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 showBrandedLegalMsg () {
	alert ("ATTENTION REALTORS:\n\nThis Model Unit Virtual Tour was produced exclusively for the\ndevelopers of The Peninsula. If you are a Buyer's Agent,  you may\nlink to the Unbranded MLS Version for your prospective buyers\nto view.\n\nThird party REALTORS working on behalf of unit owners at\nThe Peninsula ARE NOT permitted to link to or use this page\nfor the purposes of marketing a unit.\n\nINTERESTED IN HAVING YOUR OWN VIRTUAL TOUR PRODUCED?\nFor Virtual Tour information & pricing, contact the photographer\nat 904.485.6249 or on the web at www.se360tours.com.\n\nCopyright © SouthEast360Tours.com. All Rights Reserved.");
}

function showUnBrandedLegalMsg () {
	alert ("ATTENTION REALTORS:\n\nThis Model Unit Virtual Tour was produced exclusively for the\ndevelopers of The Peninsula. If you are a Buyer's Agent, you may\nlink to this Unbranded MLS Version for your prospective buyers\nto view.\n\nThird party REALTORS working on behalf of unit owners at\nThe Peninsula ARE NOT permitted to link to or use this page\nfor the purposes of marketing a unit.\n\nINTERESTED IN HAVING YOUR OWN VIRTUAL TOUR PRODUCED?\nFor Virtual Tour information & pricing, contact the photographer\nat 904.485.6249 or on the web at www.se360tours.com.\n\nCopyright © SouthEast360Tours.com. All Rights Reserved.");
}

function showBrandedInfo () {
	alert ("For more information and to schedule a private \nshowing, contact Nicole Dana at \n904.599.3429 or 305.350.1901.\n\nAMERILAND REALTY, INC.\n1431 Riverplace Boulevard\nJacksonville, FL 32204\nTel.:305.350.1901 \nwww.thepeninsulacondos.com");
}

function showUnBrandedInfo () {
	alert ("For more information and to schedule a private \nshowing, contact your realtor. \n\nReference The Peninsula on The Southbank.");
}

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);
  }
}
