function popAdmin(url)
{
	var 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');
}

		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}
		}

	var DHTML = (document.getElementById || document.all || document.layers);

		function ocSitemap(site_element, img_site_element) {
			if (!DHTML) return;
			var siteE = new getObj(site_element);
			siteE.style.visibility = (siteE.style.visibility=='visible' ? 'hidden' : 'visible');
			siteE.style.display = (siteE.style.display=='block' ? 'none' : 'block');

			var siteIMG = new getObj(img_site_element);
			
			siteIMG.obj.src = (siteIMG.obj.src.indexOf('pluss')>0 ? 'http://artun.cma.ee/gfx/miinus.gif' : 'http://artun.cma.ee/gfx/pluss.gif');
		}
		function getObj(name)
		{
			if (document.getElementById)
			{
				this.obj = document.getElementById(name);
				this.style = document.getElementById(name).style;
			}
			else if (document.all)
			{
				this.obj = document.all[name];
				this.style = document.all[name].style;
			}
			else if (document.layers)
			{
				this.obj = document.layers[name];
				this.style = document.layers[name];
			}
		}

function importScript(sname)
{
	var line = "<script type='text/javascript' src='" 
		+ sname
		+ "'";	
		document.write(line + "></script" + ">");
}

importScript("js/floatMenu.js");
importScript("js/imageSlide.js");