function checkinfopage(page,classid)
{
  if (document.getElementById("page").value=="")
     {
       alert('请输入页码!');
       document.getElementById("page").focus();
       return true;
     }
     else
     {
        window.location=page+"?page="+document.getElementById("page").value+"&classid="+classid;
     }
}

function checkinfopage1(page,url)
{
  if (document.getElementById("page").value=="")
     {
       alert('请输入页码!');
       document.getElementById("page").focus();
       return true;
     }
     else
     {
        window.location=page+"?page="+document.getElementById("page").value+"&"+url;
     }
}

function loginurl()
{
    //window.location="/login.aspx?url="+window.location
    window.location="/login.aspx";
}

function regurl()
{
    //window.location="/Register.aspx?url="+window.location
    window.location="/Register.aspx";
}

function doZoom(size){ 
document.getElementById('zoom').style.fontSize=size+'px'
} 

function showcode(o){
 //重载验证码
  var timenow = new Date().getTime();
 o.src="/include/ValidateCode.aspx?d="+timenow;
}

function addcitys(obj)
{
    var obj=document.getElementsByName("citys");
    var cl =obj.length;
    var sc ="";
    for(var ii=0;ii<cl;ii++){
        if(obj[ii].checked)sc=sc+obj[ii].value+",";
    }
	
    var ocity=document.form1.ocity.value;
    for(ii=0;ii<cl;ii++){
      if(ocity.indexOf(document.form1.citys[ii].value)!=-1)opener.document.form1.citys[ii].checked=true;
    }
   
	document.form1.citysmore.value=sc+document.form1.ocity.value;
}

    function item_popup() { 
		var imgwin = window.open("/tour/cityssel.aspx",'WIN','scrollbars=no,status=no,toolbar=no,resizable=1,location=no,menu=no,width=540,height=450'); 
		imgwin.focus(); 
	} 

function searchtour()
{
    var citysmore=document.form1.citysmore.value;
    if (citysmore=="")citysmore=" ";
    var keyword=document.form1.keyword.value;
    if (keyword=="")keyword=" ";
    window.location="/ChinaTourClass-"+document.getElementById('left_tourtype').value+"-1-"+document.form1.days.value+"-"+citysmore+"-"+keyword+"/";
}
function searchhotel()
{
    var keyword=document.getElementById('search_keyword').value;
    if (keyword=="")keyword=" ";
    window.location="/HotelSearch-0-1-"+document.getElementById('search_cityid').value+"-"+document.getElementById('search_starid').value+"-"+document.getElementById('search_indate').value.replace('-','|').replace('-','|')+"-"+document.getElementById('search_outdate').value.replace('-','|').replace('-','|')+"-"+keyword+"/";
}
function searchfaq()
{
    var keyword=document.getElementById('faqkeyword').value;
    if (keyword=="")keyword=" ";
    window.location="/faq-0-1-"+keyword+".html";
}
function orderhotrl()
{
    var roomid=0;
    var obj=document.getElementsByName("roomid");
    if (obj)
    {
    var cl =obj.length;
    for(var i=0;i<cl;i++){
        if(obj[i].checked)roomid=obj[i].value;
    }
    }
    if (roomid==0)
    {
    alert('Rooms have no choice!');
    return;
    }
    window.location="/Hotel/order-"+roomid+"-"+document.getElementById('indate').value.replace('-','|').replace('-','|')+"-"+document.getElementById('outdate').value.replace('-','|').replace('-','|')+"-"+document.getElementById('roomnumber').value+"-"+document.getElementById('ExtraBed').value+".html";
}