/* flash */
function MainFlash(pSwfUrl,chartPath,fontPath,visualPath){	
	var pathArr = pSwfUrl.split("/");
	var flashID = pathArr[pathArr.length-1].split(".")[0];

	document.write("<object classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0' width='100%'  id='chMain' height='100%' align='middle'>");
	document.write("<param name='allowScriptAccess' value='always' />");
	document.write("<param name='movie' value='"+pSwfUrl+"' />");
	document.write("<param name='quality' value='high' />");
	document.write("<param name='FlashVars' value='chartPath="+chartPath+"&fontPath="+fontPath+"&visualPath="+visualPath+"' />");
	document.write("<param name='wmode' value='transparent' />");
	document.write("<embed src='"+pSwfUrl+"' FlashVars='chartPath="+chartPath+"&fontPath="+fontPath+"&visualPath="+visualPath+"' quality='high' wmode='transparent' width='100%' height='100%' id='chMain' align='middle' allowScriptAccess='always' type='application/x-shockwave-flash' pluginspage='http://www.macromedia.com/go/getflashplayer' />");
	document.write("</object>"); 
}

function ChartFlash(pSwfUrl,xmlPath){	
	var pathArr = pSwfUrl.split("/");
	var flashID = pathArr[pathArr.length-1].split(".")[0];

	document.write("<object classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0' width='550px'  id='"+flashID+"' height='250px' align='middle'>");
	document.write("<param name='allowScriptAccess' value='always' />");
	document.write("<param name='movie' value='"+pSwfUrl+"' />");
	document.write("<param name='quality' value='high' />");
	document.write("<param name='FlashVars' value='xmlPath="+xmlPath+"' />");
	document.write("<param name='wmode' value='transparent' />");
	document.write("<embed src='"+pSwfUrl+"' FlashVars='xmlPath="+xmlPath+"' quality='high' wmode='transparent' width='550px' height='250px' align='middle' allowScriptAccess='always' type='application/x-shockwave-flash' pluginspage='http://www.macromedia.com/go/getflashplayer' />");
	document.write("</object>"); 
}

function GNBFlash(pSwfUrl){	
	var pathArr = pSwfUrl.split("/");
	var flashID = pathArr[pathArr.length-1].split(".")[0];

	document.write("<object classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0' width='212px'  id='"+flashID+"' height='700px' align='middle'>");
	document.write("<param name='allowScriptAccess' value='always' />");
	document.write("<param name='movie' value='"+pSwfUrl+"' />");
	document.write("<param name='quality' value='high' />");
	document.write("<param name='wmode' value='transparent' />");
	document.write("<embed src='"+pSwfUrl+"' quality='high' wmode='transparent' width='212px' height='700px' align='middle' allowScriptAccess='always' type='application/x-shockwave-flash' pluginspage='http://www.macromedia.com/go/getflashplayer' />");
	document.write("</object>"); 
}

function locationFlash(pSwfUrl){	
	var pathArr = pSwfUrl.split("/");
	var flashID = pathArr[pathArr.length-1].split(".")[0];

	document.write("<object classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0' width='630px'  id='"+flashID+"' height='18px' align='middle'>");
	document.write("<param name='allowScriptAccess' value='always' />");
	document.write("<param name='movie' value='"+pSwfUrl+"' />");
	document.write("<param name='quality' value='high' />");
	document.write("<param name='wmode' value='transparent' />");
	document.write("<embed src='"+pSwfUrl+"' quality='high' wmode='transparent' width='630px' height='18px' align='middle' allowScriptAccess='always' type='application/x-shockwave-flash' pluginspage='http://www.macromedia.com/go/getflashplayer' />");
	document.write("</object>"); 
}

// Font Enlarge / Reduction 
size = 100; 
function zoom(n){ 
    size += n; 
    if(size > 200){ 
        //alert("더이상 확대할 수 없습니다."); 
    } else if(size < 100){ 
        //alert("더이상 축소할 수 없습니다."); 
    } else { 
        obj = document.getElementById("main"); 
        //for(i=0;i<=obj.length;i++){ 
            obj.style.fontSize = size + "%"; 
       // } 
    } 
} 

function clear(){ 
	obj = document.getElementsById("test"); 
	obj.style.fontSize = "100%"; 
}

