String.prototype.getParameter = function(str)
{
	//alert(str);
	var index = this.search(str);
	if(index >= 0) {
		//alert(index);
		var tempValue = this.substring(index);
		//alert(tempValue);
		endIndex = tempValue.search("&");
		if (endIndex >= 0)
			tempValue = tempValue.substring(0,endIndex);
		//alert(tempValue);
		var param = tempValue.split("=");
		return param[1];
	}
	return ("");
};

String.prototype.startsWith = function(str)
{
	return (this.match("^"+str)==str);
};

String.prototype.endsWith = function(str)
{
	return (this.match(str+"$")==str);
};

String.prototype.trim = function () {
    return this.replace(/^\s*/, "").replace(/\s*$/, "");
};

