
function SI_displaySelects( selectVisibility ) {
	for ( var i = 0; i < document.forms.length; i++ ) {
		for ( var j = 0; j < document.forms[i].elements.length; j++ ) {
			if ( document.forms[i].elements[j].type.indexOf( "select" ) != -1 ) {
				document.forms[i].elements[j].style.visibility = selectVisibility;
			}
		}
	}
}

function SI_showSubNav(SI_subnav){
			
			var SI_nav;
			var SI_complete;
			
			SI_imgOn(SI_subnav);
			
			if(document.getElementById){
				SI_complete = "document.getElementById('" + SI_subnav + "Menu')";
			}
			else if(document.all){
				SI_complete = "document.all['" + SI_subnav + "Menu']";
			}
			
			SI_nav = eval(SI_complete);
				
			if (SI_nav){
				SI_nav.style.visibility = 'visible';	
			}
			
			SI_displaySelects( 'hidden' );
}

function SI_hideSubNav(SI_subnav){
		
			var SI_nav;
			var SI_complete;
			
			SI_imgOff(SI_subnav);
			
			if(document.getElementById){
				SI_complete = "document.getElementById('" + SI_subnav + "Menu')";
			}
			else if(document.all){
				SI_complete = "document.all['" + SI_subnav + "Menu']";
			}
			
			SI_nav = eval(SI_complete);
				
			if (SI_nav){
				SI_nav.style.visibility = 'hidden';	
			}
			
			SI_displaySelects( 'visible' );
}


if (document.images) {
			
			SI_serviceon = new Image();		 SI_serviceon.src="images/aboutf.gif";
			SI_saleson = new Image();		 SI_saleson.src="images/truckf.gif";
			SI_rentalson = new Image();			 SI_rentalson.src="images/rentalf.gif";
			SI_leasingon = new Image();			 SI_leasingon.src="images/partsf.gif";
			SI_partson = new Image();		 SI_partson.src="images/servicesf.gif";
			SI_newson = new Image();		 SI_newson.src="images/newsletterf.gif";
			
			
			SI_serviceoff = new Image();	 SI_serviceoff.src="images/about.gif";
			SI_salesoff = new Image();		 SI_salesoff.src="images/truck.gif";
			SI_rentalsoff = new Image();	SI_rentalsoff.src="images/rental.gif";
			SI_leasingoff = new Image();		 SI_leasingoff.src="images/parts.gif";
			SI_partsoff = new Image();		 SI_partsoff.src="images/services.gif";
			SI_newsoff = new Image();		 SI_newsoff.src="images/newsletter.gif";
			
		} 


		<!-- Adds a suffix onto the image name so that the program calls the on state of the image -->
		function SI_imgOn(iname) {
			if (document.images) {
				document[iname].src = eval(iname + "on.src");
			}
		}

		<!-- Adds a suffix onto the image name so that the program calls the off state of the image -->
		function SI_imgOff(iname) {
			if (document.images) {
				document[iname].src = eval(iname + "off.src");
			}
		}
		



var SI_arMenu = new Array();
		
		SI_arMenu[0] = new Array(
			"SI_service",
			0,  // pixels from left
			110, // width of menu
			"-History","./history.html", 
			"-Meet the Staff","staff.html", 
			"-Links","links.html",
			"-Our Policy","policy.html",
			"-Pictures","pictures.html",
			"-Contact Us","contact.html"
			);
			
		SI_arMenu[1] = new Array(
			"SI_sales", 
			100, // pixels from left
			110, // width of menu
			"-Models","newmodels.html",
			"-Financing","financing.html",
			"-Contact Us","contact.html"
			);
		
		SI_arMenu[2] = new Array(
			"SI_rentals",
			200, // pixels from left
			110, // width of menu
			"-What We Offer ","offersl.html",
			"-Payment Options","paymentsoptions.html",
			"-Contact Us","contact.html"
			);
			
		SI_arMenu[3] = new Array(
			"SI_leasing",
			300, // pixels from left
			110, // width of menu
			"-What We Offer ","offerp.html",
			"-Order Online","order.html",
			"-Application","application.html",
			"-Pictures","partspic.html",
			"-Contact Us","contact.html"
			);
		
		SI_arMenu[4] = new Array(
			"SI_parts",
			400, // pixels from left
			110, // width of menu
			"-What We Offer ","offerservice.html",
			"-Our Trucks","servicestrucks.html",
			"-Contact Us","contact.html"
			
			
			);
		
		SI_arMenu[5] = new Array(
			"SI_news",
			500, // pixels from left
			110, // width of menu
			"-Most Recent","currentnews.html"//,
			//"-Archives","archives.html"
			);
		
					

