var enabled = 1; var largePopup = 'width=600,height=540,menubar=0,scrollbars=1,resizable=1' var smallPopup = 'width=400,height=400,menubar=0,scrollbars=0,status=0' function oncePopup(theURL,winName,winType) { if ((readCookie('popupFlag') == null) && (enabled ==1)) { createCookie('popupFlag',location.href,1); popupRemote(theURL,winName,winType); } } function popupRemote(theURL,winName,winType) { newWin=window.open(theURL,winName,eval(winType)); newWin.focus(); } function createCookie(name,value,days) { if (days) { var date = new Date(); date.setTime(date.getTime()+(days*24*60*60*1000)); var expires = "; expires="+date.toGMTString(); } else var expires = ""; document.cookie = name+"="+value+expires+"; path=/"; } function readCookie(name) { var nameEQ = name + "="; var ca = document.cookie.split(';'); for(var i=0;i < ca.length;i++) { var c = ca[i]; while (c.charAt(0)==' ') c = c.substring(1,c.length); if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length); } return null; } function eraseCookie(name) { createCookie(name,"",-1); } function disable() { enabled = 0; } function cmcPopup(url) { cmcwindow=window.open(url,'cmc','width=488,height=490,menubar=0,scrollbars=0,resizable=no'); if (window.focus) {cmcwindow.focus();} return false; } function cmcTransPopup(url) { cmctranswindow=window.open(url,'cmc','width=506,height=490,menubar=0,scrollbars=1,resizable=no'); if (window.focus) {cmctranswindow.focus();} return false; } function cmcGoHome(url) { var thisWin = window.name; if (thisWin == "cmcJargon") { top.location.href = url; } else if ((thisWin == "cmc") && window.opener && window.opener.open) { self.opener.location.href = url; self.opener.focus(); self.close(); } else { self.location.href = url; } return false; } function initFaqs() { // grab the faq div var allDivs = document.getElementById("faqContent"); // grab the FAQ category content var faqCat = new Array; faqCat = allDivs.getElementsByTagName("div"); // build the list of category titles and populate the drop-down var FaqDD = document.getElementsByTagName("select")[0]; for (var i = 0; i < faqCat.length; i++) { var catTitle = faqCat[i].getElementsByTagName("h2")[0].innerHTML; //alert(catTitle); var cleanTitle = catTitle.replace("\&","\&"); addOpt(FaqDD, cleanTitle, i); } // finally, hide all but the first FAQ category for (var i = 1; i < faqCat.length; i++) { faqCat[i].style.display = "none"; } } function showFaqCat(catIndex) { // grab the faq div var allDivs = document.getElementById("faqContent"); // grab the FAQ category content var faqCat = new Array; faqCat = allDivs.getElementsByTagName("div"); // hide all but the selected FAQ category for (var i = 0; i < faqCat.length; i++) { if (i == catIndex) { faqCat[i].style.display = "inline"; } else { faqCat[i].style.display = "none"; } } } // helper function to populate the drop-down function addOpt(sel,lbl,val ) { var optn = document.createElement("OPTION"); optn.text = lbl; optn.value = val; sel.options.add(optn); }