// var randomImage = new Array("temp","http://www.tac-global.com/images/interiordefault/1top.jpg","http://www.tac-global.com/images/interiordefault/2top.jpg","http://www.tac-global.com/images/interiordefault/3top.jpg")
// var randomNum = Math.floor((Math.random() * 3) + 1)
// var lowergif = randomNum + "pixint"
var timerID;
var defaultsection;
var d = document;

function choosePic()
{
  document.building.src = randomImage[randomNum]
}


function chooseLow() 
{
  return (lowergif);
}


function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);


function P7_ReDoIt() { //v1.21 by PVII
 if(document.layers) {MM_reloadPage(false);}
}




function defaultsetter()
{
//This function sets a global variable equal to the section name defined in the onload event.
var args = defaultsetter.arguments;
defaultsection = args[0];
}

function menuObj(argsM)
{
//This function shows sublayer and highlights the table cell of the variable passed to it.
//If the variable is "nix", then the menu returns to the default setting declared in the onload event.
if (argsM == "nix") 
{
var defsec = defaultsection;
} else {
var defsec = argsM;
}

  for(k=0 ; k<10 ; k++)
  {
  //hides all layers and changes cell backgrounds for all types of browsers
  if(document.layers) 
  d.layers[layerarray[k]].visibility="hidden";
  
  if(document.all)
  d.all(layerarray[k]).style.visibility="hidden";

  
  if(document.getElementById){

  d.getElementById(layerarray[k]).style.visibility="hidden";
  d.getElementById(layerarray2[k]).style.background = "#CCCCCC";
  }
  }

  //shows the appropriate layer and changes appropriate cell background for all types of browsers
  if(document.layers) 
  d.layers[defsec].visibility="visible";
  
  if(document.all)
  d.all(defsec).style.visibility="visible";
  
  
  if(document.getElementById){
  d.getElementById(defsec).style.visibility="visible";
  d.getElementById(defsec + '2').style.background = "#EEEEEE";
  }
}

function stoptimer()
{
//stops the timer so that it doesn't try to go back to default when mouse is over another menu item.
  clearTimeout(timerID);
}

function starttimer()
{
//sends menu config to default after 1500 nanoseconds
  timerID = setTimeout("menuObj('nix')",1500);
}


function subhi(defsubsec)
{
//Highlights the submenu item table cells
  if(document.getElementById)
  d.getElementById(defsubsec).style.background = "#ffffff";
}

function subhiback(subsec)
{
//returns highlighted cell to normal state
  if(document.getElementById)
  d.getElementById(subsec).style.background = "#ECECEC";
}