<!--

String.prototype.trim = function() {
	return this.replace(/(^[ \f\n\r\t]*)|([ \f\n\r\t]*$)/g, "");
}

String.prototype.isEmail = function() {
	var t = escape(this);
	var isEmail = true;
	if(t.match(/^(\w+)@(\w+)[.](\w+)$/ig) == null && t.match(/^(\w+)@(\w+)[.](\w+)[.](\w+)$/ig) == null){
		isEmail = false;
	}

	return isEmail;
}

String.prototype.isNumber = function() {
	var t = escape(this);
	var isNumber = true;

	if(t.match(/^\d+$/ig) == null){
		isNumber = false;
	}
	
	return isNumber;
}



function isEmail(mail) {
	var t = escape(this);
	var isEmail = true;
	if(t.match(/^(\w+)@(\w+)[.](\w+)$/ig) == null && t.match(/^(\w+)@(\w+)[.](\w+)[.](\w+)$/ig) == null){
		isEmail = false;
	}

	return isEmail;
}


function callUploadBar(file) {
	strAppVersion = navigator.appVersion; 
	if (file != "") {
		if (strAppVersion.indexOf('MSIE')!=-1 && 
		strAppVersion.substr(strAppVersion.indexOf('MSIE')+5,1) > 4) {

			winstyle = "dialogWidth=385px; dialogHeight:150px; center:yes"; 
			window.showModelessDialog("/common/lib/show_progress.asp?nav=ie", null, winstyle); 
			//window.open("/common/lib/show_progress.asp?nav=ie", null, winstyle); 
		} else { 
			winpos = "left=" + ((window.screen.width-380)/2)+",top=" + ((window.screen.height-110)/2);
			winstyle="width=380,height=110,status=no,toolbar= no,menubar = no,"	+"location=no,resizable=no,scrollbars=no,copyhistory=no," + winpos; 
			window.open("/common/lib/show_progress.asp",null,winstyle); 
		} 
	}
}


var globalExtList = null;

function isImageExt(obj) {
	var imageExt = new Array(
		"jpg",
		"jpeg",
		"gif",
		"png"
	);

	return isConfirmExt(obj, imageExt);
}

function isConfirmExt(obj, extList) {
	globalExtList = extList;
	var isConfirm = false;

	if( obj != null && extList != null && extList.length != 0 ) {
		var eList = extList;
		var objExt = obj.value.substring(obj.value.lastIndexOf(".") + 1, obj.value.length).toUpperCase()

		for(var i = 0, len = eList.length ; i < len ; i++ ) {
			if( objExt == eList[i].toUpperCase() ) {
				isConfirm = true;
				break;
			}
		}
	} else {
		alert("File Object ÀÎÀÚ ¶Ç´Â extListÀÎÀÚ°¡ NullÀÌ°Å³ª extList°¡ ºñ¾îÀÖ½À´Ï´Ù.");
	}	

	return isConfirm;
}

function extMessage(title) {
	var exts = "[ ";
	for(var i = 0, len = globalExtList.length ; i < len ; i++ ) {
		exts += globalExtList[i] + ", ";
	}

	if( exts.indexOf(",") != -1 ) {
		exts = exts.substring(0, exts.length - 2);
	}

	exts += " ]";

	alert(title + "¿¡ Ã·ºÎ°¡´ÉÇÑ ÆÄÀÏ È®ÀåÀÚ´Â " + exts.toUpperCase() + "ÀÔ´Ï´Ù.");
}


function checkID(sValue){

  var oIDMatch = new RegExp(/^[A-Z0-9]{4,12}$/i);

  return oIDMatch.test(sValue);
}



-->