/*

  Copyright 2001 Fukuoka Dance Stage. All Rights Reserved. 
  WEBMASTER: Toru   @Studio [ Garyu Tensei ]
  Contact: fds@fds21.com
  Would you use this?  Shoujingatarinyo.

*/


var vNum = navigator.appVersion.charAt(0);
var bName = navigator.appName.charAt(0);
osType=navigator.userAgent;
	if(osType.indexOf("Mac")>=0){myOS="mac";}
	if(osType.indexOf("Win")>=0){myOS="win";}
	myApp=navigator.appName;
	myVer=navigator.appVersion;
	myBrowser=myApp.charAt(0);

mNum =navigator.appVersion.indexOf("Mac");

if(navigator.appVersion.indexOf("Mac") > -1){
	if(bName=="M" && vNum>=4){
	//document.write("<link rel='stylesheet'TYPE='text/css' href='../css/macie.css'>");	// MAC IE5.0-6.0
	}else{
		if( vNum < 5 ){	
		//	document.write("<link rel='stylesheet'TYPE='text/css' href='../css/macns4.css'>");// MAC NETSCAPE 4.x
		}else{
		//	document.write("<link rel='stylesheet'TYPE='text/css' href='../css/macns6.css'>");// MAC NETSCAPE 6.x~
		}
	}
}else{
	if( bName == "M"){
	document.write("<link rel='stylesheet'TYPE='text/css' href='../css/winie.css'>");}// WIN IE

	else{
		if( vNum < 5 ){document.write("<link rel='stylesheet'TYPE='text/css' href='../css/winns4.css'>");} // WIN NETSCAPE 4.x
		else{document.write("<link rel='stylesheet'TYPE='text/css' href='../css/winns6.css'>");}// WIN NETSCAPE 6.x~
	}
}
// 全て共通
document.write("<link rel='stylesheet'TYPE='text/css' href='../css/all.css'>");	

var ver = navigator.appVersion.charAt(0);
var ie = 0, nn = 0;
if(navigator.appName == "Netscape") nn = 1;
if(navigator.appName ==
	"Microsoft Internet Explorer") ie = 1;

function txtCall(m) {
	if((top.navi1!=null)&&(top.navi1.msg!=null)){
		if ( (bName == "M") && (vNum >= 4)){
			top.navi1.msg.innerHTML = m;
		}
		if ( (bName == "N") && (vNum >= 5)){
			top.navi1.document.getElementById('msg').innerHTML = m;
		}
		else if((bName == "N") && (vNum >=4) && (vNum <5) ){
			top.navi1.document.msg1.document.open();
			top.navi1.document.msg1.document.write(m);
			top.navi1.document.msg1.document.close();
		}
	}
}

function s_btnClear(h){
	if((top.navi1!=null)&&(top.navi1.msg!=null)){
		for(i=1 ; i<=6 ; i++) {
			top.navi1.document.images["menu"+i].src="../img/top/sbtn1.gif";
		}
		top.navi1.document.images["menu"+h].src="../img/top/sbtn3.gif";
		top.navi1.btnFlg = h;
		//doMove("navi"+h,0);
	}
}


function wideH(n){
	window.open("vuzz010223/html/"+n+".htm","new"+n,"width=320,height=400,resizable=yes,scrollbars=0");
}

function mOvr(src,clrOver){ 
        if (!src.contains(event.fromElement)){ 
                src.style.cursor = 'hand'; 
                src.bgColor = clrOver; 
        } 
} 

function mOut(src,clrIn){ 
        if (!src.contains(event.toElement)){ 
                src.style.cursor = 'default'; 
                src.bgColor = clrIn; 
        } 
} 

function mClk(src){ 
	if(event.srcElement.tagName=='TD')
		src.children.tags('A')[0].click();
}

//ナビのレイヤー操作
timerID=0;
idName="navi1";
var mX=-1000;
var mY=86;

function doMove(idName1,offX){
	if(top.navi1!=null){
		if(timerID!=0){
			clearInterval(timerID);
		}
		if(document.getElementById){
			top.navi1.document.getElementById(top.navi1.idName).style.display="none";
			top.navi1.document.getElementById(idName1).style.display="block";
		}
		else if(document.all){
			top.navi1.document.all(top.navi1.idName).style.display="none";
			top.navi1.document.all(idName1).style.display="block";
		}
		else if(document.layers){
			top.navi1.document.layers[top.navi1.idName].hidden= true;
			top.navi1.document.layers[idName1].hidden= false;	
		}
	
		idName=idName1;
		var mX=-600;
		var mY=86;
		if(document.getElementById){		//IE5-6、NS6、Mozilla用
			var oj = top.navi1.document.getElementById(top.navi1.idName).style;
			oj.left =mX;
			if(bName == "N" && vNum > 4){
				oj.top =mY-3;
			}
			else{
				oj.top =mY;
			}
		}else if(document.all){
			var oj =top.navi1.document.all(top.navi1.idName).style;
			oj.left =mX;
			oj.top =mY;
		}
		else if(document.layers){
			var x=mX;
			var y=mY;
			top.navi1.document.layers[top.navi1.idName].moveTo(x,y);
		}
		timerID=setInterval("moveLayer("+offX+")",50);
	}
}

