rnd_comp_length=2;/*устанавливаешь длинну массива, т.е. сколько цветов будет*/ colors_= new Array(rnd_comp_length); 
colors_[0] = "#606060"; 
colors_[1] = "#84A53C"; 
var next_ = 0; 


	function strpos(haystack, needle, offset)
	{
	    var i = haystack.indexOf( needle, offset );
	    return i >= 0 ? i : false;
	}

	function jmail(obj)
	{	
		jQuery('#jmail_button').attr('src','/img/jmail_wait.gif');	
		//var temp=decodeURIComponent(jQuery('#jmailform').serialize());
		var temp=jQuery('#jmailform').serialize();
		//alert(temp);
		//jQuery.ajax({url:'/ajax/jmail.php',type:'post',data:temp,success:function(res){SetJmailInfo(res)}}); 
      		jQuery('#opera_gori_v_adu').load('/ajax/jmail.php?'+temp,function(res){SetJmailInfo(res)});
      	}
      	
	function SetJmailInfo(res)
	{	
		jQuery('#jmail_button').attr('src','/img/jmail.gif');	
		jQuery('#jqmail_info').html(res);	
		jQuery('#jqmail_info').fadeIn('slow').delay(5000).fadeOut('slow');		        jQuery('#imd_kcaptcha').attr('src','kcaptcha'+Math.round((Math.random() * (100 - 1))));
		if(res=='<div style="color:green">Сообщение отправлено</div>') 	
		{       
			jQuery("#jmailform input[name],#jmailform input[company],#jmailform input[phone],#jmailform input[email],#jmailform input[adress],#jmailform input[fax],#jmailform input[sec_code],#jmailform textarea[text]").val('');
			jQuery('#jmailform textarea[text]').html('');
			jQuery('#jmailform textarea').val('');
		}
	}
	
	function HideJmailInfo()
	{	
			jQuery('#jqmail_info').fadeOut('slow');
	}
