﻿//-------------------------
//0:IE(Base IE6.x) 1:not IE
var browser_chk=0;
//hantei
if(document.all){browser_chk=0;}
else{browser_chk=1;}

//-------------------------
var ary_flv_page_url;
ary_flv_page_url=new Array();

//Hakuba(0:low/1:High)
ary_flv_page_url[0]="./contents/flv/hakuba_low.html";
ary_flv_page_url[1]="./contents/flv/hakuba_high.html";

//Shiga(2:low/3:High)
ary_flv_page_url[2]="./contents/flv/shiga_low.html";
ary_flv_page_url[3]="./contents/flv/shiga_high.html";

//Nozawa(4:low/5:High)
ary_flv_page_url[4]="./contents/flv/nozawa_low.html";
ary_flv_page_url[5]="./contents/flv/nozawa_high.html";

//Myoko(6:low/7:High)
ary_flv_page_url[6]="./contents/flv/myoko_low.html";
ary_flv_page_url[7]="./contents/flv/myoko_high.html";
//-------------------------
function live_drop_see(pos)
{
if(browser_chk==0)
 {
 if(pos=="0"){drop1.style.visibility="visible";}
 if(pos=="1"){drop3.style.visibility="visible";}
 }
else
 {
 var popup;
 if(pos=="0"){popup = document.getElementById("drop1");}
 if(pos=="1"){popup = document.getElementById("drop3");}
 popup.style.visibility="visible";
 }
}
//------------------------
function live_drop_del(pos)
{
if(browser_chk==0)
 {
 if(pos=="0"){drop1.style.visibility="hidden";}
 if(pos=="1"){drop3.style.visibility="hidden";}
 }
else
 {
 var popup;
 if(pos=="0"){popup = document.getElementById("drop1");}
 if(pos=="1"){popup = document.getElementById("drop3");}
 popup.style.visibility="hidden";
 }

}
//------------------------
function drop_position_conf()
{
 //Fire Fox NN Over Ie7.0
 if(browser_chk==1)
 {
 var popup = document.getElementById("drop1");
 popup.style.left="0px";
 popup.style.top="16px";
 }
 else
 {
 var opera_chk_num=-1;
 opera_chk_num=opera_chk();
 var ie_ver_chk_num=-1;
 ie_ver_chk_num=ie_ver_chk();

 //Opera,IE over 7.x
 if(opera_chk_num==0||ie_ver_chk_num==0)
   {
   drop1.style.left="0px";
   drop1.style.top="16px";
   }

 }
}
//-------------------------
function sekisetu_drop_see(pos)
{
if(browser_chk==0)
 {
 if(pos=="0"){sekisetu_drop1.style.visibility="visible";}
 if(pos=="1")
   {
   sekisetu_drop3.style.visibility="visible";
   //live not see
   drop2.style.visibility="hidden";
   }
 }
else
 {
 var popup;
 if(pos=="0"){popup = document.getElementById("sekisetu_drop1");}
 if(pos=="1"){popup = document.getElementById("sekisetu_drop3");}
 popup.style.visibility="visible";

 //live not see
 var popup2;
 if(pos=="1"){popup2 = document.getElementById("drop2");}
 popup2.style.visibility="hidden";
 }
}
//------------------------
function sekisetu_drop_del(pos)
{
if(browser_chk==0)
 {
 if(pos=="0"){sekisetu_drop1.style.visibility="hidden";}
 if(pos=="1")
   {
   sekisetu_drop3.style.visibility="hidden";
   //live to see
   drop2.style.visibility="visible";
   }
 }
else
 {
 var popup;
 if(pos=="0"){popup = document.getElementById("sekisetu_drop1");}
 if(pos=="1"){popup = document.getElementById("sekisetu_drop3");}
 popup.style.visibility="hidden";

 //live to see
 var popup2;
 if(pos=="1"){popup2 = document.getElementById("drop2");}
 popup2.style.visibility="visible";
 }

}
//------------------------
function sekisetu_drop_position_conf()
{
 //Fire Fox NN Over Ie7.0
 if(browser_chk==1)
 {
 var popup = document.getElementById("sekisetu_drop1");
 popup.style.left="0px";
 popup.style.top="16px";
 }
 else
 {
 var opera_chk_num=-1;
 opera_chk_num=opera_chk();
 var ie_ver_chk_num=-1;
 ie_ver_chk_num=ie_ver_chk();

 //Opera,IE over 7.x
 if(opera_chk_num==0||ie_ver_chk_num==0)
   {
   sekisetu_drop1.style.left="0px";
   sekisetu_drop1.style.top="16px";
   }

 }
}

//---------------------------------------
function opera_chk()
{
//browser_chk=0 But Opera is Position err
var b_name=navigator.userAgent;
var tmp_result=-1;
b_name=b_name.toLowerCase();
tmp_result=(b_name.indexOf("opera",0))*1;
if(tmp_result!=-1){tmp_result=0;}
return tmp_result;
}
//---------------------------------------
function netscape_chk()
{
//browser_chk=1 But Netscape is drop down err
var b_name=navigator.userAgent;
var tmp_result=-1;
b_name=b_name.toLowerCase();
tmp_result=(b_name.indexOf("netscape",0))*1;
if(tmp_result!=-1){tmp_result=0;}
return tmp_result;
}
//---------------------------------------
function ie_ver_chk()
{
//browser_chk=0 But Over Ie7.x is drop posioton err
var b_name=navigator.userAgent;
var tmp_result=-1;

b_name=b_name.toLowerCase();
tmp_result=(b_name.indexOf("msie ",0))*1;

//IE
if(tmp_result!=-1)
{
var point_chk=-1;
point_chk=(b_name.indexOf(";",tmp_result+5))*1;

 if(point_chk!=-1)
 {tmp_result=b_name.substring(tmp_result+5,point_chk)*1;}
 else
 {tmp_result=b_name.substring(tmp_result+5,tmp_result+6)*1;} 


 //Over7.x
 if(tmp_result>=7)
 {tmp_result=0;}
 else
 {tmp_result=-1;}

}

if(tmp_result!=-1){tmp_result=0;}

return tmp_result;
}

