var hostpath = location.href.replace('/' + location.search + '$/', '');
var linkset = -1;
/*
hostpath = hostpath.replace(/^.*\/([^\/]*?)\/([^\/]*?\.[^\.]+?)?$/, '$1'); //fails in safari.. so do this the hacky way.
if (hostpath == "aboutus") {
linkset = 0; // tabs_about
}
if (hostpath == "solutionscenter") {
linkset = 1; //tabs_solutions
}
if (hostpath == "pressroom") {
linkset = 2; // tabs_press
}
*/
//alert(linkset);

if (hostpath.indexOf('/aboutus/') > 0) {
    linkset = 0; // tabs_about
}
if (hostpath.indexOf('/solutionscenter/') > 0) {
    linkset = 1; // tabs_solutionscenter
}
if (hostpath.indexOf('/pressroom/') > 0) {
    linkset = 2; // tabs_press
}



//initialize tabs on every page!
ddtabmenu.definemenu("ddtabs1", linkset) //initialize Tab Menu #1 with 1st tab selected

//this is the application path for the links below.
//var url = "http://localhost/runbeck/";
var url = "http://www.runbeck.net/";
//var url = "http://www.runbeck.net/";



//-----------------------------------------------------------------
var links  = "<DIV class='tabcontainer'>";
links  += "<div id='tabs_about' class='tabcontent'>";
links += "	<ul>";
links  += "		<li><a href='"+url + "aboutus/index.html'>Company Overview</a>&nbsp; | </li>";
links  += "		<li><a href='"+url + "aboutus/MissionVisionValues.html'>Mission, Vision & Values</a>&nbsp; | </li>";
links  += "		<li><a href='"+url + "aboutus/ExecutiveBios.html'>Executive Bios</a>&nbsp; | </li>";
links  += "		<li><a href='"+url + "aboutus/Careers.html'>Careers</a>&nbsp; | </li>";
links  += "		<li><a href='"+url + "aboutus/Blog.html'>Blog</a>&nbsp; | </li>";
links  += "		<li><a href='"+url + "aboutus/ResourceCenter.html'>Resource Center</a></li>";
links  += "	</ul>";
links  += "	</div>";
links  += "	<div id='tabs_solutions' class='tabcontent'>";
links += "	<ul>";
links += "		<li><a href='" + url + "solutionscenter/BallotProduction.html'>Ballot Production</a>&nbsp; | </li>";
links += "		<li><a href='" + url + "solutionscenter/ElectionSupportMaterials.html'>Election Support Materials</a>&nbsp; | </li>";
links += "		<li><a href='" + url + "solutionscenter/PostalVoting.html'>Postal Voting</a></li>";
links  += "	</ul>";
links  += "	</div>";
links += "	<div id='tabs_press' class='tabcontent'>";
links  += "	<ul>";
links += "		<li><a href='" + url + "pressroom/PressReleases.html'>Press Releases</a>&nbsp; | </li>";
links += "		<li><a href='" + url + "pressroom/MediaCoverage.html'>Media Coverage</a>&nbsp; | </li>";
links += "		<li><a href='" + url + "pressroom/WhitePapers.html'>White Papers</a>&nbsp; | </li>";
links += "		<li><a href='" + url + "pressroom/CaseStudies.html'>Case Studies</a>&nbsp; | </li>";
links += "		<li><a href='" + url + "pressroom/Testimonials.html'>Testimonials</a>&nbsp; | </li>";
links += "		<li><a href='" + url + "pressroom/Events.html'>Events</a></li>";
links  += "	</ul>";
links  += "	</div>";
links  += "</DIV>";

document.write (links);