/*rollover script by two-ways*/
/*coryright(c)two-ways co.Ltd All rights reserved*/
/*2008.05 ver3.0*/

window.onload=LoadEvent;

function LoadEvent(){
prImg= new Array();
for (i=0; i<document.images.length; i++){
	if(document.images[i].getAttribute("class")=="over"){
	baseIMG = document.images[i].src;
	newIMG = baseIMG.replace(baseIMG.substr(baseIMG.length-4,4),("_o" + baseIMG.substr(baseIMG.length-4,4)));
	prImg[i] = new Image();
	prImg[i].src = newIMG;
	document.images[i].setAttribute("onmouseover", "Over("+i+")");
	document.images[i].setAttribute("onmouseout", "Out("+i+")");
	}else if(document.images[i].getAttribute("className")=="over"){
	baseIMG = document.images[i].src;
	newIMG = baseIMG.replace(baseIMG.substr(baseIMG.length-4,4),("_o" + baseIMG.substr(baseIMG.length-4,4)));
	prImg[i] = new Image();
	prImg[i].src = newIMG;
	document.images[i].setAttribute("onmouseover",  new Function("Over("+i+");"));
	document.images[i].setAttribute("onmouseout",  new Function("Out("+i+");"));
	}
}
//newwin
for (i=0; i<document.links.length; i++){
	if(document.links[i].getAttribute("class")=="map"){
	document.links[i].setAttribute("onclick", "OpenWin1()");
	document.links[i].target = windowname1;
	}else if(document.links[i].getAttribute("className")=="map"){
	document.links[i].setAttribute("onclick", new Function("OpenWin1();"));
	document.links[i].target = windowname1;
	}
}
//photo
for (i=0; i<document.links.length; i++){
	if(document.links[i].getAttribute("class")=="enlarge"){
	document.links[i].setAttribute("onclick", "OpenWin2()");
	document.links[i].target = windowname2;
	}else if(document.links[i].getAttribute("className")=="enlarge"){
	document.links[i].setAttribute("onclick", new Function("OpenWin2();"));
	document.links[i].target = windowname2;
	}
}

if(document.getElementById('course01')){
document.getElementById('course01').style.height = '35px';
document.getElementById('course02').style.height = '35px';
document.getElementById('course03').style.height = '35px';
document.getElementById('course04').style.height = '35px';
}

}

function Over(IMG){//mouseover
baseIMG = document.images[IMG].src;
if(baseIMG.substr(baseIMG.length-6,2) !="_o"){
newIMG = baseIMG.replace(baseIMG.substr(baseIMG.length-4,4),("_o" + baseIMG.substr(baseIMG.length-4,4)));
document.images[IMG].src=newIMG;
}
}

function Out(IMG){//mouseout
baseIMG = document.images[IMG].src;
if(baseIMG.substr(baseIMG.length-6,2) =="_o"){
newIMG = baseIMG.replace(baseIMG.substr(baseIMG.length-6,6),baseIMG.substr(baseIMG.length-4,4));
document.images[IMG].src=newIMG;
}
}

function callJavascript(toY,ID) {
document.getElementById(ID).style.height = toY+ 'px';
return toY;
} 

function ReciseArea(toY,ID) {
document.getElementById(ID).style.height = toY+ 'px';
return toY;
}
/*newwindow script by two-ways*/
/*2006.12.21ver1.0*/

//window setting1
windowname1 = "newwin";
map = "toolbar=no,location=no,status=no,menubar=yes,scrollbars=auto,resizable=no,width=550,height=620";
//window setting2
windowname2 = "photo";
enlarge = "toolbar=no,location=no,status=no,menubar=no,scrollbars=yes,resizable=yes,width=900,height=1000";

function OpenWin1(){
var link1=this.location.href;
var win1=window.open(link1,windowname1, map);
win1.focus();
 }

function OpenWin2(){
var link2=this.location.href;
var win2=window.open(link2,windowname2, enlarge);
win2.focus();
 }