// #############################################################################################
// 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;Inicio&nbsp;&nbsp;</a></li>");
	document.write("<li><a href='liquid/index.html' rel='LiquidContainers'>Contenedores uso l&#237quido</a></li>");
	document.write("<li><a href='dry/index.html' rel='DryMaterials'>Contenedores uso seco</a></li>");
	document.write("<li><a href='containerservices/index.html'>Servicios</a></li>");
	document.write("<li><a href='tracking/index.html'>Rastreo</a></li>");
	document.write("<li><a href='resources/index.html' rel='Resources'>Recursos</a></li>");
	document.write("<li><a href='about/index.html' rel='AboutCaps'>Acerca de 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'>Contenedor pl&#225stico CAPS 315</a>");
	document.write("<a href='liquid/oneway.html'>Contenedor Corrugado, CAPS Un solo uso</a>");
	document.write("<a href='liquid/rental_options.html'>Opciones de renta contenedor l&#237quido</a>");
	document.write("<a href='liquid/container_accessories.html'>Accesorios para contenedores</a>");
	document.write("<a href='liquid/industries_served.html'>Aplicaciones de contenedor l&#237quido</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'>Opciones de renta contenedor de s&#243lidos</a>");
    //document.write("<a href='dry/dry_industries_served.html'>Aplicaciones de contenedores de s&#243lidos</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='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'>Estudio De Casos</a>");
	document.write("<a href='resources/index.html'>Testimoniales</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'>Biograf&#237as Ejecutivas</a>");
	document.write("<a href='about/partners.html'>Socios & Asociados</a>");
	//document.write("<a href='press/index.html'>Press Room</a>");
	document.write("<a href='about/environmental.html'>Responsabilidad Ecol&#243gica</a>");
	document.write("<a href='about/faqs.html'>Preguntas Frecuentemente Realizadas</a>");
	document.write("<a href='1/contact.html'>Contactenos</a>");
	document.write("</div>");
	document.write("</div>");

	var tab_param = gup( 'tab' );

	tabdropdown.init("moonmenu", tab_param)
}
