function getNavigatorType() {
	if ( navigator.appName == "Microsoft Internet Explorer" )
			return 1;  
		else if ( navigator.appName == "Netscape" )
			return 2;	
		else 
			return 0;
}
function getNavigatorVersion() {
	info = window.navigator.appVersion.split(" ");
	return info[0];
}	
function getIEVersion(){
	g=navigator;
	a=g.userAgent;
	p=g.appVersion;
	m=p.indexOf("MSIE");
	
	if(m!=-1 && a.indexOf("Win") != -1){
	return parseFloat(p.substring(m+4));
	}
	return -1;
}
function moveFocus(num, from, to){
	var str = from.value.length;
	if(str == num) {
		getElmById(to).focus();
	}   
}	

function getValById(aID) {
	vObj = getElmById(aID);
	return vObj.value;
}

function getNodeValById(aID) {
	vObj = getElmById(aID);
	return vObj.firstChild.nodeValue;
}

function getSelectValById(aID) {
	vObj = getElmById(aID);
	return vObj.options[vObj.selectedIndex].value;
}

//Clear and Restore Default Value of Input Boxes
function clickClear(thisfield, defaulttext) {
	if (thisfield.value == defaulttext) {
		thisfield.value = "";		
		//thisfield.style.cssText = "";
	}
}

function clickRecall(thisfield, defaulttext) {
	if (thisfield.value == "") {
		thisfield.value = defaulttext;
		//thisfield.style.cssText = "color: #666";
	}
}

function clearBg(thisfield) {
	thisfield.style.backgroundImage = "";
}

function login_checkSubmit(thisform) {
	if(thisform.id.value == "") {
		alert("Please Enter ID");
		thisform.id.focus();
		return false;
	}
	if(thisform.passwd.value == "") {
		alert("Please Enter Password");
		thisform.passwd.focus();
		return false;
	}		
}

function post_checkSubmit(thisform) {
	if(thisform.surburb.value == 'Áö¿ª¸í...') {
		alert("Áö¿ª¸íÀ» ¼±ÅÃÇÏ¿© ÁÖ½Ê½Ã¿ä");
		thisform.surburb.focus();
		return false;
	}			
}

function isValidUser(logined) {
	if(logined == 0) {
		alert("Please login first");
		document.login_form.id.focus();
		return false;
	}
	return true;
}

function getElmById(aID){
  var element = null;
 
  if (document.getElementById) // this is better use than using like "isMozilla || isIE5', such as Opera or Safari, to work without any changes.
    element = document.getElementById(aID)
  else if (isNetscape4)
    element = document.layers[aID]
  else if (isIE4)
    element = document.all[aID]; 

  return element;
} 

function checkDisableById(aId){
	sObj = getElmById(aId);
	if(sObj.disabled == true){
		sObj.disabled = false;
	}else{
		sObj.disabled = true;		
	}
}