﻿var currentinpix = "00";

function showonimage(number) {
	if(currentinpix == number)
		return;
		
	var newimage = 'url("/store/htmlcontent/extras/dots/'+number+'on.gif")';
	var mappoint = 'mappoint'+number;
	document.getElementById(mappoint).style.backgroundImage = newimage;
	var mappoint = 'listpoint'+number;
	document.getElementById(mappoint).style.backgroundImage = newimage;
	var mappoint = 'listtext'+number;
	document.getElementById(mappoint).style.color = '0A70BB';
}

function showoffimage(number) {

	if(currentinpix == number)
		return;
		
	var newimage = 'url("/store/htmlcontent/extras/dots/'+number+'off.gif")';
	var mappoint = 'mappoint'+number;
	document.getElementById(mappoint).style.backgroundImage = newimage;
	var mappoint = 'listpoint'+number;
	document.getElementById(mappoint).style.backgroundImage = newimage;
	var mappoint = 'listtext'+number;
	document.getElementById(mappoint).style.color = '333333';
}

function showipix(number,inpix) {

	if(currentinpix == number)
		return;
		
	if(currentinpix != "00"){
		var newimage = 'url("/store/htmlcontent/extras/dots/'+currentinpix+'off.gif")';
		var mappoint = 'mappoint'+currentinpix;
		document.getElementById(mappoint).style.backgroundImage = newimage;
		var mappoint = 'listpoint'+currentinpix;
		document.getElementById(mappoint).style.backgroundImage = newimage;
		var mappoint = 'listtext'+currentinpix;
		document.getElementById(mappoint).style.color = '333333';
	}
			
	currentinpix = number;
	
	var newimage = 'url("/store/htmlcontent/extras/dots/'+currentinpix+'view.gif")';
	var mappoint = 'mappoint'+currentinpix;
	document.getElementById(mappoint).style.backgroundImage = newimage;
	var mappoint = 'listpoint'+currentinpix;
	document.getElementById(mappoint).style.backgroundImage = newimage;
	var mappoint = 'listtext'+currentinpix;
	document.getElementById(mappoint).style.color = '60B067';
	
	var panoramablock = "<APPLET name='IpixViewer'code='IpixViewer.class' archive='IpixViewer.jar' codebase='http://www.freshtourism.com/includes' width='270' height='200'>";
	panoramablock += "<PARAM NAME='url' VALUE='/store/htmlcontent/"+pageinpix[currentinpix]+".ipx'>";
	panoramablock += "<PARAM NAME='toolbar' VALUE='on'>";
	panoramablock += "<PARAM NAME='splashbg' VALUE='FFFFFF'>";
	panoramablock += "<PARAM NAME='initfov' VALUE='115'>";
	panoramablock += "<PARAM NAME='spinspeed' VALUE='4'>";
	panoramablock += "<PARAM NAME='spinstyle' VALUE='flat'>";
	panoramablock += "</APPLET>";

	document.getElementById('iPiXdisplay').innerHTML = panoramablock;
	
	bigclick.src = '/store/htmlcontent/extras/images/360bigclick.gif';
}

function showonimagethumb(number) {
	if(currentinpix == number)
		return;
		
	var mappoint = 'mappoint'+number;
	var changeimage = "/store/htmlcontent/"+thumbimage[number];
	flvFSTI1(mappoint,changeimage,0,0,0.5,1);
	
	var newimage = 'url("/store/htmlcontent/extras/dots/'+number+'on.gif")';
	var mappoint = 'listpoint'+number;
	document.getElementById(mappoint).style.backgroundImage = newimage;
	var mappoint = 'listtext'+number;
	document.getElementById(mappoint).style.color = '0A70BB';
}

function showoffimagethumb(number) {

	if(currentinpix == number)
		return;
	
	flvFSTI2();
	
	var newimage = 'url("/store/htmlcontent/extras/dots/'+number+'off.gif")';
	var mappoint = 'listpoint'+number;
	document.getElementById(mappoint).style.backgroundImage = newimage;
	var mappoint = 'listtext'+number;
	document.getElementById(mappoint).style.color = '333333';
}

