var BrowserDetect = { init: function () { this.browser = this.searchString(this.dataBrowser) || "An unknown browser"; this.version = this.searchVersion(navigator.userAgent) || this.searchVersion(navigator.appVersion) || "an unknown version"; this.OS = this.searchString(this.dataOS) || "an unknown OS"; }, searchString: function (data) { for (var i=0;i 0 && height > maxheight) var finalheight = maxheight; else var finalheight = height; //iframeEl.style.height = "auto"; iframeEl.style.height = finalheight + "px"; } } function swapLoginImgs() { setLayerDisp('menu_logout_div','inline'); setLayerDisp('menu_account_div','inline'); setLayerDisp('menu_email_div','none'); setLayerDisp('menu_login_div','none'); } function getFrameLink(id,url) { if(id && url) { if(document.layers && document.layers[id].load) document.layers[id].load(url,0); else if(frames && frames.length && frames[id]) frames[id].location.replace(url); else if(document.getElementById(id)) document.getElementById(id).location.replace(url); } } function reloadFrame(id) { frames[id].location.reload(true); } function getValue(id) { if(document.getElementById(id)) return document.getElementById(id).value; } function setValue(id,val) { if(document.getElementById(id)) document.getElementById(id).value = val; } function setHTML(id,html) { if(document.getElementById(id)) document.getElementById(id).innerHTML = html; } function getResultCount(r,id) { setHTML('result'+r,'Loading...'); getFrameLink('dataframe','resultcount?id='+id+'&r='+r); } function checkDefault(id,def,clk) { var val = document.getElementById(id).value; if(clk && val && val == def) document.getElementById(id).value = ''; if(!clk && val == '') document.getElementById(id).value = def; } function swapImg(id,src) { document.images[id].src = src; } function unique(a) { tmp = new Array(0); for(i = 0; i < a.length; i++) { if(!contains(tmp,a[i])) { tmp.length += 1; tmp[tmp.length-1] = a[i]; } } return tmp; } function contains(a,e) { for(j = 0; j < a.length; j++) if(a[j] == e) return true; return false; } function getFrameSrc(id) { if(document.layers && document.layers[id].load) return document.layers[id].location; else if(frames && frames.length && frames[id]) return frames[id].location; } function getLeft(id) { xPos = document.getElementById(id).offsetLeft; tempEl = document.getElementById(id).offsetParent; while (tempEl != null) { xPos += tempEl.offsetLeft; tempEl = tempEl.offsetParent; } return xPos; } function getTop(id) { yPos = document.getElementById(id).offsetTop; tempEl = document.getElementById(id).offsetParent; while (tempEl != null) { yPos += tempEl.offsetTop; tempEl = tempEl.offsetParent; } return yPos; } function getWidth(id) { var width = document.getElementById(id).offsetWidth; if(!width) width = document.getElementById(id).style.width; return width; } function getHeight(id) { var height = document.getElementById(id).offsetHeight; if(!height) height = document.getElementById(id).style.height; return height; } function windowWidth() { if (window.innerWidth) { if (document.body.offsetWidth) { if (window.innerWidth!=document.body.offsetWidth) return document.body.offsetWidth; } return (window.innerWidth); } if (document.documentElement.clientWidth) return document.documentElement.clientWidth; if (document.body.clientWidth) return document.body.clientWidth; } function windowHeight() { if (window.innerHeight) { if (document.body.offsetHeight) { if (window.innerHeight!=document.body.offsetHeight) return document.body.offsetHeight; } return (window.innerHeight); } if (document.documentElement.clientHeight) return document.documentElement.clientHeight; if (document.body.clientHeight) return document.body.clientHeight; } function setBlank(id) { document.getElementById(id).value=''; } function setCookie(name,value,time) { if(!time) time = "Wed, 1 Jan 2020 12:00:00"; document.cookie = name+"="+value+"; expires="+time+" UTC"+"; path=/"; } function setLayerVis(id,vis) { if(vis == 'v') vis = 'visible'; if(vis == 'h') vis = 'hidden'; if(document.getElementById(id)) document.getElementById(id).style.visibility = vis; } function setLayerDisp(id,vis) { if(vis == 'i') vis = 'inline'; if(vis == 'b') vis = 'block'; if(vis == 'n') vis = 'none'; if(document.getElementById(id)) document.getElementById(id).style.display = vis; } function serviceArea() { window.open("service_areas.php","sa", "height=400, width=400, toolbar=no, menubar=no, scrollbars=yes, resizable=no, location=no, directories=no, status=no"); } function listing_info(url,w,h) { window.open(url, "newWin", "height="+h+", width="+w+", toolbar=no, menubar=no, scrollbars=no, resizable=no, location=no, directories=no, status=no"); } function openWindow(url,w,h) { window.open(url, "newWin", "height="+h+", width="+w+", toolbar=no, menubar=yes, scrollbars=yes, resizable=yes, location=no, directories=no, status=no"); } function swapImgRestore() { var i,x,a=document.sr; for(i=0;a&&i0&&parent.frames.length) { d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);} if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i