execOnLoad = function() {
 //updateContentForNav();
 an_StartList();
 //an_SetNavAndCrumbs();
 
}

execNow = function() {
 updateContentForNav();
}

window.onload=execOnLoad;

// ------------------------------------------------------------------------- \\

function updateContentForNav() {
  if (document.getElementById("secondary_navigation")) {
    var cw = document.getElementById("content-wrapper");
	if(cw && cw.style) {
		cw.style.marginRight = "200px";
		if (!cw.attributes["id"].value) { cw.style.width = "100%"; } /* IE 5.5 needs this also */
	};
  }
}

function an_StartList() {
  if (document.all&&document.getElementById && !window.opera) {
    navRoot = document.getElementById("primary-navigation");
    if (navRoot) {
      for (i=0; i<navRoot.childNodes.length; i++) {
   	    node1 = navRoot.childNodes[i];
       	if (node1.nodeName=="UL") {
	      for (j=0; j<node1.childNodes.length; j++) {
    	    node2 = node1.childNodes[j];
        	if (node2.nodeName=="LI") {
	          node2.onmouseover=function() {
    	        this.className+=" over";
        	  }
	          node2.onmouseout=function() {
    	        this.className=this.className.replace(" over", "");
        	  }
    } } } } }
	navRoot = document.getElementById("sites");
    if (navRoot) {
      for (i=0; i<navRoot.childNodes.length; i++) {
        node = navRoot.childNodes[i];
		if (node.attributes["class"].value) { cls = node.attributes["class"].value; } /* IE 6 */
		else { cls = node.attributes["class"]+""; /* IE 5.5 */ }
		if (cls.indexOf("expand") >= 0) {
          if (node.nodeName=="LI") {
            node.onmouseover=function() {
              this.className+=" over";
            }
            node.onmouseout=function() {
              this.className=this.className.replace(" over", "");
            }
    } } } }
	cls = "";
    navRoot = document.getElementById("site-tools");
    if (navRoot) {
      for (i=0; i<navRoot.childNodes.length; i++) {
   	    node1 = navRoot.childNodes[i];
       	if (node1.nodeName=="UL") {
	      for (j=0; j<node1.childNodes.length; j++) {
    	    node2 = node1.childNodes[j];
			if (node2.attributes["class"].value) { cls = node2.attributes["class"].value; /* IE 6 */ }
			else { cls = node2.attributes["class"]+""; /* IE 5.5 */ }
			if (cls.indexOf("expand") >= 0) {
        	if (node2.nodeName=="LI") {
	          node2.onmouseover=function() {
    	        this.className+=" over";
        	  }
	          node2.onmouseout=function() {
    	        this.className=this.className.replace(" over", "");
        	  }
    } } } } } }
} }


function an_IE_GetAttribute(tag,attribute,removeOnlyIfTwo) {
  attribute = attribute.toLowerCase();
  // Find the first instance of the attribute.
  var startOfClass = tag.toLowerCase().indexOf(attribute);
  if (startOfClass == -1) { return tag; /* probably need some kind of timeout event or something because IE sucks */ }
  // Make sure there is another class assigned
  if (startOfClass != tag.toLowerCase().lastIndexOf(attribute) || !removeOnlyIfTwo) {
    // Find the first space after the first class
    var lengthOfClass = tag.substring(startOfClass).indexOf(" ");
    // The string to remove is from 'class' up to the next space
    var classString = tag.substr(startOfClass,lengthOfClass)+" ";
    tag = an_StringReplace(tag,classString,"");
  }
  return tag;
}

var promotion_index = 0;
function an_Promotions(step) {
 var promotions = document.getElementById("promotions-content");
 if (promotions && promotions.childNodes) {

  var len = 0; // number of LI child nodes -- Opera, Mozilla consider blank space as a text node
  for (var i = 0; i < promotions.childNodes.length; i++) { if (promotions.childNodes[i].nodeName == "LI") len++; }
  if (len == 1) return;

  var new_index = promotion_index + step;
  if (new_index < 0) new_index = len-1;
  if (new_index >= len) new_index = 0;

  var c = 0;
  for (i = 0; i < promotions.childNodes.length; i++) {
   if(promotions.childNodes[i].nodeName == "LI") {
    if (promotion_index == c) { promotions.childNodes[i].style.display = "none"; }
    if (new_index == c) { promotions.childNodes[i].style.display = "block"; }
    c++;
   }
  }
  promotion_index = new_index;
 }
}




function an_StringReplace(str, match, replace) {
  // This function takes a three string arguments.
  //  str - the string to work on
  //  match - a sub string of str to replace with:
  //  replace - text to replace 'match' with
  str=str+""; // This was needed to make sure str is considered a string.
  var a=str.indexOf(match);
  if (a >= 0) { str = str.substring(0,a) + replace + str.substring(a+match.length); }
  return str;
}

