function send_log() {

	if ( ! document.loginform.userid.value) {
	alert("\n¾ÆÀÌµð(ID)¸¦ ÀÔ·ÂÇØÁÖ¼¼¿ä.");
	document.loginform.userid.focus();
	return false;}
	
	if ( ! document.loginform.userpwd.value) {
	alert("\nºñ¹Ð¹øÈ£(PWD)¸¦ ÀÔ·ÂÇØÁÖ¼¼¿ä.");
	document.loginform.userpwd.focus();
	return false;}	

	window.document.loginform.submit();

}

// ÀÛÀº ÆË¾÷Ã¢
function pop_small(url) {
window.open(url, "POP_ejbs", "width=500,height=400,scrollbars=1,left=10,top=10,toolbar=no,resize=no");
}

// Å« ÆË¾÷Ã¢
function pop_big(url) {
window.open(url, "POP_ejbs", "width=680,height=700,scrollbars=1,left=10,top=10,toolbar=no,resize=no");
}


function setJBgateHomePage() {
	userHomePage.setHomePage("http://www.spem.co.kr");
}


window.onerror=null;
if (navigator.appName == "Netscape") {
layerRef="document.layers";
styleSwitch="";
} else {
layerRef="document.all";
styleSwitch=".style";
}

function toggle_link(layerName) {

layer_obj = eval(layerRef + "['" + layerName + "']" + styleSwitch + ".display");

if (layer_obj == "none")  {
eval(layerRef + "['" + layerName + "']" + styleSwitch + ".display=''");
} else {
eval(layerRef + "['" + layerName + "']" + styleSwitch + ".display='none'");
}

}

function display_show(layerName) {

layer_obj = eval(layerRef + "['" + layerName + "']" + styleSwitch + ".display");

eval(layerRef + "['" + layerName + "']" + styleSwitch + ".display=''");

}

function display_none(layerName) {

layer_obj = eval(layerRef + "['" + layerName + "']" + styleSwitch + ".display");

eval(layerRef + "['" + layerName + "']" + styleSwitch + ".display='none'");

}


function isNum(obj)
{
	var inText = obj.value;
	var ret;

	for (var i = 0; i<= inText.length; i++) {
	    	ret = inText.charCodeAt(i);
	    	
    	
		if (ret > 127) {			
			alert("¼ýÀÚ¸¸À» ÀÔ·ÂÇÏ¼¼¿ä");
			obj.value = "";
			obj.focus();
			break;
			return false;
		}else if((ret <=47 && ret > 31) || ret >= 58){
			alert("¼ýÀÚ¸¸À» ÀÔ·ÂÇÏ¼¼¿ä");
			obj.value = "";
			obj.focus();
			break;
			return false;			
		}
	}
	return true;
		
	
} 

function FlashLoad(url,w,h,id,bg,vars,win){


    var flashStr=
    "<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+"' id='"+id+"' align='middle'>"+
    "<param name='allowScriptAccess' value='always' />"+
    "<param name='movie' value='"+url+"' />"+
    "<param name='FlashVars' value='"+vars+"' />"+
    "<param name='wmode' value='"+win+"' />"+
    "<param name='menu' value='false' />"+
    "<param name='quality' value='high' />"+
    "<param name='bgcolor' value='"+bg+"' />"+
    "<embed src='"+url+"' FlashVars='"+vars+"' menu='false' quality='high' bgcolor='"+bg+"' width='"+w+"' height='"+h+"' name='"+id+"' align='middle' allowScriptAccess='always' type='application/x-shockwave-flash' pluginspage='http://www.macromedia.com/go/getflashplayer' />"+
    "</object>";

	document.write(flashStr);
}


function limitCheck(idButton, formname, kind){
	var max = 3;
	var cnt = 0;
	var obj;

	
	obj = eval("document." + formname + "." + kind);

	for(i=0; i<obj.length; i++)
		if(obj[i].checked == true) cnt++;

	if(cnt > max){
		alert('3°³±îÁö¸¸ ¼±ÅÃÇÒ¼ö ÀÖ½À´Ï´Ù');
		idButton.checked = false;
	}
}

function minCheck(form){

	var cnt = 0;
	var obj;

	
	obj = eval(form);

	for(i=0; i<obj.length; i++)
		if(obj[i].checked == true) cnt++;

	  if (cnt == 0 ) return true;
	  else return false;
}


function setCookie(name, value, expiredays) {
	var todayDate = new Date();
	todayDate.setDate( todayDate.getDate() + expiredays);
	document.cookie = name + "=" + escape( value ) + "; path=/; expires=" + todayDate.toGMTString() + ";"
}



function FocusMove(From, To, FormName, maxLen)
{
	obj = eval("document." + FormName + "." + From);


	if (obj.value.length == maxLen)
	{
		eval("document." + FormName + "." + To + ".focus()");
	}

}


function goto_byselect(sel, targetstr)
{
  var index = sel.selectedIndex;
  if (sel.options[index].value != '') {
     if (targetstr == 'blank') {
       window.open(sel.options[index].value, 'new_win');
     } else {
       var frameobj;
       if (targetstr == '') targetstr = 'self';
       if ((frameobj = eval(targetstr)) != null)
         frameobj.location = sel.options[index].value;
     }
  }
}