//---------------------------------------
function opera_92xchk()
{
var tmp_result=-1;

var myBsr   = navigator.appName; 
var myAgent = navigator.userAgent;
var myTop = myAgent.indexOf("Opera",0);
var myLast=0;
var myVer="";

if (myTop*1 == -1){
myBsr = "Not Opera";
myLast=0;
myVer=-1;
}
else
{
myBsr = "Opera";
myLast = myAgent.indexOf(" ",myTop+6);
myVer = myAgent.substring(myTop+6,myLast);  // OPのバージョン切り取り
}

if(myVer*1==-1){tmp_result=-1;}
else
{
  if(myVer*1<=9.19){tmp_result=1;}	
  else
  {
  if((myVer*1>=9.20)&&(myVer*1<=9.29)){tmp_result=2;}
  else{tmp_result=-1;}
  }

}
return tmp_result;
}

//---------------------------------------
function mac_opera_chk()
{
//OS Mac AND Browser Opera
var tmp_result=-1;
var opera_chk_num=opera_chk();

//Opera
if(opera_chk_num*1==0)
 {
 //Mac OS
 if(navigator.userAgent.indexOf("Mac")!=-1)
   {tmp_result=0;}
   else
   {tmp_result=-1;}
 }
else
{tmp_result=-1;}

return tmp_result;
}



//---------------------------------------
function flv_win_open_chk(chk_string)
{
var tmp_result=-1;

chk_string=chk_string.substring(0,11);

//Hakuba(0:low/1:High)
if(chk_string=="0zeMDhVoAUM"){tmp_result=0;};
if(chk_string=="OSSUHAg7Ae4"){tmp_result=1;};

//Shiga(2:low/3:High)
if(chk_string=="96gWZEIpins"){tmp_result=2;};
//if(chk_string=="EdTpUyx5hTY"){tmp_result=3;};
if(chk_string=="enOJoO6CZNc"){tmp_result=3;};

//Nozawa(4:low/5:High)
if(chk_string=="3Yr29k3OFkU"){tmp_result=4;};
//if(chk_string=="Jt0Vc3rNhB0"){tmp_result=5;};
if(chk_string=="tZa32M15JQ8"){tmp_result=5;};

//Myoko(6:low/7:High)
if(chk_string=="uSBDtmeYXYk"){tmp_result=6;};
if(chk_string=="zvG7kKfnUjc"){tmp_result=7;};

return flv_win_open(tmp_result);

}

//---------------------------------------
function flv_win_open(ary_no)
{
//NetScape Opera92X
var ns_chk=netscape_chk();
var op_92x_chk=opera_92xchk();
var mac_opera_chk_num=mac_opera_chk();
var flv_page_url="";
var flv_win;

//Mac OS AND Opera
if(mac_opera_chk_num*1==0)
{
  flv_page_url=ary_flv_page_url[ary_no*1];
  flv_win = window.open(flv_page_url,"flvwin","scrollbars=no,resizable=no,HEIGHT=450,WIDTH=550");
}
else
{


//swf_ok
if((swf_inst_ver_check*1==1)&&(ns_chk*1!=0)&&(op_92x_chk*1!=1)&&(op_92x_chk*1!=2)){
var ary_yt0;
var ary_yt1;
ary_yt0=new Array();
ary_yt1=new Array();

//Hakuba(0:low/1:High)
ary_yt0[0]="0zeMDhVoAUM";
ary_yt0[1]="OSSUHAg7Ae4";

//Shiga(2:low/3:High)
ary_yt0[2]="96gWZEIpins";
//ary_yt0[3]="EdTpUyx5hTY";
ary_yt0[3]="enOJoO6CZNc";

//Nozawa(4:low/5:High)
ary_yt0[4]="3Yr29k3OFkU";
//ary_yt0[5]="Jt0Vc3rNhB0";
ary_yt0[5]="tZa32M15JQ8";


//Myoko(6:low/7:High)
ary_yt0[6]="uSBDtmeYXYk";
ary_yt0[7]="zvG7kKfnUjc";


//Hakuba(0:low/1:High)
ary_yt1[0]="[Hakuba]";
ary_yt1[1]="[Hakuba]";

//Shiga(2:low/3:High)
ary_yt1[2]="[Shiga Kogen]";
ary_yt1[3]="[Shiga Kogen]";

//Nozawa(4:low/5:High)
ary_yt1[4]="[Nozawa Onsen]";
ary_yt1[5]="[Nozawa Onsen]";

//Myoko(6:low/7:High)
ary_yt1[6]="[Myokokogen]";
ary_yt1[7]="[Myokokogen]";

var ary_yt2;
ary_yt2=new Array();
ary_yt2[0]=ary_yt0[ary_no*1];
ary_yt2[1]=ary_yt1[ary_no*1];

return jsMoviePlay(ary_yt2);

}
else
//swf_ng
 {
  flv_page_url=ary_flv_page_url[ary_no*1];
  flv_win = window.open(flv_page_url,"flvwin","scrollbars=no,resizable=no,HEIGHT=450,WIDTH=550");
 }
 
 
}
}

//------------------------------------------
