// JavaScript Document 
var dirPath='';

function getDirPath() {
	for (i=0;i<dir;i++) {
		dirPath = dirPath + "../";
	}
	return;
}

getDirPath();

//PreloadImage

img = new Array("btn_pagetop_o.gif");

bfImg = new Array();

for(i=0; i<img.length; i++) {
	bfImg[i] = new Image();
	imgPath = dirPath + "image/" + img[i];
	bfImg[i].src = imgPath;
}


function toggleDisplay(blkID) {
	var obj=document.all && document.all(blkID) || document.getElementById && document.getElementById(blkID);
	if(obj && obj.style) obj.style.display="none" == obj.style.display ?"" : "none";

	var blkAllID = blkID + "All";
	var objAll=document.all && document.all(blkAllID) || document.getElementById && document.getElementById(blkAllID);
	if(objAll && objAll.style) objAll.style.display="none" == objAll.style.display ?"" : "none";
	
	document.location.href = "#" + blkID ;
}


function pagetopBtn() {
	getDirPath();

	imgName = "'btn_pagetop'";
	document.write('<div id="pagetopBtn">');
	document.write('<a href="#top" onMouseOver="movr(' + imgName + ')" onMouseOut="mout(' + imgName + ')"><img src="' + dirPath + 'image/btn_pagetop.gif" width="68" height="11" name="btn_pagetop" alt="PAGE TOP" /></a>');
	document.write('</div>');
}

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 movr(wk) {
	document.images[wk].src = dirPath + "image/" + wk + "_o.gif";
}

function mout(wk) {
	document.images[wk].src = dirPath + "image/" + wk + ".gif";
}

function popup1(url,nam,wid,hei){
	prop = "status=yes,scrollbars=yes,resizable=yes";
	puWindow(url,nam,wid,hei,prop);
}

function puWindow(url,nam,wid,hei,prop){
	var offset = 100;
	var w = window.screen.width;
	var h = window.screen.height;
	var l = (w-wid)/2;
	var t = ((h-hei)/2)-offset;
	sty = prop;
	sty+= ",width=";
	sty+= wid;
	sty+= ",height=";
	sty+= hei;
	sty+= ",left=";
	sty+= l;
	sty+= ",top=";
	sty+= t;
	popWin = window.open(url,nam,sty);
	popWin.focus();
}


