// #############################################################################################
// THIS WAS THE OLD CODE THAT USED ?TAB=# QUERYSTRINGS IN URL TO FIGURE OUT WHICH TAB TO COLOR
// #############################################################################################
//function gup( name ){  name = name.replace(/[\[]/,"\\\[").replace(/[\]]/,"\\\]");  var regexS = "[\\?&]"+name+"=([^&#]*)";  var regex = new RegExp( regexS );  var results = regex.exec( window.location.href );  if( results == null )    return "";  else    return results[1];}

// #############################################################################################
// THIS CODE WAS ADDED TO THE SITE MAY 2010 BY LEVEL TECHNOLOGIES, LLC (Kevin Linna)
// THIS CODE CHECKS ONLY A PORTION OF THE URL (USING JAVASCRIPT INDEXOF METHOD) FOR EACH PAGE 
// TO DETERMINE WHICH TAB TO COLOR IN THE MAIN .js MENU ALERTING USERS WHICH TAB IS CURRENT
// #############################################################################################

//declare the function name (this has been kept the same as the original function for consistency)
function gup( name ){
//set name variable equal to the entire url
name=document.location.href;

//start first comparative statement to see if url contains the characters:  "/liquid/"	
if(name.indexOf("/liquid/")> 0) {
	return "1";
	
//start next ELSEIF comparative statement to see if url contains the characters:  "/dry/"	
}else if(name.indexOf("/dry/")> 0) {
	return "2";

//start next ELSEIF comparative statement to see if url contains the characters:  "/tracking/other_services.html"
}else if(name.indexOf("/tracking/other_services.html")> 0) {
	return "3";
	
//start next ELSEIF comparative statement to see if url contains the characters:  "/containerservices/"
}else if(name.indexOf("/containerservices/")> 0) {
	return "3";

//start next ELSEIF comparative statement to see if url contains the characters:  "/tracking/index.html"
}else if(name.indexOf("/tracking/index.html")> 0) {
	return "4";

//start next ELSEIF comparative statement to see if url contains the characters:  "/resources/"
}else if(name.indexOf("/resources/")> 0) {
	return "5";

//start next ELSEIF comparative statement to see if url contains the characters:  "/about/"
}else if(name.indexOf("/about/")> 0) {
	return "6";

//start next ELSEIF comparative statement to see if url contains the character: "/1/"
}else if(name.indexOf("/1/")> 0) {
	return "6";
	
//start next ELSEIF comparative statement to see if url contains the word "about"
}else if(name.indexOf("/press/")> 0) {
	return "6";

//if nothing above matches then return 0 which will cause the "home" tab to be colored
} else {
	return "0";
}
}
// #############################################################################################
// END THE NEW LEVEL TECHNOLOGIES, LLC TAB COLORING CODE
// #############################################################################################


function showMenu()
{
	document.write("<div id='moonmenu' class='halfmoon'>");
	document.write("<ul>");
	document.write("<li><a href='index.html'>&nbsp;&nbsp;Home&nbsp;&nbsp;</a></li>");
	document.write("<li><a href='liquid/index.html' rel='LiquidContainers'>Liquid Containers</a></li>");
	document.write("<li><a href='dry/index.html' rel='DryMaterials'>Dry Material Containers</a></li>");
	document.write("<li><a href='containerservices/index.html' rel='ContMgntServices'>Container Services</a></li>");
	document.write("<li><a href='tracking/index.html' rel='ContainerTracking'>Container Tracking</a></li>");
	document.write("<li><a href='resources/index.html' rel='Resources'>Resources</a></li>");
	document.write("<li><a href='about/index.html' rel='AboutCaps'>About CAPS</a></li>");
	document.write("</ul>");
	document.write("</div>");
	document.write("<br style='clear: left;' />");

	document.write("<div id='LiquidContainers' class='dropmenudiv_e'>");
	document.write("<div class='innerdiv'>");
	document.write("<a href='liquid/index.html'>CAPS-315 Plastic Container</a>");
	document.write("<a href='liquid/oneway.html'>CAPS One-Way Corrugated Container</a>");
	document.write("<a href='liquid/benefits_of_liquid_containers.html'>Benefits of Liquid Containers</a>");	
	document.write("<a href='liquid/rental_options.html'>Liquid Container Rental Options</a>");
	document.write("<a href='liquid/container_accessories.html'>Container Accessories</a>");
	document.write("<a href='liquid/industries_served.html'>Liquid Industries Served</a>");
	document.write("</div>");
	document.write("</div>");

	document.write("<div id='DryMaterials' class='dropmenudiv_e'>");
	document.write("<div class='innerdiv'>");
	document.write("<a href='dry/dry_rental_options.html'>Dry Container Rental Options</a>");
	document.write("<a href='dry/dry_industries_served.html'>Dry Industries Served</a>");
	document.write("</div>");
	document.write("</div>");
	
	document.write("<div id='ContMgntServices' class='dropmenudiv_e'>");
	document.write("<div class='innerdiv'>");
	document.write("<a href='containerservices/repair.html'>Container Repair</a>");
	document.write("<a href='containerservices/cleaning.html'>Container Cleaning</a>");
	document.write("<a href='containerservices/sustainability_analysis.html'>Sustainability Analysis</a>");
	document.write("</div>");
	document.write("</div>");

	document.write("<div id='ContainerTracking' class='dropmenudiv_e'>");
	document.write("<div class='innerdiv'>");
	document.write("<a href='tracking/container_tracking_features.html'>Container Tracking Software</a>");
	document.write("</div>");
	document.write("</div>");

    document.write("<div id='Resources' class='dropmenudiv_e'>");
	document.write("<div class='innerdiv'>");
	document.write("<a href='resources/container_awards.html'>Awards</a>");
	document.write("<a href='resources/case_studies.html'>Case Studies</a>");
	document.write("<a href='resources/index.html'>Testimonials</a>");
	document.write("<a href='resources/index.html'>Careers</a>");
	document.write("</div>");
	document.write("</div>");
	
 	document.write("<div id='AboutCaps' class='dropmenudiv_e'>");
	document.write("<div class='innerdiv'>");
	document.write("<a href='about/executive_bios.html'>Executive Team</a>");
	document.write("<a href='about/partners.html'>Partners</a>");
	document.write("<a href='press/index.html'>Press Room</a>");
	document.write("<a href='about/environmental.html'>Environmental Responsibility</a>");
	document.write("<a href='about/careers.html'>Careers</a>");
	document.write("<a href='about/faqs.html'>Container FAQs</a>");
	document.write("<a href='1/contact.html'>Contact Us</a>");
	document.write("</div>");
	document.write("</div>");

	var tab_param = gup('tab');

	tabdropdown.init("moonmenu", 0)
}
