var warningmessage = "La pagina selezionata \351 disponibile soltanto sul sito in lingua inglese. Fare clic su OK se si desidera proseguire, o su Annulla se non si vuole essere dirottati su tale sito.";
 
function confirmsite(url){ 
	if ( confirm(message) ){ 
		open(url) 
	}
}



//for use as copyright year
curDate = new Date();
var curYear = curDate.getFullYear();

//TEXT SIZE SELECTION
function makeSmall() {
  var t=document.getElementById("document");
  if (t!=null) {
    t.style.fontSize="85%";    
  }
  setImage(1);
  return false;
}
function makeMedium() {
  var t=document.getElementById("document");
  if (t!=null) {
    t.style.fontSize="100%";
  }
  setImage(2);
  return false;
}
function makeBig() {
  var t=document.getElementById("document");
  if (t!=null) {
    t.style.fontSize="115%";
  }
  setImage(3);
  return false;
}
var isrc = new Array();
for (iTemp=1; iTemp<7; iTemp++) {
isrc[iTemp] = new Image();
}
isrc[1].src = '/it/imgs/topnav/s.gif';
isrc[2].src = '/it/imgs/topnav/m.gif';
isrc[3].src = '/it/imgs/topnav/b.gif';
isrc[4].src = '/it/imgs/topnav/sa.gif';
isrc[5].src = '/it/imgs/topnav/ma.gif';
isrc[6].src = '/it/imgs/topnav/ba.gif';

function setImage(imgIndex) {
  var t1=document.getElementById("ts");
  var t2=document.getElementById("tm");
  var t3=document.getElementById("tb");
    
  if (t1 != null) {
    if (imgIndex==1) {
      t1.src=isrc[4].src;
    }
    else {
      t1.src = isrc[1].src;
    }
  }
  if (t2 != null) {
    if (imgIndex==2) {
      t2.src = isrc[5].src;
    }
    else  {
      t2.src = isrc[2].src;
    }    
  }
  if (t3 != null) {
    if (imgIndex==3) {
      t3.src = isrc[6].src;
    }
    else {
      t3.src = isrc[3].src;
    }
  }
}


// 2 Functions for GE Fast Search
function fnSiteSearch(fm) {
	if (fm.textToSearch.value=="") { return false; }
	return true;
}
function fnSiteSearchLink(fm) {
	if (fm.textToSearch.value != "") { fm.submit(); } 
}

// global vars
var popupWin;
var largerWin;
var largerWin2;
var largerWin3;
var glossaryWin;
var scrnwidth=screen.width;
var scrnheight=screen.height;

//NN4 window resize fix
if(!window.saveInnerWidth) {
  window.onresize = resizeIt;
  window.saveInnerWidth = window.innerWidth;
  window.saveInnerHeight = window.innerHeight;
}
function resizeIt() {
    if (saveInnerWidth < window.innerWidth || 
        saveInnerWidth > window.innerWidth || 
        saveInnerHeight > window.innerHeight || 
        saveInnerHeight < window.innerHeight ) 
    {
        window.history.go(0);
    }
}


// "only 1 open at a time" popup function //
function openPop(url,width,height,addloptions){


	var xspot=Math.round((scrnwidth/2)-(width/2));
	var yspot=Math.round((scrnheight/2)-(height/2)-30);
	features = "height="+height+",width="+width+",top="+yspot+",screenY="+yspot+",left="+xspot+",screenX="+xspot;
	if (addloptions && addloptions!="") { features += ","+addloptions; }
	if (!popupWin || popupWin.closed){
		popupWin = window.open(url, '', features);
	}
	else {
		window.popupWin.close();
		popupWin = window.open(url, '', features);
	}
	
}


// "only 1 open at a time" popup function //
function openPopWarning(url,width,height,addloptions){
if(confirm(warningmessage)) {
	openPop(url,width,height,addloptions);
}

}

