﻿
browser=parent.window.navigator.userAgent;function Ghosting(ctrlName,bgcolor,opacity,posType,zindex){var divGhost=document.getElementById(ctrlName.id);if(divGhost!=null){var height=screen.availHeight;var width=screen.availWidth;var left=parseInt((screen.availWidth/2)-(width/2));var top=parseInt((screen.availHeight/2)-(height/2));divGhost.style.top=top;divGhost.style.left=left;divGhost.style.width=width;divGhost.style.height=height;divGhost.style.backgroundColor=bgcolor;divGhost.style.filter=opacity;divGhost.style.position=posType;divGhost.style.zIndex=zindex}}function GhostPage(ctrlName,bgcolor,opacity,posType,zindex,height){var divGhost=document.getElementById(ctrlName.id);if(divGhost!=null){divGhost.style.top=1;divGhost.style.left=1;divGhost.style.height=height;divGhost.style.backgroundColor=bgcolor;divGhost.style.filter=opacity;divGhost.style.position=posType;divGhost.style.zIndex=zindex;divGhost.style.width=728}}function MaximizeGhosting(ctrlName,bgcolor,opacity,posType,zindex,height1,ifraName){var divGhost=document.getElementById(ctrlName.id);var myHeight=0;var myClientHeight=0;var myAvailableHeight="";myAvailableHeight=parent.screen.availHeight;var myCorpMaster=document.getElementById("bodyMasterCorporate");if(myCorpMaster==null){myCorpMaster=parent.document.getElementById("bodyMasterCorporate")}if(myCorpMaster!=null){myClientHeight=myCorpMaster.clientHeight}var myAgentMaster=document.getElementById("bodyAgentMaster");if(myAgentMaster==null){myAgentMaster=parent.document.getElementById("bodyAgentMaster")}if(myAgentMaster!=null){myClientHeight=myAgentMaster.clientHeight}if(myClientHeight>=myAvailableHeight){myHeight=myClientHeight}else{myHeight=myAvailableHeight}if(ifraName!=""&&ifraName!=undefined){setiFrameHeight(myHeight,ifraName);}var myWidth="";myWidth=parent.screen.availWidth;if(divGhost!=null){divGhost.style.top=0+"px";divGhost.style.left=0+"px";divGhost.style.width=myWidth+"px";;divGhost.style.height=myHeight+"px";if(browser.indexOf("Firefox")!=-1){divGhost.style.setProperty("-moz-opacity",.5,'');}else if(browser.indexOf("Safari")!=-1){divGhost.style.opacity=0.5}else{divGhost.style.filter=opacity}divGhost.style.backgroundColor=bgcolor;divGhost.style.position=posType;divGhost.style.zIndex=zindex;if(navigator.appName=="Netscape"){divGhost.style.setProperty("-moz-opacity",.5,'');divGhost.style.width=myWidth+"px";divGhost.style.height=myHeight+"px"}if(msieversion()!=0){divGhost.style.height=myHeight+2500+"px"}}}function setiFrameHeight(h,ifraName){var myFrame=parent.document.getElementById(ifraName);var pad=0;switch(ifraName){case"ifraPD":pad=750;break;case"ifraPF":pad=800;break;case"ifraFC":pad=800;break;default:pad=900;break}if(h==""){h="990"}myFrame.style.height=h+pad+"px"}function msieversion(){var ua=parent.window.navigator.userAgent;var msie=ua.indexOf("MSIE ");if(msie>0)return parseInt(ua.substring(msie+5,ua.indexOf(".",msie)));else return 0}function setPanelsHeight(){var bLoadComplete=false;if(document.readyState){if(document.readyState=="complete"||document.readyState=="loaded"){bLoadComplete=true}}else{bLoadComplete=true}if(bLoadComplete==true){var myRightPanel=document.getElementById('ctl00_ContentPlaceHolder1_pnlRight');var myLeftPanel=document.getElementById('ctl00_ContentPlaceHolder1_pnlLeft');var myHeight=document.getElementById("divPage").clientHeight;var pnlRightBottom=document.getElementById('ctl00_ContentPlaceHolder1_pnlRightBottom');var hidHostPage=document.getElementById('hidHostPage');myRightPanel.style.height=(myHeight-113)+"px";myLeftPanel.style.height=(myHeight-70)+"px";if(pnlRightBottom!=null){if(pnlRightBottom.style.height=="100px"){myRightPanel.style.height=(myHeight-100)+"px";myLeftPanel.style.height=(myHeight-65)+"px";if(hidHostPage!=null){if(hidHostPage.value=="COMPARABLEHOMES"){myRightPanel.style.height=(myHeight-40)+"px"}if(hidHostPage.value=="NEWRULES"){myLeftPanel.style.height=(myHeight-68)+"px"}}}if(pnlRightBottom.style.height=="110px"){myRightPanel.style.height=(myHeight-110)+"px";myLeftPanel.style.height=(myHeight-78)+"px"}}if(browser.indexOf("Safari")!=-1){myLeftPanel.style.height=parseInt(myLeftPanel.style.height.replace("px",""))+50+"px";myRightPanel.style.height=parseInt(myRightPanel.style.height.replace("px",""))+50+"px"}if(browser.indexOf("Firefox")!=-1){myLeftPanel.style.height=parseInt(myLeftPanel.style.height.replace("px",""))+100+"px";myRightPanel.style.height=parseInt(myRightPanel.style.height.replace("px",""))+100+"px"}}}