// ====== Created by T.Watanabe @ Ycomm =====

function mouseOverImg(imgName,fpath){
	var btImgName = new Image();
	btImgName.src = fpath + "/" + imgName + "_over.gif";
	if (btImgName.complete){
		document.images[imgName].src = btImgName.src
	}
}

function mouseOutImg(imgName,fpath){
	var btImgName = new Image();
	btImgName.src = fpath + "/" + imgName + ".gif";
	if (btImgName.complete){
		document.images[imgName].src = btImgName.src
	}
}

function powOn(imgType){
	var btImgName = new Image();
	var imgName = imgType;
	btImgName.src = "img/3way_" + imgName + "_on.gif";
	if (btImgName.complete){
		document.images[imgName].src = btImgName.src
	}
	btImgName = new Image();
	imgName = "3way_rear";
	btImgName.src = "img/" + imgName + "_" + imgType + ".gif";
	if (btImgName.complete){
		document.images[imgName].src = btImgName.src
	}
}

function powOut(imgType){
	var btImgName = new Image();
	var imgName = imgType;
	btImgName.src = "img/3way_" + imgName + ".gif";
	if (btImgName.complete){
		document.images[imgName].src = btImgName.src
	}
	btImgName = new Image();
	imgName = "3way_rear";
	btImgName.src = "img/" + imgName + ".gif";
	if (btImgName.complete){
		document.images[imgName].src = btImgName.src
	}
}

function toTop(){
	location.href="../demo_index.html";
}

function toWebDemo(){
	win=window.open("../demo_index.html","demoWin",
		"toolbar=no,location=no,status=yes,menubar=no,scrollbars=no,resizable=yes,width=800,height=600");
	win.focus();
}

function skipSwfTo(swf,frame){
	self.document[swf].GotoFrame(frame);
	self.document[swf].Play()
}

function listOpen(openID){
	if (self.document.getElementById(openID).style.display == "none"){
		self.document.getElementById(openID).style.display="block"
	}
	else{
		self.document.getElementById(openID).style.display="none"	
	}
}

function tofunctions(path){
	if(path.substring(0,3) == "../"){location.href="../demo_index.html"}
	else{location.href="demo_index.html"}
	if(opener.closed){
		win=window.open(path + "counter.html","funcWin","");
		win.focus();	
	}
	else{
		opener.location.href= path + "counter.html";
		opener.focus()
	}
}