//--------------------------------------------------------------------------
var bw = verifyCompatibleBrowser();
init = function(){
	startlist()
}
window.onload=init;

function startlist() {
  var str = '';
  //for ie only
	if (document.all&&document.getElementById) {
		navRoot = document.getElementById("nav");
		arLi = document.getElementsByTagName('LI')
		
	  	for (i=0; i<arLi.length; i++) {
	  	  node = arLi[i];
	  	  
	  	  var tmpid = (arLi[i].id)?arLi[i].id:'null';
	  	  
	  	  node.onmouseover=function() {
 				  var targ;
 				  var testE = e
	        if (!e) var e = window.event;
	        if (e.target) targ = e.target;
	        if (e.srcElement) targ = e.srcElement;
	        if (targ.nodeType == 3) // defeat Safari bug
   	      	targ = targ.parentNode;
   	      
   	      var targ = (targ.tagName=='A')?targ.parentNode:targ;
   	      
          var shim = targ.getElementsByTagName('IFRAME').item(0);           var childUL = targ.getElementsByTagName('UL').item(0);          
          if(shim && childUL){            shim.style.height = childUL.offsetHeight;            shim.style.width = childUL.offsetWidth;
          }
          this.className+=" over";          
				}
				
	  	  node.onmouseout=function() {
				  this.className=this.className.replace(" over", "");
				  
				  //var targ;
	        //if (!e) var e = window.event;
	        //if (e.target) targ = e.target;
	        //if (e.srcElement) targ = e.srcElement;
	        //if (targ.nodeType == 3) // defeat Safari bug
   	      //	targ = targ.parentNode;
   	      //   	      
   	      //if(targ.id) {
   	      //  var iframes = targ.getElementsByTagName('IFRAME');
   	      //  var childUL = targ.getElementsByTagName('UL').item(0)
   	      //}
 	        //if(iframes && iframes.length==1 && childUL) iframes.item(0).style.display = 'none';   	      
 	        
				}
	  	}
	}
}
function verifyCompatibleBrowser()
{
    this.ver=navigator.appVersion;
    this.dom=document.getElementById?1:0;
    this.ie6=(this.ver.indexOf("MSIE 6")>-1 && this.dom)?1:0; 
    this.ie5=(this.ver.indexOf("MSIE 5")>-1 && this.dom)?1:0; 
    this.ie4=(document.all && !this.dom)?1:0; 
    this.ns5=(this.dom && parseInt(this.ver) >= 5) ?1:0; 
    this.Mac=(navigator.platform.indexOf("MacPPC")>-1)?1:0;
    this.PC=(navigator.platform.indexOf("Win")>-1)?1:0;
    this.ns4=(document.layers && !this.dom)?1:0;
    this.bw=(this.ie5 || this.ie4 || this.ns4 || this.ns5);
    return this;
} 

function getShim(targ){  var shim = targ.getElementsByTagName('IFRAME').item(0);  var childUL = targ.getElementsByTagName('UL').item(0);  
  if(shim && childUL) shim.style.height = childUL.offsetHeight;
  
  if(targ.id) var iframes = document.getElementById(targ.id).getElementsByTagName('IFRAME');
  if(iframes && iframes.length==1) iframes.item(0).style.display = 'block';}

function getelementposition(which,what)
{
      var temp = (what)?what:document.getElementById(which);
      coords = new Array();
      var x = 0;
      var y = 0;
      var yoff = temp.offsetHeight;
      var xoff = temp.offsetWidth;
      if(temp && typeof temp.offsetParent != 'undefined')
      {
        
        while(temp && typeof temp.offsetLeft == 'number')
        {
        x += temp.offsetLeft;
        temp = temp.offsetParent;
        }
        
        var temp = (what)?what:document.getElementById(which);
        while(temp && typeof temp.offsetTop == 'number')
        {
          y += temp.offsetTop;
          temp = temp.offsetParent;
        }
      }
      
      coords.xoff = xoff
      coords.yoff = yoff
      coords.x = x
      coords.y = y
      //alert('coords.xoff: ' + coords.xoff + ' - coords.xoff: ' +coords.yoff+ ' - coords.x: '+coords.x+' - coords.y: '+coords.y+' ')
      return coords;
}
