////////////////////////////////////////////////////////

function na_open_window(name, url, left, top, width, height, toolbar, menubar, statusbar, scrollbar, resizable)
{
  toolbar_str = toolbar ? 'yes' : 'no';
  menubar_str = menubar ? 'yes' : 'no';
  statusbar_str = statusbar ? 'yes' : 'no';
  scrollbar_str = scrollbar ? 'yes' : 'no';
  resizable_str = resizable ? 'yes' : 'no';
  window.open(url, name, 'left='+left+',top='+top+',width='+width+',height='+height+',toolbar='+toolbar_str+',menubar='+menubar_str+',status='+statusbar_str+',scrollbars='+scrollbar_str+',resizable='+resizable_str);
}

function PayMoney(){
	var xpos = (screen.availWidth / 2) - 200;
	var ypos = (screen.availHeight / 2) - 270;
	
	na_open_window('pay_go', '/pay/', xpos, ypos, 500, 649, 0, 0, 0, 0, 0)
}




function obj_flash(filenm, Fwidth, Fheight){
document.writeln('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"     codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,22,0" width="' + Fwidth + '" height="' + Fheight + '" align=middle>');
document.writeln('<param name="AllowScriptAccess" value="always"> ');
document.writeln('<param name="quality" value="high">');
document.writeln('<param name="wmode" value="transparent">');
document.writeln('<param name="Menu" value="false">');
document.writeln('<param name="movie" value="' + filenm + '">');
document.writeln('<embed AllowScriptAccess="always" src="' + filenm + '" width="' + Fwidth + '" height="' + Fheight + '" ></embed>');
document.writeln('</object>');
}




