function InsertFlashPhotos()
{
  document.write('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0" width="501" height="188" id="photos" align="top">\n');
  document.write('<param name="allowFullScreen" value="false" />\n');
  document.write('<param name="allowScriptAccess" value="sameDomain" />\n');
  document.write('<param name="movie" value="photos.swf" />\n');
  document.write('<param name="quality" value="high" />\n');
  document.write('<param name="bgcolor" value="#d2d2d2" />\n');
  document.write('<param name="play" value="true" />\n');
  document.write('<param name="wmode" value="v" />\n');
  document.write('<embed src="photos.swf" quality="high" bgcolor="#d2d2d2" wmode="opaque" play="true" width="501" height="188" name="photos" align="top" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" allowFullScreen="false" />\n');
  document.write('</object>\n');
}

function positionMainLayers() {
	if (document.layers) {
            document.layer1Welcome.style.top="17px";
            document.layer2VirtualTours.style.top="17px";
            document.layer2VirtualToursSet2.style.top="17px";
            document.layer1Welcome.style.left="17px";
            document.layer2VirtualTours.style.left="17px";
            document.layer2VirtualToursSet2.style.left="17px";
            document.layer1Welcome.style.visibility="visible";
            document.layer1Welcome.style.zIndex="2";
            document.layer2VirtualTours.style.visibility="hidden";
            document.layer2VirtualTours.style.zIndex="1";
            document.layer2VirtualToursSet2.style.visibility="hidden";
            document.layer2VirtualToursSet2.style.zIndex="1";
            document.layer3FlashPhotos.style.visibility="visible";
            document.layer3FlashPhotos.style.zIndex="3";
        }
        if (document.all) {
             document.all.layer1Welcome.style.top="17px";
             document.all.layer2VirtualTours.style.top="17px";
             document.all.layer2VirtualToursSet2.style.top="17px";
             document.all.layer1Welcome.style.left="17px";
             document.all.layer2VirtualTours.style.left="17px";
             document.all.layer2VirtualToursSet2.style.left="17px";
             document.all.layer1Welcome.style.visibility="visible";
             document.all.layer1Welcome.style.zIndex="2";
             document.all.layer2VirtualTours.style.visibility="hidden";
             document.all.layer2VirtualTours.style.zIndex="1";
             document.all.layer2VirtualToursSet2.style.visibility="hidden";
             document.all.layer2VirtualToursSet2.style.zIndex="1";
             document.all.layer3FlashPhotos.style.visibility="visible";
             document.all.layer3FlashPhotos.style.zIndex="3";
        }
        if (!document.all && document.getElementById) {
             document.getElementById("layer1Welcome").style.top="17px";
             document.getElementById("layer2VirtualTours").style.top="17px";
             document.getElementById("layer2VirtualToursSet2").style.top="17px";
             document.getElementById("layer1Welcome").style.left="17px";
             document.getElementById("layer2VirtualTours").style.left="17px";
             document.getElementById("layer2VirtualToursSet2").style.left="17px";
             document.getElementById("layer1Welcome").style.visibility="visible";
             document.getElementById("layer1Welcome").style.zIndex="2";
             document.getElementById("layer2VirtualTours").style.visibility="hidden";
             document.getElementById("layer2VirtualTours").style.zIndex="1";
             document.getElementById("layer2VirtualToursSet2").style.visibility="hidden";
             document.getElementById("layer2VirtualToursSet2").style.zIndex="1";
             document.getElementById("layer3FlashPhotos").style.visibility="visible";
             document.getElementById("layer3FlashPhotos").style.zIndex="3";
    }
}
	
var win= null;
function NewWindow(mypage,myname,w,h,scroll){
	var winl = (screen.width-w)/2;
	var wint = (screen.height-h)/2;
	var settings ='height='+h+',';
	settings +='width='+w+',';
	settings +='top='+wint+',';
	settings +='left='+winl+',';
	settings +='scrollbars='+scroll+',';
	settings +='resizable=no';
	win=window.open(mypage,myname,settings);
	if(parseInt(navigator.appVersion) >= 4){win.window.focus();}
}
function MM_openBrWindow(theURL,winName,features) {
	window.open(theURL,winName,features);
}
var win= null;
function NewWindowWithScroll(mypage,myname,w,h,scroll){
	var winl = (screen.width-w)/2;
	var wint = (screen.height-h)/2;
	var settings ='height='+h+',';
	settings +='width='+w+',';
	settings +='top='+wint+',';
	settings +='left='+winl+',';
	settings +='scrollbars='+scroll+',';
	settings +='resizable=no';
	win=window.open(mypage,myname,settings);
	if(parseInt(navigator.appVersion) >= 4){win.window.focus();}
}
function MM_openBrWindow(theURL,winName,features) {
	window.open(theURL,winName,features);
}
function MM_openBrWindow(theURL,winName,features) {
	window.open(domain_url,winName,features);
}

function showUnBrandedInfo () {
	alert ("For more information and to schedule a private \nshowing, contact your realtor. \n\nReference the MLS # or Location listed above.");
}

function alertExternal(url) {
	 alert('You are now leaving this \nInteractive Virtual Home Tour.'); 
	 window.open(url); 
}

function maximize() {
   	window.moveTo(0,0)
   	window.resizeTo(screen.availWidth, screen.availHeight)
}

function PlayFlashMusic()
{
	var flashMovie=getFlashMovieObject("bgmusic");
	flashMovie.Play();
	//embed.nativeProperty.anotherNativeMethod();
}

function RewindFlashMusic()
{
	var flashMovie=getFlashMovieObject("bgmusic");
	flashMovie.Rewind();
}

function StopFlashMusic()
{
	var flashMovie=getFlashMovieObject("bgmusic");
	flashMovie.StopPlay();
}

function PlayFlashAudio()
{
	var flashMovie=getFlashMovieObject("audio");
	flashMovie.Play();
	//embed.nativeProperty.anotherNativeMethod();
}

function RewindFlashAudio()
{
	var flashMovie=getFlashMovieObject("audio");
	flashMovie.Rewind();
}

function StopFlashAudio()
{
	var flashMovie=getFlashMovieObject("audio");
	flashMovie.StopPlay();
}

function getFlashMovieObject(movieName)
{
  if (window.document[movieName]) 
  {
    return window.document[movieName];
  }
  if (navigator.appName.indexOf("Microsoft Internet")==-1)
  {
    if (document.embeds && document.embeds[movieName])
      return document.embeds[movieName]; 
  }
  else // if (navigator.appName.indexOf("Microsoft Internet")!=-1)
  {
    return document.getElementById(movieName);
  }
}