// -----------------------------------------------------------------------------
// The following function cycles through the main nav HTML and highlights the
// appropriate top-level section.
// It also assembles and generates the page breadcrumbs based on values in the
// main nav.
function an_SetAttribute(node,att,val) {
	var current = "";
	if (node.attributes[att]) {
		current = node.attributes[att].nodeValue;
		val = current ? current + " " + val : val;
		node.attributes[att].nodeValue = val;
	} else {
		node.setAttribute(att,val);
	}
		
}
///popup js start
//-----------------------------------------------------------------------------
// toggleRegion
//  This function cycles through a series of HTML tags (img, div, etc) and sets
//  all the visibility of all but one to hidden. The other is made visible.
//  It takes two or more arguments:
//   1  - The tag number to make visible.
//   2+ - The tag ID, minus it's sequence number: 'image' in the case of
//       'image0', 'image1', 'image2', etc...
//  By convention, 0 is the default ID. Initial states of the tags must
//   be defined elsewhere.
function toggleRegion(which, region) {
	// Cycle through arguments, and apply the appropriate rollover status
	for (var a = 1; a < arguments.length; a++) {
		var i = 1;
		var x = document.getElementById(arguments[a]+i);

		// Cycle through all rollover tag (starting at 1, ending at the first sequentially non-existant element)
		while (x) {
			// Set all images hidden, except 'which'
			if (which != i) { x.style.visibility="hidden"; }
			x = document.getElementById(arguments[a]+(++i));
		}

		// Make the selected tag visible
		x = document.getElementById(arguments[a]+which);
		if (x) {
			x.style.visibility="visible";
		} else {
			x = document.getElementById(arguments[a]+0);
			if (x) x.style.visibility="visible";
		}
	}
}
//------------------------------------------------------------------------------


function newImage(arg) {
	if (document.images) {
		rslt = new Image();
		rslt.src = arg;
		return rslt;
	}
}

function changeImages() {
	if (document.images && (preloadFlag == true)) {
		for (var i=0; i<changeImages.arguments.length; i+=2) {
			document[changeImages.arguments[i]].src = changeImages.arguments[i+1];
		}
	}
}

// JavaScript Document
// this code, but you are not permitted to redistribute it as
// "Apple sample code" after having made changes.
// ********************************
// application-specific functions *
// ********************************

// store variables to control where the popup will appear relative to the cursor position
// positive numbers are below and to the right of the cursor, negative numbers are above and to the left
var xOffset = 30;
var yOffset = -5;

function showPopup (targetObjectId, eventObj) {
    if(eventObj) {
	// hide any currently-visible popups
	hideCurrentPopup();
	// stop event from bubbling up any farther
	eventObj.cancelBubble = true;
	// move popup div to current cursor position 
	// (add scrollTop to account for scrolling for IE)
	//var newXCoordinate = 200
	/*(eventObj.pageX)?eventObj.pageX + xOffset:eventObj.x + xOffset + ((document.body.scrollLeft)?document.body.scrollLeft:0);*/
	//var newYCoordinate = 300
	/*(eventObj.pageY)?eventObj.pageY + yOffset:eventObj.y + yOffset + ((document.body.scrollTop)?document.body.scrollTop:0);*/
	//moveObject(targetObjectId, newXCoordinate, newYCoordinate);
	// and make it visible
	if( changeObjectVisibility(targetObjectId, 'visible') ) {
	    // if we successfully showed the popup
	    // store its Id on a globally-accessible object
	    window.currentlyVisiblePopup = targetObjectId;
	    return true;
	} else {
	    // we couldn't show the popup, boo hoo!
	    return false;
	}
    } else {
	// there was no event object, so we won't be able to position anything, so give up
	return false;
    }
} // showPopup

function hideCurrentPopup() {
    // note: we've stored the currently-visible popup on the global object window.currentlyVisiblePopup
    if(window.currentlyVisiblePopup) {
	changeObjectVisibility(window.currentlyVisiblePopup, 'hidden');
	window.currentlyVisiblePopup = false;
    }
} // hideCurrentPopup



// ***********************
// hacks and workarounds *
// ***********************

// initialize hacks whenever the page loads
//window.onload = initializeHacks;

// setup an event handler to hide popups for generic clicks on the document
//document.onclick = hideCurrentPopup;

function initializeHacks() {
    // this ugly little hack resizes a blank div to make sure you can click
    // anywhere in the window for Mac MSIE 5
    if ((navigator.appVersion.indexOf('MSIE 5') != -1) 
	&& (navigator.platform.indexOf('Mac') != -1)
	&& getStyleObject('blankDiv')) {
	window.onresize = explorerMacResizeFix;
    }
    resizeBlankDiv();
    // this next function creates a placeholder object for older browsers
    createFakeEventObj();
}

function createFakeEventObj() {
    // create a fake event object for older browsers to avoid errors in function call
    // when we need to pass the event object to functions
    if (!window.event) {
	window.event = false;
    }
} // createFakeEventObj

function resizeBlankDiv() {
    // resize blank placeholder div so IE 5 on mac will get all clicks in window
    if ((navigator.appVersion.indexOf('MSIE 5') != -1) 
	&& (navigator.platform.indexOf('Mac') != -1)
	&& getStyleObject('blankDiv')) {
	getStyleObject('blankDiv').width = document.body.clientWidth - 20;
	getStyleObject('blankDiv').height = document.body.clientHeight - 20;
    }
}

