<!--
//點選加入會員, 另開視窗執行會員加入程式
function member_add(vWinOpen,vWebjoin,vLink,vOpener)
{
    var x = 650;
    var y = 500;
    var vurl = "/webCs/Mem_ADD.asp?sExecAction=A&sOpenWin="+vWinOpen;

    if (typeof (vWebjoin) != "undefined") {
    	if (vWebjoin != "")  vurl = vurl +"&sCt80_Webjoin="+vWebjoin;
    }
    if (typeof (vLink) != "undefined") {
    	if (vLink != "")  vurl = vurl +"&sLink="+vLink;
    }
    if (typeof (vOpener) != "undefined") {vOpener = "";}
/*    if (vOpener == "Y") {
    var hintW = window.opener.open(vurl,"Mem","top="+(screen.Height-y-50)/2+",height="+y+",left="+(screen.Width-x)/2+",width="+x + ",scrollbars=yes" );
    }
    else
    {
    var hintW = window.open(vurl,"Mem","top="+(screen.Height-y-50)/2+",height="+y+",left="+(screen.Width-x)/2+",width="+x + ",scrollbars=yes" );
    }
    if (!hintW.opener) hintW.opener = self;
    if (hintW.focus != null) hintW.focus();*/
    if (vWinOpen == "1") {
    	var hintW = window.open("/WebCs/mem_add.asp?sOpenwin="+vWinOpen,"Mem","top="+(screen.Height-y-50)/2+",height="+y+",left="+(screen.Width-x)/2+",width="+x + ",scrollbars=yes");
    	if (!hintW.opener) hintW.opener = self;
    	if (hintW.focus != null) hintW.focus();
    } else {
    	mem_frame.innerHTML = "<iframe src='/WebCS/mem_add.asp?sExecAction=A' name='mem_id' id='mem_id' scrolling='no' frameborder='0' width='100%' height='993' marginwidth='0' marginheight='0' align='center'></iframe>"
		Fun_SetCook("Mem_Act","A");
    }
}

//點選會員登入, 另開視窗執行會員登入處理
/* vKind:
 *		L = 單純登入
 *		U = 修改資料
 *		E = e-帳戶查詢
 *		O = 訂單查詢
 *		M = 訂閱/取消電子報
 *		B = 桃園機場接駁車
 */
function member_login(vKind,vWinOpen,vWebjoin,vNextParm1,vNextParm2)
{
	var x = 500;
	var y = 150;
    var hintW;

	if (vKind != "undefined") {
		switch (vKind) {
			//訂單查詢 or 桃園機場接駁車
			case "O":
			case "B":
			case "L":
				parent.location.href="/1member/login.asp?sExecAction=" + vKind;
				Fun_SetCook("Mem_Act","00");
				break;
			//修改資料
    		case "U":
				mem_frame.innerHTML = "<iframe src='/WebCS/mem_add.asp?sExecAction=U' name='mem_id' id='mem_id' scrolling='no' frameborder='0' width='100%' height='993' marginwidth='0' marginheight='0' align='center'></iframe>"
				Fun_SetCook("Mem_Act","U");
				break;
			//e-帳戶查詢
			case "E":
				mem_frame.innerHTML = "<iframe src='/WebCS/mem_QEcash.asp' name='mem_id' id='mem_id' scrolling='no' frameborder='0' width='100%' height='500' marginwidth='0' marginheight='0' align='center'></iframe>"
				Fun_SetCook("Mem_Act","E");
				break;
			//訂閱/取消電子報
			case "M":
				mem_frame.innerHTML = "<iframe src='/WebCS/mem_cxlmail.asp?sCt80_idno=A226927787' name='mem_id' id='mem_id' scrolling='no' frameborder='0' width='100%' height='749' marginwidth='0' marginheight='0' align='center'></iframe>"
				Fun_SetCook("Mem_Act","M");
				break;
			default:
				mem_frame.innerHTML = "<iframe src='/1Member/index_0.asp' name='mem_id' id='mem_id' scrolling='no' frameborder='0' width='100%' height='721' marginwidth='0' marginheight='0' align='center'></iframe>"
				break;
		}
    } else {
    	hintW = window.open("/webCs/Mem_Login.asp","Login","scrollbars=yes,top="+(screen.Height-y)/2+",height="+y+",left="+(screen.Width-x)/2+",width="+x);
    	if (!hintW.opener) hintW.opener = self;
   		if (hintW.focus != null) hintW.focus();
	}
}

//查詢密碼
function member_pswd(vWinOpen) {
	var x = 460;
	var y = 320;
	var vurl;

	if (vWinOpen == "1") {
		x=460;
		y=363;
		vurl = "/WebCs/mem_Qpswd.asp?sOpenwin=1";
		var hintW = window.open(vurl,"Qpswd","top="+(screen.Height-y)/2+",height="+y+",left="+(screen.Width-x)/2+",width="+x);
		if (!hintW.opener) hintW.opener = self;
		if (hintW.focus != null) hintW.focus();
	} else {
		mem_frame.innerHTML = "<iframe src='/WebCS/mem_Qpswd.asp' name='mem_id' id='mem_id' scrolling='no' frameborder='0' width='100%' height='500' marginwidth='0' marginheight='0' align='center'></iframe>"
	}
}

//會員登出
function member_logout(tPath)
{
	var vurl = "/webCs/Mem_Logout.asp?sPath=" + tPath;
	var hintW = window.open(vurl, "Logout","scrollbars=no,top=0,height=10,left=0,width=10");
}