function showipixthumb(number,inpix) {

	if(currentinpix == number)
		return;
		
	if(currentinpix != "00"){
		var newimage = 'url("/store/htmlcontent/extras/dots/'+currentinpix+'off.gif")';
		var mappoint = 'mappoint'+currentinpix;
		document.getElementById(mappoint).style.backgroundImage = newimage;
		var mappoint = 'listpoint'+currentinpix;
		document.getElementById(mappoint).style.backgroundImage = newimage;
		var mappoint = 'listtext'+currentinpix;
		document.getElementById(mappoint).style.color = '333333';
	}
			
	currentinpix = number;
	
	var newimage = 'url("/store/htmlcontent/extras/dots/'+currentinpix+'view.gif")';
	var mappoint = 'mappoint'+currentinpix;
	document.getElementById(mappoint).style.backgroundImage = newimage;
	var mappoint = 'listpoint'+currentinpix;
	document.getElementById(mappoint).style.backgroundImage = newimage;
	var mappoint = 'listtext'+currentinpix;
	document.getElementById(mappoint).style.color = '60B067';
	
	var panoramablock = "<APPLET name='IpixViewer'code='IpixViewer.class' archive='IpixViewer.jar' codebase='http://www.freshtourism.com/includes' width='270' height='200'>";
	panoramablock += "<PARAM NAME='url' VALUE='/store/htmlcontent/"+pageinpix[currentinpix]+".ipx'>";
	panoramablock += "<PARAM NAME='toolbar' VALUE='on'>";
	panoramablock += "<PARAM NAME='splashbg' VALUE='FFFFFF'>";
	panoramablock += "<PARAM NAME='initfov' VALUE='115'>";
	panoramablock += "<PARAM NAME='spinspeed' VALUE='4'>";
	panoramablock += "<PARAM NAME='spinstyle' VALUE='flat'>";
	panoramablock += "</APPLET>";

	document.getElementById('iPiXdisplay').innerHTML = panoramablock;
	
	bigclick.src = '/store/htmlcontent/extras/images/360bigclick.gif';
}

function showlargeipix() {
	if(currentinpix != "00"){
		VRpopup.setUrl("http://www.freshtourism.com/store/htmlcontent/extras/popups/360popup.html?view="+pageinpix[currentinpix]+"-WebHigh.ipx&coment="+pageinpixcoments[currentinpix]);
		VRpopup.showPopup('anchor360');
	}
}

function showlargeimage(largeshow) {
	Imagepopup.setUrl("http://www.freshtourism.com/store/htmlcontent/extras/popups/imagepopup.html?view="+largeimage[largeshow]+"&coment="+pageinpixcoments[largeshow]);
	Imagepopup.showPopup('anchor360');
}

function preloadImages() {
  var d=document; if(d.images){ if(!d.p) d.p=new Array();
    var i,j=d.p.length,a=preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.p[j]=new Image; d.p[j++].src=a[i];}}
}

preloadImages('/store/htmlcontent/extras/dots/01off.gif','/store/htmlcontent/extras/dots/01on.gif');
preloadImages('/store/htmlcontent/extras/dots/02off.gif','/store/htmlcontent/extras/dots/02on.gif');
preloadImages('/store/htmlcontent/extras/dots/03off.gif','/store/htmlcontent/extras/dots/03on.gif');
preloadImages('/store/htmlcontent/extras/dots/04off.gif','/store/htmlcontent/extras/dots/04on.gif');
preloadImages('/store/htmlcontent/extras/dots/05off.gif','/store/htmlcontent/extras/dots/05on.gif');
preloadImages('/store/htmlcontent/extras/dots/06off.gif','/store/htmlcontent/extras/dots/06on.gif');
preloadImages('/store/htmlcontent/extras/dots/07off.gif','/store/htmlcontent/extras/dots/07on.gif');
preloadImages('/store/htmlcontent/extras/dots/08off.gif','/store/htmlcontent/extras/dots/08on.gif');
preloadImages('/store/htmlcontent/extras/dots/09off.gif','/store/htmlcontent/extras/dots/09on.gif');
preloadImages('/store/htmlcontent/extras/dots/10off.gif','/store/htmlcontent/extras/dots/10on.gif');
preloadImages('/store/htmlcontent/extras/dots/11off.gif','/store/htmlcontent/extras/dots/11on.gif');
preloadImages('/store/htmlcontent/extras/dots/12off.gif','/store/htmlcontent/extras/dots/12on.gif');
preloadImages('/store/htmlcontent/extras/dots/13off.gif','/store/htmlcontent/extras/dots/13on.gif');
preloadImages('/store/htmlcontent/extras/dots/14off.gif','/store/htmlcontent/extras/dots/14on.gif');
preloadImages('/store/htmlcontent/extras/dots/15off.gif','/store/htmlcontent/extras/dots/15on.gif');
preloadImages('/store/htmlcontent/extras/dots/16off.gif','/store/htmlcontent/extras/dots/16on.gif');
preloadImages('/store/htmlcontent/extras/dots/17off.gif','/store/htmlcontent/extras/dots/17on.gif');
preloadImages('/store/htmlcontent/extras/dots/18off.gif','/store/htmlcontent/extras/dots/18on.gif');
preloadImages('/store/htmlcontent/extras/dots/19off.gif','/store/htmlcontent/extras/dots/19on.gif');
preloadImages('/store/htmlcontent/extras/dots/20off.gif','/store/htmlcontent/extras/dots/20on.gif');