function SI_setUpMenus(SI_backcolor, SI_overcolor, SI_textcolor, SI_overtextcolor, SI_linecolor){
	if ((document.all) || (document.getElementById)){

	var SI_subnav = "";
			
			for (j = 0; j < SI_arMenu.length; j++){
				SI_subnav += "<div id=\"" + SI_arMenu[j][0] + "Menu\" style=\"z-index:999;position: absolute; left: " + SI_arMenu[j][1] + "; width: " + SI_arMenu[j][2] + ";  visibility: hidden\" onmouseover=\"SI_showSubNav('" + SI_arMenu[j][0] + "');\" onmouseout=\"SI_hideSubNav('" + SI_arMenu[j][0] + "');\">";
					SI_subnav += "<table cellspacing=\"0\" cellpadding=\"0\" border=\"0\" width=\"" + SI_arMenu[j][2] + "\">";
						
						for (i=3; i < SI_arMenu[j].length-1; i=i+2){
							SI_subnav += "<tr>";
								SI_subnav += "<td width=\"1\" bgcolor=\"#000000\"><img src=\"1.gif\" width=\"1\" height=\"22\"></td>";
								SI_subnav += "<td width=\"6\" bgcolor=\"#000000\" class=\"siNavSide\"><img src=\"1.gif\" width=\"6\" height=\"22\"></td>";
								if( document.isRemoteHosted == 'local' ) {
									SI_subnav += "<td width=\"108\" bgcolor=\"" + SI_backcolor + "\" class=\"cnnNavMenu\" onClick=\"if (typeof P_popupoff != 'undefined') P_popupoff();document.location.href='" + SI_arMenu[j][i+1] + "'\" onmouseover=\"this.bgColor='" + SI_overcolor + "';this.style.color='" + SI_overtextcolor+ "';\" onmouseout=\"this.bgColor='" + SI_backcolor + "';this.style.color='" + SI_textcolor + "'\" style=\"color: " + SI_textcolor + "\"><div style=\"padding-left:12px;\">" + SI_arMenu[j][i] + "</a></div></td>";
								} else if ( !(IsRelativeURL( SI_arMenu[j][i+1] )) ) {
									SI_subnav += "<td width=\"108\" bgcolor=\"" + SI_backcolor + "\" class=\"cnnNavMenu\" onClick=\"if (typeof P_popupoff != 'undefined') P_popupoff();document.location.href='" + SI_arMenu[j][i+1] + "'\" onmouseover=\"this.bgColor='" + SI_overcolor + "';this.style.color='" + SI_overtextcolor+ "';\" onmouseout=\"this.bgColor='" + SI_backcolor + "';this.style.color='" + SI_textcolor + "'\" style=\"color: " + SI_textcolor + "\"><div style=\"padding-left:12px;\">" + SI_arMenu[j][i] + "</a></div></td>";
								} else {
									if( document.isRemoteHosted == 'sipreview' ) {
										SI_subnav += "<td width=\"108\" bgcolor=\"" + SI_backcolor + "\" class=\"cnnNavMenu\" onClick=\"if (typeof P_popupoff != 'undefined') P_popupoff();document.location.href='" + SI_arMenu[j][i+1] + "'\" onmouseover=\"this.bgColor='" + SI_overcolor + "';this.style.color='" + SI_overtextcolor+ "';\" onmouseout=\"this.bgColor='" + SI_backcolor + "';this.style.color='" + SI_textcolor + "'\" style=\"color: " + SI_textcolor + "\"><div style=\"padding-left:12px;\">" + SI_arMenu[j][i] + "</a></div></td>";
									} else {
										SI_subnav += "<td width=\"108\" bgcolor=\"" + SI_backcolor + "\" class=\"cnnNavMenu\" onClick=\"if (typeof P_popupoff != 'undefined') P_popupoff();document.location.href='" + SI_arMenu[j][i+1] + "'\" onmouseover=\"this.bgColor='" + SI_overcolor + "';this.style.color='" + SI_overtextcolor+ "';\" onmouseout=\"this.bgColor='" + SI_backcolor + "';this.style.color='" + SI_textcolor + "'\" style=\"color: " + SI_textcolor + "\"><div style=\"padding-left:12px;\">" + SI_arMenu[j][i] + "</a></div></td>";
									}
								}
								SI_subnav += "<td width=\"1\" bgcolor=\"#000000\"><img src=\"http://i.cnn.net/si/images/1.gif\" width=\"1\" height=\"22\"></td>";
							SI_subnav += "</tr>";
							SI_subnav += "<tr>";
								SI_subnav += "<td colspan=\"3\" bgcolor=\"" + SI_linecolor + "\" height=\"1\"><img src=\"1.gif\" width=\"1\" height=\"1\"></td>";
							SI_subnav += "</tr>";
						}
						
					SI_subnav += "</table>";
				SI_subnav += "</div>";
			}
			
	document.write(SI_subnav);

	}
}