//點選呼朋引伴, 另開視窗執行呼朋引伴程式
function member_mailfriend(tUrl,tAction)
{

  var x = 350;
  var y = 200;


  if (tUrl == ""){
    var vurl ="/webCs/Mem_SendMail.asp?tellafriend=" + location.href;
  }
  else{
    var vurl ="/webCs/Mem_SendMail.asp?tellafriend=" + tUrl;
  }


  if (typeof (tAction) == "undefined") { tAction = "";}
  if (tAction != "") {vurl = vurl + "&sWebAction=" + tAction;}

  window.open(vurl,"mail","top="+(screen.Height-y)/2+",height="+y+",left="+(screen.Width-x)/2+",width="+x);
}

//加入我的最愛
function member_love()
{
  vUrl="http://"+document.domain+"/";
  window.external.AddFavorite(vUrl,'雄獅旅遊全球資訊網');
}

//會員功能
function member_func(vKind)
{
  if (typeof (vKind) != "undefined") {
	  if (vKind == "E")	location.href("/webcs/mem_Qpswd.asp");
	  if (vKind == "F")	location.href("/webcs/mem_Upswd.asp");
	  if (vKind == "C")	location.href("/webcs/mem_pswd.asp");
	  if (vKind == "ECASH")	location.href("/webcs/mem_QEcash.asp");
  }

}

//會員E-cash說明
function member_ecash(vKind)
{
//  if (typeof (vKind) == "undefined") { vKind = "";}
// if (vKind == "" ) {
    	var x = 695;
  		var y = 500;
        var vurl = "/2member/ecash/e-cash.htm";
    	window.open(vurl,"Ecash","top="+(screen.Height-y)/2+",height="+y+",left="+(screen.Width-x)/2+",width="+x+",scrollbars=yes");
  	//	var hintW = window.open(vurl,"Ecash","top="+(screen.Height-y)/2+",height="+y+",left="+(screen.Width-x)/2+",width="+x+",scrollbars=yes");
    //	if (!hintW.opener) hintW.opener = self;
    //	if (hintW.focus != null) hintW.focus();
//  }

}

function webshop(vForm) {
	if (vForm == "N") { location.href("/webcs/webshop00.asp"); }
	else {
	form.target ='_top';
	form.action = '/webcs/webshop00.asp';
	form.submit();
	}

}
// 開窗控制, Joy (目前B2e使用)
function WOpenwin(vUrl,vName,vTop,vLeft,vHight,vWidth,vParm) {
	if (typeof (vParm) == "undefined") { vParm = "scrollbars=yes"}
	var x = vTop;
	var y = vLeft;
	if (vLeft == 0) { y = (screen.Width-vWidth)/2}
	if (vTop  == 0) { x = (screen.Height-vHight)/2}
	var hintW = window.open(vUrl,vName,"top="+x+",height="+vHight+",left="+y+",width="+vWidth+","+vParm);
  	if (!hintW.opener) hintW.opener = self;
    	if (hintW.focus != null) hintW.focus();
}

// 開窗控制 Louisa (目前1China行程使用)
function CnOpenwin(vTour,vParm) {
	if (typeof (vParm) == "undefined") { vParm = "scrollbars=yes"}
	var hintW = window.open("/WebAction/WebCsex01_china.asp?sTour="+vTour,"need","top=0,left=0,height=600,width=616,"+vParm);
  	if (!hintW.opener) hintW.opener = self;
    	if (hintW.focus != null) hintW.focus();
}

//取得id元素
function fun_hotsales_getEId(tID)
{
	if(document.getElementById == null)
	{
		document.getElementById	= document.all;
	}

	if(tID == null){return null;}

	return document.getElementById(tID);
}

//hot sale的下拉選項連結
function fun_hotsales(tName)
{
	var hs_id = fun_hotsales_getEId(tName);
	for (i=1 ; i<=tName.length ; i++)
	{
		if (hs_id.selectedIndex == i)
		{
			if (hs_id.options[i].value == ''){hs_id.options[i].value='#';}
			location.href=hs_id.options[i].value;
		}
	}
}

//變換head的icon圖
function Fun_HeadPic(tSrc)
{
	fun_hotsales_getEId("Head_icon").src = tSrc;
}

//Cookie 設定
function Fun_SetCook(tName, tValue)
{
	document.cookie = tName + "=" + tValue;
	//alert(unescape(document.cookie)); 檢核用
	return true;
}

//開啟"寫信給我們"視窗
function fun_OpenWebVoc()
{
	window.open('/WebVoc/WebVccs00.asp','voc','width=450,height=572,top='+(screen.height-572)/2+',left='+(screen.width-450)/2+'');
}

//開啟新視窗聯結
function fun_OpenLink(tUrl,tName,tHeight,tWidth,tScroll,tResize,tStatus)
{
	var tAttr = "";
	tAttr = 'width=' + tWidth + ',height=' + tHeight + ',top=' + (screen.Height-tHeight)/2 + ',left=' + (screen.width-tWidth)/2;
	if (tScroll == "yes") {
		tAttr += ',scrollbars=' + tScroll;
	} else {
		tAttr += ',scrollbars=no';
	}
	if (tResize == "yes") {
		tAttr += ',resizable=' + tResize;
	} else {
		tAttr += ',resizable=no';
	}
	if (tStatus == "yes") {
		tAttr += ',status=' + tStatus;
	} else {
		tAttr += ',status=no';
	}
	window.open(tUrl, tName, tAttr);
}
//-->