
/************************************************************************************************/
/* timeInterVal : Interval Time                                                                  */
/* imgHeight : Top ¹öÆ° Æø                                                                        */
/* topDir : °è»êµÉ ¹æÇâ Ç¥½Ã true (»ó->ÇÏ)/ false (ÇÏ->»ó)/ default (true)                         */
/* bwrHeight : ºê¶ó¿ìÀú Æø                                                                        */
/* limitBwrHeight - ºê¶ó¿ìÀú°¡ Æ¯Á¤ ÆøÀÌÇÏ·Î ÀÛ¾ÆÁø°æ¿ì Æ¯Á¤ »ó´Ü¿¡ °íÁ¤µÉ ³ôÀÌ                      */
/* baseGap : À§Ä¡ÇÒ Æ¯Á¤À§Ä¡¿Í ºê¶ó¿ìÀú°£ÀÇ °£°Ý                                                    */
/* isNS4 : ³×½ºÄÉÀÌÇÁ4 Ã¼Å©                                                                        */
/* isNS6 : ³×½ºÄÉÀÌÇÁ6ÀÌ»ó Ã¼Å©                                                                    */
/* isMSIE : ÀÍ½ºÇÃ·Î·¯ Ã¼Å©                                                                        */
/************************************************************************************************/
var timeInterVal = 100;
var imgHeight = 16;
var topDir = true;
var bwrHeight = 0;
var limitBwrHeight = 89;
var baseGap = 770;
var isNS4 = false;
var isNS6 = false;
var isMSIE = false;

/************************************************************************************************/
/* Top Button Position Direction Change Function                                                */
/************************************************************************************************/
function setTopDir(dVal){
	topDir = dVal;
}

/************************************************************************************************/
/* Get Browser Function                                                                         */
/************************************************************************************************/
function getBrowser() {
	isNS4 = ((document.layers)==null)?false:true;
	isNS6 = ((!document.all && document.getElementById)==null || (!document.all && document.getElementById) == false)?false:true;
	isMSIE = ((document.all)==null)?false:true;
}

/************************************************************************************************/
/* Call Browser Size Function                                                                   */
/************************************************************************************************/
function chgWinSize() {
	initTopButton();
}

/************************************************************************************************/
/* Initial Top Button Function                                                                  */
/************************************************************************************************/
function initTopButton() {
	if (isNS4 || isNS6) {
		bwrHeight = window.innerHeight; 
	} else if(isMSIE) {
		bwrHeight = document.body.clientHeight;
	}
	if (isNS4) document.goTop.top = limitBwrHeight;
	if (isNS6) document.getElementById('goTop').style.top = limitBwrHeight;
	if (isMSIE) goTop.style.pixelTop = limitBwrHeight;
}

/************************************************************************************************/
/* Move Top Button Function                                                                     */
/************************************************************************************************/
function TopMovec() {
	var topPos = (topDir)?bwrHeight-(baseGap+imgHeight):baseGap;
	if (isNS4) document.goTop.top = topPos+window.pageYOffset;
	if (isNS6) document.getElementById('goTop').style.top = topPos+scrollY;
	if (isMSIE) goTop.style.pixelTop = topPos+document.body.scrollTop;

	if(topDir) {
		if (isNS4 && document.goTop.top <= limitBwrHeight) {
			if (document.goTop.top == limitBwrHeight) return;
			document.goTop.top = limitBwrHeight;
			return;
		}
		if (isNS6 && parseInt(document.getElementById('goTop').style.top) <= limitBwrHeight) {
			if (document.getElementById('goTop').style.top == limitBwrHeight) return;
			document.getElementById('goTop').style.top = limitBwrHeight;
			return;
		}
		if (isMSIE && goTop.style.pixelTop <= limitBwrHeight) {
			if (goTop.style.pixelTop == limitBwrHeight) return;
			goTop.style.pixelTop = limitBwrHeight;
			return;
		}
	}
}

function topc() {
	getBrowser();
	initTopButton();
	setInterval("TopMovec()",timeInterVal);
}

function q(num) 
{
	switch(num) 
	{
		case 1 : 
			location.href="/product/CPdNormal.jsp?pc=175";
			break;
		case 2 : 
			location.href="javascript:na_open_window('win', '/cf-cd/daewon-ci.htm', 200, 100, 340, 350, 0, 0, 0, 0, 0)";
			break;		
		case 3 : 
			location.href="javascript:na_open_window('win', '/cf-cd/daewon-50.htm', 200, 100, 396, 336, 0, 0, 0, 0, 0)";
			break;
	}
}

document.write("\
<!-- START OF QUICK LINK -->\
<div id=\"goTop\" name=\"goTop\" style=\"position:absolute;left:895px;top:"+limitBwrHeight+"\">\
	<table cellpadding=0 cellspacing=0 border=0 width=80>\
	<tr>\
		<td><OBJECT classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" codebase=\"https://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0\" WIDTH=74 HEIGHT=179>\
	    	<PARAM NAME=movie VALUE=\"/common/img/flashkr/quick.swf\"> \
	        <PARAM NAME=quality VALUE=high> \
	        <PARAM NAME=bgcolor VALUE=#ffffff> \
	        <EMBED src=\"/common/img/flashkr/quick.swf\" quality=high bgcolor=#ffffff WIDTH=74 HEIGHT=179 TYPE=\"application/x-shockwave-flash\" PLUGINSPAGE=\"https://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash\"></EMBED>\
	    </OBJECT></td>\
	</tr>\
	</table>\
</div>\
<!--Top Button ³¡-->\
");
