	function gE(el){
    return document.getElementById(el);
  }
  
  function hit(i,path,tbl){
      cspath=path+"c.php";
      if (i){
        obj_obr=new Image;
        obj_obr.src=""+cspath+"?i="+i+"&t="+tbl+"&r="+Math.random();
      }
      for (x=0;x<100000;x++){}
      return true;
  }
  
  function CheckOnNumber(hodnota)					//kontrola zda je hodnota ciselna
	{
		if (hodnota==""){
		return false;
		}
		for (i=0;i<hodnota.length;i++){
			if (hodnota.charAt(i)<'0'){
			return false;
			}
			if (hodnota.charAt(i)>'9'){
			return false;
			}
		}
		return true;
	} 
	
	function CheckOnEmail(email)
	{
		invalidChars='/:,;ì¹èø¾ýáíéúù';			//vytvoreni promene se znaky ktere se nesmeji v adrese objevit
		for (i=0;i<invalidChars.length;i++){	//smicka proveruje zda se jeden ze znaku nevyskytuje v adrese
			badChar=invalidChars.charAt(i)
				if (email.indexOf(badChar,0)>-1){
				return false;
				}
		}
		atPos = email.indexOf('@',1)
		if (atPos==-1){
		return false;
		}
		if (email.indexOf('@',atPos+1)>-1){		//od mista nalezu prvniho @ se pokousime hledat @ (dva nelze)
		return false;
		}
		periodPos=email.indexOf('.',atPos)
		if (periodPos==-1){
		return false;
		}
		if (periodPos+3>email.length){
		return false;
		}
		return true;
	}
	

      function ov_mn(id){
        document.getElementById(id).className = 'menu_over';
      }
      function ou_mn(id,trida){
        document.getElementById(id).className = trida;
      }
      
      function men(m1,m2){
        document.getElementById(m1).style.display='block';
        document.getElementById(m2).style.display='none';
        
      }

	
function AlertStay(){
  clearInterval(BD);
}
	
function AlertCheck(){
	if ( gE('alert') ){
		BD=window.setTimeout("AlertOff('100')",4000);
	}
}

function AlertOff(opc){
  clearInterval(BD);
		var ie5=(document.getElementById && document.all);
		var ns6=(document.getElementById && !document.all);
		nPlus = 20   //the % of fading for each step
		speed = 50  //the speed
		    if(document.getElementById){
		       imgs = gE('alert');
				opacity = opc-nPlus;
				opc = opacity;
				
		    	if(opacity>-30){
					if(ie5){
				        imgs.style.filter="alpha(opacity=0)";
						imgs.filters.alpha.opacity = opacity;
					}
					
					if(ns6){
		        		imgs.style.MozOpacity = 0;
						imgs.style.MozOpacity = opacity/100;
		    		}
					tmr=setTimeout('AlertOff('+opc+')',speed);
		    	}else{
					clearInterval(tmr);
					gE('alert').style.display='none';
				}
		  }
}

