// only user themesz
function pulogion(f)
{
	if (f.account.value.length < 1)	{	alert("請輸入帳號");f.account.focus();return false;};
	data = f.account.value.match(/^\S+@\S+\.\S+$/);
	if (!data || !f.account.value)	{	alert("Email格式錯誤");f.account.focus();return false;};
	if (f.password.value=="") {	alert("請輸入密碼");f.password.focus();return false;};
	
}

function askpsw(f)
{
		if (f.account.value.length < 1) {	alert("請輸入您申請的帳號(mail)查詢");f.account.focus();return false;};
		data = f.account.value.match(/^\S+@\S+\.\S+$/);
		if (!data || !f.account.value)	{	alert("Email格式錯誤");f.account.focus();return false;};
		
		g="/web/PUM?command=askpsw&account="+f.account.value
		open(g,'DescPopup','location=no,scrollbars=no,menubars=no,toolbars=no,resizable=no,left=100,top=100,width=350,height=150')
}


function s_find(id)
{
		for (i=0;i<3;i++)
			{
				j=i+1;document.getElementById('find'+j).className="find_1";	document.getElementById('search_type'+j).className="search_type";	
				
			}
			j=id+1;	
		document.getElementById('find'+j).className="find_0";document.getElementById('search_type'+j).className="search_type2";
		
		var F=document.keywordserch
		
		
		switch(F,id)
	{
		/*找景點*/
		case 0:
			
			F.action="/web/Topic";
			F.command.value="";
		
		break;
		
		/*找活動*/
		case 1:			
			F.action="/web/Message";
			F.command.value="ByC";
		break;
		
		/*找商品*/
		case 2:
			F.action="/web/MdFront";
			F.command.value="mallSearch";
		break;
		
		default:document.getElementById('search_keyword').value="";
	}
	
	
}

function keyword_serch(f)
{
		if (f.keyword.value=="")
		{
				alert("請輸入關鍵字");f.keyword.focus();return false;
		}
}





var nypageiframeids=["nypageiframe"];
var nypageiframehide="yes";
    function nypageresizeCaller() {
   var dynnypageiframe=new Array()
   for (i=0; i < nypageiframeids.length; i++){
      if (document.getElementById)
          resizenypageiframe(nypageiframeids[i])
      if ((document.all || document.getElementById) && nypageiframehide=="no"){
          var tempobj=document.all? document.all[nypageiframeids[i]] : document.getElementById(nypageiframeids[i])
          tempobj.style.display="block";
          }
      }
}

function resizenypageiframe(frameid){
   var iframecurrentfr=document.getElementById(frameid)
   if (iframecurrentfr && !window.opera){
       iframecurrentfr.style.display="block";
     if (iframecurrentfr.contentDocument && iframecurrentfr.contentDocument.body.offsetHeight)
      { iframecurrentfr.height = iframecurrentfr.contentDocument.body.offsetHeight; //ns6 syntax
      }else if (iframecurrentfr.Document && iframecurrentfr.Document.body.scrollHeight)
      { iframecurrentfr.height = iframecurrentfr.Document.body.scrollHeight;//ie5+ syntax
      }
     if (iframecurrentfr.contentDocument && iframecurrentfr.contentDocument.body.offsetWidth)
      { iframecurrentfr.width = iframecurrentfr.contentDocument.body.offsetWidth; //ns6 syntax
     }else if (iframecurrentfr.Document && iframecurrentfr.Document.body.scrollWidth)
       { iframecurrentfr.width = iframecurrentfr.Document.body.scrollWidth;//ie5+ syntax
       }
     if(iframecurrentfr.addEventListener)
      {  iframecurrentfr.addEventListener("load", readjustnypageiframe, false);
     }else if (iframecurrentfr.attachEvent){
           iframecurrentfr.detachEvent("onload", readjustnypageiframe); 
           iframecurrentfr.attachEvent("onload", readjustnypageiframe);
          }
      }
  }

function readjustnypageiframe(loadevt) {
  var crossevt=(window.event)? event : loadevt;
  var nypageiframeroot=(crossevt.currentTarget)? crossevt.currentTarget : crossevt.srcElement;
  if (nypageiframeroot)
    resizenypageiframe(nypageiframeroot.id);
  }

function loadintonypageiframe(nypageiframeid, url){
   if (document.getElementById)
  document.getElementById(nypageiframeid).src=url;
}

if (window.addEventListener)
    window.addEventListener("load", nypageresizeCaller, false);
else if (window.attachEvent)
    window.attachEvent("onload", nypageresizeCaller);
else
    window.onload=nypageresizeCaller;