var xPos=-500;

function moveLayer(offX){
	if(top.navi1!=null){
		if(document.getElementById){		//IE5-6、NS6、Mozilla用
			var oj = top.navi1.document.getElementById(top.navi1.idName).style;
			xPos =(offX + parseInt(oj.left))/2 ;
			oj.left = xPos +'px';
		}
		else if(document.all){
			var oj = top.navi1.document.all(top.navi1.idName).style.pixelLeft;
			xPos = (offX + parseInt(oj.left))/2;
			top.navi1.document.all(idName).style.pixelLeft = xPos;
		}
		else if(document.layers){
			xPos= (offX+document.layers[top.navi1.idName].left)/2;
			top.navi1.document.layers[top.navi1.idName].moveTo(xPos,mY-3);
		}
		if(xPos>=-1){
			clearInterval(timerID);
		}
	}
}


/*=================================
 ■画像幅に合わせて別窓を開く
=================================*/
_winOpen = window.open
function winOpen(url,name,opt) {
	//alert(winOpen);
	var w,h,c=false,g=null,l,t,o,x=-1,i=0,a=["left","top","width","height","resizable","scrollbars","s	tatus","menubar","toolbar","location","directories"];
	if(!name)name = ""; if(!opt)opt="";
	if(opt.match(/^(\d+|\*)(,(\d+|\*))+$/)) {
		do {
			opt = opt.substring(0,x+1) + a[i]+"="+opt.substring(x+1);
		} while((x=opt.indexOf(',',x+a[i++].length))!=-1);
		opt = opt.replace(/[^=]+=\*,/g,"");
	}
	if(opt.match(/image=(true|1)/)) {
		g = new Image();g.src=url;url="";opt+=",resizable=1";
		if(g.width>0&&g.height>0);
		opt+=",width="+(w=g.width)+",height="+(h=g.height);
	}
	if(
		(w=opt.match(/width=(\d+)/))&&(w=RegExp.$1)&&
		(h=opt.match(/height=(\d+)/))&&(h=RegExp.$1)&&
		opt.match(/center=(true|1)/)&&!!(c=true)
	)
	opt+=",left="+(l=screen.width-w)+",top="+(t=screen.height-h);
	o = _winOpen(url,name,opt);

	if(c&&navigator.platform.indexOf("Mac")!=-1)o.moveTo(l,t);
	if(g) {
		o.document.open();
		o.document.write(
			//window.resizeTo('+w+','+h+');
			//'<html><head><title>'+g.src.substring(g.src.lastIndexOf('/')+1)+'</title><head><body style=overflow:hidden leftmargin=0 topmargin=0 marginwidth=0 marginheight=0 onload="window.focus();alert(document.body.parentNode.innerHTML)">'
			'<html><head><meta http-equiv="imagetoolbar" content="no"><title>'+g.src.substring(g.src.lastIndexOf('/')+1)+'</title><head><body style=overflow:hidden leftmargin=0 topmargin=0 marginwidth=0 marginheight=0 onLoad="if(self.innerWidth){self.innerWidth=document.ImgArea.width;self.innerHeight=document.ImgArea.height}else{self.resizeBy(document.ImgArea.width-document.body.clientWidth,document.ImgArea.height-document.body.clientHeight);window.focus();}")>'

		);
		o.document.write(
			'<a href="javascript:window.close()"><img src="'+g.src+'"'+(w>0&&h>0?' width='+w+' height='+h:' onLoad="if(self.innerWidth){self.innerWidth=this.width;self.innerHeight=this.height}else{self.resizeBy(this.width-document.body.clientWidth,this.height-document.body.clientHeight)}"')+' border=0 name="ImgArea"></a>'
		);
		o.document.write(
			'</body></html>'
		);
		o.document.close();
	}
	return o;
}
window.open = winOpen;

//外部リンクを別窓に
window.onload = function(){
	if( window.document && window.document.links ){
		L = window.document.links;
		if( L.length ){
			for( i=0; i<L.length; i++ ){
				if( L[i].hostname != "fds" && L[i].hostname != "www.fds21.com" && L[i].hostname != "fds21.com" && L[i].hostname != ""){
					L[i].target = "_blank" ;
					L[i].className  = "blank" ;
					//alert(L[i].hostname);
				}
			}
		}
	}
}