	function LoadSite(site, where) {
		//alert (site);
   	 var req = mint.Request();
   	 req.OnSuccess = function() {
	           
	    }
	    req.OnLoading = function() {
	    	//$(where).innerHTML = "checking ...";
	    	//document.getElementById(frm_id).disabled = true;
	    }
	    req.Send(site, where);
	 }	
	 
	function SendRequest(where, what, ans)
	{
	    var req = mint.Request();
	    req.OnSuccess =
	    function() {
	        $(ans).innerHTML = this.responseText;
	    }
	    req.OnLoading = function() {
	    	if (loading) {
	         document.getElementById(loading).style.display='block';
	          SetOpacity("searchMenuload", 50);
	   	 }
	    }
	    req.SendForm(what, where);
	}
	
	function CheckForm(site, where, frm_id) {
   	 var req = mint.Request();
   	 req.OnSuccess = function() {
   	 	document.getElementById(frm_id).disabled = false;
   	 	if (this.responseText && frm_id!='country') {
    	 		document.getElementById(frm_id).style.borderColor='#AC5D28';
 		
   	 	} 	
   	 	else if (this.responseText && frm_id=='country') {
   	 		document.getElementById(frm_id).style.borderColor='#B6BC86';
   	 	}
   	 	else {
   	 		document.getElementById(frm_id).style.borderColor='#B6BC86';
   	 	}
	    }
	    req.OnLoading = function() {
	    	$(where).innerHTML = "checking ...";
	    	document.getElementById(frm_id).disabled = true;
	    }
	    if (frm_id=='cpass') {req.Send(site+"="+frm_id+"&data2="+document.getElementById('pass').value, where);}
	    else if (frm_id=='username' || frm_id=='email') {req.Send(site+"="+frm_id+"&dbase="+document.getElementById('RegisterAs').value, where); }
	    else {req.Send(site+"="+frm_id, where);}
	 }

	 function SearchResult(pustka) {
	   var browserName=navigator.appName; 
	   if (browserName!="Microsoft Internet Explorer") site_to_show ="pl/oferty/";
	   else if (pustka=='on') site_to_show='';
	   else site_to_show='pl/oferty/';
	   var country = document.getElementById('ser_country').value;
	   var county = document.getElementById('ser_county').value;
	   if (document.getElementById('ser_town')) var town = document.getElementById('ser_town').value; else town ='none';
	   var category = document.getElementById('ser_category').value;
	   var subcategory = document.getElementById('ser_subcategory').value;
	   if (country!='none') {
	   	site_to_show += country;
	   	if (county!='none') {
	   		site_to_show += ","+county;
	   			   		
	   		if (town!='none') site_to_show += ","+town;
	   	}
	   }
	   if (category!='none') {
	   	site_to_show += "/"+category;
	   	if (subcategory!='none') site_to_show += ","+subcategory;
	   }
	   top.location.href=site_to_show;  
	 } 


function SearchResult1(pustka) {
	   var browserName=navigator.appName; 
	   if (browserName!="Microsoft Internet Explorer") site_to_show ="items/";
	   else if (pustka=='on') site_to_show='';
	   else site_to_show='items/';
	   var country = document.getElementById('ser_country').value;
	   var county = document.getElementById('ser_county').value;
	   if (document.getElementById('ser_town')) var town = document.getElementById('ser_town').value; else town ='none';
	   var category = document.getElementById('ser_category').value;
	   var subcategory = document.getElementById('ser_subcategory').value;
	   if (country!='none') {
	   	site_to_show += country;
	   	if (county!='none') {
	   		site_to_show += ","+county;
	   			   		
	   		if (town!='none') site_to_show += ","+town;
	   	}
	   }
	   if (category!='none') {
	   	site_to_show += "/"+category;
	   	if (subcategory!='none') site_to_show += ","+subcategory;
	   }
	   top.location.href=site_to_show;  
	 }
function ShowFoto (zdjecie, linke) {
	document.getElementById('link').href = linke;
	document.getElementById('fotka').src = zdjecie;

}
