

////////////Æ÷½ºÆ® ¹æ½ÄÀ¸·Î »õÃ¢ ¶ç¿ì±â/////////

document.write("<div id=vistaDiv style='display:none'></div>");
document.write("<iframe name=IFrameResult id='IFrameResult' style='display:none'></iFrame>");
 function pupup_post(actionUrl, winName, popArg) {
  if ( popArg == null ) popArg = "";
  var content = "<form name=visActionForm>";
  if ( actionUrl.indexOf("?") == -1 ) {
   moveURL = actionUrl;
  } else {
   var paramSplit = actionUrl.split("?");
   moveURL = paramSplit[0];
   if ( paramSplit.length == 2 ) {
    getParam = paramSplit[1].split("&"); 
    for (var i=0; i < getParam.length; i++) {
     getElement = getParam[i].split("=");
     getElementName = (getElement[0] != null) ? getElement[0] : '';
     getElementValue = (getElement[1] != null) ? getElement[1] : '';
     content += "<input type=hidden name='" + getElementName + "' value='" + getElementValue + "'>\n";
    }
   }
  }
  
  content += "</form>";
  document.all.vistaDiv.innerHTML = content;
  if( winName != "_self" ) window.open("about:blank", winName, popArg);
 
  visActionForm.target = winName;
  visActionForm.action = moveURL;
  visActionForm.method = "post";
  visActionForm.submit();

}
////////////Æ÷½ºÆ® ¹æ½ÄÀ¸·Î »õÃ¢ ¶ç¿ì±â/////////


// MS ÆÐÄ¡·Î ÀÎÇÑ JS 06.03.15 ¹Ú¹ü¹Î
function PrintEmbed(EmbID) 
{ 

    if(document.getElementById(EmbID))
   	document.write(document.getElementById(EmbID).value); 
    	
} 


function quit_TG(frum_iden){	
	if(confirm("Are you sure?")){
		document.location.href('TG_join.asp?mode=quit&frum_iden='+frum_iden);
	}	
}

function modifyMember(){
	if(document.form.memb_pass.value==""){
		alert("please insert member password");
		document.form.memb_pass.focus();
	}else if(document.form.memb_pass2.value!=document.form.memb_pass.value){
		alert("password ans password confirm does not match");
		document.form.memb_pass2.focus();
	}else if(document.form.memb_fname.value==""){
		alert("please insert member first name");
		document.form.memb_fname.focus();
	}else if(document.form.memb_lname.value==""){
		alert("please insert member last name");
		document.form.memb_lname.focus();
	}else{
		document.form.action="/ansn_new/asp/join/modifyProcess.asp";
		document.form.submit();
	}	
}
function joinMember(){
	if(document.form.memb_iden.value==""){
		alert("please insert member id");
		document.form.memb_iden.focus();
	}
	else if(checkChar(document.form.memb_iden.value) != 0)
    {
        alert("You can't use special letter in id engine.");
        document.form.memb_iden.focus();
    }
	else if(document.form.memb_pass.value==""){
		alert("please insert member password");
		document.form.memb_pass.focus();
	}
	else if(checkChar(document.form.memb_pass.value) != 0)
    {
        alert("You can't use special letter in password engine.");
        document.form.memb_pass.focus();
    }
	else if(document.form.memb_pass2.value!=document.form.memb_pass.value){
		alert("password ans password confirm does not match");
		document.form.memb_pass2.focus();
	}
	else if(checkChar(document.form.memb_pass2.value) != 0)
    {
        alert("You can't use special letter in password engine.");
        document.form.memb_pass2.focus();
    }
	else if(document.form.memb_fname.value==""){
		alert("please insert member first name");
		document.form.memb_fname.focus();
	}
	else if(checkChar(document.form.memb_fname.value) != 0)
    {
        alert("You can't use special letter in first name engine.");
        document.form.memb_fname.focus();
    }
	else if(document.form.memb_lname.value==""){
		alert("please insert member last name");
		document.form.memb_lname.focus();
	}
	else if(checkChar(document.form.memb_lname.value) != 0)
    {
        alert("You can't use special letter in last name engine.");
        document.form.memb_lname.focus();
    }
	else{
		document.form.action="/ansn_new/asp/join/joinProcess.asp";
		document.form.submit();
	}
}
function checkID(){
	window.open("/ansn_new/asp/join/checkID.asp", "checkID", "width=298,height=160,top=0,left=0,scrollbars=0, resizable=1, toolbar=0, menubar= 0,location=0, directories=0, status=0");
}
function check_result(){
	window.opener.form.memb_iden.value=document.form.memb_iden.value;
	window.close();
}
var where = ""; 
function checkwhere(e) {
	if (document.layers){
	xCoord = e.x;
	yCoord = e.y;
	}
	else if (document.all){
	xCoord = event.clientX;
	yCoord = event.clientY;
	}
	else if (document.getElementById){
	xCoord = e.clientX ;
	yCoord = e.clientY ;
	}
		
}
	document.onmousemove = checkwhere;

	if(document.captureEvents) {document.captureEvents(Event.MOUSEMOVE);}
	
