function top_on(id){
	var id_id=document.getElementById(id);
	if (id_id) id_id.src="gfx/nap_"+id+"_on.jpg";
}
function top_off(id){
	var id_id=document.getElementById(id);
	if (id_id) id_id.src="gfx/nap_"+id+"_off.jpg";
}
function checkDomain(form){
			
		var domena=document.getElementById(form).value; //.toLowerCase();
	    var text='The domain name is incorrect.\n Name of domain can consist exclusively of small letters, digits and the sign \"-\" only!. \n The domain name cannot begin and end with the sign \"-\" and cannot contain or use the space bar.';
	        
		var first=domena.substring(0,1);
		var last=domena.substring(domena.length-1,domena.length);
		if (domena == "" || first=="-" || last=="-"||first=="." || domena.indexOf("--")!=-1 || domena.length>63){
			alert(text);
			document.getElementById(form).focus();
		   	return false;
		}
	        
		for(i=0;i<domena.length;i++){
			var znak = domena.substring(i,i+1);
			if (znak=="-" || znak!="." && ( (znak>="0" && znak<="9") || (znak>="a" && znak<="z") || idn.indexOf(znak)>=0 )) {}
			else {
				alert(text);
				document.getElementById(form).focus();
				return false;
			}
		}
	}
	
	function ShowHide(id){
	var objectt = document.getElementById(id);
	   if (objectt) {
	   	if (objectt.style.display=='none') objectt.style.display='block';
	   	else objectt.style.display='none';
	   }
	
	}
	
	function printt(typee, zam_id, fv_id, user_id) {
	   if (typee && zam_id) {
	      strona_do_wyswietlenia = "http://www.sklepsnowboardowy.pl/print.php?type=" + typee + "&zam_id=" + zam_id + "&fv_id=" +fv_id+"&user_id=" + user_id;
	      window.open (strona_do_wyswietlenia, '','width=800, height=600, status=no,toolbar=yes,menubar=yes,location=no,resizable=yes');
	   }
	
	}
function LoadSite(site, where, param) {
	var req = mint.Request();
	req.OnSuccess = function() {
	    }
	req.OnLoading = function() {
		//$(where).innerHTML = "changing ...";
	}
	req.Send(site, where);
}

	function SendRequest(where, what, ans, loading)
	{
	    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='#FF0000';
 		
   	 	} 	
   	 	else if (this.responseText && frm_id=='country') {
   	 		document.getElementById(frm_id).style.borderColor='#B5CEE7';
   	 	}
   	 	else {
   	 		document.getElementById(frm_id).style.borderColor='#B5CEE7';
   	 	}
	    }
	    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, where); }
	    else {req.Send(site+"="+frm_id, where);}
	 }	
	 
	function setscolor(kolor) {
		document.getElementById('kolor-naklejki').value=kolor;
	}
	
	function SendRequest(where, what, ans, param, param2)
	{
	    var req = mint.Request();
	    req.OnSuccess =
	    function() {
	        $(ans).innerHTML = this.responseText;
	    }
	    req.SendForm(what, where+"?par1="+param+"&par2="+param2);
	}