var xmlfile="/ATC_RightButtons.aspx?pid=";var rb_div=new Array();var AJAX=(function(a){return function(b){var c=a();c.open("GET",b,false);c.send("");return c}})(this.XMLHttpRequest?function(){return new XMLHttpRequest}:function(){return new ActiveXObject("Microsoft.XMLHTTP")});function get_qs(e){var d="";var b=new Array();var a=location.search;a=a.split("&");for(var c=0;c<a.length;c++){tmp=a[c].split("=");b[tmp[0].toLowerCase()]=tmp[1]}if(typeof b[e.toLowerCase()]!="undefined"){d=b[e.toLowerCase()]}else{if(location.href.indexOf("~p")>1){var a=location.href.substr(location.href.indexOf("~p")+2);a=a.split("p~");if(a.length>0){d=a[0]}}}return(d)}function get_right_buttons(){var a=AJAX(xmlfile+listingID);if(a.status==200){rb_div=a.responseXML.getElementsByTagName("buttons").item(0).getElementsByTagName("div")}if(rb_div.length>0){DomReady.ready(function(){(function(){var b="";for(i=0;i<rb_div.length;++i){b+=rb_div[i].getElementsByTagName("content").item(0).firstChild.nodeValue}b=b.replace("#canonical#",canonicalURL);document.getElementById("atc_right_buttons").innerHTML=b;setTimeout("atc_process_right_buttons()",20)}())})}}function atc_process_right_buttons(){var c,f,k,a,d,g;var b,j,h,e;d=null;g=false;d=navigator.userAgent.toLowerCase();g=((d.indexOf("ipad")!=-1));c=document.getElementById("FullScreenViewer");b=document.getElementById("ATCFullScreen");if(c&&!g){k=c.innerHTML;f=document.getElementById("fullviewerdiv");if(f&&k.length>5&&k.length<16){a=get_vht_fsv_object(k);f.innerHTML=a;f.style.display="inline"}}else{if(b&&g){j=document.getElementById("fullviewerdiv");e=b.innerHTML.split("|");if(j&&e.length==2){h="<a onclick=\"javascript:TateTour('http://www.thishomephotos.com/fullscreen.asp?mls="+e[0]+"&mlsnum="+e[1]+'\');" style="CURSOR:pointer"><img src="/images/FullScrnViewer.gif" border="0" /></a>';j.innerHTML=h;j.style.display="inline"}}}}function get_vht_fsv_object(b){var a;a="";a+='<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0" width="147" height="20" id="custom_slide_show" >';a+='	<param name="allowScriptAccess" value="always" />';a+='	<param name="allowFullScreen" value="true" />';a+='	<param name="FlashVars" VALUE="configUrl=http://tours.vht.com/FSViewer/fsdata.aspx?vhtid='+b+'&button_image=http://tours.vht.com/FSViewer/buttons/atc_fsv_b1.gif&button_over=http://tours.vht.com/FSViewer/buttons/atc_fsv_b1.gif&button_click=http://tours.vht.com/FSViewer/buttons/atc_fsv_b1.gif&thumb_height=10&thumb_offset=0&close_bttn_padding=10&inBrowser=false&hideCopyright=false" />';a+='	<param name="movie" value="http://tours.vht.com/FSViewer/flash/custom_slide_show.swf" />	';a+='	<param name="quality" value="best" />';a+='	<param name="scale" value="noscale" />';a+='	<param name="wmode" value="opaque" />';a+='	<param name="salign" value="lt" />';a+="	<embed 	";a+='		src="http://tours.vht.com/FSViewer/flash/custom_slide_show.swf" ';a+='		quality="best" ';a+='		scale="noscale" ';a+='		salign="lt" ';a+='		width="147" ';a+='		height="20" ';a+='		name="custom_slide_show" ';a+='		wmode="opaque" ';a+='		allowScriptAccess="always" ';a+='		allowFullScreen="true" ';a+='		type="application/x-shockwave-flash" ';a+='		pluginspage="http://www.adobe.com/go/getflashplayer" ';a+='		FlashVars="configUrl=http://tours.vht.com/FSViewer/fsdata.aspx?vhtid='+b+'&button_image=http://tours.vht.com/FSViewer/buttons/atc_fsv_b1.gif&button_over=http://tours.vht.com/FSViewer/buttons/atc_fsv_b1.gif&button_click=http://tours.vht.com/FSViewer/buttons/atc_fsv_b1.gif&thumb_height=10&thumb_offset=0&close_bttn_padding=10&inBrowser=false&hideCopyright=false" ';a+="	/>";a+="</object>";return(a)}var listingID=get_qs("listingid");if(listingID!=""){setTimeout("get_right_buttons()",200)};
