function windowWidth(){
	if(is_nav4){ 
		var windowW = window.innerWidth; 
	}
	if(is_ie4 || is_ie55 || is_ie5up){ 
		var windowW = document.body.clientWidth; 
	}
	if(is_gecko5up ){ 
		var windowW = window.innerWidth; 
		//var windowW = document.body.clientWidth; 
	}
	return windowW;
}

  var lastmenu="SBUMenu1";
  function commonShow(x)
  {
    if (document.all)
	{
      if (document.all[x])
	  {
        if (document.all[x].style)
	    {
	      document.all[x].style.visibility = "visible";
  	    }
      }
	}
	else
    if (document.layers)
	{
      if (document.layers[x])
	  {
        document.layers[x].visibility = "show";
	  }
      if (document.layers[x+"L"])
	  {
        document.layers[x+"L"].visibility = "show";
	  }
	}
	else
    if (document.getElementById)
	{	
      document.getElementById(x).style.visibility = "visible";
    }
  }
  function commonWidth(x)
  {
    if (document.all)
	{       
      return document.all[x].offsetWidth;
	}
	else
    if (document.layers)
	{
      if (document.layers[x])
	  {
        return document.layers[x].document.width;
	  }
      if (document.layers[x+"L"])
	  {
        return document.layers[x+"L"].document.width;
	  }
	}
	else
    if (document.getElementById)
	{
      if (document.getElementById(x))
	  {
        return document.getElementById(x).offsetWidth;
	  }
	}
  }


function commonHide(x)
  {

    if (document.all)
	{
	  if (document.all[x])
	  {
  	    if (document.all[x].style)
	    {
	      document.all[x].style.visibility = "hidden";
	    }
	  }
	}
	else
    if (document.layers)
	{
      if (document.layers[x])
	  {
        document.layers[x].visibility = "hide";
	  }
      if (document.layers[x+"L"])
	  {
          document.layers[x+"L"].visibility = "hide";
	  }
	}
	else
    if (document.getElementById)
	{
      if (document.getElementById(x))
	  {
         document.getElementById(x).style.visibility = "hidden";
	  }
    }
  }

function commonPos(x,sm_top,sm_left)
  {
    if (x == 'Company' || x == 'Products' || x == 'Services' || x == 'JDInTouch') {
		sm_top = 86;
    }
    //var offset = (commonWidth('MainMenu')-780)/2;
	var offset= (windowWidth()/2)-(780/2);
    if (document.all)
	{       
	  document.all[x].style.pixelTop = sm_top;
	  document.all[x].style.pixelLeft = offset+sm_left;
	}
	else
    if (document.layers)
	{
      if (document.layers[x])
	  {
        document.layers[x].top=sm_top;
        document.layers[x].left=offset+sm_left;
	  }
      if (document.layers[x+"L"])
	  {
        document.layers[x+"L"].top=sm_top;
        document.layers[x+"L"].left=sm_left;
	  }
	}
	else
    if (document.getElementById)
	{
      if (document.getElementById(x))
	  {
	    document.getElementById(x).style.top = sm_top;
	    document.getElementById(x).style.left = offset+sm_left;
	  }
	}
  }
  
  	function centerDims(width,height)
	{
		var left;
		var top;
		if(window.screen.availHeight > height)
			top = (window.screen.availHeight - height) / 2;
		else
			top = 0;
		if(window.screen.availWidth > width)
			left = (window.screen.availWidth - width) / 2;
		else
			left = 0;
		//alert('screenheight='+window.screen.availHeight+'\nscreenWidth='+window.screen.availWidth+'\nheight='+height+'\nwidth='+width+'\ntop='+top+'\nleft='+left);
		return 'screenX='+left+',screenY='+top+',left='+left+',top='+top;
	}
  