	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) != '.' && hodnota.charAt(i) != ','  ){
  			if (hodnota.charAt(i)<'0'){
  			return false;
  			}
  			if (hodnota.charAt(i)>'9'){
  			return false;
  			}
			}
		}
		return true;
	} 
	
	function CheckInput(typ,val){
    if ( typ == 'number' ){
      if ( !CheckOnNumber(val) && val != '' ){
        alert('Vkládaná hodnota musí být číslo.');
        return false;
      }
    
    }
  }
	
	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';
				}
		  }
}

function CookieCreate(name,value,days) {
	if (days) {
		var date = new Date();
		date.setTime(date.getTime()+(days*24*60*60*1000));
		var expires = "; expires="+date.toGMTString();
	}
	else var expires = "";
	document.cookie = name+"="+value+expires+"; path=/";
}

function CookieRead(name) {
	var nameEQ = name + "=";
	var ca = document.cookie.split(';');
	for(var i=0;i < ca.length;i++) {
		var c = ca[i];
		while (c.charAt(0)==' ') c = c.substring(1,c.length);
		if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length);
	}
	return null;
}

function CookieErase(name) {
	CookieCreate(name,"",-1);
}



/*
function mouse_press(en) 
{ 
  // identifikace prohlížeče 
  var ver = parseInt(navigator.appVersion); 
  var browser = navigator.appName; 
  //blok příkazů pro NN 
  if (ver >= 4 & browser == "Netscape") {var tlacitko = en} ; 
  // blok příkazů pro IE 
  if (ver >= 4 & browser == "Microsoft Internet Explorer") { 
  var tlacitko = event.button 
  //převedení získaných hodnot tak, aby byly kompatibilní s NN 
//  if (tlacitko ==2) {tlacitko = 3}; 
//  if (tlacitko ==4) {tlacitko = 2}; 
  } 
  alert(tlacitko);
  /*
  if (tlacitko == 1) {alert ("Klikli jste na levé tlačítko myši")}; 
  if (tlacitko == 2) {alert ("Klikli jste na prostřední tlačítko myši")}; 
  if (tlacitko == 3) {alert ("Klikli jste na pravé tlačítko myši")};
  
  return false; 
} 
*/ 