function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);

function bt(name,after) 
{ 
eval(name+'.filters.blendTrans.stop();'); 
eval(name+'.filters.blendTrans.Apply();'); 
eval(name+'.src="'+after+'";'); 
eval(name+'.filters.blendTrans.Play();'); 
} 

var Toggle =1;
 function Imgtop(){
     kins.stop();
  }

 function Imgstart(){
      kins.start();
 }
 
 function Imgtop1(){
     kins1.stop();
  }

 function Imgstart1(){
      kins1.start();
 }

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 bt(name,after){ 
eval(name+'.filters.blendTrans.stop();'); 
eval(name+'.filters.blendTrans.Apply();'); 
eval(name+'.src="'+after+'";'); 
eval(name+'.filters.blendTrans.Play();'); 
} 

function OpenWindow(url,intWidth,intHeight) { 
      window.open(url, "_blank", "width="+intWidth+",height="+intHeight+",top=0,left=0,resizable=1,scrollbars=1") ;
}


//  ´ÙÀ½°ª ÀÔ·ÂºÒ°¡
// return value != 0 ÀÌ¸é ¿À·ù : return value¸¦ È°¿ëÇÑ´Ù.
function checkChar(text)
{
	var leng = text.length;
	for (var i=0; i < leng; i++) 
	{
// ÀÔ·ÂÇÒ ¼ö ¾ø´Â char:	~`'@#$^_\|{}[]()&
		if ((text.charAt(i) == "~") ||
			(text.charAt(i) == '"') ||
			(text.charAt(i) == ";") ||
			(text.charAt(i) == "-") ||
			(text.charAt(i) == "`") ||
			(text.charAt(i) == "'") ||
//			(text.charAt(i) == "@") ||
			(text.charAt(i) == "#") ||
			(text.charAt(i) == "$") ||
			(text.charAt(i) == "^") ||
			(text.charAt(i) == "_") ||
			(text.charAt(i) == "\\") ||
			(text.charAt(i) == "|") ||
			(text.charAt(i) == "<") ||
			(text.charAt(i) == ">") ||
			(text.charAt(i) == "\{") ||
			(text.charAt(i) == "\}") ||
			(text.charAt(i) == "\[") ||
			(text.charAt(i) == "\]") ||
			(text.charAt(i) == "(") ||
			(text.charAt(i) == ")") ||
			(text.charAt(i) == "&") )
		{
			return("~\";-`'@#$^_\|<>{}[]()&");
		}
		
	}
	return(0);
}


