// Flash include
function swf(p,w,h){
    document.write (" <object classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0' width='"+w+"' height='"+h+"'> ");
    document.write (" <param name='movie' value='"+p+"'> ");
    document.write (" <param name='quality' value='high'> ");
    document.write (" <PARAM name='wmode' value='transparent'> ");
    document.write (" <embed src='"+p+"' quality='high' pluginspage='http://www.macromedia.com/go/getflashplayer' type='application/x-shockwave-flash' width='"+w+"' height='"+h+"'></embed> ");
    document.write (" </object> ");
}

// Title
document.title=" ¹é±ÝT&A À¥»çÀÌÆ®¿¡ ¿À½Å°ÍÀ» È¯¿µÇÕ´Ï´Ù. ";

// Focus
function allblur() {
 for (i = 0; i < document.links.length; i++)
	document.links[i].onfocus = document.links[i].blur;
}

function bluring(){
if(event.srcElement.tagName=="A"||event.srcElement.tagName=="IMG") document.body.focus();
}
//document.onfocusin=bluring;


// Window_Close
function CloseWindow() {
	window.close();
}

function goLogin(){
	window.location = "/member/loginInput.do?referer="+location.href;
}
// Window_Open ½ºÅ©·ÑÀÌ ¾øÀ» ¶§
function OpenWindow(url,intWidth,intHeight) {
      window.open(url, "_blank", "width="+intWidth+",height="+intHeight+",resizable=0,scrollbars=0") ;
}

// Window_Open ½ºÅ©·ÑÀÌ ÀÖÀ» ¶§
function OpenWindow_s(url,intWidth,intHeight) {
      window.open(url, "_blank", "width="+intWidth+",height="+intHeight+",resizable=0,scrollbars=1") ;
}


// SwapImg
function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

/*-----------------------------------------------------------------------
  ±â´É   : PopUp Window¸¦ ¶ç¿î´Ù. 
  INPUT  : vPpgm_id, vPwidth, vPheight
  RETURN :           
  AUTHOR : KYS
  ÂüÁ¶   : 
-----------------------------------------------------------------------*/
function jsPopUp(vPpgm_id, vPwidth, vPheight){
	var vUcall_url = vPpgm_id;
	var vUwidth    = vPwidth;
	var vUheight   = vPheight;
	        
	var nUwin = window.open(vUcall_url,
              'newWindow',
              'top=10,left=10,toolbar=no,location=0,directories=no,status=no,menubar=no,scrollbars=0,resizable=0,width='+vUwidth+',height='+vUheight);
            nUwin.focus();
}

//ÆäÀÌÁö º¯¼ö ÂüÁ¶
var depth1 = "";
var depth2 = "";
var depth3 = "";
var logchk = "";

function setDepthVar(firvar, secvar, thrvar, logvar) {
	depth1 = firvar;
	depth2 = secvar;
	depth3 = thrvar;
	logchk = logvar;
}


// BASIC SCRIPT
function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}


// LAYER SHOW HIDE
function cu(stat){
	if (stat == 1){ 
		document.all.cu1.style.display = "block"; 
		document.all.cu2.style.display = "none"; 
		document.all.cu3.style.display = "none"; 
	} else if (stat == 2){  
		document.all.cu1.style.display = "none"; 
		document.all.cu2.style.display = "block"; 
		document.all.cu3.style.display = "none"; 
	} else if (stat == 3){  
		document.all.cu1.style.display = "none"; 
		document.all.cu2.style.display = "none"; 
		document.all.cu3.style.display = "block"; 
	} 
}

//--------- ÆäÀÌÁö ÆË¾÷ ½ÃÀÛ ---------------------------//
function cnjOpen(url, n, w, h, s) {
	var winl = (screen.width - w) / 2;
	var wint = (screen.height - h) / 2;
	winprops = 'height='+h+',width='+w+',top='+wint+',left='+winl+',scrollbars='+s+',resizable'
	win = window.open(url, n, winprops)
	if (parseInt(navigator.appVersion) >= 4) { win.window.focus(); }
}
//--------- ÆäÀÌÁö ÆË¾÷ ³¡ ---------------------------//

