// Style Select ---------------------- START ------------------------

var stylesheet ="";

if (navigator.platform == "MacPPC") {
	stylesheet = "mac";
} else {
	stylesheet = "win";
}


function styleSetL0() {
	if(stylesheet != ""){
		document.write('<link rel="stylesheet" type="text/css" href="css/textsets_'+stylesheet+'.css">');
	}
}

function styleSetL1() {
	if(stylesheet != ""){
		document.write('<link rel="stylesheet" type="text/css" href="../css/textsets_'+stylesheet+'.css">');
	}
}

function styleSetL2() {
	if(stylesheet != ""){
		document.write('<link rel="stylesheet" type="text/css" href="../../css/textsets_'+stylesheet+'.css">');
	}
}
// Style Select ---------------------- END ------------------------




// Scroll to Top ---------------------- START ------------------------

//É¬£ìBOCTYPE¤êASSÍÑ£õ.wÄæ€¡¦¡¦¡¦
var scrOldY=10000;

if(navigator.platform=="MacPPC" || navigator.platform=="MacIntel") {
	scrPlat="mac";
} else {
	scrPlat="win";
}

if(navigator.userAgent.lastIndexOf("Firefox")>=0) {
	scrName="Firefox";
} else if(navigator.userAgent.lastIndexOf("Safari")>=0) {
	scrName="Safari";
} else if(navigator.userAgent.lastIndexOf("Netscape")>=0) {
	scrName="Netscape";
} else if(navigator.userAgent.lastIndexOf("MSIE")>=0) {
	scrName="IE";
} else {
	scrName="Other";
}


function scrTop() {
	speed=6;
	
	if( (scrPlat=="mac"&&scrName=="IE") || scrName=="Safari" || scrName=="Netscape" ) {
		if(document.body.scrollTop>scrOldY) {
			scrOldY=10000;
			clearTimeout(scrTimer);
		} else {
			movY=Math.floor((0-document.body.scrollTop)/speed);
			window.scrollBy(0,movY);
			scrOldY=document.body.scrollTop;
		}
	} else {
		if(document.documentElement.scrollTop>scrOldY) {
			scrOldY=10000;
			clearTimeout(scrTimer);
		} else {
			movY=Math.floor((0-document.documentElement.scrollTop)/speed);
			window.scrollBy(0,movY);
			scrOldY=document.documentElement.scrollTop;
		}
	}
	
	
	
	if(movY==0 || scrOldY==10000) {
		scrOldY=10000;
		clearTimeout(scrTimer);
	} else {
		scrTimer=setTimeout("scrTop()",10);
	}
}

// Scroll to Top ---------------------- END ------------------------



// Toppage onMouse Actions ---------------------- START ------------------------

//basenum=100;
tarwidth=200;
speed=7;
stateArray=new Array("unused","closed","closed","closed","closed","closed","closed","closed","closed");
movArray=new Array(false,false,false,false,false,false,false,false,false);
countArray=new Array(0,0,0,0,0,0,0,0,0);

function movon(nownum,basenum1,basenum2) {
	if(stateArray[nownum]=="closed") {
	
		countArray[nownum]++;
		movArray[nownum]=true;
		numA=basenum2-(speed*countArray[nownum]);
		numB=basenum1+(speed*countArray[nownum]);
		numC=basenum2+(speed*countArray[nownum]);
		numD=basenum1-(speed*countArray[nownum]);
		
		document.getElementById("mainimg"+nownum).style.clip="rect("+numA+"px,"+numB+"px,"+numC+"px,"+numD+"px)";
		document.getElementById("mainimg"+nownum).style.visibility="visible";
		
		if(nownum=="1") {
			movTimer1=setTimeout("movon("+nownum+","+basenum1+","+basenum2+")",10);
		} else if(nownum=="2") {
			movTimer2=setTimeout("movon("+nownum+","+basenum1+","+basenum2+")",10);
		} else if(nownum=="3") {
			movTimer3=setTimeout("movon("+nownum+","+basenum1+","+basenum2+")",10);
		} else if(nownum=="4") {
			movTimer4=setTimeout("movon("+nownum+","+basenum1+","+basenum2+")",10);
		} else if(nownum=="5") {
			movTimer5=setTimeout("movon("+nownum+","+basenum1+","+basenum2+")",10);
		} else if(nownum=="6") {
			movTimer6=setTimeout("movon("+nownum+","+basenum1+","+basenum2+")",10);
		} else if(nownum=="7") {
			movTimer7=setTimeout("movon("+nownum+","+basenum1+","+basenum2+")",10);
		} else if(nownum=="8") {
			movTimer8=setTimeout("movon("+nownum+","+basenum1+","+basenum2+")",10);
		}
		
		if(Math.max(numA,numD)<=0) {
			stateArray[nownum]="opened";
			movArray[nownum]=false;
			countArray[nownum]=0;
			clearTimeout(eval("movTimer"+nownum));
		}
	}
}

function movoff(nownum) {
	clearTimeout(eval("movTimer"+nownum));
	document.getElementById("mainimg"+nownum).style.visibility="hidden";
	stateArray[nownum]="closed";
}

// Toppage onMouse Actions ---------------------- END ------------------------


