//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
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='middle' allowScriptAccess='always' swLiveConnect='true' type='application/x-shockwave-flash' pluginspage='http://www.macromedia.com/go/getflashplayer' />");
document.writeln("</OBJECT>");
}

//ÀÎÇ²¹Ú½º ¹è°æÁ¦¾î
function 
    clrImg(obj){
        obj.style.backgroundImage="";obj.onkeydown=obj.onmousedown=null;
}

//°ü·ÃÁ¦Ç° ÅÇ¹öÆ°
function chgTap(no){
	
	for(i=1;i<=2;i++){
		document.getElementById('tab0'+i).src = "/images/product/tab_product_0"+ i + ".gif"
		document.getElementById('tabCon0'+i).style.display = "none";
	}
		document.getElementById('tab0'+no).src = "/images/product/tab_product_0"+ no + "_on.gif"
		document.getElementById('tabCon0'+no).style.display = "block";

}

function chgTap2(no){
	
	for(i=1;i<=8;i++){
		document.getElementById('tab2_0'+i).src = "/images/product/tab_construction_0"+ i + ".gif"
		document.getElementById('tabCon2_0'+i).style.display = "none";
	}
		document.getElementById('tab2_0'+no).src = "/images/product/tab_construction_0"+ no + "_on.gif"
		document.getElementById('tabCon2_0'+no).style.display = "block";

}

function chgTap3(no){
	
	for(i=1;i<=2;i++){
		document.getElementById('tab3_0'+i).src = "/images/product/tab_solution_0"+ i + ".gif"
		document.getElementById('tabCon3_0'+i).style.display = "none";
	}
		document.getElementById('tab3_0'+no).src = "/images/product/tab_solution_0"+ no + "_on.gif"
		document.getElementById('tabCon3_0'+no).style.display = "block";

}

function downTap(no){
	
	for(i=1;i<=2;i++){
		document.getElementById('downTab0'+i).src = "/images/product/tab_download_0"+ i + ".gif"
		document.getElementById('downTabCon0'+i).style.display = "none";
	}
		document.getElementById('downTab0'+no).src = "/images/product/tab_download_0"+ no + "_on.gif"
		document.getElementById('downTabCon0'+no).style.display = "block";

}

//Quick banner
function initMoving(target, position, topLimit, btmLimit) {
	if (!target)
		return false;

	var obj = target;
	obj.initTop = position;
	obj.topLimit = topLimit;
	obj.bottomLimit = document.documentElement.scrollHeight - btmLimit;

	obj.style.position = "absolute";
	obj.top = obj.initTop;
	obj.left = obj.initLeft;

	if (typeof(window.pageYOffset) == "number") {
		obj.getTop = function() {
			return window.pageYOffset;
		}
	} else if (typeof(document.documentElement.scrollTop) == "number") {
		obj.getTop = function() {
			return document.documentElement.scrollTop;
		}
	} else {
		obj.getTop = function() {
			return 0;
		}
	}

	if (self.innerHeight) {
		obj.getHeight = function() {
			return self.innerHeight;
		}
	} else if(document.documentElement.clientHeight) {
		obj.getHeight = function() {
			return document.documentElement.clientHeight;
		}
	} else {
		obj.getHeight = function() {
			return 500;
		}
	}

	obj.move = setInterval(function() {
		if (obj.initTop > 0) {
			pos = obj.getTop() + obj.initTop;
		} else {
			pos = obj.getTop() + obj.getHeight() + obj.initTop;
			//pos = obj.getTop() + obj.getHeight() / 2 - 15;
		}

		if (pos > obj.bottomLimit)
			pos = obj.bottomLimit;
		if (pos < obj.topLimit)
			pos = obj.topLimit;

		interval = obj.top - pos;
		obj.top = obj.top - interval / 3;
		obj.style.top = obj.top + "px";
	}, 30)
}