//	NORMAL Function to View Larger Image.
//	Opens window which contains only a 500 x 500 image
function openLarger(imgurl,imgalt) {
	var xspot=Math.round((scrnwidth/2)-(250));
	var yspot=Math.round((scrnheight/2)-(280));
	if (!largerWin || largerWin.closed) {
		largerWin = window.open("","","width=500,height=500,top="+yspot+",screenY="+yspot+",left="+xspot+",screenX="+xspot);
	}
	else {
		window.largerWin.close();
		largerWin = window.open("","","width=500,height=500,top="+yspot+",screenY="+yspot+",left="+xspot+",screenX="+xspot);
	}
	drawstr =  '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">';
	drawstr += '<html><head><META NAME="Robots" content="index,follow"><title>'+imgalt+'</title></head>';
	drawstr += '<body bgcolor="white" marginheight="0" marginwidth="0" topmargin="0" leftmargin="0">';
	drawstr += '<img src="';
	drawstr += imgurl;
	drawstr += '" width="500" height="500" border="0" alt="';
	drawstr += imgalt;
	drawstr += '">';
	drawstr += '</body></html>';
	largerWin.document.open();
	largerWin.document.write(drawstr);
	largerWin.document.close();
}


//	Function to View Larger Fluorescent (HORIZONTAL) Image.
//	Opens window which contains only a ????? x 128 image
function openLarger2(imgurl,imgalt) {
	var xspot=Math.round((scrnwidth/2)-(250));
	var yspot=Math.round((scrnheight/2)-(100));
	if (!largerWin2 || largerWin2.closed) {
		largerWin2 = window.open("","","scrollbars,width=500,height=150,top="+yspot+",screenY="+yspot+",left="+xspot+",screenX="+xspot);
	}
	else {
		window.largerWin2.close();
		largerWin2 = window.open("","","scrollbars,width=500,height=150,top="+yspot+",screenY="+yspot+",left="+xspot+",screenX="+xspot);
	}
	drawstr =  '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">';
	drawstr += '<html><head><META NAME="Robots" content="index,follow"><title>'+imgalt+'</title></head>';
	drawstr += '<body bgcolor="white" marginheight="0" marginwidth="0" topmargin="0" leftmargin="0">';
	drawstr += '<img src="';
	drawstr += imgurl;
	drawstr += '" height="128" border="0" alt="';
	drawstr += imgalt;
	drawstr += '">';
	drawstr += '</body></html>';
	largerWin2.document.open();
	largerWin2.document.write(drawstr);
	largerWin2.document.close();
}

//	Function to View Larger Fluorescent (VERTICAL) Image.
//	Opens window which contains only a 303 x ?????? image
function openLarger3(imgurl,imgalt) {
	var xspot=Math.round((scrnwidth/2)-(160));
	var yspot=Math.round((scrnheight/2)-(280));
	if (!largerWin3 || largerWin3.closed) {
		largerWin3 = window.open("","","scrollbars,width=323,height=500,top="+yspot+",screenY="+yspot+",left="+xspot+",screenX="+xspot);
	}
	else {
		window.largerWin3.close();
		largerWin3 = window.open("","","scrollbars,width=323,height=500,top="+yspot+",screenY="+yspot+",left="+xspot+",screenX="+xspot);
	}
	drawstr =  '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">';
	drawstr += '<html><head><META NAME="Robots" content="index,follow"><title>'+imgalt+'</title></head>';
	drawstr += '<body bgcolor="white" marginheight="0" marginwidth="0" topmargin="0" leftmargin="0">';
	drawstr += '<img src="';
	drawstr += imgurl;
	drawstr += '" width="303" border="0" alt="';
	drawstr += imgalt;
	drawstr += '">';
	drawstr += '</body></html>';
	largerWin3.document.open();
	largerWin3.document.write(drawstr);
	largerWin3.document.close();
}


function closepopups(){
	if (popupWin && popupWin.open){
		window.popupWin.close();
	}
	if (largerWin && largerWin.open){
		window.largerWin.close();
	}
	if (largerWin2 && largerWin2.open){
		window.largerWin2.close();
	}
	if (largerWin3 && largerWin3.open){
		window.largerWin3.close();
	}
	if (glossaryWin && glossaryWin.open){
		window.glossaryWin.close();
	}
}


// 3 functions used by various searches (Retained from previous site)
function fnLtrim(strString){
	var i=0;
	var intLen = strString.length;
	while((strString.charAt(i) == " ") && ( i < intLen)) {
		i++;
	}
	strString = strString.substring(i,intLen);
	return  strString;
}

function fnRtrim(strString){
	var intLen = strString.length;
	var i= intLen-1;
	while((strString.charAt(i) == " ") && ( i > 0 )){
		i--;
	}
	strString = strString.substring(0,i+1);
	return strString;
}

