
var onloadFunctions=new Array();function setOnloadFunction(functionName){onloadFunctions[onloadFunctions.length]=functionName;}
function setOnLoadFunction(functionName){setOnloadFunction(functionName)}
function executeOnloadFunctions(){for(var i=0;i<onloadFunctions.length;i++){eval(onloadFunctions[i]);}}
window.onload=executeOnloadFunctions;if(!document.getElementById){document.getElementById=function(){return null;}}
function initMenu(){var uls=document.getElementsByTagName("ul");for(i=0;i<uls.length;i++){if(uls[i].className=="menuList"){decorateMenu(uls[i]);}}}
function decorateMenu(menu){var items=menu.getElementsByTagName("li");for(var i=0;i<items.length;i++){items[i].firstChild.myIndex=i;if(items[i].firstChild.onclick){items[i].firstChild.onclick=function(){eval(items[this.myIndex].firstChild.getAttribute("onclick"));setCookie("menuSelected",this.myIndex);};}else{items[i].firstChild.onclick=function(){setCookie("menuSelected",this.myIndex);};}}
activateMenu(items);}
function activateMenu(items){var activeMenu;var numExactMatch=0;var numPartialMatch=0;var firstExactMatchIndex=0;var firstPartialMatchIndex=0;var current=document.location.toString();for(var i=0;i<items.length;i++){var url=items[i].firstChild.getAttribute("href");var matchIndex=current.indexOf(url);if(matchIndex!=-1){if((matchIndex+url.length)==current.length){if(numExactMatch==0){firstExactMatchIndex=i;}
numExactMatch++;}else{if(numPartialMatch==0){firstPartialMatchIndex=i;}
numPartialMatch++;}}}
if((numExactMatch==0)&&(numPartialMatch==0)){var menuItems=new Array("faq","calendar","accessandallocation","refill","team","bundle");var teamMember=new Array("mattbaker","davidcollier","beneu","danielneal","carolpoliti","johnregal","paulrothstein","chrisstorbeck","benweintraub","marczachary","rickbolander","ronelwell","interwestpartners","davepower","joeredling");var foundTeamMember;var foundBundle;var l=menuItems.length;for(var item=0;item<l;item++){if(menuItems[item]=="team"){for(member in teamMember){if(current.toLowerCase().indexOf(teamMember[member])!=-1){foundTeamMember="true";}}}
if(menuItems[item]=="bundle"){if(current.toLowerCase().indexOf("combopak")!=-1){foundBundle="true";}}
if(foundTeamMember=="true"||foundBundle=="true"||current.toLowerCase().indexOf(menuItems[item])!=-1){for(var i=0;i<items.length;i++){var url=items[i].firstChild.getAttribute("href");if(url.toLowerCase().indexOf(menuItems[item])!=-1){firstExactMatchIndex=i;numExactMatch++;}}}}}
if(numExactMatch==1){if(items[firstExactMatchIndex].parentNode.className=="submenu"){items[firstExactMatchIndex].firstChild.className="active";items[firstExactMatchIndex].parentNode.parentNode.className="active";}else{items[firstExactMatchIndex].className+="active";}}
else if(numExactMatch>1){var activeIndex=firstExactMatchIndex;var menuSelected=getCookie("menuSelected");if(menuSelected!=null){var url=items[menuSelected].firstChild.getAttribute("href");var matchIndex=current.indexOf(url);if((matchIndex+url.length)==current.length){activeIndex=menuSelected;}}
if(items[activeIndex].parentNode.className=="submenu"){items[activeIndex].firstChild.className="active";items[activeIndex].parentNode.parentNode.className="active";}else{items[activeIndex].className+="active";}}
else if(numPartialMatch==1){if(items[firstPartialMatchIndex].parentNode.className=="submenu"){items[firstPartialMatchIndex].firstChild.className="active";items[firstPartialMatchIndex].parentNode.parentNode.className="active";}else{items[firstPartialMatchIndex].className+="active";}}
else if(numPartialMatch>1){var activeIndex=firstPartialMatchIndex;var menuSelected=getCookie("menuSelected");if((menuSelected!=null)&&(current.indexOf(items[menuSelected].firstChild.getAttribute("href"))!=-1)){activeIndex=menuSelected;}
if(items[activeIndex].parentNode.className=="submenu"){items[activeIndex].firstChild.className="active";items[activeIndex].parentNode.parentNode.className="active";}else{items[activeIndex].className+="active";}}}
setOnloadFunction("initMenu()");function setCookie(name,value,expires,path,domain,secure){document.cookie=name+"="+escape(value)+
((expires)?"; expires="+expires.toGMTString():"")+
((path)?"; path="+path:"")+
((domain)?"; domain="+domain:"")+((secure)?"; secure":"");}
function getCookie(name){var prefix=name+"="
var start=document.cookie.indexOf(prefix)
if(start==-1){return null;}
var end=document.cookie.indexOf(";",start+prefix.length)
if(end==-1){end=document.cookie.length;}
var value=document.cookie.substring(start+prefix.length,end)
return unescape(value);}
function deleteCookie(name,path,domain){if(getCookie(name)){document.cookie=name+"="+
((path)?"; path="+path:"")+
((domain)?"; domain="+domain:"")+"; expires=Thu, 01-Jan-70 00:00:01 GMT";}}