window.onload=maximize;window.onresize=myResize;var totalWidth;var totalHeight;var stillViews=null;var panoViews=null;var stillImageAvail=false;var sound=null;var mp3File;soundManager.waitForWindowLoad=true;soundManager.onload=function(){var a='<input type="image" value="Pause" onclick="soundButtonOnClick(this);" src="../Images/buttons/mute.gif">';divContent("music",a);sound=soundManager.createSound("music","../Sounds/"+mp3File);sound.play({onfinish:function(){this.play()}})};function playSound(){soundManager.play("music")}function soundButtonOnClick(a){if(!sound.paused){a.value="Play";a.src="../Images/buttons/play.gif";soundManager.pause("music")}else{a.value="Pause";a.src="../Images/buttons/mute.gif";soundManager.play("music")}}function maximize(){window.moveTo(0,0);window.resizeTo(window.screen.availWidth,window.screen.availHeight);window.focus();myResize()}function myResize(){if(self.innerHeight){totalWidth=self.innerWidth;totalHeight=self.innerHeight}else{if(document.documentElement&&document.documentElement.clientHeight){totalWidth=document.documentElement.clientWidth;totalHeight=document.documentElement.clientHeight}else{if(document.body){totalWidth=document.body.clientWidth;totalHeight=document.body.clientHeight}}}if(totalWidth<950){totalWidth=950}if(totalWidth>1600){totalWidth=1600}if(totalHeight<595){totalHeight=595}if(totalHeight>1200){totalHeight=1200}var a=document.getElementById("wrapper");a.style.width=(totalWidth-10)+"px";a.style.height=(totalHeight-10)+"px";var b=document.getElementById("logo");b.style.width=(totalWidth-693)+"px";var i=document.getElementById("MLS");i.style.width=(totalWidth-693)+"px";var g=document.getElementById("hMiddle");g.style.width=(totalWidth-693)+"px";var f=document.getElementById("content");f.style.height=(totalHeight-120)+"px";var d=document.getElementById("sideBar1");d.style.height=(totalHeight-130)+"px";var h=document.getElementById("imageContainer");h.style.width=(totalWidth-330)+"px";h.style.height=(totalHeight-150)+"px";if(stillImageAvail==true){resizeStill()}var e=document.getElementById("scene");e.style.width=(totalWidth-330)+"px";e.style.height=(totalHeight)-150+"px";var j=document.getElementById("footer");j.style.width=(totalWidth-330)+"px";var c=document.getElementById("sideBar2");c.style.height=(totalHeight-120)+"px";var k=document.getElementById("links");k.style.height=(totalHeight-320)+"px"}function resizeStill(){var e=document.getElementById("still");var c=totalWidth-330;var b=totalHeight-150;var d;var a;if(c<=b){d=c;a=(2/3)*c}else{if(c>=((3/2)*b)){a=b;d=(3/2)*b}else{d=c;a=(2/3)*c}}e.style.width=d+"px";e.style.height=a+"px";e.style.marginLeft=((c-d)/2)+"px";e.style.marginTop=((b-a)/2)+"px"}function isMLS(){return((window.location.search.indexOf("mls")==-1)?false:true)}function formatPhone(d){var e=false;e="(";var b=d.substring(0,3);e+=b+") ";var c=d.substring(3,6);e+=c+"-";var a=d.substring(6,10);e+=a;return e}function displayMLS(f,d,g,h,c,a,b){var e="";var i="";if(d!=""){e="MLS: "+d}else{e=f}if(g!=""){i+='<br /><br /><a href="http://tours.virtualopenhouse360.com/scripts/emailTour.aspx?tourName='+g+'" target="_blank"><img src="../Images/Buttons/emailTour.gif" alt="Email Tour" border="0"/></a><br /><br />'}if(h!=""&&c!=""&&a!=""&&b!=""){document.title=h+", "+c+" "+a+" "+b+" Virtual Tour";i+='<a href="" onclick="javascript:displayMap(&quot;../scripts/map.htm?addr='+h+", "+c+" "+a+" "+b+'&quot;); return false"><img src="../Images/Buttons/viewMap.gif" alt="View Map" border="0"/></a><br /><br />'}divContent("MLS",e);divContent("links",i)}function contactObj(i,m,o,j,g,q,d,f,p,a,e,n,l,c,h,k,b){this.company=i;this.firstName=m;this.lastName=o;this.title=j;this.phone1Type=g;this.phone1=q;this.phone1Ext=d;this.phone2Type=f;this.phone2=p;this.phone2Ext=a;this.phone3Type=e;this.phone3=n;this.phone3Ext=l;this.webAddress=c;this.email=h;this.portrait=k;this.logo=b;this.display=function(u){if(!isMLS()){var r="";var s="";var v=(u==1)?"hLeft":"hRight";var t=(u==1)?"floatLeft":"floatRight";if(this.portrait!=""){r+='<img src="../Images/Agent/'+this.portrait+'" alt="'+this.firstName+" "+this.lastName+'" class="'+t+'"/>'}if(this.firstName!=""&&this.lastName!=""){r+="<b>"+this.firstName+" "+this.lastName+"</b><br />"}else{if(this.firstName!=""&&this.lastName==""){r+="<b>"+this.firstName+"</b><br />"}else{if(this.firstName==""&&this.lastName!=""){r+="<b>"+this.lastName+"</b><br />"}else{if(this.firstName==""&&this.lastName==""&&this.company!=""){r+="<b>"+this.company+"</b><br />"}}}}if(this.title!=""){r+=this.title+"<br />"}if(this.phone1!=""){if(this.phone1Type!=""){r+=this.phone1Type+": "}r+=formatPhone(this.phone1);if(this.phone1Ext!=""){r+=" x:"+(this.phone1Ext)}r+="<br />"}if(this.phone2!=""){if(this.phone2Type!=""){r+=this.phone2Type+": "}r+=formatPhone(this.phone2);if(this.phone2Ext!=""){r+=" x:"+(this.phone2Ext)}r+="<br />"}if(this.phone3!=""){if(this.phone3Type!=""){r+=this.phone3Type+": "}r+=formatPhone(this.phone3);if(this.phone3Ext!=""){r+=" x:"+(this.phone3Ext)}r+="<br />"}if(this.email!=""){r+='<a href="mailto:'+this.email+'">'+this.email+"</a><br />"}if(this.webAddress!=""){r+='<a href="http://'+this.webAddress+'" target="_blank">Visit My Website</a>'}if((u==1)&&(this.logo!="")){s+='<img src="../Images/company/'+this.logo+'" alt="'+this.company+'"/>';divContent("logo",s)}divContent(v,r)}}}function panoObj(c,b,d,e,f,a){this.name=c;this.filename=b;this.type=d;this.zoom=e;this.pan=f;this.tilt=a}function stillObj(b,a){this.name=b;this.filename=a;this.src="Scene/"+a}function panoObjView(){this.panoArray=new Array();this.panoLinks=function(){var b="";if(this.panoArray.length>0){b+='<div class="Subtitle">Panorama</div>';for(var a=0;a<this.panoArray.length;a++){b+='<a href="" onclick="displayPano('+a+'); return false;">'+this.panoArray[a].name+"</a><br/>"}}return b};this.addPano=function(a){this.panoArray[this.panoArray.length]=a}}function stillObjView(){this.stillArray=new Array();this.xmlString="";this.stillLinks=function(){var b="";if(this.stillArray.length>0){b+='<br/><a href="" onclick="javascript:displaySlideShow(); return false;">Slide Show</a><br/><br/>';b+='<div class="Subtitle">Stills</div>';for(var a=0;a<this.stillArray.length;a++){b+='<a href="" onclick="displayStill('+a+'); return false;">'+this.stillArray[a].name+"</a><br/>"}}return b};this.addStills=function(a){this.stillArray[this.stillArray.length]=a;this.xmlString+=' <image source="'+this.stillArray[(this.stillArray.length-1)].src+'"/> '}}function createDiv(e){var f=document.getElementById("still");var c=document.getElementById("panorama");var g=document.getElementById("slideshow");var a=document.getElementById("iframe");if(((e=="panorama")&&(c))||((e=="still")&&(f))||((e=="slideshow")&&(g))){return}var j=((f)?"still":((c)?"panorama":((g)?"slideshow":((a)?"iframe":""))));if(j!=""){document.getElementById("imageContainer").removeChild(document.getElementById(j))}if((e=="panorama")||(e=="slideshow")){var h=document.createElement("div");h.setAttribute("id",e);h.innerHTML='<br /><br /><br /><br /><br /><p>THIS VIRTUAL TOUR REQUIRES THE LATEST FLASH PLAYER</p><br /><br /><p><a href="http://www.adobe.com/go/getflashplayer/" target="_blank">GET FLASH PLAYER HERE</a></p>';document.getElementById("imageContainer").appendChild(h)}else{if(e=="still"){var b=document.createElement("IMG");b.setAttribute("id","still");document.getElementById("imageContainer").appendChild(b);resizeStill()}}}function displayPano(b){stillImageAvail=false;var a;var e;createDiv("panorama");if(panoViews.panoArray[b].type==2){a="mov";e="xml360.xml"}if(panoViews.panoArray[b].type==3){a="cylinder";e="xmlPano180.xml"}if(panoViews.panoArray[b].type==4){a="cylinder";e="xmlPano225.xml"}var c={};var f={};var d={};c.xml_file="../scripts/"+e;c.panoType=a;c.panoName="Scene/"+panoViews.panoArray[b].filename;if(panoViews.panoArray[b].type==2){c.zoomHome=panoViews.panoArray[b].zoom;c.tiltHome=panoViews.panoArray[b].tilt}c.panHome=panoViews.panoArray[b].pan;f.allowfullscreen="true";f.allowscriptaccess="sameDomain";swfobject.embedSWF("../scripts/pano.swf","panorama","100%","100%","9.0.0","../scripts/expressInstall.swf",c,f,d)}function displayStill(a){stillImageAvail=true;createDiv("still");document.getElementById("still").src="Scene/"+stillViews.stillArray[a].filename}function displaySlideShow(){stillImageAvail=false;var d='<?xml version="1.0" encoding="utf-8"?><album><configuration backgroundImage="../Images/Logos/wait1.gif" delay="6" startWithItemID="myPhoto"><controller autoHide="false" backgroundColor="#D0C7B5" backgroundAlpha=".5"	backgroundRoundness="0" strokeColor="#685739" strokeWidth="1" padding="3, 3, 3, 3" iconColorUp="#4b3f29" iconColorOver="#ffffff" iconHeight="21" iconWidth="21" iconSpacing="8" showFullScreenButton="true" showNavigationButton="false" /><transition kenBurnsMode="randomZoomIn" kenBurnsTime="6" kenBurnsStrength=".25" /></configuration><contents> '+stillViews.xmlString+"</contents></album>";createDiv("slideshow");var a={xml:escape(d),showLogo:"false",showRegistration:"false"};var c={allowScriptAccess:"sameDomain",allowfullscreen:"true",allowNetworking:"all"};var b={};swfobject.embedSWF("../scripts/monoslideshow.swf","slideshow","100%","100%","9.0.0","../scripts/expressInstall.swf",a,c,b)}function displayMap(b){stillImageAvail=false;createDiv("iframe");var a=document.createElement("iframe");a.setAttribute("id","iframe");a.setAttribute("src",b);a.setAttribute("marginheight","0");a.setAttribute("marginwidth","0");a.setAttribute("scrolling","no");a.style.width="100%";a.style.height="100%";document.getElementById("imageContainer").appendChild(a)}function displaySideBar1(){var c="";var b="";var a=false;if(panoViews!=null){b=panoViews.panoLinks();c+=b;if((b!="")&&(!a)){displayPano(0);a=true}}if(stillViews!=null){b=stillViews.stillLinks();c+=b;if((b!="")&&(!a)){displaySlideShow();a=true}}divContent("sideBar1",c)}function divContent(c,b){var a=document.getElementById(c);a.innerHTML=b};