var RightAreaClass = "defaultrightarea"; var GotoNutrition = false; //** override menu cookie (test for now) function overrideMenuCookie(){ var tmpwMod=''; var expMod=new Date(); expMod.setTime(expMod.getTime()-1000); document.cookie='tree_0_state=;'+tmpwMod+';expires='+expMod.toGMTString(); document.cookie='tree_0_selected=;'+tmpwMod+';expires='+expMod.toGMTString(); } //** parse the url for the parameter specified and return its value function getURLParam(strParamName){ var strReturn = ""; var strHref = window.location.href; if ( strHref.indexOf("&") > -1 ){ var strQueryString = strHref.substr(strHref.indexOf("&")).toLowerCase(); var aQueryString = strQueryString.split("&"); for ( var iParam = 0; iParam < aQueryString.length; iParam++ ){ if (aQueryString[iParam].indexOf(strParamName + "=") > -1 ){ var aParam = aQueryString[iParam].split("="); strReturn = aParam[1]; break; } } } return strReturn; } //** when called, attempts to change the frame "mainframe" to a url provided as a url parameter in &mainframe= function changeIFrame() { //alert('in changeIFrame'); var theUrl = getURLParam('mainframe'); if(theUrl !=""){ //alert('final url: '+theUrl); loadintoIframe('mainframe',theUrl); } } //** when called, attempts to set the source of the main frame as given only when no url source is available (see function above) //** this addresses a workflow issue where the back button goes to the source loaded first before the final source function initFrame(src) { var theUrl = getURLParam('mainframe'); if(theUrl !=""){ }else{ if(src!="") loadintoIframe('mainframe',src); } } //** used to jump to nutrition info function toggleNutritionOff() { GotoNutrition = false; } //** called in Nutrition menu as custom function function toggleNutrition() { GotoNutrition = true; } function tryAnchor() { //custom addition to go to an anchor in the frame when GotoNutrition is true (set using toggleNutrition >> called in menu definition) if(GotoNutrition) if(frames['mainframe']){ var curframedoc = frames['mainframe'].document; if(curframedoc.getElementById) { if(curframedoc.getElementById('nutrition')) curframedoc.getElementById('nutrition').scrollIntoView(true); } } } function changeClass(elemName, newClassName) { var Elem; if(document.getElementById) { Elem= document.getElementById(elemName); } else if (document.all){ Elem= document.all[elemName]; } Elem.className = newClassName; } /*********************************************** * IFrame SSI script II- © Dynamic Drive DHTML code library (http://www.dynamicdrive.com) * Visit DynamicDrive.com for hundreds of original DHTML scripts * This notice must stay intact for legal use ***********************************************/ //Input the IDs of the IFRAMES you wish to dynamically resize to match its content height: //Separate each ID with a comma. Examples: ["myframe1", "myframe2"] or ["myframe"] or [] for none: var iframeids=["mainframe","rightframe"] //Should script hide iframe from browsers that don't support this script (non IE5+/NS6+ browsers. Recommended): var iframehide="no" var getFFVersion=navigator.userAgent.substring(navigator.userAgent.indexOf("Firefox")).split("/")[1] var FFextraHeight=parseFloat(getFFVersion)>=0.1? 16 : 0 //extra height in px to add to iframe in FireFox 1.0+ browsers function resizeCaller() { var dyniframe=new Array() for (i=0; i