function Banner_Scroll(objName, width, height){this.objName=objName;this.width=width;this.height=height;this.offsetX=0;this.offsetY=0;this.length = 0;this.itemWith = 0;this.itemHeight = 0;this.wait = 5000;this.f_wait = 10000;this.speed = 50;this.dir = 0;/*0:left, 1:right, 2:up, 3:down */this.items = new Array();this.addItem = function (str){this.items[this.length] = str;this.length++;};this.ptr = 0;this.tm = null;this.itm_tm = null;this.stop = 0;this.MyName = "";this.init = function(MyName){this.MyName = MyName;var boxObj = document.getElementById(this.objName);boxObj.style.width=this.width;boxObj.style.height=this.height;boxObj.style.overflow='hidden';boxObj.style.position='relative';boxObj.style.left=this.offsetX+'px';boxObj.style.top=this.offsetY+'px';var initStr = '';var t_left = 0;var t_top = 0;for(var i=0; i<this.length; i++){initStr += '<div style="position:absolute'+ ';width:' + this.itemWidth+ ';height:' + this.itemHeight+ ';left:' + t_left+ ';top:' + t_top+ ';" id="' + this.objName + '_Item_' + i + '"'+ ' onmouseover="' + this.MyName + '.mv_stop()"'+ ' onmouseout="' +this.MyName + '.mv_start()"'+ '>';initStr += this.items[i];initStr += '</div>';switch(this.dir){case 0: case 1:t_left += this.itemWidth;break;case 2: case 3:t_top += this.itemHeight;break;}}document.getElementById(this.objName).innerHTML = initStr;if(this.length>0){this.tm = setTimeout(this.MyName + '.moveStart()', this.f_wait);}};this.mv_Max = 0;this.moveStart = function(){clearTimeout(this.tm);var boxObj = document.getElementById(this.objName);switch(this.dir){case 0:this.mv_Max = this.itemWidth;break;case 1:this.ptr--;if(this.ptr<0) this.ptr = this.length-1;for(var i=0; i<this.length; i++){var m_obj = document.getElementById(this.objName + '_Item_' + i);m_obj.style.left = (parseInt(m_obj.style.left) + this.itemWidth) + "px";}boxObj.scrollLeft = this.itemWidth;document.getElementById(this.objName + '_Item_' + this.ptr).style.left = "0px";this.mv_Max = this.itemWidth;break;case 2:this.mv_Max = this.itemHeight;break;case 3:this.ptr--;if(this.ptr<0) this.ptr = this.length-1;for(var i=0; i<this.length; i++){var m_obj = document.getElementById(this.objName + '_Item_' + i);m_obj.style.top = (parseInt(m_obj.style.top) + this.itemHeight) + "px";}boxObj.scrollTop = this.itemHeight;document.getElementById(this.objName + '_Item_' + this.ptr).style.top = "0px";this.mv_Max = this.itemHeight;break;}this.tm = setTimeout(this.MyName + '.itemMove()', this.speed);};this.itemMove = function(){clearTimeout(this.itm_tm);var boxObj = document.getElementById(this.objName);switch(this.dir){case 0:var cur_ptr = boxObj.scrollLeft;var offset = (this.mv_Max - cur_ptr) / 3;if(parseInt(offset)!=0){boxObj.scrollLeft = cur_ptr + offset;this.itm_tm = setTimeout(this.MyName + '.itemMove()', this.speed);}else{for(var i=0; i<this.length; i++){var m_obj = document.getElementById(this.objName + '_Item_' + i);m_obj.style.left = (parseInt(m_obj.style.left) - this.itemWidth) + "px";}document.getElementById(this.objName + '_Item_' + this.ptr).style.left = (this.itemWidth * (this.length-1)) + "px";this.ptr++;if(this.ptr==this.length) this.ptr = 0;boxObj.scrollLeft = 0;if(this.stop==0){this.tm = setTimeout(this.MyName + '.moveStart()', this.wait);}else{clearTimeout(this.tm);}}break;case 1:var cur_ptr = boxObj.scrollLeft;var offset = cur_ptr / 3;if(parseInt(offset)!=0){boxObj.scrollLeft = cur_ptr - offset;this.itm_tm = setTimeout(this.MyName + '.itemMove()', this.speed);}else{boxObj.scrollLeft = 0;if(this.stop==0){this.tm = setTimeout(this.MyName + '.moveStart()', this.wait);}else{clearTimeout(this.tm);}}break;case 2:var cur_ptr = boxObj.scrollTop;var offset = (this.mv_Max - cur_ptr) / 3;if(parseInt(offset)!=0){boxObj.scrollTop = cur_ptr + offset;this.itm_tm = setTimeout(this.MyName + '.itemMove()', this.speed);}else{for(var i=0; i<this.length; i++){var m_obj = document.getElementById(this.objName + '_Item_' + i);m_obj.style.top = (parseInt(m_obj.style.top) - this.itemHeight) + "px";}document.getElementById(this.objName + '_Item_' + this.ptr).style.top = (this.itemHeight * (this.length-1)) + "px";this.ptr++;if(this.ptr==this.length) this.ptr = 0;boxObj.scrollTop = 0;if(this.stop==0){this.tm = setTimeout(this.MyName + '.moveStart()', this.wait);}else{clearTimeout(this.tm);}}break;case 3:var cur_ptr = boxObj.scrollTop;var offset = cur_ptr / 3;if(parseInt(offset)!=0){boxObj.scrollTop = cur_ptr - offset;this.itm_tm = setTimeout(this.MyName + '.itemMove()', this.speed);}else{boxObj.scrollTop = 0;if(this.stop==0){this.tm = setTimeout(this.MyName + '.moveStart()', this.wait);}else{clearTimeout(this.tm);}}break;}};this.mv_stop = function(){this.stop = 1;clearTimeout(this.tm);};this.mv_start = function(){this.stop = 0;this.tm = setTimeout(this.MyName + '.moveStart()', this.wait);};}



// flashWrite(ÆÄÀÏ°æ·Î, °¡·Î, ¼¼·Î[, º¯¼ö][,¹è°æ»ö][,À©µµ¿ì¸ðµå])
function flashWrite(url,w,h,vars,bg,win){
	
	var id=url.split("/")[url.split("/").length-1].split(".")[0]; //id´Â ÆÄÀÏ¸íÀ¸·Î ¼³Á¤
	if(vars==null) vars='';
	if(bg==null) bg='#FFFFFF';
	if(win==null) win='transparent';


	// ÇÃ·¡½Ã ÄÚµå Á¤ÀÇ
	var flashStr= "	<object classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000'";
		flashStr+="			codebase='http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0'";
		flashStr+="			width='"+w+"'";
		flashStr+="			height='"+h+"'";
		flashStr+="			id='"+id+"'";
		flashStr+="			align='middle'>";

		flashStr+="		<param name='allowScriptAccess' value='always' />";
		flashStr+="		<param name='movie' value='"+url+"' />";
		flashStr+="		<param name='FlashVars' value='"+vars+"' />";
		flashStr+="		<param name='wmode' value='"+win+"' />";
		flashStr+="		<param name='menu' value='false' />";
		flashStr+="		<param name='quality' value='high' />";
		flashStr+="		<param name='bgcolor' value='"+bg+"' />";
	
	
		flashStr+="		<embed src='"+url+"'";
		flashStr+="		       flashVars='"+vars+"'";
		flashStr+="		       wmode='"+win+"'";
		flashStr+="		       menu='false'";
		flashStr+="		       quality='high'";
		flashStr+="		       bgcolor='"+bg+"'";
		flashStr+="		       width='"+w+"'";
		flashStr+="		       height='"+h+"'";
		flashStr+="		       name='"+id+"'";
		flashStr+="		       align='middle'";
		flashStr+="		       allowScriptAccess='always'";
		flashStr+="		       type='application/x-shockwave-flash'";
		flashStr+="		       pluginspage='http://www.macromedia.com/go/getflashplayer' />";
		flashStr+=" </object>";

	// ÇÃ·¡½Ã ÄÚµå Ãâ·Â
	document.write(flashStr);
}



