function FlashV(url, w, h, val, id){
var html = '';
 
html = '<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="' + window.location.protocol + '//download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=10,0,0,0" width="'+w+'" height="'+h+'" id = "'+id+'">';
html += '<param name="allowScriptAccess" value="always" />';
html += '<param name="allowFullScreen" value="false" />';
html += '<param name="movie" value="'+url+'">';
html += '<param name="quality" value="high">';
html += '<param name="bgcolor" value="#000000" />';
html += '<param name="wmode" value="transparent">';
html += '<param name="FlashVars" value="'+val+'" />';
html += '<embed width="'+w+'" height="'+h+'" src="'+url+'" FlashVars="'+val+'" wmode="transparent" name = "'+id+'"></embed>'
html += '</object>'
 
	
document.write(html);
}

function FlashVIn(url, w, h, val, id){
	var html = '';
	 
	html = '<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="' + window.location.protocol + '//download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=10,0,0,0" width="'+w+'" height="'+h+'" id = "'+id+'">';
	html += '<param name="allowScriptAccess" value="always" />';
	html += '<param name="allowFullScreen" value="false" />';
	html += '<param name="movie" value="'+url+'">';
	html += '<param name="quality" value="high">';
	html += '<param name="bgcolor" value="#000000" />';
	html += '<param name="wmode" value="transparent">';
	html += '<param name="FlashVars" value="'+val+'" />';
	html += '<embed width="'+w+'" height="'+h+'" src="'+url+'" FlashVars="'+val+'" wmode="transparent" name = "'+id+'"></embed>'
	html += '</object>';
	 
		
	return html;
	}


function FlashAdobe(url, w, h, val, id){
	 
	var html = '';

	
	AC_FL_RunContent(
			'codebase', window.location.protocol + '//download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=10,0,0,0',
			'width', w,
			'height', h,
			'src', id,
			'quality', 'high',
			'pluginspage', window.location.protocol + '//www.adobe.com/go/getflashplayer',
			'align', 'middle',
			'play', 'true',
			'loop', 'true',
			'scale', 'showall',
			'wmode', 'transparent',
			'devicefont', 'false',
			'id', id,
			'bgcolor', 'transparent',
			'name', id,
			'menu', 'true',
			'allowFullScreen', 'false',
			'allowScriptAccess','always',
			'movie', url,
			'salign', ''
			);  
	
 	html += '<noscript>';
	html += '<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="' + window.location.protocol + '//download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=10,0,0,0" width="' + w + '" height="' + h + '" id="' + id + '" align="middle">';
	html += '<param name="allowScriptAccess" value="sameDomain" />';
	html += '<param name="allowFullScreen" value="false" />';
	html += '<param name="movie" value="' + url + '" /><param name="quality" value="high" /><param name="bgcolor" value="#ffffff" />	<embed src="' + url + '" quality="high" bgcolor="#ffffff" width="' + w + '" height="' + h + '" name="' + id + '" align="middle" allowScriptAccess="always" allowFullScreen="false" type="application/x-shockwave-flash" pluginspage="' + window.location.protocol + '//www.adobe.com/go/getflashplayer" />';
	html += '</object>';
	html += '</noscript>';	
		
	document.write(html);

	}


function FlashGNB(val){

var html;
 
if (val==undefined || val =='')
{
	/*
	$.ajax({url:'/common/xml/xmlNavi.jsp', 
		async: false,
		dataType:'xml', 
		success:function(data){
		alert(data);
		}
	});
	*/
	
	 $.ajax({
	   async:false,
	   type:'get',
	   url: '/common/xml/xmlNavi.jsp',
	   processData: false,
	   dataType:'xml',
	   success: function(xml){
	     
		   
		   var pureUrl = location.href
 		   if (pureUrl.indexOf("?") > 0)
			   pureUrl = pureUrl.substring(0, pureUrl.indexOf("?"));
		   
		   var depth1El = $(xml).find("depth2[url*="+pureUrl+"]").add( $(xml).find("depth2[addurl*="+pureUrl+"]") );
	 	   
		   if (depth1El.size()>0){
		   val = 'depth1=' + $(xml).find("depth1").index( depth1El.parent()[0] );
		   val += '&depth2='+depth1El.parent().children().index(  depth1El[0] );
		   
		   var linemap = '<li><a href="/">Home</a></li>';
		   linemap += '<li><a href="'+depth1El.parent().attr("url")+'">'+depth1El.parent().attr("subject")+'</a></li>';
		   linemap += '<li><a href="'+depth1El.attr("url")+'" class="select">'+depth1El.attr("subject")+'</a></li>';
		   
		   
		   $(function(){$(".location ol").html(linemap);});
		   }
		  
	    },
	   error : function(xhr, status, error){alert(error);}
	 });
	 
}

html = '<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="' + window.location.protocol + '//download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=10,0,0,0" width="160" height="500" id="gnb">';
html += '<param name="allowScriptAccess" value="sameDomain" />';
html += '<param name="allowFullScreen" value="false" />';
html += '<param name="movie" value="/common/flv/gnb.swf" />';
html += '<param name="quality" value="high" />';
html += '<param name="bgcolor" value="#000000" />';
html += '<param name="wmode" value="transparent">';
html += '<param name="FlashVars" value="'+val+'" />';
html += '<embed src="/common/flv/gnb.swf" quality="high"  FlashVars="'+val+'" bgcolor="#000000" width="160" height="500" wmode="transparent" name="gnb" align="middle" allowScriptAccess="sameDomain" allowFullScreen="false" type="application/x-shockwave-flash" pluginspage="http://www.adobe.com/go/getflashplayer" />';
html += '</object>';

document.write(html);

}


// ie6 png 투명 적용 스크립트 및 CSS : 이미지 배경이 아닐경우 
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 '';
}

// Product Map Controll
function openMap() {
	$("#flash_product_map").css({'marginTop':'0px'});
	$("#product_slide_btn").hide();
	
	 
	var flashEl = ($("#product_map embed").get(0) == undefined ?  $("#product_map").get(0) : $("#product_map embed").get(0) );
	flashEl.openMap();
}

function closeMap() {
 	$("#product_slide_btn").show();
	$("#flash_product_map").css({'marginTop':'-2000px'});
}


