/*
 * input:
 * 	strname parameter name
 * output: getParameter(str)
 */
function getResponseParameter(strname) {
	var hrefstr, pos, parastr, para, tempstr;
	hrefstr = window.location.href;
	pos = hrefstr.indexOf("?");
	parastr = hrefstr.substring(pos + 1);
	para = parastr.split("&");
	tempstr = "";
	for (i = 0; i < para.length; i++) {
		tempstr = para[i];
		pos = tempstr.indexOf("=");
		if (tempstr.substring(0, pos) == strname) {
			return tempstr.substring(pos + 1);
		}
	}
	return "";
}

/*
 * StringBuffer
 */
function StringBuffer(str){
	this._strings = new Array;
	if(typeof(str)=='string'){
		this.append(str);
	}
}
StringBuffer.prototype.append = function (str){
	this._strings.push(str);
};
StringBuffer.prototype.toString = function(){
	return this._strings.join("");
};
