function changeLoc(loc) { window.location = loc } function getCookie(name) { var prefix = name + "="; var cStr = document.cookie; var start = cStr.indexOf(prefix); if (start==-1) { return null; } var end = cStr.indexOf(";", start+prefix.length); if (end==-1) { end=cStr.length; } var value=cStr.substring(start+prefix.length, end); return unescape(value); } function setCookie(name, value, expiration) { document.cookie = name+"="+value+"; expires="+expiration; } function toggleCheckbox(checkBox) { var element = document.getElementById(checkBox.id); if (element.value == "1" || element.checked) { element.checked = false; element.value = "0"; } else { element.checked = true; element.value = "1"; } } function toggleChkbox(checkBox) { if (checkBox.checked) { checkBox.checked = true; } else { checkBox.checked = false; } } function toggle_list(id){ ul = "ul_" + id; img = "img_" + id; hid = "h_" + id; ulElement = document.getElementById(ul); imgElement = document.getElementById(img); hiddenElement = document.getElementById(hid); if (ulElement){ if (ulElement.className == 'closed'){ ulElement.className = "open"; imgElement.src = "/images/list_opened.gif"; hiddenElement.value = "1" }else{ ulElement.className = "closed"; imgElement.src = "/images/list_closed.gif"; hiddenElement.value = "0" } } } function toggle_layer(id) { lElement = document.getElementById(id); imgElement = document.getElementById("img_" + id); if (lElement){ if (lElement.className == 'closed'){ lElement.className = "open"; imgElement.src = "/images/list_opened.gif"; return true; }else{ lElement.className = "closed"; imgElement.src = "/images/list_closed.gif"; return false; } } return true; } function toggle_layer_status(id) { lElement = document.getElementById(id); if (lElement){ if (lElement.className == 'closed'){ return false; }else{ return true; } } return true; } function toggle_text(id){ if ( document.getElementById ) elem = document.getElementById( id ); else if ( document.all ) elem = eval( "document.all." + id ); else return false; if(!elem) return true; elemStyle = elem.style; if ( elemStyle.display != "block" ) { elemStyle.display = "block" } else { elemStyle.display = "none" } return true; } function getFF(id) { if ( document.getElementById ) elem = document.getElementById( id ); else if ( document.all ) elem = document.eval( "document.all." + id ); return elem } function setFF(id, value) {if(getFF(id))getFF(id).value=value;} function setCFF(id) {if(getFF(id))getFF(id).checked=true;} function updateSUFromC(btnName) { var suem = getCookie('_cdf_em');var sueg = getCookie('_cdf_gr'); if (suem != "" && suem != null && suem != "undefined") { setFF('sup_email', suem); setFF('signup_submit_button',btnName); } if (sueg && sueg != "") { if (sueg.indexOf(",") < 0 && sueg != "") { gr_id = sueg; setCFF('supgr_'+gr_id); } else while ((i = sueg.indexOf(",")) >= 0) { gr_id = sueg.substring(0,i); sueg = sueg.substring(i+1); setCFF('supgr_'+gr_id); } if (sueg.indexOf(",") < 0 && sueg != "") { gr_id = sueg; setCFF('supgr_'+gr_id);} } } function updateLUEfC() { var suem = getCookie('_cdf_em'); if (suem != "" && suem != null && suem != "undefined") { setFF('login_user_email', suem); } } function replaceHRFST(ifrm) { var o = ifrm; var w = null; if (o.contentWindow) { // For IE5.5 and IE6 w = o.contentWindow; } else if (window.frames && window.frames[o.id].window) { w = window.frames[o.id]; } else return; var doc = w.document; if (!doc.getElementsByTagName) return; var anchors = doc.getElementsByTagName("a"); for (var i=0; i= 12) { adds = ' PM'; h = system_date.getHours() - 12; } else { adds = ' AM'; h = system_date.getHours(); } spans[i].innerHTML = h + ":" + (system_date.getMinutes()+"").replace(/\b(\d)\b/g, '0$1') + adds; } } function PopupPic(sPicURL,sWidth,sHeight) { window.open( "/popup.htm?"+sPicURL, "", "resizable=1,HEIGHT="+sHeight+",WIDTH="+sWidth+",scrollbars=yes"); } function open_link(target, location){ if (target == 'blank'){ window.open(location); } else { window.top.location = location; } }