// 
function openWin(winHtml)
{
var options='toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=no,width=450,height=300';
window.open(winHtml,'mywin',options);
}

var congratulation;
var myinterval;

function openFlash()
{
window.open('happy.htm','happy','width=468,height=330,toolbar=0,location=0,directories=0,menubar=0,scrollbars=0,resizable=0,status=0');
myInterval=setInterval('moveImage()',100);
}


function moveImage(){
	congratulation=document.all["congratulation"];
	
	y=congratulation.style.posTop ;
 	congratulation.style.posTop-=10;
	if (y<-2000){
		window.clearInterval(myInterval);
	}
}




//
var currentBar=1;

function clickBar(barNum){
	
	clearBar(currentBar);
	renderBar(barNum);
	currentBar=barNum;
	
	
}
function clearBar(barNum){
	
	var barName="bar"+barNum;
	var oldBar1=document.all[barName];
	barName="bar"+(barNum+1);
	var oldBar2=document.all[barName];
	
	oldBar1.style.background="#DBDADA";
	oldBar2.style.background="#DBDADA";
	
}


function renderBar(barNum){
	
	var barName="bar"+barNum;
	var newBar1=document.all[barName];
	barName="bar"+(barNum+1);
	var newBar2=document.all[barName];
	
	newBar1.style.background="#C0C0C0";
	newBar2.style.background="#C0C0C0";
	
	
}


function moveOverBar(barNum){
	
	
	var imageName="image"+barNum;
	
	var image=document.all[imageName];
	image.src="../images/pic-02.gif";
	
}

function moveOutBar(barNum){
	
	var imageName="image"+barNum;
	
	var image=document.all[imageName];
	image.src="../images/pic-01.gif";
	
	
}
function mouseOverMar(){
	
	
	var mar=document.all["mar1"];
	mar.scrollAmount=0;
	
}

function mouseOutMar(){
	
	var mar=document.all["mar1"];
	mar.scrollAmount=1;
	
	
}

window.name="_current_Dest_Home_Page";
function _setURL(obj)
{
var itemIndex,targetURL,targetName,currentURL;
var pi,i,tempx,parmList;
itemIndex=obj.selectedIndex;
targetURL=obj.options(itemIndex).value;
targetName=obj.options(itemIndex).text;
targetName=encodeURIComponent(targetName);
currentURL=window.location.href;
if (currentURL.lastIndexOf("?")!=-1) 
    {
     pi=currentURL.lastIndexOf("?")+1;
     tempx=currentURL.substr(pi);
     parmList=tempx.split("&");
     currentURL=currentURL.substr(0,pi-1)+"?from_dest="+targetName;
     for(i=0;i<parmList.length;i++) if(parmList[i].indexOf("from_dest=")==-1)  currentURL=currentURL+"&"+parmList[i];
    }
   else
    currentURL=currentURL+"?from_dest="+targetName;

window.location.replace(currentURL);
}
function setdefaultSelected()
{
var i
var defdest_name="陕西";
var obj=document.all.item("_select_Province");
for (i=0; i<obj.options.length; i++)
 {
  if (obj.options(i).text==defdest_name) obj.selectedIndex=i;
 }
}

function _doQuery()
{
var keywords,Sotrip_queryPath;
var _sotrip_Qey_win;

Sotrip_queryPath="/tour/newsotrip/system/modules/com.sotrip.test//elements/sotrip_treequery.jsp";
keywords=document.all.item("_toGo_dest").value;
if(keywords.length==0) 
 {
  alert("请输入您要到达的目的地名称!")
  return;
 }

//if (window.confirm("与 ["+keywords+"] 相关目的地搜索将需要较长地时间,您要继续吗?")==true)
//  {
   keywords = encodeURIComponent(keywords);
   Sotrip_queryPath=Sotrip_queryPath+"?todestname="+keywords+"&winobj="+window.name;
   _sotrip_Qey_win=openWin(Sotrip_queryPath);
//  }
//  else
//   return;

}