function SearchSubmit(frm,section) {
	var strSKU = frm.txtSearch.value;
	if(strSKU=="") {
		return false;
	}
	strSKU = fnLtrim(fnRtrim(frm.txtSearch.value));
	var strFinal = "";
	var i;
	for(i=0; i<strSKU.length; i++){
		if( strSKU.charAt(i) != '*' ) {
			strFinal = strFinal + strSKU.charAt(i);
		}
	}
	//frm.REQUEST.value = "GECOMSEARCH";
	frm.SITEID.value = "LIGHTINGHOME";
	frm.searchPageNo.value="1";
	frm.FOLDER.value=section;
	frm.web_server.value = "http://www.gelighting.com";
	//frm.SEARCHTEXT.value = strFinal + "*";
	frm.SEARCHTEXT.value = strFinal;
	//frm.action = "http://genet.geappliances.com/geasearch/Dispatcher";
	frm.action = "http://genet.geappliances.com/geasearch/Dispatcher?REQUEST=GECOMSEARCH";
	return true;
}



// function linktoOpener(url) is called from popups. Places url in opener, and closes popup. 
function linktoOpener(url) {
	if(self.opener) {
		self.opener.top.document.location=url;
		self.opener.focus();
		self.close();
	} else {
		self.top.document.location=url;
		self.focus();
	}
}

// turnonTab() sniffs the document location and turns on the appropriate tab in the navbar.
// Used on HOME LIGHTING site
function turnonTab() {
	var currurl=document.location+"";
	var locindex="0";
	if(currurl.indexOf("/products/") != -1) { locindex="1"; }
	if(currurl.indexOf("/design_with_light/") != -1) { locindex="2"; }
	if(currurl.indexOf("/where_to_buy/") != -1) { locindex="3"; }
	if(currurl.indexOf("/ask_us/") != -1) { locindex="4"; }
	if(locindex!="0" && document.getElementById) {
		document.getElementById("navimgcell"+locindex).className="navbarLinkOn";
		document.getElementById("navimg"+locindex).src="/it/imgs/shim.gif";
		document.getElementById("navlinkcell"+locindex).className="navbarLinkOn";
		document.getElementById("navlink"+locindex).className="navbarLinkOn";
	}
}

// turnonTab2() sniffs the document location and turns on the appropriate tab in the navbar.
// Used on COMMERCIAL LIGHTING site -- all except its home page where navbar is hard coded to have "home" selected.
function turnonTab2() {
	var currurl=document.location+"";
	var locindex="0";
	if(currurl.indexOf("/product_portfolio/") != -1) { locindex="1"; }
	if(currurl.indexOf("/products/") != -1) { locindex="2"; }
	if(currurl.indexOf("/lighting_applications/") != -1) { locindex="3"; }
	if(currurl.indexOf("/resources/") != -1) { locindex="4"; }
	if(locindex!="0" && document.getElementById) {
		document.getElementById("navbarCell_"+locindex).className="selected";
		document.getElementById("navbarImg_"+locindex).src="/it/imgs/nav1Link_selected.gif";
	}
}

// needforSubmit() builds INFM URL from two select elements and redirects user to INFM page
function needforSubmit() {
	var infm_url = "/it/home_lighting/infm/";
	var form = document.needforForm;
	var Ineed = form.needSel.options[form.needSel.selectedIndex].value;
	var ForMy = form.forSel.options[form.forSel.selectedIndex].value;
	infm_url = infm_url + Ineed + "_" + ForMy + ".htm";
	document.location = infm_url;
}

// setINFMform() reads URL and sets select elements of INFM form to reflect the current page
function setINFMform() {
	var curl = unescape(document.location);
	if (curl.indexOf("/infm/")!=-1) {
		var infm = curl.slice((curl.indexOf('/infm/')+6),curl.indexOf('.htm'));
		var infm_arr = infm.split("_");
		var form = document.needforForm;
		form.needSel.selectedIndex = (infm_arr[0]=="light")?0:(infm_arr[0]=="life")?1:2;
		for(i=0;i<6;i++) {
			if (form.forSel.options[i].value == infm_arr[1]) {
				form.forSel.selectedIndex = i;
			}
		}
	}
}

