	
/*
 Util Function
*********************************************************/
String.prototype.trim = function(str) { 
	str = this != window ? this : str; 
	return str.replace(/^\s+/g,'').replace(/\s+$/g,''); 
}

String.prototype.replaceQuot = function(str) {
	str = this != window ? this : str;
	str = str.replace(/\\/g,'\\\\');
	str = str.replace(/\"/g,'\\\"');
	str = str.replace(/\'/g,'\\\'');
	return str;
}

String.prototype.escapeXml = function(str) {
	str = this != window ? this : str;
	str = str.replace(/&/g,'&amp;');
	str = str.replace(/\'/g,'&#039;');
	str = str.replace(/\"/g,'&#34;');
	str = str.replace(/</g,'&lt;');
	str = str.replace(/>/g,'&gt;');
	return str;
}

function String_startsWithIgnore(str) {
	if(str==null) return false;
	var re = new RegExp(str,'ig');
	return (this.search(re)==0) ? true : false;
}
String.prototype.startsWithIgnore = String_startsWithIgnore;

function String_endsWithIgnore(str) {
	if(str==null) return false;
	var re = new RegExp(str,'ig');
	var idx = this.search(re);
	return (idx>=0 && (idx+str.length)==this.length) ? true : false;
}
String.prototype.endsWithIgnore = String_endsWithIgnore;

function returnValue(obj,defaultValue) {
	defaultValue = (defaultValue==null) ? "" : defaultValue;
	return (obj==null) ? defaultValue : obj;
}
	
/*
 URL¿¡¼­ ÇöÀç ¸Þ´ºÀÇ DepthÁ¤º¸¿Í ¸Þ´ºº° ID(µð·ºÅä¸®¸í)¸¦ °¡Á®¿Â´Ù.
 »ó´Ü ÇÃ·¡½Ã, ÁÂÃø¸Þ´º, Ä«Å×°í¸®Á¤º¸, ºê¶ó¿ìÀúÅ¸ÀÌÆ² µî¿¡¼­ ¸ðµÎ »ç¿ëÇÑ´Ù.
***************************************************************/
var sPathName = location.pathname;
var tempDir = sPathName.split("/");
var dir = new Array;
for (var i=0; i<tempDir.length; i++) {
	if ((tempDir[i].trim()!="")&&(tempDir[i].indexOf(".")<0)) {
		dir[dir.length] = tempDir[i].trim();
	}
}
