
// 동영상 퍼가기
function copyUrl( fn ){	

	var oStr;
	

	oStr = "<object classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' "; 
	oStr += "codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0' ";
	oStr += "width='320' height='240' id='I-PMC' align='middle'>";
	oStr += "<param name='movie' value='http://www.i-pmc.co.kr/UpLoad/ConcertMovie/" + fn + "' />";
	oStr += "<param name='quality' value='high' />";
	oStr += "<param name='wmode'     value='transparent'/>";
	oStr += "<param name='allowScriptAccess' value='always'/>";
	oStr += "<param name='base' value='.' />";
	oStr += "<embed base='.' src='http://www.i-pmc.co.kr/UpLoad/ConcertMovie/" + fn + "' quality='high' width='320' height='240'  align='middle' ";
	oStr += "wmode='transparent' ";
	oStr += "type='application/x-shockwave-flash' pluginspage='http://www.macromedia.com/go/getflashplayer' allowScriptAccess='always' swLiveConnect=true name='I-PMC'  />'</embed></object>";

	window.clipboardData.setData("Text", oStr);
	alert("복사되었습니다. ctrl + v 로 붙여넣기 하세요.\n");
}

// png 이미지
function setPng24(obj) { 
    obj.width=obj.height=1; 
	obj.style.width = obj.width + "px"; 
    obj.style.height = obj.height + "px"; 
    obj.className=obj.className.replace(/\bpng24\b/i,''); 
    obj.style.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+ obj.src +"',sizingMethod='image');" 
    obj.src='';  
    return ''; 
} 

// 기본 플래시				
function flashObj(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" />');
    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 +"; ");
 }
}


//quick_top
function initMoving(target, position, topLimit, btmLimit) {
	if (!target)
		return false;

	var obj = target;
	obj.initTop = position;
	obj.topLimit = topLimit;
	obj.bottomLimit = document.documentElement.scrollHeight - btmLimit;

	obj.style.position = "absolute";
	obj.style.zIndex= "10";
	obj.top = obj.initTop;
	obj.left = obj.initLeft;

	if (typeof(window.pageYOffset) == "number") {
		obj.getTop = function() {
			return window.pageYOffset;
		}
	} else if (typeof(document.documentElement.scrollTop) == "number") {
		obj.getTop = function() {
			return document.documentElement.scrollTop;
		}
	} else {
		obj.getTop = function() {
			return 0;
		}
	}

	if (self.innerHeight) {
		obj.getHeight = function() {
			return self.innerHeight;
		}
	} else if(document.documentElement.clientHeight) {
		obj.getHeight = function() {
			return document.documentElement.clientHeight;
		}
	} else {
		obj.getHeight = function() {
			return 1000;
		}
	}

	obj.move = setInterval(function() {
		if (obj.initTop > 0) {
			pos = obj.getTop() + obj.initTop;
		} else {
			pos = obj.getTop() + obj.getHeight() + obj.initTop;
			//pos = obj.getTop() + obj.getHeight() / 2 - 15;
		}

		if (pos > obj.bottomLimit)
			pos = obj.bottomLimit;
		if (pos < obj.topLimit)
			pos = obj.topLimit;

		interval = obj.top - pos;
		obj.top = obj.top - interval / 3;
		obj.style.top = obj.top + "px";
	}, 30)
}

//팝업띄우기 스크롤 있는 거
function popsn(url,trgt,w,h) { 
    window.open(url,trgt,'width='+w+',height='+h+',scrollbars=no,resizable=no,copyhistory=no,toolbar=no,status=no'); 
}
//팝업띄우기 스크롤 없는 거
function popsy(url,trgt,w,h) { 
    window.open(url,trgt,'width='+w+',height='+h+',scrollbars=yes,resizable=no,copyhistory=no,toolbar=no,status=no,left=0,top=0'); 
}


//탭
function Over(imgName) {
	imgName.src = imgName.src.replace(/(_on.gif|.gif)$/i, "_on.gif");
	imgName.src = imgName.src.replace(/(_on.jpg|.jpg)$/i, "_on.jpg");
}
function Out(imgName) {
	imgName.src = imgName.src.replace(/(_on.gif|.gif)$/i, ".gif");
	imgName.src = imgName.src.replace(/(_on.jpg|.jpg)$/i, ".jpg");
}

function clOver(clName){	
	clName = clName.className = "on";
}
function clOut(clName){
	clName = clName.className = "";
}

function layer_events()
{
  if (document.layers) {
    document.layers['gnb_area'].captureEvents(Event.MOUSEOVER|Event.MOUSEOUT|Event.MOUSEUP);
    document.layers['gnb_area'].onmouseout = new Function("this.style.height='115'");
    document.layers['gnb_area'].onmouseover = new Function("this.style.height='260'");
  }
}

function display_open(n) {
	div_name = document.getElementById(n);

	if(div_name.style.display == "block"){
		div_name.style.display ="none";
	}else{
		div_name.style.display ="block";
	}
}



//chgHeight
function chgHeight(n) {
	swf_name = document.getElementById("nanta_gnb");
	if(n == "open"){
		swf_name.style.height ="250px";
	}else{
		swf_name.style.height ="97px";
	}
}




//faq_list
function faq(n) {
	for(i = 1; i <= 10; i++){
		faq_con = document.getElementById("con"+i);
		faq_title = document.getElementById("title"+i);
		if(i == n){			
			faq_con.style.display = "block";
			faq_title.className = "on";
		}else{
			faq_con.style.display = "none";	
			faq_title.className = "";
		}
	}
}

//준비중
function ready() {
	alert('Under Construction');
}

//서브메인-난타
function submainTab(obj) {
	document.getElementById("tab1").style.display="none";
	document.getElementById("tab2").style.display="none";

	document.getElementById("tab"+obj).style.display="block";
}

//서브메인-티켓예매
function submainTab2(obj) {
	document.getElementById("tab1").style.display="none";
	document.getElementById("tab2").style.display="none";
	document.getElementById("tab3").style.display="none";
	document.getElementById("tab4").style.display="none";

	document.getElementById("tab"+obj).style.display="block";
}

//서브메인-커뮤니티
function submainTab5(obj) {
	document.getElementById("tab1").style.display="none";
	document.getElementById("tab2").style.display="none";
	document.getElementById("tab3").style.display="none";
	document.getElementById("tab4").style.display="none";

	document.getElementById("tab"+obj).style.display="block";
}