
var lsMovieUrl				= "virtualtour/reunionHDHomeShow.swf";


function GetYouTubeIntroOutro(){
	if(location.search.indexOf('videoDemo=true')!=-1){
		return {
			videoIntroId:"SNbfJ3zbr-k",
			videoOutroId:""
			};
		}
	
	
	return {disabled:true};
		
	}

var lsVideoIntro				= "";
var lsVideoOutro				= "";




var lsViewerData			= "";

function GetViewerData(){
	return "<div>"+lsViewerData+"<\/div>";
	}

var gsLabelsNode			= "<?xml version=\"1.0\" encoding=\"UTF-8\"?><Labels><Label value=\"Start the Tour\" name=\"StartTour\"\/><Label value=\"View Photo\" name=\"ViewPhoto\"\/><Label value=\"Fullscreen is not supported on your computer, you will need to upgrade your Flash player to the latest version to use this feature\" name=\"NoSupportFullScreen\"\/><Label value=\"Error configuring fullscreen\" name=\"FullScreenConfigError\"\/><Label value=\"There was an error trying to change the fullscreen state\" name=\"FullScreenChangeError\"\/><Label value=\"This feature is not available in fullscreen mode.\" name=\"FullScreenNotAvailable\"\/><Label value=\"In order to use this feature you must first exit fullscreen mode.\" name=\"MustExitFullScreen\"\/><Label value=\"Exit fullscreen mode\" name=\"ExitFullScreen\"\/><Label value=\"Error loading tour data\" name=\"ErrorLoadingData\"\/><Label value=\"TourId\" name=\"TourId\"\/><Label value=\"Listing #:\" name=\"ListingId\"\/><Label value=\"ShowAgent\" name=\"ShowAgent\"\/><Label value=\"Contact Information\" name=\"ContactInformation\"\/><Label value=\"This virtual tour presented by:\" name=\"PresentedBy\"\/><Label value=\"Welcome\" name=\"Welcome\"\/><Label value=\"More Info\" name=\"MoreInfo\"\/><Label value=\"Mortgage Calculator\" name=\"MortgageCalc\"\/><Label value=\"Send to a Friend\" name=\"SendToFriend\"\/><Label value=\"Send email to agent\" name=\"SendToAgent\"\/><Label value=\"Printable Flyer\" name=\"PrintableFlyer\"\/><Label value=\"Map\" name=\"Map\"\/><Label value=\"Local Schools\" name=\"Schools\"\/><Label value=\"Photo Gallery\" name=\"Gallery\"\/><Label value=\"Scroll to the left\" name=\"ScrollLeft\"\/><Label value=\"Scroll to the right\" name=\"ScrollRight\"\/><Label value=\"Toggle fullscreen mode\" name=\"ToggleFullscreen\"\/><Label value=\"Show gallery of photos\" name=\"ShowGallery\"\/><Label value=\"Powered by\" name=\"PoweredBy\"\/><Label value=\"Return to Virtual Tour\" name=\"ReturnToTourScreen\"\/><Label value=\"Please wait while loading...\" name=\"PleaseWaitLoad\"\/><Label value=\"Your Name\" name=\"YourName\"\/><Label value=\"Your Email Address\" name=\"YourEmailAddress\"\/><Label value=\"Your Phone Number\" name=\"YourPhoneNumber\"\/><Label value=\"Your Friend's Name\" name=\"YourFriendName\"\/><Label value=\"Your Friend's Email Address\" name=\"YourFriendAddress\"\/><Label value=\"Message Subject\" name=\"MessageSubject\"\/><Label value=\"Your Message\" name=\"YourMessage\"\/><Label value=\"Question Regarding Listing #{0}\" name=\"QuestionRegarding\"\/><Label value=\"There was an error sending your message, please verify that all addresses are correct and try again.\" name=\"ErrorSendingMessage\"\/><Label value=\"Message sent successfully!\" name=\"MessageSuccessful\"\/><Label value=\"There was an error sending your message!\" name=\"MessageNotSuccessful\"\/><Label value=\"The form provided below will allow you to send an email to the real estate agent responsible for this listing. &lt;br \/&gt;&lt;br \/&gt;Once you are finished composing your email, click the &quot;Send Message&quot; button located at the bottom of this page to send the email.\" name=\"AgentMessage\"\/><Label value=\"The form provided below will allow you to send this tour to a friend.&lt;br \/&gt;&lt;br \/&gt;Once you are finished composing your email, click the &quot;Send Message&quot; button located at the bottom of this page to send the email.\" name=\"FriendMessage\"\/><Label value=\"Take a look at this Virtual Tour\" name=\"SendToFriendMessageSubject\"\/><Label value=\"Please enter your message here.\" name=\"EnterHere\"\/><Label value=\"Please wait while your message is being sent...\" name=\"PleaseWaitSend\"\/><Label value=\"EnterMessage\" name=\"EnterMessage\"\/><Label value=\"Send Message\" name=\"SendMessage\"\/><Label value=\"Send an email to {0}\" name=\"SendEmailTo\"\/><Label value=\"Email Me\" name=\"EmailMe\"\/><Label value=\"GoToWebsite\" name=\"GoToWebsite\"\/><Label value=\"View My Website\" name=\"ViewMyWebsite\"\/><Label value=\"Go To {0}\" name=\"GoTo\"\/><Label value=\"Change or enter new values below to calculate your monthly mortgage payment. If you're not sure what a certain field does, hover your mouse cursor over the question mark icon next to it to get more information.\" name=\"CalcMessage\"\/><Label value=\"Price:\" name=\"Price\"\/><Label value=\"Price - This is the purchase price of the listing in dollars.\" name=\"PriceTip\"\/><Label value=\"Percent Down\" name=\"PercentDown\"\/><Label value=\"Percent Down - This dropdown calculates the down payment for common percentages. In the US, if you pay more than 20% of the purchase price you can avoid Private Mortgage Insurance.\" name=\"PercentDownTip\"\/><Label value=\"Down Payment\" name=\"DownPayment\"\/><Label value=\"Down Payment - This is the amount you have to put as a down payment, either filled in by a chosen percent down or entered in this field.\" name=\"DownPaymentTip\"\/><Label value=\"Loan Amount\" name=\"LoanAmount\"\/><Label value=\"Loan Amount - This is the amount that you will need to borrow from a lender. It is simply the price minus the down payment.\" name=\"LoanAmountTip\"\/><Label value=\"Loan Length (years)\" name=\"LoanLength\"\/><Label value=\"Loan Length - The amount of time, in years, that you will have to pay off the Loan Amount. The common US values are 15 and 30 years, the common Canadian value is 25 years.\" name=\"LoanLengthTip\"\/><Label value=\"Interest Rate\" name=\"InterestRate\"\/><Label value=\"Interest Rate - This is the fee charged for the loan amount you borrowed from the lender. Also known as the nominal rate.\" name=\"InterestRateTip\"\/><Label value=\"Compound Period\" name=\"CompoundPeriod\"\/><Label value=\"Compound Period - This is the number of times per year in which the interest rate is compounded. For US mortgages, this is monthly and for Canadian mortgages, this is semi-annual.\" name=\"CompoundPeriodTip\"\/><Label value=\"Monthly Payment\" name=\"MonthlyPayment\"\/><Label value=\"Monthly Payment - This is the the amount you will pay monthly in order to pay off the mortgage loan amount, given the information specified above. It does not include tax, mortgage insurance or other possible fees.\" name=\"MonthlyPaymentTip\"\/><Label value=\"Custom Down Payment Amount\" name=\"CustomDownPayment\"\/><Label value=\"Monthly\" name=\"Monthly\"\/><Label value=\"Quarterly\" name=\"Quarterly\"\/><Label value=\"Semi Annually\" name=\"SemiAnnually\"\/><Label value=\"Annually\" name=\"Annually\"\/><Label value=\"The following items are required, and have not been entered:\" name=\"RequiredItems\"\/><Label value=\"This feature is not available in offline mode.\" name=\"NeedsInternet\"\/><Label value=\"From Address\" name=\"FromAddress\"\/><Label value=\"Get directions to this location from:\" name=\"GetDirections\"\/><Label value=\"Go!\" name=\"Go\"\/><Label value=\"Please wait while the map is loading...\" name=\"WaitMapLoad\"\/><Label value=\"Re-center map\" name=\"CenterMap\"\/><Label value=\"Features\" name=\"Features\"\/><Label value=\"Listing Information\" name=\"ListingInformation\"\/><Label value=\"Room Information\" name=\"RoomInformation\"\/><Label value=\"National\" name=\"National\"\/><Label value=\"This School\" name=\"ThisSchool\"\/><Label value=\"American Indian\/Alaskan Native\" name=\"NativeAmerican\"\/><Label value=\"Asian\/Pacific Islander\" name=\"Asian\"\/><Label value=\"Hispanic\" name=\"Hispanic\"\/><Label value=\"Black, non-Hispanic\" name=\"Black\"\/><Label value=\"White, non-Hispanic\" name=\"White\"\/><Label value=\"General Information\" name=\"GeneralInformation\"\/><Label value=\"Address\" name=\"Address\"\/><Label value=\"Phone:\" name=\"Phone\"\/><Label value=\"District\" name=\"District\"\/><Label value=\"View details of\" name=\"ViewDetails\"\/><Label value=\"County\" name=\"County\"\/><Label value=\"Institution Type\" name=\"InstitutionType\"\/><Label value=\"Public School\" name=\"PublicSchool\"\/><Label value=\"NCES District ID\" name=\"NCESDistrictID\"\/><Label value=\"School Characteristics\" name=\"SchoolCharacteristics\"\/><Label value=\"Locale\" name=\"Locale\"\/><Label value=\"Type\" name=\"Type\"\/><Label value=\"Total Teachers (FTE)\" name=\"TotalTeachers\"\/><Label value=\"Total Students\" name=\"TotalStudents\"\/><Label value=\"Student to Teacher Ratio\" name=\"StudentTeacherRatio\"\/><Label value=\"Total\" name=\"Total\"\/><Label value=\"Enrollment Information\" name=\"EnrollmentInformation\"\/><Label value=\"Enrollment by Race\/Ethnicity\" name=\"EnrollmentRace\"\/><Label value=\"Enrollment by Grade\" name=\"EnrollmentGrade\"\/><Label value=\"School District General Information\" name=\"SchoolDistrictGeneralInfo\"\/><Label value=\"Public School District\" name=\"PublicSchoolDistrict\"\/><Label value=\"School District Characteristics\" name=\"SchoolDistrictCharacteristics\"\/><Label value=\"Grades\" name=\"Grades\"\/><Label value=\"Schools in District\" name=\"SchoolsInDistrict\"\/><Label value=\"Status\" name=\"Status\"\/><Label value=\"miles away\" name=\"MilesAway\"\/><Label value=\"All\" name=\"All\"\/><Label value=\"Primary\" name=\"Primary\"\/><Label value=\"Middle\" name=\"Middle\"\/><Label value=\"High\" name=\"High\"\/><Label value=\"Other\" name=\"Other\"\/><Label value=\"Below is a list of public schools near this listing.  Click the &quot;+&quot; next to a school to get more information.\" name=\"ViewerMessage\"\/><Label value=\"Public Schools\" name=\"PublicSchools\"\/><Label value=\"School\" name=\"School\"\/><Label value=\"Sort list by school name\" name=\"SortName\"\/><Label value=\"Distance\" name=\"Distance\"\/><Label value=\"Sort list by distance\" name=\"SortDistance\"\/><Label value=\"Grade\" name=\"Grade\"\/><Label value=\"Sort list by grade\" name=\"SortGrade\"\/><Label value=\"Please wait while the schools are loading...\" name=\"PleaseWaitSchools\"\/><Label value=\"There was an error retrieving the list of schools\" name=\"ErrorLoadingSchools\"\/><Label value=\"Information provided by NCES.\" name=\"ProviedByNCES\"\/><\/Labels>"

