﻿// JScript 檔

   function choiceHTL(SelectModel)
        {
            window.open('http://www.travel4u.com.tw/Calendars/calendar.aspx?SelectModel='+SelectModel,'','scrollbars=no,location=no,directories=no,status=no,toolbar=no,resizable=no,menubar=no,resizable=no,width=430,height=200,top=450,left=600');
        }   
         function searchGroup(){
		    var msg;
			var continent;
			var StartDate;
			var EndDate;
			var ROUT;
			var day; 
	        if (document.getElementById("Oversea_startdate").value != "" && document.getElementById("Oversea_enddate").value != ""){
	            continent = document.getElementById("Overseas").value; 
	            StartDate = document.getElementById("Oversea_startdate").value;
				EndDate = document.getElementById("Oversea_enddate").value;
				day = document.getElementById("day1").value;
				var goPlace0 = document.form1.rdo2(0).checked
        			var goPlace1 = document.form1.rdo2(1).checked
			if (goPlace0!=""){
				ROUT ="TPE" 
			}		
			if (goPlace1!=""){
				ROUT ="KHH"  
			}	
				//ROUT = document.getElementById("rdo2").value;
				if (continent == "BITN_CD=N0535" || continent == "BITN_CD=N0534" || continent == "BITN_CD=N6001")
				{
				location.href =  "/oversea/list_custom.aspx?StartDate=" + StartDate + "&EndDate=" + EndDate + "&day=" + day + "&"+ continent; 
				}else{
				location.href =  "/oversea/list_custom.aspx?StartDate=" + StartDate + "&EndDate=" + EndDate + "&ROUT=" + ROUT + "&day=" + day +"&"+ continent; 
				}	
	        }else{
	            alert("請輸入起迄日期 !");
	           return false; 
	        }
        }	
        function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}
function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}
function formHandler(form)
            {
                var URL = document.form1.ES_Email.value;
                var intelm;
                var strreg = /^\w+((-\w+)|(\.\w+))*\@[A-Za-z0-9]+((\.|-)[A-Za-z0-9]+)*\.[A-Za-z0-9]+$/;
                intelm = document.form1.ES_Email.value.search(strreg);
                if(intelm == -1)
                    {
                      intelm = false;
                      window.alert('MAIL格式不正確'); 
                    }
                else
                    {
                       intelm = true;
                       popup = location.href("/member/choose.asp?ES_Email="+URL);
                    }
            }