//--------------------STYLE SHEET--------------------

var Win = navigator.appVersion.indexOf('Win',0) != -1;
var Mac = navigator.appVersion.indexOf('Mac',0) != -1;
var IE = navigator.appName.indexOf('Microsoft',0) != -1;
var NN = navigator.appName.indexOf('Netscape',0) != -1;
if(Mac){
document.write('<link rel="stylesheet" href="/common/css/fontmac.css" type="text/css">');
}
else if(Win){
document.write('<link rel="stylesheet" href="/common/css/fontwin.css" type="text/css">');
}

//--------------------POP UP--------------------

function winop(url,height,width){
window.open(url,"wakowin","status=no,location=no,scrollbars=yes,resizable=yes,width="+ width +",height="+ height).focus();
}

//--------------------head_img--------------------

var himg = new Array();
himg[0] = new Image();  himg[0].src = "/common/images/head2006/head_tab01.gif";
himg[1] = new Image();  himg[1].src = "/common/images/head2006/head_tab01_o.gif";
himg[2] = new Image();  himg[2].src = "/common/images/head2006/head_tab02.gif";
himg[3] = new Image();  himg[3].src = "/common/images/head2006/head_tab02_o.gif";
himg[4] = new Image();  himg[4].src = "/common/images/head2006/head_tab03.gif";
himg[5] = new Image();  himg[5].src = "/common/images/head2006/head_tab03_o.gif";
himg[6] = new Image();  himg[6].src = "/common/images/head2006/head_tab04.gif";
himg[7] = new Image();  himg[7].src = "/common/images/head2006/head_tab04_o.gif";
himg[8] = new Image();  himg[8].src = "/common/images/head2006/head_tab05.gif";
himg[9] = new Image();  himg[9].src = "/common/images/head2006/head_tab05_o.gif";
himg[10] = new Image();  himg[10].src = "/common/images/head2006/head_tab06.gif";
himg[11] = new Image();  himg[11].src = "/common/images/head2006/head_tab06_o.gif";

function changeHEADIMG(hnam,hnum) {
document.images[hnam].src = himg[hnum].src; }


//--------------------POP UP02--------------------
function win0penBlank(url,winame,w,h,scro) {
winType = "width=" + w + ",height=" + h + ",top=10,left=10,toolbar=no,location=no,status=no,menubar=no,scrollbars=" + scro + ",resizable=yes,directories=no" ;
wob = window.open(url,winame,winType);
wob.focus();
}

//--------------------head_img new--------------------

var hnimg = new Array();
hnimg[0] = new Image();  hnimg[0].src = "/common/images/header/header_bot01.gif";
hnimg[1] = new Image();  hnimg[1].src = "/common/images/header/header_bot01_on.gif"; 
hnimg[2] = new Image();  hnimg[2].src = "/common/images/header/header_bot02.gif";
hnimg[3] = new Image();  hnimg[3].src = "/common/images/header/header_bot02_on.gif"; 
hnimg[4] = new Image();  hnimg[4].src = "/common/images/header/header_bot03.gif";
hnimg[5] = new Image();  hnimg[5].src = "/common/images/header/header_bot03_on.gif"; 
hnimg[6] = new Image();  hnimg[6].src = "/common/images/header/header_bot04.gif";
hnimg[7] = new Image();  hnimg[7].src = "/common/images/header/header_bot04_on.gif"; 
hnimg[8] = new Image();  hnimg[8].src = "/common/images/header/header_bot05.gif";
hnimg[9] = new Image();  hnimg[9].src = "/common/images/header/header_bot05_on.gif"; 
hnimg[10] = new Image();  hnimg[10].src = "/common/images/header/header_bot06.gif";
hnimg[11] = new Image();  hnimg[11].src = "/common/images/header/header_bot06_on.gif"; 
hnimg[12] = new Image();  hnimg[12].src = "/common/images/header/header_bot07.gif";
hnimg[13] = new Image();  hnimg[13].src = "/common/images/header/header_bot07_on.gif"; 

function headIMGchange(hnam,hnum) {
document.images[ 'header_bot' + hnam ].src = hnimg[hnum].src; }

