function XMLHttp(strUrl)
{
	var strText = "";
	eval ('try {xmlhttp = new ActiveXObject("Microsoft.XMLHTTP"); } catch (e) {xmlhttp = null;}');
	if (xmlhttp != null)
	{
		xmlhttp.Open("GET", strUrl, false);
		xmlhttp.Send();
		if (xmlhttp.status==200)
		{
			strText = xmlhttp.responseText;
		}
		else
		{
			strText=-1;
		}
	}
	return strText;
}

function checkRegExp(src, regE)
{
	return regE.test(src.trim());
}

//删除空格
String.prototype.lTrim = function () {
return this.replace(/^\s*/, "");
}
// remove trailing whitespace
String.prototype.rTrim = function () {
return this.replace(/\s*$/, "");
}
// remove leading and trailing whitespace
String.prototype.trim = function () {
return this.rTrim().lTrim();
}

function alertFocus(obj, msg)
{
	alert(msg);
	try
	{
		obj.focus()
	}
	catch(e)
	{
	}
}

// 读取用户提交的地址栏中的指定参数
function getQueryString(priStrQueryName)
{
	priStrValue = "";
	priIsFound = false;
	if (this.location.search.indexOf("?")==0&&this.location.search.indexOf("=")>1)
	{
		priArraySource = unescape(this.location.search).substring(1,this.location.search.length).split("&");
		priGetQSi = 0;
		while (priGetQSi<priArraySource.length&&!priIsFound)
		{
			if (priArraySource[priGetQSi].indexOf("=")>0)
			{
				if (priArraySource[priGetQSi].split("=")[0].toLowerCase()==priStrQueryName.toLowerCase())
				{
					priStrValue = priArraySource[priGetQSi].split("=")[1];
					priIsFound = true;
				}
			} 
			priGetQSi ++ ;
		}	
	}
	return priStrValue;
} 