function dtxtview(num){
	max=document.getElementById("tab").getElementsByTagName("a").length;

	for(i=1;i<=max;i++){
		document.getElementById("dtabv"+i).style.display = "none";
	}
	document.getElementById("dtabv"+num).style.display = "block";
}
function dtxtview_1(num){
	max=document.getElementById("tab").getElementsByTagName("a").length;

	for(i=1;i<=max;i++){
		document.getElementById("dtabv"+i).style.display = "none";
	}
	document.getElementById("dtabv"+num).style.display = "block";

	if(num == 1) {
		viewMV('ad200801');
		admv(1);
	}else if(num == 2){
		viewMV('ad200701');
		admv07(1);
	}else if(num == 3){
		viewMV('ad200601');
		admv06(1);
	}
}
function admv(num){
	max=document.getElementById("handler").getElementsByTagName("a").length;

	for(i=1;i<=max;i++){
		document.getElementById("admv"+i).style.display = "none";
	}
	document.getElementById("admv"+num).style.display = "block";
}
function admv_1(num){
	max=document.getElementById("handler").getElementsByTagName("a").length;

	for(i=1;i<=max;i++){
		document.getElementById("admv"+i).style.display = "none";
	}
	document.getElementById("admv"+num).style.display = "block";
	if(num == 1)viewMV('ad200801');
	else if(num == 2)viewMV('ad200802')
}
function admvpr(num){
	max=document.getElementById("wrapper2").getElementsByTagName("p").length;

	for(i=1;i<=max;i++){
		document.getElementById("admvpr"+i).style.display = "none";
	}
	document.getElementById("admvpr"+num).style.display = "block";
}

function admv07(num){
	max=document.getElementById("handler07").getElementsByTagName("a").length;

	for(i=1;i<=max;i++){
		document.getElementById("admv07"+i).style.display = "none";
	}
	document.getElementById("admv07"+num).style.display = "block";
}
function admv07_1(num){
	max=document.getElementById("handler07").getElementsByTagName("a").length;

	for(i=1;i<=max;i++){
		document.getElementById("admv07"+i).style.display = "none";
	}
	document.getElementById("admv07"+num).style.display = "block";
	if(num == 1) viewMV('ad200701');
	else if(num == 2) viewMV('ad200702');
	else if(num == 3) viewMV('ad200703');
	else if(num == 4) viewMV('ad200704');
}
function admv06(num){
	max=document.getElementById("handler06").getElementsByTagName("a").length;

	for(i=1;i<=max;i++){
		document.getElementById("admv06"+i).style.display = "none";
	}
	document.getElementById("admv06"+num).style.display = "block";
}
function admv06_1(num){
	max=document.getElementById("handler06").getElementsByTagName("a").length;

	for(i=1;i<=max;i++){
		document.getElementById("admv06"+i).style.display = "none";
	}
	document.getElementById("admv06"+num).style.display = "block";
	if(num == 1)viewMV('ad200601');
	else if(num == 2)viewMV('ad200602');
}
function ad08(num){
	max=document.getElementById("handler08").getElementsByTagName("a").length;

	for(i=1;i<=max;i++){
		document.getElementById("admv08"+i).style.display = "none";
	}
	document.getElementById("admv08"+num).style.display = "block";
}
function ad07(num){
	max=document.getElementById("wrapper3").getElementsByTagName("a").length;

	for(i=1;i<=max;i++){
		document.getElementById("admv07"+i).style.display = "none";
	}
	document.getElementById("admv07"+num).style.display = "block";
}
function ad06(num){
	max=document.getElementById("handler06").getElementsByTagName("a").length;

	for(i=1;i<=max;i++){
		document.getElementById("admv06"+i).style.display = "none";
	}
	document.getElementById("admv06"+num).style.display = "block";
}

		function printIt(printThis, newImageUrl)  {			
			win = window.open('','offprint','width=718 height=640 left=0 top=0 scrollbars=no resizable=no');
			self.focus();
			win.document.open();
			win.document.write('<html><head>');
			win.document.write('<meta http-equiv="Content-Type" content="text/html; charset=euc-kr">');			
			win.document.write("<link rel='stylesheet' type='text/css' href='"+newImageUrl+"/images2009/cn/css/common.css' />");
			
			win.document.write('<style>');
			win.document.write('body { margin: 0; padding: 0; background: none; }');
			win.document.write('.noprint { display: none; }');
			win.document.write('</style></head><body>');
			
			win.document.write('<div id="layer_popup"><div class="pop_cont" >');
			win.document.write(printThis);
			win.document.write('</div></div>');
			
			win.document.write('</body></html>');
			win.document.close();
			win.print();
			win.close();
		}