//--------------------Jストリーム動画用JS--------------------
function SWindow(Aurl,Aname,Awidth,Aheight,Atoolbar,Alocation,Astatus,Ascroll,Amenu,Aresize){
	Astr = "width=" + Awidth;
	Astr+= ",height=" + Aheight;
	if(Atoolbar)Astr+= ",toolbar";
	if(Alocation)Astr+= ",location";
	if(Astatus)Astr+= ",status";
	if(Ascroll)Astr+= ",scrollbars";
	if(Amenu)Astr+= ",menubar";
	if(Aresize)Astr+= ",resizable";
	window.open(Aurl,Aname,Astr);
}

//--------------------ポップアップ (08/09/25追記)--------------------
function pop_w550_h600( url )
{
	if( url != "" ) {
		win = window.open(url,"pop_w550_h600","status=1,resizable=1,scrollbars=1,toolbar=1,directories=1,scrolling=1,menubar=1,location=1,width=550,height=600,")
		win.focus();
	}
}

function pop_w600_h600( url )
{
	if( url != "" ) {
		win = window.open(url,"pop_w600_h600","status=1,resizable=1,scrollbars=1,toolbar=1,directories=1,scrolling=1,menubar=1,location=1,width=600,height=600,")
		win.focus();
	}
}

function pop_w500_h300( url )
{
	if( url != "" ) {
		win = window.open(url,"pop_w500_h300","status=1,resizable=1,scrollbars=1,toolbar=1,directories=1,scrolling=1,menubar=1,location=1,width=500,height=300,")
		win.focus();
	}
}

function pop_w960_h700( url )
{
	if( url != "" ) {
		win = window.open(url,"pop_w960_h700","status=1,resizable=1,scrollbars=1,toolbar=1,directories=1,scrolling=1,menubar=1,location=1,width=960,height=700,")
		win.focus();
	}
}

function pop_w1040_h780( url )
{
	if( url != "" ) {
		win = window.open(url,"pop_w1040_h780","status=1,resizable=1,scrollbars=1,toolbar=1,directories=1,scrolling=1,menubar=1,location=1,width=1040,height=780,")
		win.focus();
	}
}

function pop_w1040_h700( url )
{
	if( url != "" ) {
		win = window.open(url,"pop_w1040_h700","status=1,resizable=1,scrollbars=1,toolbar=1,directories=1,scrolling=1,menubar=1,location=1,width=1040,height=700,")
		win.focus();
	}
}

function pop_w1040_h710( url )
{
	if( url != "" ) {
		win = window.open(url,"pop_w1040_h710","status=1,resizable=1,scrollbars=1,toolbar=1,directories=1,scrolling=1,menubar=1,location=1,width=1040,height=710,")
		win.focus();
	}
}

//========================================================================//
// マクロメディア ビヘイビアスクリプト (080314追記)                       //
//========================================================================//

function MM_swapImgRestore_v3()
{
  var i, x, a = document.MM_sr;
  for(i = 0; a && i < a.length && (x = a[i]) && x.oSrc; i++)
  {
     x.src=x.oSrc;
  }
}

function MM_preloadImages_v3()
{
  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_v3.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 MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

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 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_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

//------------------------------------------------------------------------//
// BC MovieWindow Script                                                    //
//------------------------------------------------------------------------//
var win;
function movie_pop_tab( url )
{
	if( url != "" ) {
		win = window.open(url,"movie_pop_tab","status=0,resizable=0,scrollbars=0,toolbar=0,directories=0,scrolling=0,menubar=0,location=0,width=966,height=546,")
		win.focus();
	}
}
function movie_pop_compact_tab( url )
{
	if( url != "" ) {
		win = window.open(url,"movie_pop_compact_tab","status=0,resizable=0,scrollbars=0,toolbar=0,directories=0,scrolling=0,menubar=0,location=0,width=798,height=503,")
		win.focus();
	}
}
function movie_pop_single( url )
{
	if( url != "" ) {
		win = window.open(url,"movie_pop_single","status=0,resizable=0,scrollbars=0,toolbar=0,directories=0,scrolling=0,menubar=0,location=0,width=492,height=490,")
		win.focus();
	}
}

function movie_pop_wide( url )
{
	if( url != "" ) {
		win = window.open(url,"movie_pop_single","status=0,resizable=0,scrollbars=0,toolbar=0,directories=0,scrolling=0,menubar=0,location=0,width=650,height=630,")
		win.focus();
	}
}

