

var nvOs = 0,    nvMW = 0,    nvMH = 0,   nvVsn = 1,    bwChk = 0,   nvBwNS=nvBwIE=0
nvUtC= navigator.userAgent.toUpperCase();   nvAPP = navigator.appVersion;   nvUA = navigator.userAgent;
if (document.layers || (!document.all && document.getElementById)) nvBwNS=1;   if (document.all) nvBwIE=1; 
if (nvUtC.indexOf("MAC") >= 0) nvOs="mac"; if (nvUtC.indexOf("WIN") >= 0) nvOs="win"
if (nvBwNS){
	snvAPP = nvAPP.indexOf(" ",0);   nvVsn = eval(nvAPP.substring(0, snvAPP));   if (nvVsn >= 5) nvVsn++;   if (nvUA.indexOf("6/6.0") >= 0) nvVsn = 1;
} if (nvBwIE){
	snvAPP = nvUA.indexOf("MSIE ",0)+5;   snvUA = nvUA.indexOf(";",snvAPP);   nvVsn = eval(nvUA.substring(snvAPP, snvUA));
}

function fBwJump(fPageB) {
	fMacIE=5, fMacNS=6, fWinIE=5, fWinNS=6; 
	if (nvOs == "mac") {
		if ((nvBwIE) && (fMacIE <=  nvVsn)) bwChk = 1;    if ((nvBwNS) && (fMacNS <=  nvVsn)) bwChk = 1
	} if (nvOs == "win") {
		if ((nvBwIE) && (fWinIE <=  nvVsn)) bwChk = 1;    if ((nvBwNS) && (fWinNS <=  nvVsn)) bwChk = 1
	} if (!bwChk) location.href = fPageB;
}

function findO(n, d) {
	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=findO(n,d.layers[i].document); return x;
} function fSwImg() {
	var i,j=0,x,a=fSwImg.arguments; document.knSWimsr=new Array; for(i=0;i<(a.length-2);i+=3)
	if ((x=findO(a[i]))!=null){document.knSWimsr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

aImgLoNm = ["img/mbtn-info-on.gif", "img/mbtn-gelande-on.gif","img/mbtn-school-on.gif","img/mbtn-event-on.gif","img/mbtn-access-on.gif","img/mbtn-stay-on.gif","img/sbtn-news-on.gif","img/sbtn-gallery-on.gif","img/sbtn-staff-on.gif","img/sbtn-mail-on.gif","img/sbtn-today-on.gif","../img/zmbtn-info-on.gif", "../img/zmbtn-gelande-on.gif","../img/zmbtn-school-on.gif","../img/zmbtn-event-on.gif","../img/zmbtn-access-on.gif","../img/zmbtn-stay-on.gif","../img/sbtn-news-on.gif","../img/sbtn-gallery-on.gif","../img/sbtn-staff-on.gif","../img/sbtn-mail-on.gif","../img/sbtn-today-on.gif","img/gelande_btn-on.gif",];   aImgLo = new Array ()
for (i = 0; i < aImgLoNm.length; i++) {   aImgLo[i] = new Image();     aImgLo[i].src = aImgLoNm[i]   }


function fImgWin(fUrl, fX, fY,fSclBar,fTolBar){
	view = window.open("","ImageViewWindow","toolbar="+fTolBar+",location=0,directories=0,status=0,menubar=0,scrollbars="+fSclBar+",resizable=0,left=20,top=50,width="+fX+",height="+fY)
	view.document.open()
	view.document.write("<html><head><title>image</title></head><body bgcolor=#ffffff leftmargin=0 topmargin=0 marginwidth=0 marginheight=0>")
	view.document.write("<a href='javaScript:window.close();'><img src='"+fUrl+"'  width="+fX+" height="+fY+" border=0></a></body></html>")
	view.document.close()
	view.focus();
}


function fNWin(fUrl, fW, fH, fTolBar,fScBar){
nWin = window.open (fUrl,"","toolbar="+fTolBar+",location=0,directories=0,status=0,menubar=0,scrollbars="+fScBar+",resizable=0,left=20,top=50,width="+fW+",height="+fH); 
nWin.focus();
}


function fMagWin(fUrl,sc){
	newWin = window.open (fUrl,"","toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars="+sc+",resizable=0,left=20,top=50,width=600,height=490"); 
	newWin.focus()
}

function viewWin(fUrl){
	view = window.open("","ImageViewWindow","toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=0,width=640,height=480")
	view.document.open()
	view.document.write("<html><head><title>Hakuba SANOSAKA</title></head><body bgcolor=#ffffff leftmargin=0 topmargin=0 marginwidth=0 marginheight=0>")
	view.document.write("<a href='javaScript:window.close();'><img src='http://www.vill.hakuba.nagano.jp/livecamera/"+fUrl+".jpg'  width=640 height=480 border=0></a></body></html>")
	view.document.close()
}
