/**
 * @func   : ipos()
 *         : ÁöÁ¤ÇÑ À§Ä¡ ÀÌÈÄºÎÅÍ ÇØ´ç ¹®ÀÚ¿­À» °Ë»öÈÄ À§Ä¡ ¹ÝÈ¯
           : ´ë¼Ò¹®ÀÚ¸¦ ±¸º°ÇÏÁö ¾ÊÀ½
 * @return : String
 * @param  : sStr    ´ë»ó¹®ÀÚ¿­
 * @param  : iOffset ½ÃÀÛÀ§Ä¡
 * @date   : 2007³â 2¿ù 8ÀÏ
 */
String.prototype.ipos = function(sStr, iOffset)
{
   var iOffset = (typeof iOffset == "number") ? iOffset : 0;
   
   return this.toLowerCase().indexOf(sStr.toLowerCase(), iOffset);
}

String.prototype.trim = function()
{
    return this.replace(/(^s*)|(s*$)/g, "");
}

String.prototype.escapeHTML = function()
{
    if ( typeof(this) == "undefined" ) return "";
    
    return this.replace( /&/g, "&amp;" ).replace( /</g, "&lt;" ).replace( />/g, "&gt;" ).replace( /\n/g, "<br>\n" ).replace( / /g, "&nbsp;" );
}
