// We would have used javascript loading to bring in the js files
// as with the css ones, but this technique fails with IE5 which 
// is still used on the Mac.

function eqCellHeights()
{
	equCellHeight(1,'head-left1','',6,'head-left2','div',6,'head-mid','',6,'head-right','P',6);
	equCellHeight(2,'content-left','',2,'content-right','',2);	
}
function roundCells()
{
	if(!roundSniff())
		return;
	Round ("body","rgb(195,185,130)","#b56123","large aa",2,"#630","top")
	Round(".roundwrapperb","#fff","#fd8","medium",0,"","tl br");
}

// displays a file whose name is the same as the cell id in that cell
function displayIds()
{
	if (!aFrameSniff()) return;
	putIdInEmptyCell(".cell-idfilewrap")
}

function initMenus()
{
	setupChainmenu ('siteinfotrig', 'siteinfomenu', 1, 'amid');
	
	setupChainmenu ('hplantrig', 'hplanmenu', 1, 'downc');
		setupChainmenu ('plandetailtrig', 'plandetailmenu', 2, 'right');
	setupChainmenu ('ordertrig', 'buymenu', 1, 'downc');
	setupChainmenu ('supporttrig', 'supportmenu', 1, 'downc');
		setupChainmenu ('doctrig', 'docmenu', 2, 'right');
		setupChainmenu ('linktrig', 'linkmenu', 2, 'right');
	setupChainmenu ('compInfotrig', 'compInfomenu', 1, 'downc');
		setupChainmenu ('arjayenttrig', 'arjayentmenu', 2, 'right');
			setupChainmenu ('webservtrig', 'webservmenu', 3, 'right');
	
	setupChainmenu ('tech', 'contentMU', -1, 'drop');
	setupChainmenu ('newstrig', 'condviswrapper', -1, 'drop');
}

function makeaFrames()
{
	if (!aFrameSniff()) return;
	aFrame("contentMU","customertech.html")
	attachLinks2aFrame (".navnorm,navtmenu,navsmenu", "content-main");
	loadaFrameByLoc ("content-main", "defcontents.html",initAFrames)
}

// this procedure is called by the callback function after a successful load of a new page per the setup above
function initAFrames ()
{
	attachLinks2aFrame ("#content-main a.navnorm,navmore", "content-main");
	window.scrollTo (0,0);  // need this to ensure we always start at the top of the page again
	Round(".roundwrapperp","#fff","#fd8","medium",0,"","all");
	//debug ("here2");
	condShowHide ('newstrigB', 'condviswrapper');
	condShowHide ('!newstrigB', 'newstrig');
	condShowHide ('!newstrigB', 'newsgoaway');
	//adjustLocalLinksByDir ("content-main", "http://webnym:8888/testfold/testfold2/test1.html")

}

// following is the init procedure called by a body load--only called when main page loaded
// which in a system like this should be once only
function init() 
{
	makeaFrames();
	initMenus();
	eqCellHeights();
	roundCells();
	clickHide ("newsgoaway", 'condviswrapper')
	//pathDir ("http://webnym:8888/testfold/testfold2/test2.html")
	//debug (isLocalLink("testfold/testfold2/test2.html"))
	
}
