if(document.all && !document.getElementById) { document.getElementById = function(id) { return document.all[id]; } } function strltrim() { return this.replace(/^\s+/,''); } function strrtrim() { return this.replace(/\s+$/,''); } function strtrim() { return this.replace(/^\s+/,'').replace(/\s+$/,''); } String.prototype.ltrim = strltrim; String.prototype.rtrim = strrtrim; String.prototype.trim = strtrim; function subscribeOnEnter(event) { NS4 = (document.layers) ? true : false; var code = 0; if (NS4) { code = event.which; } else { code = event.keyCode; } if (code==13) { return( subscribeNews() ); } } function subscribeMLOnEnter(event) { NS4 = (document.layers) ? true : false; var code = 0; if (NS4) { code = event.which; } else { code = event.keyCode; } if (code==13) { return( subscribeML() ); } } function searchOnEnter(event) { NS4 = (document.layers) ? true : false; var code = 0; if (NS4) { code = event.which; } else { code = event.keyCode; } if (code==13) { searchSite(); } } function searchSite() { var qry = document.getElementById('query').value; if ( qry.trim() == '' ) { document.getElementById('query').value = "" document.getElementById('query').focus(); alert("You must enter a search word"); return; } document.getElementById('query').value = "" qryfmt = replace(qry, ' ', ',') document.location.href = "../vwSearchContent?searchview&query=" + qryfmt } function getCookie(name) { var dc = document.cookie; var prefix = name + "="; var begin = dc.indexOf("; " + prefix); if (begin == -1) { begin = dc.indexOf(prefix); if (begin != 0) return null; } else begin += 2; var end = document.cookie.indexOf(";", begin); if (end == -1) end = dc.length; return unescape(dc.substring(begin + prefix.length, end)); } function cellMO( opt, cname ) { var opt1 = opt + 'a'; var opt2 = opt + 'b'; var opt3 = opt + 'c'; var opt4 = opt + 'd'; var opt5 = opt + 'e'; if ( document.getElementById(opt) ) { document.getElementById(opt).className = cname; } if ( document.getElementById(opt1) ) { document.getElementById(opt1).className = cname; } if ( document.getElementById(opt2) ) { document.getElementById(opt2).className = cname; } if ( document.getElementById(opt3) ) { document.getElementById(opt3).className = cname; } if ( document.getElementById(opt4) ) { document.getElementById(opt4).className = cname; } if ( document.getElementById(opt5) ) { document.getElementById(opt5).className = cname; } } function chgClass( id, cname ) { document.getElementById(id).className = cname; } function subscribeML() { var ea = document.forms["subscribeForm"].SubEmailAddress if ( ea.value.trim() == '' ) { ea.value = "" ea.focus(); alert("You must enter your email address in order to subscribe"); return false; } if ( ea.value.indexOf(' ') != -1 ) { ea.focus() alert("The specified email address does not appear to be formed correctly."); return false; } if ( ea.value.indexOf(',') != -1 ) { ea.focus() alert("The specified email address does not appear to be formed correctly."); return false; } if ( ea.value.indexOf('@') == -1 ) { ea.focus() alert("The specified email address does not appear to be formed correctly."); return false; } if ( ea.value.indexOf('.') == -1 ) { ea.focus() alert("The specified email address does not appear to be formed correctly."); return false; } document.forms["subscribeForm"].submit(); return true; } function sd(u) { alert(u + "&a=" + now.getMinutes()+ "0" + now.getFullYear().toString().substring(2,4) + "0" + now.getMonth() + "0" + now.getDate() + "0" + now.getHours()); return u + "&a=" + now.getMinutes()+ "0" + now.getFullYear().toString().substring(2,4) + "0" + now.getMonth() + "0" + now.getDate() + "0" + now.getHours(); } function subscribeNews() { var ea = document.forms[0].EmailAddress.value if ( ea.trim() == '' ) { document.forms[0].EmailAddress.value = "" document.forms[0].EmailAddress.focus(); alert("You must enter your email address in order to subscribe"); return false; } if ( ea.indexOf(' ') != -1 ) { document.forms[0].EmailAddress.focus() alert("The specified email address does not appear to be formed correctly."); return false; } if ( ea.indexOf(',') != -1 ) { document.forms[0].EmailAddress.focus() alert("The specified email address does not appear to be formed correctly."); return false; } if ( ea.indexOf('@') == -1 ) { document.forms[0].EmailAddress.focus() alert("The specified email address does not appear to be formed correctly."); return false; } if ( ea.indexOf('.') == -1 ) { document.forms[0].EmailAddress.focus() alert("The specified email address does not appear to be formed correctly."); return false; } document.forms[0].submit(); return true; } function replace(s, t, u) { i = s.indexOf(t); r = ""; if (i == -1) return s; r += s.substring(0,i) + u; if ( i + t.length < s.length) r += replace(s.substring(i + t.length, s.length), t, u); return r; } function bm( sTitle ) { hitmarker = new Image() hitmarker.src = "../bm.gif?Open&" + new String (Math.random()).substring (2, 11); isMac = (navigator.appVersion.indexOf("Mac") != -1); isOpera = (window.opera) ? true : false; if ( document.all && ! isMac ) { var site = sTitle + " - " + top.location.hostname; window.external.AddFavorite( top.location.href, site ); } else if ( isOpera ) { alert('Press CTL+T in order to bookmark this page.') } else { alert('Press CTRL+D in order to bookmark this page.') } } function goBargains() { var cat = document.getElementById('barg').value; if( cat =='0' ) {return;} document.getElementById('barg').value = '0' top.location.href = 'http://' + top.location.hostname + bargurl + '&cat=' + cat } function buyDirect( spath, scoyid, spid, qty, opt, ba, pcat ) { window.location = spath + "/agBuyDirect?OpenAgent&coyid=" + scoyid + "&pid=" + spid + "&pcat=" + pcat + "&start=1&opt=" + opt + "&qty=" + qty + "&buy=" + ba; } function timeStatus(message){ status=message; } function setStatus(message){ status=message; setTimeout('timeStatus("'+message+'")',1); } function PopUpWin( url, w, h ) { var opt = "toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=0,copyhistory=0,width="+w+",height="+h; window.open(url, "PopUp", opt); }