function playflash(file,width,height,bgcolor,quality,name){
        document.write('<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="'+width+'" height="'+height+'" id="'+name+'">');  //ÇÃ·¡½¬ÇÃ·¹ÀÌ¾î ¹öÀüÀÌ ÀÌÀü¹öÀüÀÏ°æ¿ì ¹öÀü 8À» º¯°æ
        document.write('<param name="movie" value="'+file+'" />');
        document.write('<param name="quality" value="'+quality+'" />');
        document.write('<param name="wmode" value="transparent" />');  //Åõ¸íÇÃ·¡½¬°¡ ¾Æ´Ò°æ¿ì ÀÌ ¶óÀÎÀ» »èÁ¦
        document.write('<param name="bgcolor" value="'+bgcolor+'" />');
        document.write('<embed src="'+file+'" quality="'+quality+'" wmode="transparent" bgcolor="'+bgcolor+'" width="'+width+'" height="'+height+'" name="'+name+'" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />');
        document.write('</object>')
}


function openWinSr(url,width,height,pname) {
	var argv = openWinSr.arguments;
	var argc = openWinSr.arguments.length;
	var scl=(argc>4)?"yes":"no";
	var str,top,left;
	top = parseInt(screen.height/3 - height/2);
	left = parseInt(screen.width/3 - width/2);
	if(top<0) top=0;
	if(left<0) left=0;
	str="toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars="+scl+",resizable=yes,copyhistory=no,";
	str=str+"width="+width+",height="+height;
	str=str+",top="+top;
	str=str+",left="+left;
	var st = window.open(url,pname,str);
	st.resizeTo(width,(height+30))
	st.focus();
	}

function openWin(url,width,height) {
	var argv = openWin.arguments;
	var argc = openWin.arguments.length;
	var scl=(argc>3)?"yes":"no";
	var str,top,left;
	top = parseInt(screen.height/3 - height/2);
	left = parseInt(screen.width/3 - width/2);
	if(top<0) top=0;
	if(left<0) left=0;
	str="toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars="+scl+",resizable=no,copyhistory=no,";
	str=str+"width="+width+",height="+height;
	str=str+",top="+top;
	str=str+",left="+left;
	var st = window.open(url,"",str);
	st.focus();
	}




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);	
}

*/


///// ¿À¸¥ÂÊ¹öÆ° ±ÝÁö//////////////////////////////

function dragIt(evt) 
{	
	if (event.button==1) {
		//alert('¸¶¿ì½º¸¦ µå·¡±×ÇÒ ¼ö ¾ø½À´Ï´Ù.');
		return false;
	}
}


function engage(evt) 
{
//	alert("asdf");
	if ((event.button==2) || (event.button==3) || (event.keyCode == 93)) {
		alert('¸¶¿ì½º ¿À¸¥ÂÊ ¹öÆ°Àº »ç¿ëÇÒ¼ö ¾ø½À´Ï´Ù.');
		return false
	}else if((event.altKey)) {
		return false;
	}
} 
document.onmousedown = engage; //¸¶¿ì½º¸¦ Å¬¸¯ÇßÀ» ¶§
document.onkeydown=engage;	//Å°º¸µå¸¦ ´­·¶À»¶§
document.onmousemove = dragIt; //¸¶¿ì½º¸¦ µå·¡±×ÇßÀ» ¶§
document.onkeyup=engage	//Å°º¸µå¸¦ ¶ç¾úÀ»¶§

function NullCheck(){
	if(document.onmousedown == null){
		document.onmousedown = engage;
	}
	if(document.onkeydown == null){
		document.onkeydown = engage;
	}
	if(document.onmousemove == null){
		document.onmousemove = engage;
	}
	if(document.onkeyup == null){
		document.onkeyup = engage;
	}
	SelfCrack = window.setTimeout("NullCheck()",1000);
}
var SelfCrack = window.setTimeout("NullCheck()",1000);