/* SELECT ELEMENT NAVIGATION */
/* selectNav function -- a select (dropdown) element navigation function
   called from onChange event of select element,
   i.e. onChange="selectNav('formName','archive');"
   where 'formName' is the id/name of the containing form, and
   where 'archive' is the id/name of the specific select element to be tested.
   the value of the option elements should be the target URLs.
*/
function selectNav(form,fName) {
  fRef = eval('top.document.'+form);
  var selIdx = fRef[fName].selectedIndex 
  var selURL = fRef[fName].options[selIdx].value 
  document.location = selURL;
}

/* setSelected function -- sets select element navigation dropdown to reflect the current page
   called inline after the code for the select element navigation,
   i.e. within a javascript code block
      setSelected(top.document.formName,'archive');
   where 'archive' is the name of the specific select element to be effected
   the value of the option elements will be compared to the current URL and, if an option matches, it will be set as selected.
*/
function setSelected(form,fName) {
  fRef = eval('top.document.'+form);
	var curl = unescape(document.location);
  i = curl.indexOf('/it/');
  curl = curl.slice(i);
  for(i=0;i<fRef[fName].options.length;i++) {
    if (fRef[fName].options[i].value.indexOf(curl)>=0) {
      fRef[fName].options[i].selected = true;
      break;
    }
  }
}
/* END SELECT ELEMENT NAVIGATION */


/*  Edison Awards openPop wrapper function */
  function eaPop(url) {
    openPop("/it/resources/edison_award/" + url,"710","550","resizable,scrollbars");
  }
/*/Edison Awards openPop wrapper function */

/* Learn About Light's Distribution Curves openPop wrapper function */
function openCurve(idx) {
	openPop("http://www.gelighting.com/it/resources/learn_about_light/pop_curves.htm?"+idx,"710","520","resizable,scrollbars");
}
/*/Learn About Light Distribution Curves openPop wrapper function */


/* COMMERCIAL Glossary opener function */
/* Calls absolutely so it can be used within ecatalog also */
/* Cannot use generic openPop because of feature override behavior */
function openGlossary(anchr) {
	if (!glossaryWin || glossaryWin.closed){
		glossaryWin = window.open("http://www.gelighting.com/it/resources/glossary.htm#"+anchr,"","width=770,height=300,resizable,scrollbars,toolbar,location,status,top=1,screenY=1,left=1,screenX=1");
	}
	else {
		glossaryWin.focus();
		glossaryWin.document.location = "http://www.gelighting.com/it/resources/glossary.htm#"+anchr;
	}
}
/*/Glossary opener function */



/**********************************************************************/
// Cascading Menus for Standard GE Corporate Top Navbar
// By Matthew Rasnake and Scott Henderson, GE Consumer & Industrial
// March 2005
/**********************************************************************/


var menuBaseHref = "";

//if NOT teamsite AND NOT gelighting, make menuBaseHref absolute
hoststring=window.location.host.toLowerCase();
if (hoststring.indexOf('EULCTLG') > 0) {
	// menuBaseHref = "http://www.gelighting.com";
	menuBaseHref = "";
}

//Create the only array we'll need.
geMenuArray = new Array();

/* All calls are absolute b/c it must be used within ecatalog & search results also */

/* The first menu */
/*geMenuArray[0] = [
				"Automotive||"+menuBaseHref+"/it/product_portfolio/automotive/index.htm",
				"General Lamps||"+menuBaseHref+"/it/product_portfolio/general_lighting/index.htm",
				"SHOWBIZ&#174;||"+menuBaseHref+"/it/product_portfolio/showbiz/index.htm",
				"Specialty||"+menuBaseHref+"/it/product_portfolio/specialty/index.htm",
				"Electronic Ballasts||"+menuBaseHref+"/it/product_portfolio/ballasts/index.htm",
				"Fittings||"+menuBaseHref+"/it/product_portfolio/fittings/index.htm",
             ];*/
geMenuArray[0] = [
				"Prodotti per la tua casa||"+menuBaseHref+"/it/product_portfolio/home_lighting/index.htm",
				"Prodotti per la tua auto||"+menuBaseHref+"/it/product_portfolio/automotive/index.htm",
				"Prodotti commerciali||"+menuBaseHref+"/it/product_portfolio/commercial_lighting/index.htm",
//				"Lighting Fittings||"+menuBaseHref+"/it/product_portfolio/fittings/index.htm",
				];			 
