//lnb ·¹ÀÌ¾î»çÀÌÁî º¯È¯
function setLnbSize(h){
	var container = document.getElementById("lnb");
	var px = "px";
	container.style.height = h+px;
}


function setGnbSize(h){
	var container2 = document.getElementById('gnb');
	var px = "px";
	container2.style.height = h+px;

	//ÇÑ¹ø ÆîÃÆÀ»¶§
	if(h>42){
		document.getElementById("toparea").style.zIndex = '6';
		document.getElementById("quickmenuCon").style.zIndex = '5';
	}else{
		document.getElementById("toparea").style.zIndex = '3';
		document.getElementById("quickmenuCon").style.zIndex = '100';
	}
	
}

function getFlashMovieObject(movieName){
	if (window.document[movieName]) 
	{
		return window.document[movieName];
	}
	if (navigator.appName.indexOf("Microsoft Internet")==-1)
	{
		if (document.embeds && document.embeds[movieName])
		return document.embeds[movieName]; 
	}
	else // if (navigator.appName.indexOf("Microsoft Internet")!=-1)
	{
		return document.getElementById(movieName);
	}
}

	
//quickMenu ·¹ÀÌ¾î»çÀÌÁî º¯È¯
function setQuickMenuSize(w){
	var container = document.getElementById("quickMenu");
	
	container.style.width = w+"px";
	
	
	//ÇÑ¹ø ÆîÃÆÀ»¶§
	if(w>200 || w<202 ){
		document.getElementById("quickmenuCon").style.width = '202px';
		document.getElementById("quickmenuCon").style.marginLeft  = '298px';
		
	}
	//Full·Î ÆîÃÆÀ»¶§
	if(w>202){
		document.getElementById("quickmenuCon").style.width = '1001px';
		document.getElementById("quickmenuCon").style.marginLeft  = '-501px';
	}
	
	//¿ÏÀü Á¢Èú¶§
	if(w==101){
		
		document.getElementById("quickMenu").style.width = '101px';
		document.getElementById("quickmenuCon").style.width = '101px';
		document.getElementById("quickmenuCon").style.marginLeft  = '397px';
	}
	
	return "ok";
}

function alertSize() {
  var myWidth = 0, myHeight = 0;
  if( typeof( window.innerWidth ) == 'number' ) {
    //Non-IE
    myWidth = window.innerWidth;
    myHeight = window.innerHeight;
  } else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
    //IE 6+ in 'standards compliant mode'
    myWidth = document.documentElement.clientWidth;
    myHeight = document.documentElement.clientHeight;
  } else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
    //IE 4 compatible
    myWidth = document.body.clientWidth;
    myHeight = document.body.clientHeight;
  }
  window.alert( 'Width = ' + myWidth );
  window.alert( 'Height = ' + myHeight );
}

function setBgFullSizeClose(){
	var myWidth = 0, myHeight = 0;
	  if( typeof( window.innerWidth ) == 'number' ) {
	    //Non-IE
		document.body.style.overflow='visible';		
	  } else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
	    //IE 6+ in 'standards compliant mode'
		document.documentElement.style.overflow='visible';
		
	  } else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
	    //IE 4 compatible
	  }
}

function setBgFullSize(){
	var fullDiv = document.getElementById('fullBgDiv');
	// ºê¶ó¿ìÀúº° ³Êºñ¿Í ³ôÀÌ ±¸ÇÏ±â
	var myWidth = 0, myHeight = 0;
	  if( typeof( window.innerWidth ) == 'number' ) {
	    //Non-IE
	    myWidth = window.innerWidth - 17;
		myHeight = document.documentElement.scrollHeight;
		if(myHeight==0){
			myHeight = document.body.scrollHeight ;
		}
		//document.body.style.overflow='hidden';
		
	  } else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
	    //IE 6+ in 'standards compliant mode'
	    myWidth = document.documentElement.clientWidth;
	    myHeight = document.documentElement.scrollHeight;
		//myHeight = document.documentElement.clientHeight;
		//document.documentElement.style.overflow='hidden';
		
	  } else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
	    //IE 4 compatible
	    myWidth = document.body.clientWidth;
	    myHeight = document.body.scrollHeight;
	  }
	  
	document.getElementById("fullBgImg").style.width = myWidth+"px";
	document.getElementById("fullBgImg").style.height = myHeight+"px";
	fullDiv.style.display='block';
}

// Äü¸Þ´º close
function setQuickMenuClose(){
	if(document.getElementById("leftMenuArea")){
		document.getElementById("leftMenuArea").style.zIndex = '5';
	}
	document.getElementById("quickmenuCon").style.zIndex = '3';
	document.getElementById("fullBgDiv").style.display='none';
	//setBgFullSizeClose();
}
	
// Äü¸Þ´º open
function setQuickMenuOpen(){
	if(document.getElementById("leftMenuArea")){
		document.getElementById("leftMenuArea").style.zIndex = '3';
	}
	document.getElementById("quickmenuCon").style.zIndex = '50000';
	setBgFullSize();
	//alertSize();
}

	
function swf(src,w,h,flashVar){
	html = '';
	html += '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0"  width="'+w+'" height="'+h+'">';
	html += '<param name="movie" value="'+src+'">';
	html += '<param name="quality" value="high">';
	html += '<param name="allowFullScreen" value="true">';	
	html += '<param name="allowScriptAccess" value="always">';
	html += '<param name="FlashVars" value="'+flashVar+'">';
	html += '<param name="wmode" value="transparent">';
	html += '<embed src="'+src+'" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="'+w+'" height="'+h+'" name="flashvars" allowScriptAccess="always" allowFullScreen="true"></embed>';
	html += '</object>';
	document.write(html);
}

function movieScrap(a) {
      var txt;
      var result;
    
      txt='<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,18,0" width="320" height="240" id="wisePlay9_Full" align="middle">';
      txt+='<param name="allowScriptAccess" value="always">';
      txt+='<param name="allowFullScreen" value="true">';
      txt+='<param name="movie" value="flvPlayer_get.swf?moviename='+a+'&autostart=1'+'">';
      txt+='<param name="quality" value="high">';
      txt+='<param name="bgcolor" value="#000000">';
      txt+='<embed src="flvPlayer_get.swf?moviename='+a+'&autostart=1'+'"'+'quality="high" bgcolor="#000000" width="320" height="240" name="wisePlay9_Full" align="middle" allowScriptAccess="always" allowFullScreen="true" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer">';
      txt += '</object>';
  	
      result = window.clipboardData.setData('Text', txt); 
      //alert("¼Ò½º º¹»ç°¡ ¿Ï·áµÇ¾ú½À´Ï´Ù.="+a);	
}
