// È¨ÆäÀÌÁö Åë°è ½ºÅ©¸³Æ®
function _dwiLoad(){
	  var _gaq = _gaq || [];
  _gaq.push(['_setAccount', 'UA-25263785-1']);
  _gaq.push(['_setDomainName', 'none']);
  _gaq.push(['_setAllowLinker', true]);
  _gaq.push(['_trackPageview']);

  (function() {
    var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
    ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
  })();
}
_dwiLoad();


function getFlashSet(id,pageNum,subNum){
	if(id=="main_top"){
		url="../images/swf/top_main.swf?pageNum="+pageNum+"&subNum="+subNum;
		w='945';h='110px';t="transparent";bg="none";
	}else if(id=="topNavi"){
		url="../images/swf/v_sub"+pageNum+".swf";
		w='945px';h='235px';t="transparent";bg="none";
	}
	getFlash(id,url,w,h,t,bg);
}

//ÇÃ·¡½ÃÃâ·Â
function getFlash(id,url,w,h,t,bg){
	var flashOut='<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0" width='+w+' height='+h+' id='+id+'>';
	flashOut+='<param name="movie" value='+url+' />';
	flashOut+='<param name="wmode" value='+t+' />';
	flashOut+='<param name="bgcolor" value='+bg+' />';
	flashOut+='<param name="allowScriptAccess" value="sameDomain" />';
	flashOut+='<param name="quality" value="high" />';
	flashOut+='<param name="menu" value="false" />';
	flashOut+='<embed src='+url+' width='+w+' height='+h+' name='+id+' wmode='+t+' bgcolor='+bg+' swLiveConnect="true" allowScriptAccess="sameDomain" quality="high" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />';
	flashOut+='</embed>';
	flashOut+='</object>';

	document.write(flashOut);
}


//·¹ÀÌ¾î ¿Â¿ÀÇÁ
function layerOnOff(obj){
	var obj=document.getElementById(obj);
	if(obj.style.display=='none'){
		obj.style.display='block';
	}else if(obj.style.display=='block'){
		obj.style.display='none';
	}
}

//ÆË¾÷ È­¸é Áß¾Ó¿¡ ¶ç¿ì±â
function Win_pop(newwin,w,h) {
var winl = (screen.width - w) / 2;
var wint = (screen.height - h) / 2;
if(w=='100%') w=window.availWidth;
winprops = 'width='+w+',height='+h+',top='+wint+',left='+winl+',resizable=no,scrollbars=no,toolbars=no,status=no,menu=no';
win = window.open(newwin, null, winprops)
if (parseInt(navigator.appVersion) >= 4) { win.window.focus(); }
}


//ÅÇ
function tabchange(img,divid){
	var tabarea=img.parentNode;
	var imgs=tabarea.getElementsByTagName('img');
	var setimgsrc,setimgcheck,imgtype,newname,obj;

	//off image set
	for(var i=0; i<imgs.length; i++){
		setimgsrc=imgs[i].src.split("/");
		setimgcheck=setimgsrc[setimgsrc.length-1].split(".");
		imgcheck=setimgcheck[0];
		obj=eval(document.getElementById(divid+(i+1)));
		if(img==imgs[i]){
			if(imgcheck.indexOf('on')==-1){
				img.src=img.src.replace(imgcheck,imgcheck+'on');
			}
			obj.style.display='block';
		}else{
			if(imgcheck.indexOf('on')!=-1){
				newname=imgcheck.replace('on','');
				imgs[i].src=imgs[i].src.replace(newname+'on',newname);
			}
			obj.style.display='none';
		}
	}

}

//** ¿À¸¥ÂÊ Äü¸Þ´º (¸¶¿ì½º ½ºÅ©·Ñ)
function scrollMenu(objid,starttop,bottommargin){
	var obj=document.getElementById(objid);
	var ny=starttop+document.body.scrollTop;
	var mosttop=(document.body.clientHeight+document.body.scrollTop)-(bottommargin+obj.offsetHeight);
	var speed=10;
	if(mosttop<=starttop){
		mosttop=starttop;
		obj.style.top=(obj.offsetTop+((mosttop-obj.offsetTop)/speed))+'px';
	}else if(mosttop>starttop){
		if(document.body.clientHeight<document.body.scrollTop){
			obj.style.top=(obj.offsetTop+((mosttop-obj.offsetTop)/speed))+'px';
		}else{
			obj.style.top=(obj.offsetTop+((ny-obj.offsetTop)/speed))+'px';
		}
	}
	setTimeout("scrollMenu('"+objid+"',"+starttop+","+bottommargin+")",1);
}

//**À§·Î ¿Ã¶ó°¡±â
function goTop(){
     document.body.scrollTop=0;
}


//** global menu
//function globalMenu()
//{
//document.write("<div id='global_top'>");
//document.write("<a href='/main/main.asp'><img src='../images/common/top01.gif'></a>");
//document.write("<a href='/sitemap/sitemap.html'><img src='../images/common/top02.gif'></a>");
//document.write("<a href='/etc/contact.asp'><img src='../images/common/top03.gif'></a>");
//document.write("<a href='../eng/main/main.asp'><img src='../images/common/top04.gif'></a>");
//document.write("</div>");
//}


//** footer Area
function footerArea()
{
document.write("<div id='footer'><div id='menus'>");
document.write("<table width='293' border='0' cellpadding='0' cellspacing='0'>");
document.write("<tr>");
document.write("<td width='9'><a href='#' id='productdetail_fast_btn1'><img src='../images/common/footer_left.gif'></a></td>");
document.write("<td width='275' align='center'>");
document.write("<table border='0' cellpadding='0' cellspacing='0' id='fastzone_id_1' style='display:block;'>");
document.write("<tr>");
document.write("<td valign='top'><a href='http://www.gsejin.com/main/main.asp'><img src='../images/common/footer01.gif'></a></td>");
document.write("<td valign='top'><a href='http://www.sejinheavy.com/main/main.asp'><img src='../images/common/footer02.gif'></a></td>");
document.write("</tr>");
document.write("</table>");
document.write("<table border='0' cellpadding='0' cellspacing='0' id='fastzone_id_2' style='display:block;'>");
document.write("<tr>");
document.write("<td valign='top'><a href='http://mail.sejin-c.co.kr/'><img src='../images/common/footer04.gif'></a></td>");
document.write("<td valign='top'><a href='http://pons.sejin-c.co.kr/'><img src='../images/common/footer05.gif'></a></td>");
document.write("<td valign='top'><a href='http://epay.sejin-c.co.kr/'><img src='../images/common/footer06.gif'></a></td>");
document.write("<td valign='top'><a href='http://gbns.sejin-c.co.kr/'><img src='../images/common/footer07.gif'></a></td>");
document.write("</tr>");
document.write("</table>");
document.write("</td>");
document.write("<td width='9'><a href='#' id='productdetail_fast_btn2'><img src='../images/common/footer_right.gif'></a></td>");
document.write("</tr>");
document.write("</table>");
document.write("</div></div>");
}


function agree_pop1(){
void(window.open ('../etc/pinfo.asp', 'newwin1','toolbar=0, location=0, status=0, menubar=0, scrollbars=0, resizable=0, top=100, left=100, width=660, height=625'))
}

function agree_pop2(){
void(window.open ('../etc/pinfo2.asp', 'newwin2','toolbar=0, location=0, status=0, menubar=0, scrollbars=0, resizable=0, top=100, left=100, width=660, height=625'))
}