function GetLabels(){
	return gsLabelsNode;
	}

function GetMusicUrl(){
	if(window.lsMusicUrl)
		return lsMusicUrl;

	return "";
	}

function LoadViewer(){

	if(IsPlain())
		return;

	var loContainer	= $('VirtualTour');
	if(loContainer != null){

		if(window.lsTourScheme){
			var loImage			= $$("#VirtualTour .Company img");
			var loName			= $$("#VirtualTour .Company h2");
			loImage[0].src			= lsResourceFile;
			innerXHTML(loName[0], "Your Company Name Here");
			}


		if(!deconcept.SWFObjectUtil.getPlayerVersion().versionIsValid(new deconcept.PlayerVersion([9,0,0]))){
			lsMovieUrl		= "http://data.jsvt.net/images/playerProductInstall.swf";
			}

		// Read data, then remove it from the html
		lsViewerData		= innerXHTML(loContainer);
		innerXHTML(loContainer,'');

		// Correct display properties
		$(document.body).addClassName("FlashViewer");
		$('FrameContainer').update('');

		// Initialize viewer
		var loViewer		= new SWFObject(lsMovieUrl+"?cachebuster=1", "VirtualTourViewer", "100%", "100%", "9", "#FFFFFF", true);
		loViewer.addParam("allowFullScreen","true");
		loViewer.addParam("allowScriptAccess","always");
		loViewer.write("VirtualTour");
		try{
			if(!IsFramed() && !IsSlideShow()){
				//window.moveTo(20,20);
				//window.resizeTo(screen.availWidth-40,screen.availHeight-40);
				}
			}
		catch(e){
			}
		}
	}

