document.write("<script type='text/javascript' src='/resources/js/jquery-1.4.4.min.js'></script>"); // JQuery
document.write("<script language='javascript' src='/resources/js/snswriter.js'></script>"); // SNSWrite
document.write("<script type='text/javascript' src='/resources/js/script.js'></script>"); // 더카드 개발 스크립트
document.write('<link rel="shortcut icon" href="/resources/images/main/favicon.ico" />'); // 파비콘

function autoblur() {
	if(event.srcElement.tagName == "A"||event.srcElement.tagName == "IMG") document.body.focus();
}
document.onfocusin = autoblur;

// flash
function Swf_View(URL,SizeX,SizeY,LnkId,Frm,Flag) // quick
{
    document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" ');
    document.write('codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" ');
    document.write('width="'+SizeX+'" height="'+SizeY+'" id="'+LnkId+'" align="middle">');
    document.write('<param name="movie" value="'+URL+'" />');
    document.write('<param name="quality" value="high" />');
	document.write('<param name="bgcolor" value="transparent" />');
    if ( Flag == null || Flag != 'N' )
    {
        document.write('<param name="wmode" value="transparent"/>');
    }
 document.write('<param name="allowScriptAccess" value="always"/> ');
 document.write('<param name="base" value="." />');
    document.write('<embed base="." src="'+URL+'" quality="high" width="'+SizeX+'" height="'+SizeY+'"  align="middle" ');
  if ( Flag == null || Flag != 'N' )
    {
        document.write(' wmode="transparent" ');
    }
    document.write('type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" allowScriptAccess="always" swLiveConnect=true name="'+LnkId+'"  />');
    document.write('</embed></object>');
 if ( Frm == 'Y' ) { // form 태그 들어가는 페이지에 적용
  eval("window." + LnkId + " = document.forms[0]."+ LnkId +"; ");
 }
}





//팝업띄우기(스크롤없는거) javascript:popsn('url','pop','500','500');
function popsn(url,trgt,w,h) {
	window.open(url,trgt,'width='+w+',height='+h+',scrollbars=no,resizable=no,copyhistory=no,toolbar=no');
}
//팝업띄우기(스크롤있는거) javascript:popsn01('url','pop','500','500','yes');
function popsn01(url,trgt,w,h,q) {
	window.open(url,trgt,'width='+w+',height='+h+',scrollbars='+q+',resizable=no,copyhistory=no,toolbar=no');
}


// png
function setPng24(obj) {
	obj.width=obj.height=1;
	obj.className=obj.className.replace(/\bpng24\b/i,'');

	obj.style.filter =

	"progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+ obj.src +"',sizingMethod='image');"
	//obj.src=''; 
	return '';
}

//RollOver
function ImageOver(imgEL){
 imgEL.src = imgEL.src.replace("off.", "on.");
}
function ImageOut(imgEL){
 imgEL.src = imgEL.src.replace("on.", "off.");
}


// 이미지&div 동시에 같이 바뀌기 tab change
function tab_change(n) {
	for(i = 1; i <= 4; i++){
		div_name = document.getElementById("tblList_"+i);
		img_s = document.getElementById("simg_"+i);
		if(i == n){   
			div_name.style.display ="block";   
			img_s.src="/asset/images/story/tab_company0"+i+"_on.gif";

		}else{
			div_name.style.display ="none";
			img_s.src="/asset/images/story/tab_company0"+i+"_off.gif";
		}
	}
}

function tab_location(n) {
	for(i = 1; i <= 2; i++){
		div_name = document.getElementById("tab0"+i);
		if(i == n){   
			div_name.style.display ="block";   
		}else{
			div_name.style.display ="none";
		}
	}
}



function Bchange(n,max) {
	for(i = 1; i <= max; i++){
		div_name = document.getElementById("b"+i);
		if(i == n){			
			div_name.style.display ="block";							
		}else{
			div_name.style.display ="none";
		}
	}
}

var printpp;

function bp(){
 printpp=document.body.innerHTML;
 document.body.innerHTML=print_this.innerHTML;
}

