LFsame=0;
LFdns="http://www.courchevel.com/panoramas/";
LFurl=document.URL;
LFhost=self.location.host;
if(LFdns.indexOf(LFhost) != -1)LFsame=1;
LFlg=new Array();
LFlg[0]='F';
LFlg[1]='E';
LFlg[2]='S';
LFlg[3]='I';
LFlg[4]='P';
LFlg[5]='G';
LFie=0;
LFns6=0;
LFaol=0;
var LFspUA,LFlang,LFww,LFhh,LFvuW,LFvuH,LFvuX,LFvuY,LFlocuse,LFdisp,LFroot,LFpPGT,LFvuOp,TrInUse=0,LFtdep,LFtdON,LFwn;
function LFvuSet(){
	LFwn="0";
	LFspUA=LFgetUA();
	LFlang=LFwhchLng();
	LFvuW=392;LFvuH=240;LFvuX=0;LFvuY=0;
	LFvuOp=1;
	var c=LFurl.substr(  Math.max( LFurl.lastIndexOf("\\"),LFurl.lastIndexOf("/") ) , 1 );
	var a=LFurl.indexOf("VU-PAR-");
	var b=LFurl.indexOf(c,a)+1;
	LFlocuse=((a!=-1)?LFurl.substr(0,b):"");
	LFroot=LFlocuse?LFlocuse:LFdns;
}
function LFgetUA(){
	var v,i=0;
	var ua=window.navigator.userAgent.toLowerCase();
	var platform;
	if(typeof(window.navigator.platform) != 'undefined') platform=window.navigator.platform.toLowerCase();
	if(platform.indexOf('mac') != -1){return 'mac';
	} else if((i=ua.indexOf('msie')) != -1){
		v=parseFloat('0' + ua.substr(i+5),10);
		LFie=(document.compatMode=="CSS1Compat")?2:1;
		if(ua.indexOf('aol') != -1) LFaol=1;
		return (v<5.01)?'ie4':'ie5+';
	} else if((i=ua.indexOf('opera')) != -1){
		v=parseFloat('0' + ua.substr(i+6),10);
		return (v<7)?'op7-':'op7+';
	} else if(ua.indexOf('netscape') != -1){
		i = ua.lastIndexOf('/');
		v=parseFloat('0'+ua.substr(i+1),10);
		if(v>=6.2){
			LFns6=1;
			return 'ns6.2+';
		} else return 'ns6.2-';
	} else return 'other';
}
function LFwhchLng(){
	var l;
	l=(LFspUA=='ie5+')? window.navigator.userLanguage : window.navigator.language ;
	if(l) l=l.substr(0,2);
	return (l=='fr')? 0:1;
}
function LFstop(f,d) {
	window.open(d+f+'_'+LFlg[LFlang]+'.htm', 'stopped'+LFlg[LFlang], 'scrollbars,dependent,width=400,height=580,left=0,top=0')
}
function LFcheckUA(d){
	if(LFspUA=='mac'){LFstop('MacUser',d);return 0}
	else if(LFspUA=='ie4'){LFstop('ie4-50-User',d);return 0}
	else if(LFspUA!='ie5+'){LFstop('Other-User',d);return 0}
	else if(!navigator.javaEnabled()){LFstop('NotJava',d);return 0}
	else return 1;
}
function openVu(t,l,x,y,s){
	var a;
	if(t=='index')LFsame=0;
	if(!t || t=="index"){
		a="../";
		var f=LFurl.substr(0,LFposLstSh(LFurl));
		f=f.substr(LFposLstSh(f)+1);
		t=f;
	}else if(LFlocuse){a=LFlocuse;} else {a=LFdns;}
	if(l=="" || l=="_" || l=="-" || l=="L")l=LFlg[LFlang];
	LFlang=1;
	if(l=="F")LFlang=0;
	if(LFvuOp){
				if(TrInUse==1){
					if(LFpPGT.tr!=t) {
						LFpPGT.stopplay();
						LFopd(a,t,l,x,y,s);
					}
					else {
						if(LFlang!=LFpPGT.lang)LFpPGT.changeL(LFlang);
						if (s!=LFpPGT.CP){
							LFpPGT.stopplay();
							LFpPGT.chObj(s);
						} else {
							LFpPGT.Restart();
						}
					}
				}else LFopd(a,t,l,x,y,s);
	}else {LFdisp.focus();LFtd()}
}
function LFopd(a,tr,lng,xp,yp,sw){
	LFgetXY(LFvuW,LFvuH,xp,yp,0);
	LFvuY=0;
	if(LFcheckUA(a)){
		if(sw=="")sw=0;
		a+="Dispatch.htm";
		var r,s="";
		for (i=0;i<tr.length;i++){
			r=tr.substr(i,1);
			if(r=="-"){s+="__"} else if(r=="/") {s+="___"} else {s+=r}
		}
		var na='PGTvu_'+sw+'_'+lng+'_'+LFie+'_'+LFns6+'_'+LFaol+'_'+(LFlocuse?1:0)+'_'+LFvuW+'_'+LFvuH+'_'+xp+'_'+yp+'_'+LFwn+'_'+LFsame+'_'+s;
		LFvuOp=0;
	}
	LFdisp=window.open(a,na,'dependent,width='+LFvuW+',height='+LFvuH+',left='+LFvuX+',top=0');
	LFdisp.focus();
	LFtd();
}
function LFtd(){
	if(LFtdON){clearTimeout(LFtdep)}
	LFtdep=setTimeout('LFvuOp=1;',LFlocuse?2000:4000);
	LFtdON=1;
}
function LFposLstSh(u){return Math.max(u.lastIndexOf("/"),u.lastIndexOf("\\"))}
function LFresiz(w,h,xp,yp,wx){
LFgetXY(w,h,xp,yp,wx);
moveTo(LFvuX,LFvuY);
resizeTo((LFaol?-8:0)+LFww,LFhh);
self.focus();
}
function LFgetXY(w,h,xp,yp,wx){
	LFww=w;
	LFhh=h;
	if(window.screen){
		if(w>screen.availWidth) LFww=screen.availWidth;
		wx=Math.min(screen.availWidth-LFww,wx);
		if(h>screen.availHeight) LFhh=screen.availHeight;
	  	LFvuX=Math.round((screen.availWidth-LFww-wx)*xp*.01);
	  	LFvuY=Math.round((screen.availHeight-LFhh)*yp*.01);
	}
}
LFvuSet();


