function Blurtxt(txtID,dfstring,col)
{
	var txt=document.getElementById(txtID);
	if (txt!=null)
	{
		if (txt.value=="")
		{
			txt.value=dfstring;
			txt.style.color=col;
		}
	}
}

function Focustxt(txtID,dfstring,col,evt)
{
	var txt=document.getElementById(txtID);
	if (txt!=null)
	{
		
		if (txt.value==dfstring)
		{ 
			txt.value="";
			txt.style.color=col;
			 
			if (navigator.userAgent.indexOf("Firefox") > -1) 
			{ 
				 evt=evt?evt:(window.event?window.event:null); 		
				if(txt.id=="bsiHotelArea")
				{  
					 
					ShowProgressInfoN(evt);
				}
				else if(txt.id=="txtCityName")
				{
					 suggest.display(txtID,'txtCityCode',evt,1);
				}
			}
			
		}
		 
		return;
	}
}

function  flist(list,response,head)
{     
	list.length=0;
	
	if  (response.value!=null && response.value!="")   
	{ 
		if (head!=null && head!="")
		{
			list.options.add(new  Option(head,''));  
		}
  　	var   piArray   =   response.value.split(',');   
  　	for(var i=0;i<piArray.length;i++)   
  　	{   
  　　　	var   ary1   =   piArray[i].toString().split('|');   
  　　　	if (ary1.length>1)
  　　　		list.options.add(new  Option(ary1[1].toString(),ary1[0].toString()));  
  　	} 
  　	if (head!=null && head!="")
		{
			list.selectedIndex =1;   
		}
		else
		{
  　		list.selectedIndex =0;   
  　	}                            
	} 
	return true;
}
function  fX(list,response,head)
{     
	list.length=0;
	if  (response.value!=null && response.value!="")   
	{ 
		if (head!=null && head!="")
		{
			list.options.add(new  Option(head,''));  
		}
  　	var   piArray   =   response.value.split(',');   
  　	for(var i=0;i<piArray.length;i++)   
  　	{   
  　　　	var   ary1   =   piArray[i].toString().split('|');   
  　　　	if (ary1.length>1)
  　　　		list.options.add(new  Option(ary1[1].toString(),ary1[0].toString()));  
  　	} 
  　	list.selectedIndex =0;   
	} 
	return true;
}
function FillAreaPYSum(lvl,strCode,FillList,ClearList,head)
{
	var clearL;
	var response;
	var fillL;
	fillL=document.getElementById(FillList);
	if (fillL==null)
		return;
	if (ClearList!=null)
	{
		clearL=document.getElementById(ClearList);
		if (clearL!=null)
			clearL.length=0;
	}
	var response;
	response=AjaxMethod.SetLstPYSum(lvl,strCode);
	flist(fillL,response,head)
	return;
}
function FillAreaPYSumInns(lvl,strCode,FillList,ClearList,head)
{
	var clearL;
	var response;
	var fillL;
	fillL=document.getElementById(FillList);
	if (fillL==null)
		return;
	if (ClearList!=null)
	{
		clearL=document.getElementById(ClearList);
		if (clearL!=null)
			clearL.length=0;
	}
	var response;
	response=AjaxMethod.SetLstPYSumInns(lvl,strCode);
	flist(fillL,response,head)
	return;
}
function FillAreaPY1(lvl,strCode,FillList,ClearList,head)
{
	var clearL;
	var response;
	var fillL;
	fillL=document.getElementById(FillList);
	if (fillL==null)
		return;
	if (ClearList!=null)
	{
		clearL=document.getElementById(ClearList);
		if (clearL!=null)
			clearL.length=0;
	}
	var response;
	response=AjaxMethod.SetLstPY1(lvl,strCode);
	flist(fillL,response,head)
	return;
}

function FillAreaPY2(lvl,strCode,FillList,ClearList,head)
{
	var clearL;
	var response;
	var fillL;
	fillL=document.getElementById(FillList);
	if (fillL==null)
		return;
	if (ClearList!=null)
	{
		clearL=document.getElementById(ClearList);
		if (clearL!=null)
			clearL.length=0;
	}
	var response;
	response=AjaxMethod.SetLstPY2(lvl,strCode);
	flist(fillL,response,head)
	return;
}

function FillAreaName(lvl,strCode,FillList,ClearList,head)
{
	var clearL;
	var response;
	var fillL;
	fillL=document.getElementById(FillList);
	if (fillL==null)
		return;
	if (ClearList!=null)
	{
		clearL=document.getElementById(ClearList);
		if (clearL!=null)
			clearL.length=0;
	}

	var response;
	response=AjaxMethod.SetLstName(lvl,strCode);
	if (lvl==3)
	fX(fillL,response,head);
	else
	flist(fillL,response,head);
	return;
}

function FillBussName(strCode,FillList,ClearList,head)
{
	var clearL;
	var response;
	var fillL;
	fillL=document.getElementById(FillList);
	if (fillL==null)
		return;
	if (ClearList!=null)
	{
		clearL=document.getElementById(ClearList);
		if (clearL!=null)
			clearL.length=0;
	}
	var response;
	response=AjaxMethod.SetBusi(strCode);
	fX(fillL,response,head)
	return;
}

function FillBusiXian(lvl,strCode,FillList,ClearList,head,BusiXian)
{
	if (BusiXian)
		FillBussName(strCode,FillList,ClearList,head);
	else
		FillAreaName(lvl,strCode,FillList,ClearList,head)
}