preloadImages('/store/htmlcontent/dextras/ots/Aoff.gif','/store/htmlcontent/extras/dots/Aon.gif');
preloadImages('/store/htmlcontent/extras/dots/Boff.gif','/store/htmlcontent/extras/dots/Bon.gif');
preloadImages('/store/htmlcontent/extras/dots/Coff.gif','/store/htmlcontent/extras/dots/Con.gif');
preloadImages('/store/htmlcontent/extras/dots/Doff.gif','/store/htmlcontent/extras/dots/Don.gif');
preloadImages('/store/htmlcontent/extras/dots/Eoff.gif','/store/htmlcontent/extras/dots/Eon.gif');

preloadImages('/store/htmlcontent/extras/images/360bigclickactive.gif','/store/htmlcontent/extras/images/360bigclick.gif');

var VRpopup = new PopupWindow();
VRpopup.offsetX=-200;
VRpopup.offsetY=-500;
VRpopup.setSize(550,540);

var Imagepopup = new PopupWindow();
Imagepopup.offsetX=50;
Imagepopup.offsetY=-50;
Imagepopup.setSize(690,690);

function MM_findObj(n, d) { //v4.01

  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {

    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}

  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];

  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);

  if(!x && d.getElementById) x=d.getElementById(n); return x;

}



function MM_preloadImages() { //v3.0

  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();

    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)

    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}

}



function flvFSTI4(){//v1.01

this.style.filter="";}



function flvFSTI3(v1,v2){//v1.01

var v3;if (v1.filters[0]&&v1.filters[0].status==2){v1.filters[0].Stop();}if (v2==0){v3="blendTrans(Duration="+v1.STI8+")";}else {v3="revealTrans(Duration="+v1.STI8+",Transition="+(v2-1)+")";}v1.style.filter=v3;}



function flvFSTI2(){//v1.01

var v1,v2=document,v3=v2.STI4,v4;for (v4=0;v3&&v4<v3.length&&(v1=v3[v4])&&v1.STI5;v4++){if (v1.filters&&!v2.STI7){flvFSTI3(v1,v1.STI3);v1.filters[0].Apply();}v1.src=v1.STI5;if (v1.filters&&!v2.STI7){v1.filters[0].Play();}}}



function flvFSTI1(){//v1.01

// Copyright 2003, Marja Ribbers-de Vroed, FlevOOware (www.flevooware.nl/dreamweaver/)

var v1=arguments,v2=document,v3;v2.STI4=new Array();v2.STI7=(navigator.userAgent.toLowerCase().indexOf("mac")!=-1);for (var v4=0;v4<v1.length-2;v4+=5){v3=MM_findObj(v1[v4]);if (v3){v3.STI5=v3.src;v3.STI6=v1[v4+1];v3.STI2=v1[v4+2];v3.STI3=v1[v4+3];v3.STI8=v1[v4+4];v2.STI4[v2.STI4.length]=v3;if (v3.filters&&!v2.STI7){flvFSTI3(v3,v3.STI2);v3.onfilterchange=flvFSTI4;v3.filters[0].Apply();}v3.src=v3.STI6;if (v3.filters&&!v2.STI7){v3.filters[0].Play();}}}}



