var agent = window.navigator.userAgent;
var classAttr = agent.indexOf("IE")!=-1?"className":"class";

function menuLeft()
{
var classAttr = agent.indexOf("IE")!=-1?"className":"class";
if (document.getElementById("leftnav")!=null)
 { 
 var leftnavnode = document.getElementById("leftnav").getElementsByTagName("UL").item(0); //<UL> element
 for (i=0; i<leftnavnode.getElementsByTagName("LI").length; i++)
  {
  node = leftnavnode.getElementsByTagName("LI").item(i); 
  if  ( node.getAttribute(classAttr)=="current" && node.parentNode.parentNode.tagName.toUpperCase()=="LI")
  	{ 
	var parentnode = node.parentNode.parentNode;
	parentnode.setAttribute(classAttr, "current hassub");
  	}
  }
 }
}

function menuTop()
{
//var agent = window.navigator.userAgent;
//alert(agent);
//var classAttr = agent.indexOf("IE")!=-1?"className":"class";
if ((agent.indexOf("Mac OS")!=-1 || agent.indexOf("Safari")!=-1) && document.getElementById("nav")!=null)
	{
	var navRoot = document.getElementById("nav").getElementsByTagName("UL").item(0);
	for (i=0; i<navRoot.childNodes.length; i++)
    {
      node = navRoot.childNodes[i];
      if (node.nodeName=="LI" && node.getElementsByTagName("UL").length>0)
      {
        node.getElementsByTagName("UL").item(0).setAttribute("style", "top: 27px;");
      }
     }
     var tblcontent = document.getElementById("tblcontent");
     //if ( tblcontent != null )  tblcontent.style.tableLayout = "auto"; //zachem-to bylo nado?

	}

if (agent.indexOf("IE 7")!=-1 && document.getElementById("nav")!=null)
	{
	var navRoot = document.getElementById("nav").getElementsByTagName("UL").item(0);
	for (i=0; i<navRoot.childNodes.length; i++)
    {
      node = navRoot.childNodes[i];
      if (node.nodeName=="LI" && node.getElementsByTagName("UL"))
      {
        node.onmouseover = function()
        {
          //this.className+= "over";  //09/09: No need in this in IE7!
          this.getElementsByTagName("UL").item(0).style.top="30px"; /*fix drop down lisp position*/  
        }
        node.onmouseout = function()
        {
        //this.className = this.className.replace("over", ""); // 09/09: No need in this in IE7!
        }
       }
      }
     }
}


//Replace html for @mail addrss
function address(adr) 
    {
    adr=adr.replace(/[0-9]+[a-z]*/, "");
    var str="<a href=";
    var att = "&#";
    str+="'mail";
    att +="064;";
    str=str+"to"+":"+adr+att+"intransa."+"com";
    str+="'>"+adr+att+"intransa."+"com</a>";
    document.write(str);
    }
    
// generate e m a i l addr from any d o m a i n
function address2(adr, domn) 
    {
    var str="<a href=";
    var att = "&#";
    str+="'mail";
    att +="064;";
    str=str+"to"+":"+adr+att+domn;
    str+="'>"+adr+att+domn+"</a>";
    document.write(str);
    }
    
    
var contact_window="";    
function openContact(url)
{
var win_settings = "width=350,height=400,left=100,top=110,screenX=100,screenY=110, location=no, menubar=no, toolbar=no";
if (contact_window!="" && contact_window!=null && !contact_window.closed) 
{ contact_window.blur(); contact_window.focus(); } 
else
{ contact_window=window.open(url,'Contact', win_settings); }

if (window.focus) {contact_window.focus(); }
return false;
}

var signup_window="";
function openSignUp(url)
{
var win_settings = "width=370,height=400,left=100,top=110,screenX=100,screenY=110, location=no, menubar=no, toolbar=no";
if (signup_window!="" && signup_window!=null && !signup_window.closed) 
{ signup_window.blur(); signup_window.focus(); } 
else
{ signup_window=window.open(url,'Sign-up', win_settings); }

if (window.focus) {signup_window.focus(); }
return false;
}

var diskreq_window="";
function openDiskReq(url)
{
var win_settings = "width=390,height=670,left=100,top=110,screenX=100,screenY=110, location=no, menubar=no, toolbar=no";
if (diskreq_window!="" && diskreq_window!=null && !diskreq_window.closed) 
{ diskreq_window.blur(); diskreq_window.focus(); } 
else
{ diskreq_window=window.open(url,'Free DVD Request', win_settings); }

if (window.focus) {diskreq_window.focus(); }
return false;
}

function DisplayCurrent (obj)
{ //alert(document.getElementById(inner_anchor+"_link").tagName);
divlist = document.getElementById("content1").getElementsByTagName("DIV");
lilist = document.getElementById("subnav").getElementsByTagName("LI");

for (i=0; i<divlist.length; i++)
	{
	id = divlist.item(i).getAttribute("id");
	if ( id != "subnav") divlist.item(i).setAttribute(classAttr, "nonedisplay");
	}
for (i=0; i<lilist.length; i++)
	{
	lilist.item(i).setAttribute(classAttr, "");
	}
currid  = obj.getAttribute("id").replace("_link", "");
document.getElementById(currid).setAttribute(classAttr, "blockdisplay");
obj.setAttribute(classAttr, "current"); //alert(obj.getAttribute(classAttr) );

}

function DisplayFirst()
{
objfirst = document.getElementById("subnav").getElementsByTagName("LI").item(0);
//alert(objfirst.getAttribute(classAttr) );
DisplayCurrent (objfirst);
}