//--------- Ã·ºÎÆÄÀÏ ±ÝÁö ½ÃÀÛ --------------------//
function preView(frm) {
	var exten = document.frm.filename
	var extention = exten.value.split(".");
    var ext = extention[1].toLowerCase();
	if (
	ext != "exe"  &&  ext != "com"  &&  ext != "bat"   &&  ext != "asp"  &&  ext != "jsp"  &&  ext != "php"  &&  ext != "htm"   &&  ext != "html"  && 
	ext != "msi"  &&  ext != "avi"  &&  ext != "mp3"   &&  ext != "asf"  &&  ext != "wmv"  &&  ext != "mpg"  &&  ext != "mpeg"  &&  ext != "vbe"   && 
	ext != "vbs"  &&  ext != "cer"  &&  ext != "mdl"   &&  ext != "htt"  &&  ext != "htc"  &&  ext != "wml"  &&  ext != "dtd"   &&  ext != "dtd"   && 
	ext != "uls"  &&  ext != "wsc"  &&  ext != "vcf"   &&  ext != "sgm"  &&  ext != "sgml" &&  ext != "vrml" &&  ext != "wrl"   &&  ext != "cur"   &&   
	ext != "ani"  &&  ext != "js"   &&  ext != "Class" &&  ext != "sfw"  &&  ext != "cfm"  &&  ext != "cfml" &&  ext != "txt"   &&  ext != "Asc"   &&  
	ext != "doc"  &&  ext != "ai"   &&  ext != "eps"   &&  ext != "ps"   &&  ext != "vsd"  &&  ext != "mpp"  &&  ext != "wk4"   &&  ext != "rtf"   &&  
	ext != "wmf"  &&  ext != "mcw"  &&  ext != "wps"   &&  ext != "wpg"  &&  ext != "xls"  &&  ext != "csv"  &&  ext != "xlw"   &&  ext != "mpe"   &&  
	ext != "mp2"  &&  ext != "asd"  &&  ext != "asx"   &&  ext != "divx" &&  ext != "wma"  &&  ext != "mp3"  &&  ext != "m3u"   &&  ext != "aif"   &&    
	ext != "aiff" &&  ext != "aifc" &&  ext != "au"    &&  ext != "snd"  &&  ext != "ra"   &&  ext != "ram"  &&  ext != "wav"   &&  ext != "Mod"   &&   
	ext != "Mid"  &&  ext != "midi" &&  ext != "cdf"   &&  ext != "pac"  &&  ext != "hqx"  &&  ext != "msi"  &&  ext != "aspx"  &&  ext != "ashx"  &&  
	ext != "asmx" &&  ext != "p7b"  &&  ext != "crl"   &&  ext != "asa"  &&  ext != "pl"   &&  ext != "cgi"  &&  ext != "shtml" &&  ext != "inc"   && 
	ext != "php3"
	){return;}
    else {alert("È®ÀåÀÚ°¡ "+ext+"ÀÎ ÆÄÀÏÀº ¾÷·Îµå ÇÏ½Ç¼ö ¾ø½À´Ï´Ù.");return false;}
}
//--------- Ã·ºÎÆÄÀÏ ±ÝÁö ³¡ ----------------------//

//--------- °ø¹éÃ¼Å© ½ÃÀÛ ----------------------//
function CheckStr(strOriginal, strFind, strChange){
	var position, strOri_Length;

	position = strOriginal.indexOf(strFind);	

	while (position != -1){
		strOriginal = strOriginal.replace(strFind, strChange);
		position    = strOriginal.indexOf(strFind);
	}

	//strOri_Length = strOriginal.length;

	return strOriginal;
}
//--------- °ø¹éÃ¼Å© ³¡ ----------------------//