var loFrame			= null;
function ShowFrame(url){
	if(loFrame == null){
		loFrame		= document.createElement("iframe");
		loFrame.width = "100%";
		loFrame.height = "100%";
		$(document.body).addClassName("ShowFrame");
		$('FrameContainer').appendChild(loFrame);
		}

	loFrame.src		= url;
	}

function ReturnToTour(){
	if(loFrame != null){
		$('FrameContainer').removeChild(loFrame);
		$(document.body).removeClassName("ShowFrame");
		}

	loFrame			= null;
	}

function IsPlain(){
	return getQueryParamValue("plain") == "true";
	}

function IsFramed(){
	return lbFramed || getQueryParamValue("framed") == "true";
	}

function IsSlideShow(){
	return getQueryParamValue("autoplay") == "true";
	}

function NextTour(){
	if(parent.NextTour && parent.NextTour!=NextTour){
		parent.NextTour();
		}
	else{
		location.href		= location.href;
		}
	}

function ChangeLanguage(href){
	if(IsArchive() && location.search.length > 1){
		location.href		= href+location.search.substring(1,location.search.length);
		return false;
		}
	if(IsSlideShow() && href.indexOf("autoplay") == -1){
		location.href		= href+(href.indexOf("?") == -1?"?":"&")+"autoplay=true";
		return false;
		}
	if(IsFramed() && href.indexOf("framed") == -1){
		location.href		= href+(href.indexOf("?") == -1?"?":"&")+"framed=true";
		return false;
		}

	return true;
	}
	
function GetVideoUrls(){					
	return {intro:lsVideoIntro,outro:lsVideoOutro};
	}
