function selcol(ob){
col=document.getElementById(ob.id).style.color;
if (col!="gray"){
 document.getElementById(ob.id).style.color="gray";
}
else{
 if ((ob.id=="t1")||(ob.id=="t2"))
  document.getElementById(ob.id).style.color="#e87b14";
 else
  document.getElementById(ob.id).style.color="white";
}
}

function newwin(sn,x,y){
 x=x+20;
 y=y+20;
 window.open(sn,'','toolbar=no,location=no,directories=no,status=no,scrollbars=no,copyhistory=no,width='+x+',height='+y);
}

function newwinscroll(sn,x,y){
 x=x+20;
 y=y+20;
 window.open(sn,'','toolbar=no,location=no,directories=no,status=no,scrollbars=yes,copyhistory=no,width='+x+',height='+y);
}

function winpict(sn,x,y){
 x=x+30;
 y=y+70;
 prg='../detwin.php?img='+sn+'&x='+x+'&y='+y;
 window.open(prg,'Detail','toolbar=no,location=no,directories=no,status=no,scrollbars=no,copyhistory=no,width='+x+',height='+y);
}

function closewin(){
 window.close();
}

function lista(){
 if (screen.width<801){
  document.getElementById("dl").outerHTML="";
 }else{
  document.getElementById("dl").width=document.body.clientWidth;
  document.getElementById("dl").style.top=parent.document.body.clientHeight-24;
 }
}

function listamenu(){
try {	
 if (screen.width<801){
  parent.menu.document.getElementById("dlm").outerHTML="<span id=\"dlm\"></span>";
 }else{
  parent.menu.document.getElementById("dlm").width=150;
  parent.menu.document.getElementById("dlm").style.top=parent.document.body.clientHeight-24;
 }
}
catch (e) {
}
}

function mlistaoff(){
try {
 if (screen.width<801){
  parent.menu.document.getElementById("dlm").outerHTML="<span id=\"dlm\"></span>";
 }else{ 
  parent.menu.document.getElementById("dlm").outerHTML="<table border=\"0\" height=\"0\" id=\"dlm\" class=\"lista\"><tr><td></td></tr></table>";
 }
}
catch (e) {
}
}

function mlistaon(){
try {
 if (screen.width<801){
  parent.menu.document.getElementById("dlm").outerHTML="<span id=\"dlm\"></span>";
 }else{ 
  parent.menu.document.getElementById("dlm").outerHTML="<table border=\"0\" cellpadding=\"0\" cellpadding=\"0\" background=\"obr/bgmenud1.gif\" width=100% height=24 id=\"dlm\" class=\"lista\"><tr><td></td></tr></table>";
  listamenu();
 }
}
catch (e) {
}
}

function tluvod(){
try {
 if (parent.tx.document.title=="VV VOCH s.r.o. úvodní strana") parent.menu.document.getElementById("zpet").style.visibility="hidden";
 else parent.menu.document.getElementById("zpet").style.visibility="visible";
}
catch (e) {
}
}

function cticookie(jm){
poz=0;
hledat=jm+"=";
delka=hledat.length;
cookiedelka=document.cookie.length;
while(poz<cookiedelka){
konec=poz+delka;
if (document.cookie.substring(poz,konec)==hledat){
konecretezce=document.cookie.indexOf(";",konec);
if (konecretezce==-1) konecretezce=document.cookie.length;
vysledek=unescape(document.cookie.substring(konec,konecretezce));
return(vysledek);}
poz=document.cookie.indexOf(" ",poz)+1;
if (poz==0) break;}
return("");
}