function ap(){
 document.body.innerHTML=printpp;
}

function pp(){
 window.print();
}

window.onbeforeprint=bp;
window.onafterprint=ap;

    //프린트하기-->


// 첫번째 탭
function tab_latest_area(idx){
for(i = 1; i <= 6 ; i++ ){
document.getElementById('tab'+i).className = "";
 document.getElementById('content'+i).className = "content hide";
}
document.getElementById('tab'+idx).className = "active";
 document.getElementById('content'+idx).className = "content show";
}




function toggleTabs(et,ec,mx,idx){
for(i = 1; i <= mx ; i++ ){
document.getElementById(et+i).className = "";
document.getElementById(ec+i).className = "content hide";
}
document.getElementById(et+idx).className = "active";
document.getElementById(ec+idx).className = "content show";
}

function iframeReSize(obj){
obj = typeof obj == 'string' ? document.getElementByld(obj) : obj;
obj.setExpression('height', 'contentWindow.document.body.scrollHeight + 5');
}
function layer_view(e_id){document.getElementById(e_id).style.display='block';}
function layer_hidden(e_id){document.getElementById(e_id).style.display='none';}

//상품상세 레이어 
function hideMe(){
  if (isIE||isNN) whichDog.style.visibility="hidden";
  else if (isN4) document.theLayer.visibility="hide";
}

function showMe(){
  if (isIE||isNN) whichDog.style.visibility="visible";
  else if (isN4) document.theLayer.visibility="show";
}


 
 
 //레이어 팝업 열기
 function openLayer(IdName, tpos, lpos){
  var pop = document.getElementById(IdName);
  pop.style.display = "block";
  pop.style.top = tpos + "px";
  pop.style.left = lpos + "px";
 } 
 //레이어 팝업 닫기
 function closeLayer(IdName){
  var pop = document.getElementById(IdName);
  pop.style.display = "none";
 }


// 전체메뉴보기
      function ViewLayer(){ 
        //만일 AllLayer이 닫혀있다면?? 
        if(document.getElementById("AllLayer").style.display=="none")
		{ 
          document.getElementById("AllLayer").style.display='inline' 
        //그렇지 않은 모든 경우라면?? 
        }else{ 
          //보이지 않게 none처리
          document.getElementById("AllLayer").style.display='none' 
        } 
    } 

//드롭다운리스트
	function layer_view01(e_id){document.getElementById(e_id).style.display='block';}
	function layer_view00(e_id){document.getElementById(e_id).style.display='block';}
	function layer_hidden01(e_id){document.getElementById(e_id).style.display='none';}
	function layer_hidden00(e_id){document.getElementById(e_id).style.display='none';}


// 할인율보기
function show(object) {
if (document.layers && document.layers[object] != null) document.layers[object].display = 'block';
else if (document.all) document.all[object].style.display = 'block';
}
function hide(object) {
if (document.layers && document.layers[object] != null) document.layers[object].display = 'none';
else if (document.all) document.all[object].style.display = 'none';
}
//-->

//faq보기
var oldf='';
var oldf_line='';

function FaqMenu(faqnm,line)
{
faqmenu=document.getElementById("h_ta"+faqnm).style;
faqmenuline=document.getElementById("h_ta"+faqnm+line).style;
	if(oldf!=faqmenu)
	{
	        if(oldf!='')
	        {
	       oldf.display='';
		   oldf_line.display='none';
	        }
	        faqmenu.display='none';
	        faqmenuline.display='block';
	        oldf=faqmenu;
			oldf_line=faqmenuline;
	}
	else
	{
	        faqmenu.display='';
	        faqmenuline.display='none';
	        
	        oldf='';
			oldf_line='';
	}
}

//가이드탭메뉴
	function plan_tab(par){
		for(i=1;i<6;i++){
			if(i==par){
			document.getElementById("tab"+par).style.display="block";
			}else{
			document.getElementById("tab"+i).style.display="none";
			}
		}	
	}