geMenuArray[0]['id']    = "navbarCell_1";
geMenuArray[0]['width'] = "115";
geMenuArray[0]['left']  = "";

/* The second menu */
geMenuArray[1] = [
			    "Lampade a incandescenza||javascript:confirmsite('http://www.gelighting.com/EULCTLG/Dispatcher?REQUEST=GETSUBMENU&MarketCode=UF&CountryCode=EN&category=INC&text=Incandescent&Site=it');",
				"Lampade alogene||javascript:confirmsite('http://www.gelighting.com/EULCTLG/Dispatcher?REQUEST=GETSUBMENU&MarketCode=UF&CountryCode=EN&category=HAL&text=Halogen&Site=it');",
				"Lampade a scarica ad alta intensit\340||javascript:confirmsite('http://www.gelighting.com/EULCTLG/Dispatcher?REQUEST=GETSUBMENU&MarketCode=UF&CountryCode=EN&category=HID&text=High%20Intensity%20Discharge&Site=it');",
				"Lampade fluorescenti||javascript:confirmsite('http://www.gelighting.com/EULCTLG/Dispatcher?REQUEST=GETSUBMENU&MarketCode=UF&CountryCode=EN&category=LFL&text=Fluorescent&Site=it');",
				"Lampade compatte fluorescenti||javascript:confirmsite('http://www.gelighting.com/EULCTLG/Dispatcher?REQUEST=GETSUBMENU&MarketCode=UF&CountryCode=EN&category=CFL&text=Compact%20Fluorescent&Site=it');",
				"Lampade SHOWBIZ&#174;||javascript:confirmsite('http://www.gelighting.com/EULCTLG/Dispatcher?REQUEST=GETSUBMENU&MarketCode=UF&CountryCode=EN&category=SS&text=Showbiz&Site=it');",
				"Prodotti speciali||javascript:confirmsite('http://www.gelighting.com/EULCTLG/Dispatcher?REQUEST=GETSUBMENU&MarketCode=UF&CountryCode=EN&category=SP&text=Speciality&Site=it');"

             ];
geMenuArray[1]['id']    = "navbarCell_2"; // id of Parent object for this menu
geMenuArray[1]['width'] = "115";          // width of this menu
geMenuArray[1]['left']  = "";             // left offset (positive or negative)


/* The first menu */
geMenuArray[2] = [
			   	"Iluminazione domestica||"+menuBaseHref+"/it/product_portfolio/home_lighting/index.htm",
				"Illuminazione per hotel||"+menuBaseHref+"/it/lighting_applications/hotel/index.htm",
				"Illuminazione da ufficio||"+menuBaseHref+"/it/lighting_applications/office/index.htm",
				"Illuminazione per negozi||"+menuBaseHref+"/it/lighting_applications/retail/index.htm",
				"Illuminazione per il mondo dello spettacolo e dell\'intrattenimento||"+menuBaseHref+"/it/lighting_applications/showbiz/index.htm",
				"Illuminazione stradale||"+menuBaseHref+"/it/lighting_applications/street/index.htm",
				"Applicazioni speciali||"+menuBaseHref+"/it/lighting_applications/specialist/index.htm"
];
geMenuArray[2]['id']    = "navbarCell_3";
geMenuArray[2]['width'] = "125";
geMenuArray[2]['left']  = "";

/* The third menu */
geMenuArray[3] = [
				//"Sala stampa||javascript:confirmsite('http://www.gelighting.com/eu/resources/press_room/index.htm');",
				"Sala stampa||"+menuBaseHref+"/it/resources/press_room.html",
				"Informazioni sull\'illuminazione||"+menuBaseHref+"/it/resources/learn_about_light/index.htm",
				"Biblioteca elettronica||"+menuBaseHref+"/it/resources/literature_library/index.htm",
				"Ambiente||"+menuBaseHref+"/it/resources/environmental/index.htm",
				"Solutions Advisor||javascript:confirmsite('http://www.gelighting.com/eu/resources/solutions_advisor/index.htm');",
				"Kit di strumenti GE Lighting||"+menuBaseHref+"/it/resources/toolkit/index.htm",
//				"Firstlight||"+menuBaseHref+"/it/resources/firstlight/module01/01.html",				
				"Edison Award||javascript:confirmsite('http://www.gelighting.com/na/business_lighting/edison_award/index.htm');",
				"Glossario sull'illuminazione||javascript:confirmsite('http://www.gelighting.com/eu/resources/glossary.htm');",
             ];
