

function mlang(lg){
   	var _ajax = new ajax.ContentLoader('ajax.php?lang='+lg,
	   	function(){
	   		location.reload();
	    });
}
function ffind(){
	document.getElementById('ffi').submit()
}
function cont_send(){
	document.getElementById('theForm').submit()
}
var cc= new Array();
function cl(id,name){
	if(!cc[id]){
		document.getElementById(name).value='';
		cc[id]=1;
	}
}
function sen_mess(){
	var fname=document.getElementById('fname').value;
	var femail=document.getElementById('femail').value;
	var fmess=document.getElementById('fmness').value;

	if(fname && fmess){
		var _ajax = new ajax.ContentLoader('ajax.php?fname='+fname+'&femail='+femail+'&fmess='+fmess,
		   	function(){
		   		alert('Собощение отослано!')
		   		location.reload();
		    });
	} else {
		alert('Поля Имя и Сообщение обязательны для заполнения!');
	}
}

function back_prod(){
	
	$('#cheng_cont').fadeOut('slow',function(){
		jQuery.post('ajax.php', {
	        	"load_prod": 12
			},function(a){
				$('#cheng_cont').html(a);
				$('#cheng_cont').fadeIn('slow');
			});
	});
	
	
	return false;
}


function big_prod(id){
	
	$('#cheng_cont').fadeOut('slow',function(){
		jQuery.post('ajax.php', {
	        	"id_big": id
			},function(a){
				$('#cheng_cont').html(a);
				$('#cheng_cont').fadeIn('slow');
			});
	});
	
	
	return false;
}

function next(id){
	//alert($('.window_content_step'+id).css('height'));
	$('#cheng_cont').fadeOut('slow',function(){
		jQuery.post('ajax.php', {
	        	"id_step": id
			},function(a){
				$('#cheng_cont').html(a);
				$('#cheng_cont').fadeIn('slow');
			});
	});
	
	
	return false;
}

function next_logia(p){
	//alert($('.window_content_step'+id).css('height'));
	
	$('#cheng_cont').fadeOut('slow',function(){
		jQuery.post('ajax.php', {
	        	"next_logia": p
			},function(a){
				$('#cheng_cont').html(a);
				$('#cheng_cont').fadeIn('slow');
			});
	});
	
	
	return false;
}
function sendMess(){
	var name=$('#name').attr('value');
	var site=$('#site').attr('value');
	var otrasl=$('#otrasl').attr('value');
	var kls=$('#kls').attr('value');
	var contl=$('#contl').attr('value');
	var tel=$('#tel').attr('value');
	var email=$('#email').attr('value');
	var info=$('#info').attr('value');
	if(name && site && otrasl && kls && contl && tel && email && info){
		$('.window_content_quetions').fadeOut('slow',function(){
			jQuery.post('ajax.php', {
		        	"send": 'mail',
		        	"name": name,
		        	"site": site,
		        	"otrasl": otrasl,
		        	"kls": kls,
		        	"contl": contl,
		        	"tel": tel,
		        	"email": email,
		        	"info": info,
				},function(a){
					$('.window_content_quetions').html(a);
					$('.window_content_quetions').fadeIn('slow');
				});
		});
	} else alert('все поля обязательны для заполнения!!!');
	
	return false;
}


/*
jQuery(document).ready(function() {
	$('#hz').click(function(){
    	alert('dd');
    	return false;
	});
});
*/