// set defaults
var nRateStartTime = 0;
var nPanTimer = '';
var nPanPhotoTypeID = 0;
var nPanMouseIn = false;
var nPanX = 0;
var nPanY = 0;
var nPanWidth = 0;
var nPanHeight = 0;
document.nCacheScene = null;
document.nCacheTab = 0
function VisiStat(){}
function buildDhtmlPan(sImagePath, nPhotoTypeID, nWidth, nHeight)
{
if(document.getElementById)
{
nPanPhotoTypeID = nPhotoTypeID;
nPanX = 0;
nPanY = 0;
nPanMotionX = ((nPanPhotoTypeID==4)?0:1);
nPanMotionY = ((nPanPhotoTypeID==4)?1:0);
nPanWidth = nWidth;
nPanHeight = nHeight;
nPanTimer = window.setTimeout('panMove();', 30);
return '
' +
'
' +
'' +
((nPhotoTypeID==3)?'':'') +
'
' +
'
' +
'';
}
else
{
return panBlockFlash(sImagePath + ((nPhotoTypeID==3)?'&n360Mode=1':''));
}
}
function cacheNext()
{
if(document.nCacheScene!=null)
{
if(document.nCacheTab<=document.nTabCount)
{
//only pre-cache if not widescreen tour (until we normalize the scene photo path in widescreen tour (and the widescreen pre-loads all the photos right now anyway)) -- Christopher 5/10/07
if(document.nTourModeID != '2')
{
window.status = 'A non-broadband download rate was detected. Photo ' + (document.nCacheScene + 1) + ' of ' + document.aSceneIDList.length + ' is being pre-cached.';
window.setTimeout('document.images.imgCache.src=\'' + document.sMediaRoot + '/Scene/big/' + photoPath(document.aSceneIDList[document.nCacheScene]) + '/' + document.aSceneIDList[document.nCacheScene] + '.jpg\';', 50);
}
document.nCacheScene++;
document.nCacheTab++;
}
else
{
window.status='Image pre-caching complete.';
window.setTimeout('window.status=\'\'', 8000);
}
}
}
function checkRate(nRate)
{
//if(document.sTourAudioFile=='')
//{
if(nRate<10)
{
// kick off image pre-caching
document.nCacheScene = 0;
cacheNext();
}
else
{
window.status = 'Your download rate is roughly ' + nRate + 'K/Sec. Image pre-caching is not necessary, and has been skipped.'
window.setTimeout('window.status=\'\'', 8000);
}
//}
}
function http(sDomain)
{
return ((document.images[1].src.substr(0,4).toLowerCase()=='http')?'http://'+sDomain:'');
}
function lcase(string)
{
return string.toLowerCase();
}
function left(str, n)
{
if (n <= 0)
return "";
else if (n > String(str).length)
return str;
else
return String(str).substring(0,n);
}
function loadDescriptions(sBlob, nTabNumber, nSubTabNumber)
{
var sString;
var sDescription2Text;
var i;
// get description text
var aBlob2 = sBlob.split('~')[nSubTabNumber].split('|');
if(((aBlob2[6] == '') || (aBlob2[6].indexOf('For more information and a personal tour of this home please contact:') != -1)) && (document.fIDX == 'False'))
{
aBlob2[6] = 'For more information on this property, please contact:
';
// write new photo & pan controls
document.getElementById('sImage').innerHTML = sString;
//set nLastSceneNumber variable to be the current TabNumber (For un-selecting navigation colors on next click)
document.nLastSceneNumber = nTabNumber;
}
function setMiniTitle(sBlob)
{
// split out subtab data (not needed for image)
if(sBlob.indexOf('~')!=-1)
{
var aBlob = sBlob.split('~');
// split variable data
var aBlob2 = aBlob[0].split('|');
}
else
{
// split variable data
var aBlob2 = sBlob.split('|');
}
document.getElementById('sTitle').innerHTML = '
' + aBlob2[1].toUpperCase() + '
';
}
function updateMiniPage(sBlob, nTabNumber)
{
if(!(document.getElementById)) { return true; }
if(!(document.body.innerHTML)) { return true; }
setMiniTitle(sBlob);
loadMiniImage(sBlob, nTabNumber);
logHit(sBlob);
return false;
}
//Fullscreen Flash ================================================================
function detectVersion()
{
version = parseInt(navigator.appVersion);
return version;
}// end of function detectVersion()
function detectOS()
{
if(navigator.userAgent.indexOf('Win') == -1) {
OS = 'Macintosh';
} else {
OS = 'Windows';
}
return OS;
} // end of function detectOS()
function detectBrowser()
{
if(navigator.appName.indexOf('Netscape') == -1) {
browser = 'IE';
} else {
browser = 'Netscape';
}
return browser;
} //end of function detectBrowser()
function FullScreen(){
var adjWidth;
var adjHeight;
if((detectOS() == 'Macintosh') && (detectBrowser() == 'Netscape')) {
adjWidth = 20;
adjHeight = 35;
}
if((detectOS() == 'Macintosh') && (detectBrowser() == 'IE')) {
adjWidth = 20;
adjHeight = 35;
winOptions = 'fullscreen=yes';
}
if((detectOS() == 'Windows') && (detectBrowser() == 'Netscape')) {
adjWidth = 30;
adjHeight = 30;
}
if(detectVersion() < 4) {
self.location.href = 'TourSWFfs.asp?nTourID=' + document.nTourID + '&sMP3Path=' + document.sMP3Path + '&fsm=' + document.fSpiderMode + '&fs=yes';
}
if((detectOS() == 'Macintosh') && (detectBrowser() == 'IE'))
{
var maciewindow = window.open('TourSWFfs.asp?nTourID=' + document.nTourID + '&sMP3Path=' + document.sMP3Path + '&fsm=' + document.fSpiderMode + '&fs=yes', 'TourSWFMacIE', 'fullscreen=yes');
maciewindow.moveTo(0,0);
maciewindow.resizeTo(screen.width - 10,screen.height - 45);
} else {
var winWidth = screen.availWidth - adjWidth;
var winHeight = screen.availHeight - adjHeight;
var winSize = 'width=' + winWidth + ',height=' + winHeight;
var thewindow = window.open('TourSWFfs.asp?nTourID=' + document.nTourID + '&sMP3Path=' + document.sMP3Path + '&nH=' + winHeight + '&nW=' + winWidth + '&fsm=' + document.fSpiderMode + '&fs=yes', 'TourSWFWinVer', winSize);
thewindow.moveTo(0,0);
}
}// end of function FullScreen(){
function MakeItSo(){
var winWidth = screen.availWidth;
var winHeight = screen.availHeight;
//alert(document.fSpiderMode);
if((detectOS() == 'Windows') && (detectBrowser() == 'IE')) {
if (document.fSpiderMode == "True") {
window.open('TourSWFfs.html', 'TourSWFWinIE','left=0,top=0,toolbar=no,location=no,scrollbars=no,status=no,resizable=no,fullscreen=yes');
} else {
window.open('TourSWFfs.asp?nTourID=' + document.nTourID + '&sMP3Path=' + document.sMP3Path + '&nH=' + winHeight + '&nW=' + winWidth + '&fsm=' + document.fSpiderMode + '&fs=yes', 'TourSWFWinIE','left=0,top=0,toolbar=no,location=no,scrollbars=no,status=no,resizable=no,fullscreen=yes');
}
} else {
onload=FullScreen();
}
}// end of function MakeItSo()
function DisplayDesc(nSceneID)
{
var nTmpSceneID;
//if nSceneID = "nSceneID=1234567" strip first part off (& strip out spaces)
if(nSceneID.indexOf('=')>0)
{
nTmpSceneID = nSceneID.replace(/^\s*|\s(?=\s)|\s*$/g, '').split('=')[1];
}
else
{
nTmpSceneID = nSceneID;
}
document.getElementById('sSceneDescription2').innerHTML = getSceneDescription2(nTmpSceneID);
logHitFlashVersion(nTmpSceneID);
nTmpSceneID = '';
}
function getSceneDescription2(nSceneID)
{
for(a=0;a0)?(aTmp2[6]):('')) + ' ' + aTmp2[7] + ' ';
}
}
}
return '';
}
function logHitFlashVersion(nSceneID)
{
var oImage = new Image;
oImage.src = 'Log.asp?s=' + nSceneID + '&r=' + document.sReferer + '&rnd=' + Math.random();
}