function explorerMacResizeFix () {
    location.reload(false);
}

///end of popup js//

///utilety js start//
// Copyright © 2000 by Apple Computer, Inc., All Rights Reserved.
//
// You may incorporate this Apple sample code into your own code
// without restriction. This Apple sample code has been provided "AS IS"
// and the responsibility for its operation is yours. You may redistribute
// this code, but you are not permitted to redistribute it as
// "Apple sample code" after having made changes.
//
// ************************
// layer utility routines *
// ************************

function getStyleObject(objectId) {
    // cross-browser function to get an object's style object given its id
    if(document.getElementById && document.getElementById(objectId)) {
	// W3C DOM
	return document.getElementById(objectId).style;
    } else if (document.all && document.all(objectId)) {
	// MSIE 4 DOM
	return document.all(objectId).style;
    } else if (document.layers && document.layers[objectId]) {
	// NN 4 DOM.. note: this won't find nested layers
	return document.layers[objectId];
    } else {
	return false;
    }
} // getStyleObject

function changeObjectVisibility(objectId, newVisibility) {
    // get a reference to the cross-browser style object and make sure the object exists
    var styleObject = getStyleObject(objectId);
    if(styleObject) {
	styleObject.visibility = newVisibility;
	return true;
    } else {
	// we couldn't find the object, so we can't change its visibility
	return false;
    }
} // changeObjectVisibility

function moveObject(objectId, newXCoordinate, newYCoordinate) {
    // get a reference to the cross-browser style object and make sure the object exists
    var styleObject = getStyleObject(objectId);
    if(styleObject) {
	styleObject.left = newXCoordinate;
	styleObject.top = newYCoordinate;
	return true;
    } else {
	// we couldn't find the object, so we can't very well move it
	return false;
    }
} // moveObject

///utilety js end//

///showhide div + change content div + radio button check ///
<!--
var state = 'hidden';
var displayState = "none";
var serviceSelected=0
function radioCheck(){
j=document.frm.SEV.length; //alert(j)
	for (i=0; i<j; i++){
		if(document.frm.SEV[i].checked) var serviceSelected = document.frm.SEV[i].value
		
	}
	switch(serviceSelected){
		case "1":
		//alert(serviceSelected)
		setInnerHTML('AirVRegular','');
		showhide('Vehicle',0)
		showhide('AirVRegular',3);
		break;
		case "2":
		//alert(serviceSelected)
		setInnerHTML('AirVRegular','limited');
		showhide('Vehicle',3)
		showhide('AirVRegular',3);
		break;
		case "3":
		//alert(serviceSelected)
		setInnerHTML('ServType','limited');
		showhide('Vehicle',0);
		showhide('AirVRegular',3);
		break;
		case "4":
		setInnerHTML('ServType','limited');
		showhide('Vehicle',0);
		showhide('AirVRegular',0);
		break;
	}
}
function showhide(layer_ref,on) {
if (state == 'visible' && on!=3) {
state = 'hidden';
displayState = "none";
}
if(state != 'visible' && on==3) {
state = 'visible';
displayState = "block";
}
if (document.all) { //IS IE 4 or 5 (or 6 beta)
eval( "document.all." + layer_ref + ".style.visibility = state");
eval( "document.all." + layer_ref + ".style.display = displayState");
}
if (document.layers) { //IS NETSCAPE 4 or below
document.layers[layer_ref].visibility = state;
document.layers[layer_ref].display = displayState;
}
if (document.getElementById && !document.all) {
maxwell_smart = document.getElementById(layer_ref);
maxwell_smart.style.visibility = state;
maxwell_smart.style.display = displayState;
}
}
//-->

function setInnerHTML ( id, selectedServ){

var Air = 'Weight in lbs:<br><input name="weight" type="text" size=15 class="texto"/>';
var Regular = 'Items to be shipped:<br>';
Regular = Regular + '<select id="Items" name="Items" class="texto">';
Regular = Regular + '<option>Up to 100 lbs.</option>';
Regular = Regular + '<option>Studio</option>';
Regular = Regular + '<option>1 Bedroom</option>';
Regular = Regular + '<option>2 Bedroom</option>';
Regular = Regular + '<option>3 Bedroom</option>';
Regular = Regular + '<option>Large Home</option>';
Regular = Regular + '</select>';
     if(!document.getElementById) return; // Not Supported
     if(document.getElementById){
	 		if(selectedServ=='limited'){
				showhide("ServType",3);
			}
			if(selectedServ!='limited'){
				showhide("ServType",0);
			}
			
	 	var SEvSelected=String(document.getElementById(id).innerHTML)
		if(selectedServ!='air'){
			if(SEvSelected.indexOf('weight')!=-1){
          		document.getElementById(id).innerHTML = Regular;
			}
			
		 }
		 else{
		  	if(SEvSelected.indexOf('weight')==-1){
		 		 document.getElementById(id).innerHTML = Air;
			}/**/
			
		 }
	}
}
///end of :showhide div + change content div + radio button check ///
