// Select Box
function selOpen(doID){
	var openSel = document.getElementById(doID);
	if(openSel.style.display==""||openSel.style.display=="none"){
		openSel.style.display="block";
		openSel.onmouseover=function(){openSel.style.display="block";}
		openSel.onfocus=function(){openSel.style.display="block";}
		openSel.onmouseout=function(){openSel.style.display="none";}
		openSel.onblur=function(){openSel.style.display="none";}
	}else{
		openSel.style.display="none";
	}
}

//window.open scrollbas = no
function popwindow01(pop,width,height)
{
	var url = pop;  
	var wd = width;
	var he = height;
	
	window.open(url,"","toolbar=0,menubar=0,scrollbars=no,resizable=no,width=" + wd +",height=" + he + "; top=30; left=50;")
}	

//window.open scrollbas = yes
function popwindow02(pop,width,height)
{
	var url = pop;  
	var wd = width;
	var he = height;
	
	window.open(url,"","toolbar=0,menubar=0,scrollbars=yes,resizable=no,width=" + wd +",height=" + he + "; top=30; left=50;")
}

//flash×ó²àflash
function flash_contents(file,width,height,id){
document.writeln("<OBJECT classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0' WIDTH='"+width+"' HEIGHT='"+height+"' id='"+id+"' ALIGN=''>");
document.writeln("<PARAM NAME=allowScriptAccess VALUE=always />");
document.writeln("<PARAM NAME=movie VALUE='"+file+"' />");
document.writeln("<PARAM NAME=quality VALUE=high>");
document.writeln("<PARAM NAME=bgcolor VALUE=#FFFFFF>");
document.writeln("<PARAM NAME=wmode VALUE=transparent> ");
document.writeln("<PARAM NAME=base VALUE=.> ");
document.writeln("<embed base='.' src='"+file+"' quality='high' width='"+width+"' height='"+height+"' name='"+id+"' wmode='transparent' align='top' allowScriptAccess='always' swLiveConnect='true' type='application/x-shockwave-flash' pluginspage='http://www.macromedia.com/go/getflashplayer' />");
document.writeln("</OBJECT>");
}

//flash no transparent
function flash_contents2(file,width,height,id){
document.writeln("<OBJECT classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0' WIDTH='"+width+"' HEIGHT='"+height+"' id='"+id+"' ALIGN=''>");
document.writeln("<PARAM NAME=allowScriptAccess VALUE=always />");
document.writeln("<PARAM NAME=movie VALUE='"+file+"' />");
document.writeln("<PARAM NAME=quality VALUE=high>");
document.writeln("<PARAM NAME=bgcolor VALUE=#FFFFFF>");
document.writeln("<PARAM NAME=wmode VALUE=window> ");
document.writeln("<PARAM NAME=base VALUE=.> ");
document.writeln("<embed base='.' src='"+file+"' quality='high' width='"+width+"' height='"+height+"' name='"+id+"' wmode='transparent' align='middle' allowScriptAccess='always' swLiveConnect='true' type='application/x-shockwave-flash' pluginspage='http://www.macromedia.com/go/getflashplayer' />");
document.writeln("</OBJECT>");
}

//iframe
function ifmView(ifrLeft,ifrTop,ifrWidth,ifrHeight,myUrl) {  
document.all.contentFrames.style.left = ifrLeft;
document.all.contentFrames.style.top = ifrTop;
document.all.contentFrames.style.width = ifrWidth;
document.all.contentFrames.style.height = ifrHeight;
contentFrames.location.href = myUrl;
document.all.contentFrames.style.display = 'block';
}

function ifmHide(){
 document.all.contentFrames.style.display = 'none';
 contentFrames.location.href = "about:blank";
}

//cont search
function thisMovie(movieName) {
    if (navigator.appName.indexOf("Microsoft") != -1) {
        return window[movieName]
    }
    else {
        return document[movieName]
    }
}

//Flash Height
function secondNaviHeight(h){
	var myflash = document.getElementsByName("contents");
	myflash[1].height = h+"px";
}


//Top Btn
function back_top()
{
        x = document.body.scrollLeft;
        y = document.body.scrollTop;
        step = 2;

        while ((x != 0) || (y != 0)) {
                scroll (x, y);
                step += (step * step / 300);
                x -= step;
                y -= step;
                if (x < 0) x = 0;
                if (y < 0) y = 0;
        } 
        scroll (0, 0);
}