function CheckSubmit(f,g){
    if(f.memb_iden.value.length==0)
    {
        alert("Please input member id");
        f.memb_iden.focus();
        return;
    }
    else if(checkChar(f.memb_iden.value) != 0)
    {
        alert("You can't use special letter in id engine.");
        f.memb_iden.focus();
        return;
    }
    else if(f.memb_pass.value.length==0)
    {
        alert("Please input member password");
        f.memb_pass.focus();
        return;
    }
    else if(checkChar(f.memb_pass.value) != 0)
    {
        alert("You can't use special letter in password engine.");
        f.memb_pass.focus();
        return;
    }
    else
    	f.action ="/ansn_new/asp/login/loginProcess.asp?call_type="+g
    	f.submit();
}

function CheckWrite(f){	
	if(f.bbsx_titl.value.length==0){
		alert("Please input title");
        f.bbsx_titl.focus();
	}
	else if(f.bbsx_body.value.length==0){
		alert("Please input contents");
        f.bbsx_body.focus();
	}
	else if(f.bbsx_pass.value.length==0){
		alert("Please input password");
        f.bbsx_pass.focus();
	}
	else f.submit();
}
function CheckEdit(f){
	if (f.del_checkbox.value=="y" && f.del_checkbox.checked==true) {
		f.del_check.value="y"
	}
	else if(f.del_checkbox.value=="y" && f.del_checkbox.checked==false) {
    	f.del_check.value="n"
    }
	else{
    	f.del_check.value="x"
    }
	
	if(f.bbsx_titl.value.length==0){
		alert("Please input title");
        f.bbsx_titl.focus();
	}
	else if(f.bbsx_body.value.length==0){
		alert("Please input contents");
        f.bbsx_body.focus();
	}
	else if(f.bbsx_pass.value.length==0){
		alert("Please input password");
        f.bbsx_pass.focus();
	}
	else f.submit();
}

function CheckDelt(f){
	if(f.bbsx_pass.value.length==0){
		alert("Please input password");
		f.bbsx_pass.focus();
	}
	else f.submit();
}

function CheckSrh(f){
	if(f.isearch.value.length==0)
	{
		alert("Please input Search");
		f.isearch.focus();
	}
	else f.submit();	
}
function CheckMemo(f){
	if(f.memo.value.length==0){
		alert("Please input memo");
		f.memo.focus();
	}
	else f.submit();
}
function image_open(img_view){
    window.open(img_view, "image", "width=800, height=600, top=0, left=0, scrollbars= 1, resizable=1, toolbar=0, menubar= 0,location=0, directories=0, status=0");
}
function show_help(){
	window.open('TG_help.html', "help", "width=580, height=600, top=0, left=0, scrollbars= 1, resizable=1, toolbar=0, menubar= 0,location=0, directories=0, status=0");
}
function OpenWindow(open_url,winid){
	var open_win = window.open(open_url, winid,"width=357, height=370, top=0, left=0, scrollbars=1, resizable=1, toolbar=0, menubar=0, location=0, directories=0, status=0");
	open_win.focus();
}
function login_plz(){
	alert("Login Please");
	document.LoginForm.memb_iden.focus();
	return;	
}
function na_restore_img_src(name, nsdoc)
{
  var img = eval((navigator.appName.indexOf('Netscape', 0) != -1) ? nsdoc+'.'+name : 'document.all.'+name);
  if (name == '')
    return;
  if (img && img.altsrc) {
    img.src    = img.altsrc;
    img.altsrc = null;
  } 
}

function na_preload_img()
{ 
  var img_list = na_preload_img.arguments;
  if (document.preloadlist == null) 
    document.preloadlist = new Array();
  var top = document.preloadlist.length;
  for (var i=0; i < img_list.length; i++) {
    document.preloadlist[top+i]     = new Image;
    document.preloadlist[top+i].src = img_list[i+1];
  } 
}

function na_change_img_src(name, nsdoc, rpath, preload)
{ 
  var img = eval((navigator.appName.indexOf('Netscape', 0) != -1) ? nsdoc+'.'+name : 'document.all.'+name);
  if (name == '')
    return;
  if (img) {
    img.altsrc = img.src;
    img.src    = rpath;
  } 
}

function no_login()
{ 
  alert("Please, Sign in with your ID and Password to Continue!");
}