function skryj(){
 skryjHlasku();
 prvekImDiv = document.getElementById("divimg");	
 prvekImDiv.style.visibility = 'hidden';
 
  prvekImage = document.getElementById("imgbig");	
 prvekImage.src = "../../_images/_nic.gif";

}

function ukaz(soubor) {


  skryj();
  prvekImage = document.getElementById("imgbig");	
  prvekImDiv = document.getElementById("divimg");	

 
  eval("prvekImage.src = soubor;");
  prvekImDiv.style.top = 5+document.body.scrollTop+"px";
  prvekImDiv.style.left = 5+document.body.scrollLeft+"px";
  setTimeout("prvekImDiv.style.visibility = 'visible';", 1000);
  return true; 
}


function zobrazHlasku () {
  
  	
  prvekImDiv = document.getElementById("divimg");	
  prvekZavrit = document.getElementById("zavrit");
  
  var divTop = prvekImDiv.style.top; 
  var divLeft = prvekImDiv.style.left;
  var divWidth = prvekImDiv.offsetWidth;
  var prvekWidth = prvekZavrit.offsetWidth;
  
  prvekZavrit.style.left = divWidth/2 - prvekWidth/2+"px";
  prvekZavrit.style.visibility = 'visible';
  

}

function skryjHlasku () {

  prvekZavrit = document.getElementById("zavrit");
  prvekZavrit.style.visibility = 'hidden';

}



adrprefix = "";
for(i=0; i<rootlevel; i++) {
  adrprefix += "../index.html";
}


adrprefix2 = "";
for(i=2; i<rootlevel; i++) {
  adrprefix2 += "../index.html";
}

version = 0;
browserName = navigator.appName; 
browserVersion = parseInt(navigator.appVersion); 
if (browserName == "Netscape") {
  if ((browserVersion < 3) && (navigator.userAgent.indexOf("OS/2") == 0)) version = 0;
  else {
	  if (browserVersion < 4) version = 1; 
	  else {
	    if (browserVersion == 5) version = 5; 
	    else version = 2;
	  }
  }
} 
else if (browserName == "Microsoft Internet Explorer" && browserVersion > 3) {  
	version = 3;
}


function najdi()
{
umisteni=adrprefix+'search/search.php3?q=';
cohledat=document.form1.tfSearch.value;
zbytek='&np=0&ps=20&t=&ul=&ue=&o=0&m=';
location=umisteni+cohledat+zbytek;
}

function najdie()
{
umisteni=adrprefix+'searche/search.php3?q=';
cohledat=document.form1.tfSearch.value;
zbytek='&np=0&ps=20&t=&ul=&ue=&o=0&m=';
location=umisteni+cohledat+zbytek;
}


function otevri() {
//alert (adrprefix2+"\n"+adrprefix);
  //var adresa = adrprefix+'rate.php?str='+window.location+'&tit='+document.title+'&zna='+pozn_var;
  var adresa = adrprefix2+'rate.php?str='+window.location+'&tit='+document.title+'&zna='+pozn_var;
  //var adresa = 'rate.php?str='+window.location+'&tit='+document.title+'&zna='+pozn_var;
  //var adresa = 'http://dev-vig.unicorn.cz/rate.php';
  //alert("version: "+version+"\nLocation: "+window.location+"\nTitle: "+document.title+"\nPoznamka: "+pozn_var+"\nPerfix: "+adrprefix+"\nAddress: "+adresa);
  
  if(version != 2) {
    //ratin = window.open('','','width=480,height=335');
    ratin = window.open(adresa,'','width=480,height=335');
  } else { 
    ratin = window.open('','','width=466,height=335');
    ratin.window.location = adresa;
  }
  
  //ratin.window.location = adresa;
}


function otevrie()
{
if (version!=2) {
ratin=window.open('','','width=480,height=335');}
else {ratin=window.open('','','width=466,height=335');}
var adresa=adrprefix+'ratee.php?str='+window.location+'&tit='+document.title+'&zna='+pozn_var;
ratin.window.location=adresa;
}




function OpenImage2(filename, title)
{
	wi = Math.floor(Math.random() * 1000) + 1000
	ImageWindow = window.open('', wi.toString(), 'status=no,resizable=no,menubar=no,scrollbars=no,toolbar=no')
	ImageWindow.document.write('<html><head><title>'+title+'</title></head><body leftmargin=0 topmargin=0 marginwidth=0 marginheight=0>')
	ImageWindow.document.write('<img src="'+filename+'" id="obr" name="obr" onClick=\"window.close();\" title=\"Zavøít okno\"><br>')
	ImageWindow.document.write('</body>')
	ImageWindow.document.write('<script> var obr=document.getElementById("obr");')
	ImageWindow.document.write('setTimeout("resizeTo(obr.width,obr.height+30)",200);')
	ImageWindow.document.write('</script>')
	ImageWindow.document.write('
<!-- Mirrored from vigracing.cz/_js_and_css/script.js by HTTrack Website Copier/3.x [XR&CO'2008], Tue, 30 Jun 2009 15:12:05 GMT -->
</html>')
}


function Zmena(id,name,status) {
	var img = document.getElementById(id);
	var path=img.src;
	path=path.substring(0,path.lastIndexOf('/'))+"/";
	if (status==1) 	img.src=path+name+"-mouse-over.png";
	else	img.src=path+name+".png";
}

function vypEml(jmeno, prijmeni, dom){
	eml_start = '\x6D\x61\x69\x6c\x74\x6f\x3a';
//	eml_end = '&#064;'+ dom;
	eml_end = '@'+ dom;
	eml = eml_start + jmeno + prijmeni + eml_end;
	location.href = eml;
}




function doOv(id,on) {
	var img = document.getElementById(id);
	var path=img.src;
	name=path.substring((path.lastIndexOf("/")+1),path.length);
	ext=name.substring(name.lastIndexOf("."),name.length);
	name=name.substring(0,name.lastIndexOf("."));
	path=path.substring(0,path.lastIndexOf("/"))+"/";

	if (on==1) 	img.src=path+name+"_o"+ext;
	else	{	
		name=name.substring(0,(name.length-2));
		img.src=path+name+ext;
	}
		img.style.cursor="pointer";


}

function hover(obj) {
	var dec= obj.style.textDecoration;
//	if (dec=="") dec="none";
//	if (dec=="none") dec="underline";
//	else dec="none";
//	obj.style.textDecoration=dec;
	obj.style.cursor="pointer";
}


