function GotoSearch() {
	if(event.keyCode==13) {
		event.keyCode=null;
		document.all.btnGo.click();
	}
}

function GotoSearch2() {
	if(event.keyCode==13) {
		event.keyCode=null;
		document.all.btnGo2.click();
	}
}

function ShowLocalInfo() {
	if(document.all.ddlLocalOption.value==-1) {
		document.all.LocalName.style.display = "none";
		document.all.LocalCode.style.display = "none";
		document.all.LocalZipCode.style.display = "none";
	}
	if(document.all.ddlLocalOption.value==1) {
		document.all.LocalName.style.display = "inline";
		document.all.LocalCode.style.display = "none";
		document.all.LocalZipCode.style.display = "none";
	}
	if(document.all.ddlLocalOption.value==2) {
		document.all.LocalName.style.display = "none";
		document.all.LocalCode.style.display = "inline";
		document.all.LocalZipCode.style.display = "none";
	}
	if(document.all.ddlLocalOption.value==3) {
		document.all.LocalName.style.display = "none";
		document.all.LocalCode.style.display = "none";
		document.all.LocalZipCode.style.display = "inline";
	}
}

function LocalInputOnfocus(DefaultValue, InputObjectID, SelectObjectID)
{
	document.getElementById(InputObjectID).style.color='#000000';
	
	if(document.getElementById(InputObjectID).value==DefaultValue)
	{
		document.getElementById(InputObjectID).value="";
	}
	
	if (SelectObjectID!="")
	{
		document.getElementById(SelectObjectID).style.visibility = "visible";
		SetPositionAndSize(InputObjectID, SelectObjectID);
	}
}

function SetPositionAndSize(InputObjectID, SelectObjectID)
{

	var InputObjectTop = document.getElementById(InputObjectID).offsetTop;
	var InputObjectLeft = document.getElementById(InputObjectID).offsetLeft;
	var InputObjectWidth = document.getElementById(InputObjectID).offsetWidth;
	var InputObjectHeight = document.getElementById(InputObjectID).offsetHeight;
	
	//alert(InputObjectTop+"|"+InputObjectLeft+"|"+InputObjectWidth+"|"+InputObjectHeight);
	
	document.getElementById(SelectObjectID).style.pixelTop = InputObjectHeight+1;
	document.getElementById(SelectObjectID).style.pixelLeft = InputObjectLeft;
	document.getElementById(SelectObjectID).style.pixelWidth = 300;
	document.getElementById(SelectObjectID).style.pixelHeight = 200;
	
}


String.prototype.trim = function()
{
    return this.replace(/(^[\\s]*)|([\\s]*$)/g, "");
}
String.prototype.lTrim = function()
{
    return this.replace(/(^[\\s]*)/g, "");
}
String.prototype.rTrim = function()
{
    return this.replace(/([\\s]*$)/g, "");
}

// Ð£Ñé×Ö·û´®ÊÇ·ñÎª¿Õ
function checkIsEmpty(str)
{
    if(str.trim() == "")
        return true;
    else
        return false;
}



function CallASPX(URL,blnThreed){    xhtpSender=new ActiveXObject("Msxml2.XMLHTTP");    xhtpSender.open("post",URL,blnThreed);    xhtpSender.setRequestHeader("Content-Type","text/xml");    //xhtpSender.onreadystatechange=SendAndGetMSGCallBackFun;    xhtpSender.send(" ");    return;} 