function popAdmin(url)
{
	win=window.open(url, 'winname', 'scrollbars=1,status=0, location=0, resizable=1, menubar=0, directories=0, toolbar=0, width=700,height=550, top=10, left=10');
}
var win=null;
window.name="site";

		function opengal(laius,korgus,id,pid,kus,table,lang){
			var laius = '500';
			var korgus = '400';
			var kyssa=window.open('/gal.php?lang='+lang+'&pid='+pid+'&id='+id+'&kus='+kus+'&table='+table+'&did=<?=$did?>&path=<?=$path?>&width='+laius+'&height='+korgus,'','scrollbars=yes,width='+laius+',height='+korgus+',resizable=yes,top=10,left=10');	
		}		
		function nothing(){
			return;
		}	

		function checknum(val) /*forms*/
		{
			temp_val=val.split("");
			_exp = new RegExp(/\d/);
			_exp2 = new RegExp(/,/);
			_exp3 = new RegExp(/\./);
			ret_str='';
			for(i=0;i<temp_val.length;i++)
			{
				temp=_exp.test(temp_val[i]);
				temp2=_exp2.test(temp_val[i]);
				temp3=_exp3.test(temp_val[i]);
				if(temp || temp2 || temp3 || temp_val[i]==' ') 
				{
					ret_str+=temp_val[i];
				}

			}
			return ret_str;
		}


function popWin(url,he,wi){
		if(he<=0)he = '300';
		if(wi<=0)wi = '300';
		
		var kyssa=window.open(url,'','scrollbars=yes,width='+wi+',height='+he+',resizable=yes,top=10,left=10');	
}

	function myHide(useDiv){
		 if (document.getElementById) {
				eval("document.getElementById(useDiv).style.visibility = \"hidden\"");
			  } else {
				if (document.layers) {
					document.layers[useDiv].visibility = 'hidden';
				} else {
				  if (document.all) {
					eval("document.all."+useDiv+".style.visibility = \"hidden\"");
				  }
				}
			  }
		}

		function myShow(useDiv)
		{
			 if (document.getElementById) {
				eval("document.getElementById(useDiv).style.visibility = \"visible\"");
			  } else {
				if (document.layers) {
					document.layers[useDiv].visibility = 'show';
				} else {
				  if (document.all) {
					eval("document.all."+useDiv+".style.visibility = \"visible\"");
				  }
				}
			  }

		}

		function confirmation2(url,txt)
		{
			input_box=confirm(txt);
			if (input_box==true){ document.location=url}
		}

		function sendMail(name, domain){
			win = window.open("mailto:" + name + "@" + domain,'emailWindow'); 
				if (win && win.open &&!win.closed) win.close(); 
		 

			
		}
