	function search(site_lang) 
	{
		var req = new JsHttpRequest();
		var search_string=document.getElementById("search_field").value;
		req.onreadystatechange = function()
		{
			if (req.readyState == 4)
			{
				document.getElementById("search_output").innerHTML=req.responseText;
		    	return(false);
			}
	   	}
	   	req.caching=false;
	   	document.getElementById("search_output").style.display='block';
		document.getElementById("search_output").innerHTML='<img width=16 height=16 src="/i/img/littleloader.gif">';
	   	req.open("POST",'/search.php',true);
	   	req.send({search_string:search_string,site_lang:site_lang});
	   	return false;
	}
	
	function change_preview(img_path)
	{
		var x=document.getElementById("last_projects_img");
		var img1=img_path+'previews/InstaForex.jpg';
		var img2=img_path+'previews/MT5.jpg';
		var img3=img_path+'previews/InstaQuote.jpg';
		var img4=img_path+'previews/Raufr.jpg';
		if (x.src==img1)
		{	
			x.src=img2;
			gE('last_projects_alt').title	=	last_projects_alt_mt5;
		}
		else if(x.src==img2)
		{
			x.src=img3;
			gE('last_projects_alt').title	=	last_projects_alt_instaquotes;
		}
		else if(x.src==img3)
		{
			x.src=img4;
			gE('last_projects_alt').title	=	last_projects_alt_raufr;
		}
		else
		{
			x.src=img1;
			gE('last_projects_alt').title	=	last_projects_alt_insta;
		}
		return false;
	}
	
	function preload_images(img_path)
	{
		pic1		= 	new Image(364,197);
  		pic1.src	=	img_path+"previews/InstaForex.jpg";
  		pic2		= 	new Image(364,197);
  		pic2.src	=	img_path+"previews/MT5.jpg";
	}
