/*function NovaOkno(co,xwidth,yheight) 
{
 xx = screen.width/2 - xwidth/2;
 yy = screen.availHeight/2 - yheight/2;
 var xdist = 0;
 var ydist = 0;
 if (document.all)
 {
  var xdist = 10;
  var ydist = 29;
 }
 else
 {
  var xdist = 24;
  var ydist = 29;
 }
 var a = window.open("","new","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=auto,left="+xx+",top="+yy+",resizable=no,width="+(xwidth+xdist)+",height="+(yheight+ydist));
 a.resizeTo(xwidth+xdist,yheight+ydist);
 a.document.clear();
 a.document.open("text/html");
 a.document.writeln('<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">');
 a.document.writeln('<html><head><title>Velký obrázek</title></head>');
 a.document.writeln('<body style="margin:0px;background-color:#ffffff;">');
 a.document.writeln('<script language="JavaScript" type="text/javascript"> this.focus(); </script>');
 a.document.writeln('<div style="position:absolute;top:'+(yheight-31)+';left:'+(xwidth-72)+';" id="nahravam"><img src="/obchod/images/nahravam.gif" width="72" height="31" border="0" alt=""></div>');

 a.document.writeln('<script language="JavaScript" type="text/javascript">');
 a.document.writeln(' <!-- ');
 a.document.writeln(' function makeObj(obj)');
 a.document.writeln(' {');
 a.document.writeln('   var dom = document.getElementById?1:0');
 a.document.writeln('   if (dom) this.css = document.getElementById(obj).style');
 a.document.writeln('   else if (document.all && !dom) this.css =  document.all[obj].style;');
 a.document.writeln('   else if (document.layers && !dom) this.css =  document.layers[obj];');
 a.document.writeln('   else return false;');
 a.document.writeln(' }');
 a.document.writeln(' var pNahravam = new makeObj("nahravam")');
 a.document.writeln(' // --> ');
 a.document.writeln('</script>');

 a.document.writeln('<a href="#" onclick="window.close();"><img src="'+co+'" width="'+xwidth+'" height="'+yheight+'" onLoad="pNahravam.css.visibility = \'hidden\'" border="0" alt=""></a>');
 a.document.writeln('</body>');
 a.document.writeln('</html>');
 a.document.close();
 return a;
}*/
function VelkyObr(OBR)
{
var URL="/BigPicture.aspx?obr="+OBR
var w=550
var h=560
var vlastnosti
var jmeno
if(screen.width){
var winl = (screen.width-w)/2;
var wint = (screen.height-h)/2;
}else{winl = 0;wint =0;}
if (winl < 0) winl = 0;
if (wint < 0) wint = 0;
var vlastnosti1 = 'height=' + h + ',';
vlastnosti1 += 'width=' + w + ',';
vlastnosti1 += 'top=' + wint + ',';
vlastnosti1 += 'left=' + winl + ',';
vlastnosti1 += vlastnosti;
window.open(URL,jmeno,vlastnosti1);
}
function Dotaz(OBR)
{
var URL=OBR
var w=250
var h=210
var vlastnosti
var jmeno
if(screen.width){
var winl = (screen.width-w)/2;
var wint = (screen.height-h)/2;
}else{winl = 0;wint =0;}
if (winl < 0) winl = 0;
if (wint < 0) wint = 0;
var vlastnosti1 = 'height=' + h + ',';
vlastnosti1 += 'width=' + w + ',';
vlastnosti1 += 'top=' + wint + ',';
vlastnosti1 += 'left=' + winl + ',';
vlastnosti1 += vlastnosti;
window.open(URL,jmeno,vlastnosti1);
}

function TabPageClick(oBtn){
         aNameParts = oBtn.id.split('_');
	 iBtnClickedIndex = parseInt( aNameParts[2] );        
	 if( oBtn.className == "active" ){ return true;
	 }
  	 oBtn.className = "active";
	 
	 for(i=1;  i <= 5; i++ ){
	     if(i == iBtnClickedIndex ){  
		    document.getElementById("uiTabPageDiv_"+ aNameParts[1] +"_"+ iBtnClickedIndex).style.display="block"; // show the clicked layer
			continue;
		 }
		 
		 oBtn = document.getElementById("uiTabControl_"+ aNameParts[1] +"_"+ i);
		 if(oBtn){
		    document.getElementById("uiTabPageDiv_"+ aNameParts[1] +"_"+ i).style.display="none";
		    oBtn.className = "navUnselected";
		 }else{
		 	break;
		 }
	 }
}
function PopupWin(url,w,h){

window.open(url, "external", "width=" + w +",height=" + h + ",resizable=yes,scrollbars=yes,status=no,location=no,toolbar=no,menubar=no");
}



function showHide(id)
{
  el=document.getElementById(id).style;
  el.display=(el.display == 'block')?'none':'block';
}

function showAll()
{
  for (var i=1;i<12;i++)
  {     
    el=document.getElementById('tab'+i).style;
    el.display = 'block';
  }
}

function hideAll()
{
  for (var i=1;i<12;i++)
  { 
    el=document.getElementById('tab'+i).style;
    el.display = 'none';
  }
}
