﻿//-------------------------
//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 flv_win_open(ary_no)
{
var flv_page_url="";
flv_page_url=ary_flv_page_url[ary_no*1];

var flv_win = window.open(flv_page_url,"flvwin","scrollbars=no,resizable=no,HEIGHT=450,WIDTH=550");
}

//------------------------------------------
