
function check(){

    if(document.add_form.name.value.length < 1){
        document.add_form.name.focus();
        alert("ÀÌ¸§À» ÀÔ·ÂÇØÁÖ¼¼¿ä.");
    }
	else if(document.add_form.email.value.length < 1 && document.add_form.phone.value.length < 1){
		alert("¿¬¶ôÃ³´Â ÇÊ¼ö ÀÔ·Â»çÇ×ÀÔ´Ï´Ù. ÀÌ¸ÞÀÏ È¤Àº ÀüÈ­¹øÈ£¸¦ ÀÔ·ÂÇØÁÖ¼¼¿ä.");
		if(document.add_form.email.value.length < 1)
			document.add_form.email.focus();
		else
			document.add_form.phone.focus();
	}
	else if(document.add_form.dob.value.length < 1){
		document.add_form.dob.focus();
		alert("»ý³â¿ùÀÏÀ» ÀÔ·ÂÇØÁÖ¼¼¿ä.");
	}
	else if(document.add_form.comment.value.length < 1){
		document.add_form.comment.focus();
		alert("Comment¸¦ ÀÔ·ÂÇØÁÖ¼¼¿ä.");
	}
    else{
        document.add_form.submit();
    }
    
}



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-1; 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 onlyDigit(el) 
{
    el.value = el.value.replace(/\D/g,'');
}

function go_back() 
{
    history.go(-1);
}

function go_replace(url) 
{
    location.replace(url);
}

function ProtectDouble(tmp)
{
    document.getElementById(tmp).disabled = true;
    setTimeout("document.getElementById('"+tmp+"').disabled = false", 3000);
}

function go_linkwindow(link)
{  
    window.open(link);
}

function go_optionwindow(link,name,option){
    window.open(link,name,option);
}

function onlyEnglish(el) 
{
    onvalue = el.value;
    
    if ((onvalue.search(/[^a-z0-9]/) != -1) || (onvalue == "")) 
    {
        el.value = "";
        el.focus();
        return false;
    }
}

function div_display(id,display,other_ids){
    if(other_ids && other_ids!='undefined'){
        arr_other_ids = other_ids.split(',');
        for(var i=0;i<arr_other_ids.length;i++){
            div_display(arr_other_ids[i], 'none');
        }
    }
    
    if(display=='auto'){
        ele_display = document.getElementById(id).style.display;
        if(ele_display=='none'){
            document.getElementById(id).style.display = '';
        }else{
            document.getElementById(id).style.display = 'none';
        }
            
    }else{
        document.getElementById(id).style.display = display;
    }
}