geMenuArray[3]['id']    = "navbarCell_4";
geMenuArray[3]['width'] = "85";
geMenuArray[3]['left']  = "-40";

//Write additional styles required for menus.
ourStyles = '<style type="text/css">';
ourStyles += 'div.ddmenu {position:absolute; margin-top:7px; visibility:hidden; text-transform:none; border-top:1px solid #CCCCCC; z-index:1;}';
ourStyles += 'a.ddcell       {background-color:#F7F7F7; border:1px solid #CCCCCC; border-top:0px; padding: 6px 7px 6px 8px; text-transform:none; display:block;}';
ourStyles += 'a.ddcell:hover {background-color: #FFFFFF;}';
ourStyles += '</style>';
document.write(ourStyles);


//fnBuildMenu(mNum) returns the html for a single menu.
function fnBuildMenu(mNum) {
        var temp;
	mArr = geMenuArray[mNum];
	mWidth = "width:"+mArr.width+"px;";                      // a CSS style width statement string
	mLeft = (mArr.left)?"margin-left:"+mArr.left+"px;":"";   // a CSS style left-margin statement string
	menuString =  '<br><div id="menudiv'+mNum+'" class="ddmenu" style="'+mWidth+mLeft+'">'; // start menuString with opening DIV
	for (mItem in mArr) {                           // loop through this sub-array
		if (parseInt(mItem)||(parseInt(mItem)==0)) {  // if array item name is a number (i.e. it's not "id" or "width")
			linky = mArr[mItem].split('||');            // split the contents of this array item to get Link Text and Link URL
			//if (linky[1].indexOf('/it/')==0) temp='';
			//else if (linky[1].indexOf('/EULCTLG/')>0) temp = ' target=_blank ' ;
			//temp = (linky[1].indexOf('/it/')==0 ? '': (linky[1].indexOf('/EULCTLG/')>0?'': (linky[1].indexOf('/confirmsite/')>0?'':' target=_blank ')));
                        menuString += '<a href="'+linky[1]+'" class="ddcell" id="m'+mNum+'-'+mItem+'" '+temp+' style="'+mWidth+'">'+linky[0]+'</a>'; // add this menu item to HTML DIV string
		}
	}
	menuString += '</div>';                         // close HTML DIV string
	return menuString;                              // return the constructed Menu HTML 
}

//fnDefineMenus() uses fnBuildMenu to create the HTML, insert it into the page, and attach event listeners to the Parent Objects  
function fnDefineMenus() {
	if(!document.getElementById(geMenuArray[geMenuArray.length-1].id)) { //a test for final Parent object that's supposed to spawn a menu
		fred = setTimeout("fnDefineMenus()",500);  //if it doesn't exist yet, wait a bit longer
	} else {
		for (men in geMenuArray) {                      // loop through main menu Array
	  		tempObj = document.getElementById(geMenuArray[men].id); //get obj ref. to this menu's Parent Object
	  		tempObj.innerHTML  += fnBuildMenu(men);     //build menu HTML string and add it to Parent Object's HTML
	  		tempObj.onmouseover = fnOpenMen;          //define Parent Object's mouseover event to call fnOpenMen
	  		tempObj.onmouseout  = fnCloseMen;         //define Parent Object's mouseout event to call fnCloseMen
    	}
	}
}

function fnOpenMen() {
  menObj = this.getElementsByTagName('div')[0];  // Our menu is the first div within the Parent Object (this)
  menObj.style.visibility = "visible";           
}
function fnCloseMen() {
  menObj = this.getElementsByTagName('div')[0];  // Our menu is the first div within the Parent Object (this)
  menObj.style.visibility = "hidden";
}

//Let's get things started!!
//We're NOT using document.onload -- It could conflict with an onload already in the BODY tag.
if (document.getElementsByTagName) { // if we're DOM capable
	fnDefineMenus();  //start _trying_ to define menus
}

/*********************************************/
// Cascading Menus Section Ended
/*********************************************/

/**********************************************************/
// This should be the end.
// Place any/all new stuff ABOVE the menus section please.
/**********************************************************/