﻿
GenSearchArea=function(parentId,searchType,sKind,sWidth)
{fCrtFrom=function(oTB)
{oSel=create("SELECT");oSel.className="search";oSel.id="depcity_"+searchType;if(sKind=="S")
{oRow=oTB.insertRow(oTB.rows.length);oCell=oRow.insertCell(oRow.cells.length);oCell.className="main_text01";oCell.appendChild(oSel);}
else if(sKind=="B")
{oRow=oTB.insertRow(oTB.rows.length);oCell=oRow.insertCell(oRow.cells.length);oCell.className="main_text01";oCell.appendChild(fCrtBImage());oCell.appendChild(text("出發地:"));oCell.appendChild(oSel);}
else if(sKind=="H")
{oRow=oTB.insertRow(oTB.rows.length);oCell=oRow.insertCell(oRow.cells.length);oCell.appendChild(text("旅遊地區: "));oCell.className="text0001";var tmp,tmpTag,tmpStr;for(var i=0;i<lstSearch.length;++i)
{tmp=lstSearch[i].split(",");tmpTag=create("SPAN");if(i!=0){oCell.appendChild(text("｜"));}
eval("tmpTag.onclick = function() { switchSearch('"+tmp[0]+"'); };");tmpTag.style.cursor="pointer";switch(tmp[1])
{case"DS":tmpStr="國內";break;case"OS":tmpStr="國外";break;default:tmpStr="";}
tmpTag.appendChild(text(tmpStr));oCell.appendChild(tmpTag);}
oRow=oTB.insertRow(oTB.rows.length);oCell=oRow.insertCell(oRow.cells.length);oCell.appendChild(text("出發地:"));oCell.appendChild(oSel);oCell.className="text0001";oRow=oTB.insertRow(oTB.rows.length);oCell=oRow.insertCell(oRow.cells.length);}
else if(sKind=="HL")
{oRow=oTB.insertRow(oTB.rows.length);oCell=oRow.insertCell(oRow.cells.length);if(typeof(lstSearch)!="undefined"&&lstSearch.length!=0)
{oCell.appendChild(text("旅遊地區: "));oCell.className="text0001";var tmp,tmpTag,tmpStr;for(var i=0;i<lstSearch.length;++i)
{tmp=lstSearch[i].split(",");tmpTag=create("SPAN");if(i!=0){oCell.appendChild(text("｜"));}
eval("tmpTag.onclick = function() { switchSearch('"+tmp[0]+"'); };");tmpTag.style.cursor="pointer";switch(tmp[1])
{case"DS":tmpStr="國內";break;case"OS":tmpStr="國外";break;default:tmpStr="";}
tmpTag.appendChild(text(tmpStr));oCell.appendChild(tmpTag);}}
oCell=oRow.insertCell(oRow.cells.length);oCell.appendChild(text("出發地:"));oCell.className="text0001";oCell=oRow.insertCell(oRow.cells.length);oCell.appendChild(oSel);}
switch(searchType)
{case"DS":case"DSR":aOpts.push(["TPE","不限"]);oSel.disabled=true;break;case"TK":case"OS":aOpts.push(["TPE","台北"]);aOpts.push(["KHH","高雄"]);break;case"KHH":aOpts.push(["KHH","高雄"]);oSel.disabled=true;break;default:return false;}
for(var i=0;i<aOpts.length;++i)
{var opt=create("OPTION");oSel.appendChild(opt);opt.value=aOpts[i][0];opt.text=aOpts[i][1];}};fCrtCAC=function(oTB)
{var wCountry,wTkRegion,wTkCountry,wTkCity;if(sKind=="S")
{oRow=oTB.insertRow(oTB.rows.length);oCell=oRow.insertCell(oRow.cells.length);oCell.className="main_text01";oCell.appendChild(text("目的地:"));oCell=oRow.insertCell(oRow.cells.length);}
else if(sKind=="B")
{if(searchType=="TK")
{oRow=oTB.insertRow(oTB.rows.length);oCell=oRow.insertCell(oRow.cells.length);oCell.appendChild(fCrtBImage());oCell=oRow.insertCell(oRow.cells.length);oCell.appendChild(text("航段"));oCell.appendChild(lstTkRS=fCrtAreaSelect("TkRS",0));lstTkRS.remove(0);var oOpt=create("OPTION");oOpt.text="來回";oOpt.value="R";lstTkRS.add(oOpt);oOpt=create("OPTION");oOpt.text="單程";oOpt.value="S";lstTkRS.add(oOpt);oCell.className="main_text01";}
oRow=oTB.insertRow(oTB.rows.length);oCell=oRow.insertCell(oRow.cells.length);oCell.appendChild(fCrtBImage());oCell.appendChild(text("旅遊地區:"));oCell.className="main_text01";oRow=oTB.insertRow(oTB.rows.length);oCell=oRow.insertCell(oRow.cells.length);}
else if(sKind=="H")
{var oImg=fCrtImg(getPrefixPath()+"images/line.gif");oImg.style.width="138px";oRow=oTB.insertRow(oTB.rows.length);oCell=oRow.insertCell(oRow.cells.length);oCell.appendChild(oImg);oRow=oTB.insertRow(oTB.rows.length);oCell=oRow.insertCell(oRow.cells.length);oCell.appendChild(text("目的地:"));oCell.className="text0001";oRow=oTB.insertRow(oTB.rows.length);oCell=oRow.insertCell(oRow.cells.length);}
else if(sKind=="HL")
{oCell=oRow.insertCell(oRow.cells.length);oCell.appendChild(text("目的地:"));oCell.className="text0001";oCell=oRow.insertCell(oRow.cells.length);}
else if(sKind=="")
{oRow=oTB.insertRow(oTB.rows.length);oCell=oRow.insertCell(oRow.cells.length);}
else if(sKind=="_DS"||sKind=="_OS")
{oRow=oTB.insertRow(oTB.rows.length);oCell=oRow.insertCell(oRow.cells.length);}
switch(searchType)
{case"DS":if(sKind=="H"||sKind=="HL")
{oCell.appendChild(lstDomArea=fCrtAreaSelect("DomArea"));oCell.appendChild(text(" "));oCell.appendChild(lstDomCity=fCrtAreaSelect("DomCity"));}
else
{oCell.appendChild(lstDomArea=fCrtAreaSelect("DomArea"));if(sKind!=""){oCell.appendChild(create("BR"));}
oCell.appendChild(lstDomCity=fCrtAreaSelect("DomCity"));}
break;case"DSR":oCell.appendChild(lstDomArea=fCrtAreaSelect("DomArea"));oCell.appendChild(create("BR"));oCell.appendChild(lstDomCity=fCrtAreaSelect("DomCity"));oCell.appendChild(create("BR"));oCell.appendChild(lstDomHtl=fCrtAreaSelect("DomHtl"));break;case"OS":case"KHH":oCell.appendChild(lstCountry=fCrtAreaSelect("Country"));if(sKind!="HL"&&sKind!=""){oCell.appendChild(create("BR"));}
oCell.appendChild(lstArea=fCrtAreaSelect("Area"));if(sKind!="HL"&&sKind!=""){oCell.appendChild(create("BR"));}
oCell.appendChild(lstCity=fCrtAreaSelect("City"));break;case"TK":oCell.appendChild(lstTkRegion=fCrtAreaSelect("Region"));oCell.appendChild(create("BR"));oCell.appendChild(lstTkCountry=fCrtAreaSelect("Country"));oCell.appendChild(create("BR"));oCell.appendChild(lstTkCity=fCrtAreaSelect("City"));break;case"":oCell.appendChild(lstCountry=fCrtAreaSelect("Country"));oCell.appendChild(lstArea=fCrtAreaSelect("Area"));oCell.appendChild(lstCity=fCrtAreaSelect("City"));break;default:return false;}
if(lstDomArea)lstDomArea.options[0].text="--選擇地區--";if(lstDomCity)lstDomCity.options[0].text="--選擇城市--";if(lstCountry)lstCountry.options[0].text="--選擇國家--";if(lstArea)lstArea.options[0].text="--選擇地區--";if(lstCity)lstCity.options[0].text="--選擇城市--";if(searchType=="TK")
{oRow=oTB.insertRow(oTB.rows.length);oCell=oRow.insertCell(oRow.cells.length);oCell.appendChild(fCrtBImage());oCell=oRow.insertCell(oRow.cells.length);oCell.appendChild(text("航空公司"));oCell.appendChild(lstTkAir=fCrtAreaSelect("Air",0));oCell.className="main_text01";}};fCrtCalendar=function(oTB)
{if(sKind=="S")
{oRow=oTB.insertRow(oTB.rows.length);oCell=oRow.insertCell(oRow.cells.length);oCell.className="main_text01";oCell.appendChild(text("出發日期:"));oCell=oRow.insertCell(oRow.cells.length);oCell.appendChild(fCrtShowDate());oCell.appendChild(fCrtSearchBtn(chkSubmit,getPrefixPath()+"images/search_go2.gif"));}
else if(sKind=="B")
{oRow=oTB.insertRow(oTB.rows.length);oCell=oRow.insertCell(oRow.cells.length);oCell.appendChild(fCrtBImage());oCell.appendChild(text("出團日期:"));oCell.className="main_text01";oRow=oTB.insertRow(oTB.rows.length);oCell=oRow.insertCell(oRow.cells.length);oCell.appendChild(fCrtShowDate());oRow=oTB.insertRow(oTB.rows.length);oCell=oRow.insertCell(oRow.cells.length);oCell.appendChild(fCrtSearchBtn(chkSubmit,getPrefixPath()+"images/search_go2.gif"));}
else if(sKind=="H")
{var oImg=fCrtImg(getPrefixPath()+"images/line.gif");oImg.style.width="138px";oRow=oTB.insertRow(oTB.rows.length);oCell=oRow.insertCell(oRow.cells.length);oCell.appendChild(oImg);oRow=oTB.insertRow(oTB.rows.length);oCell=oRow.insertCell(oRow.cells.length);oCell.appendChild(text("出發日期"));oCell.className="text0001";oRow=oTB.insertRow(oTB.rows.length);oCell=oRow.insertCell(oRow.cells.length);oCell.appendChild(fCrtShowDate());oRow=oTB.insertRow(oTB.rows.length);oCell=oRow.insertCell(oRow.cells.length);oCell.appendChild(fCrtSearchBtn(chkSubmit,getPrefixPath()+"images/search_go2.gif"));}
else if(sKind=="HL")
{oCell=oRow.insertCell(oRow.cells.length);oCell.appendChild(text("出發日期"));oCell.className="text0001";oCell=oRow.insertCell(oRow.cells.length);oCell.appendChild(fCrtShowDate());oCell=oRow.insertCell(oRow.cells.length);oCell.appendChild(fCrtSearchBtn(chkSubmit,getPrefixPath()+"images/s-icon.gif"));}};fCrtAreaSelect=function(sIdx)
{sWidth=typeof(sWidth)=="undefined"?120:sWidth;if(sIdx.length<1){return;}
var oSel=create("SELECT");oSel.appendChild(create("OPTION"));oSel.clssName="search";oSel.id="lst_"+searchType+"_"+sIdx;if(sWidth>0){oSel.style.width=sWidth+"px";}
return oSel;};fCrtShowDate=function()
{var oSpan,sLink,eLink,oImg;oSpan=create("SPAN");sTxt=create("INPUT");sLink=create("A");oImg=create("IMAGE");sTxt.type="text";sTxt.readOnly=true;sTxt.id=searchType+"_startD";sTxt.size=6;sTxt.value=getDateFormat("m_0");eTxt=sTxt.cloneNode(false);eTxt.id=searchType+"_endD";eTxt.value=getDateFormat("m_2");eLink=sLink.cloneNode(true);crtCalendar1(sLink,sTxt);crtCalendar1(eLink,eTxt);if(sKind=="B")
{oSpan.appendChild(sTxt);oSpan.appendChild(sLink);oSpan.appendChild(eTxt);oSpan.appendChild(eLink);}
else
{oSpan.appendChild(sTxt);oSpan.appendChild(sLink);oSpan.appendChild(text(" "));oSpan.appendChild(eTxt);oSpan.appendChild(eLink);}
oSpan.className="search";oSpan.id=searchType+"_showDate";return oSpan;};fCrtSearchBtn=function(fncSubmit,imgSrc)
{var oImg=create("IMAGE");oImg.src=imgSrc;oImg.style.cursor="pointer";oImg.onclick=fncSubmit;return oImg;};fCrtImg=function(url)
{var oImg=create("IMAGE");oImg.src=url;return oImg;};chkSubmit=function()
{var sendData;var depCity;if(trim(sTxt.value)=="")
{alert("請選擇 [開始日期]");startD.popup(null);return;}
if(trim(eTxt.value)=="")
{alert("請選擇 [結束日期]");endD.popup(null);return;}
depCity=get("depcity_"+searchType);switch(searchType)
{case"DS":oFrm.action=getPrefixPath()+"Tour/TourList.aspx";if(lstDomArea.selectedIndex<1)
{alert("請選擇");lstDomArea.focus();return;}
if(lstDomCity.selectedIndex<1)
{alert("請選擇");lstDomCity.focus();return;}
sendData=depCity.value+"^"+lstDomArea.value+"^"+lstDomCity.value+"^"+sTxt.value+"^"+eTxt.value+"^Y";break;case"DSR":oFrm.action="/28688634A/SET_HTL/HTL_List.aspx";if(lstDomArea.selectedIndex<1)
{alert("請選擇");lstDomArea.focus();return;}
if(lstDomCity.selectedIndex<1)
{alert("請選擇");lstDomCity.focus();return;}
sendData=lstDomCity.value+"^"+lstDomHtl.value+"^"+sTxt.value+"^"+eTxt.value;break;case"OS":case"KHH":oFrm.action=getPrefixPath()+"Tour/TourList.aspx";if(lstCountry.selectedIndex<1)
{alert("請選擇");lstCountry.focus();return;}
if(lstArea.selectedIndex<1)
{alert("請選擇");lstArea.focus();return;}
if(lstCity.selectedIndex<1)
{alert("請選擇");lstCity.focus();return;}
sendData=depCity.value+"^"+lstCountry.value+"^"+lstCity.value+"^"+sTxt.value+"^"+eTxt.value+"^N";break;case"TK":oFrm.action="./Ticket/tkt_List.aspx";if(lstTkRegion.selectedIndex<1)
{alert("請選擇");lstTkRegion.focus();return;}
if(lstTkCountry.selectedIndex<1)
{alert("請選擇");lstTkCountry.focus();return;}
if(lstTkCity.selectedIndex<1)
{alert("請選擇");lstTkCity.focus();return;}
sendData=depCity.value+"^"+lstTkCity.value+"^"+lstTkAir.value+"^"+lstTkRS.value+"^"+sTxt.value+"^"+eTxt.value;break;default:return;}
searchD.value=sendData;oFrm.submit();};fCrtBImage=function()
{var oImg=create("IMAGE");oImg.src=getPrefixPath()+"images/overseas-travels/iron.GIF"
return oImg;};GenSearchArea_Init=function()
{var oParent=get(parentId);if(!oParent){alert(parentId+" Not Found!!");return false;}
oFrm=create("FORM");oParent.appendChild(oFrm);oFrm.id="frmSearch"+searchType;oFrm.method="POST";searchD=create("INPUT");searchD.type="hidden";oFrm.appendChild(searchD);searchD.id=searchType+"_searchD";searchD.name="searchD";var oTab=create("TABLE");oParent.appendChild(oTab);if(sKind=="S"){oTab.style.width="370px";}
else if(sKind=="B"){oTab.style.width="153px";}
else if(sKind=="H"){oTab.style.width="153px";}
else if(sKind=="HL"){oTab.align="center";}
fCrtFrom(oTab);fCrtCAC(oTab);fCrtCalendar(oTab);fCrtCAC_Events();};GenListArea_Init=function()
{var oParent=get(parentId);if(!oParent){alert(parentId+" Not Found!!");return false;}
var oTab=create("TABLE");oParent.appendChild(oTab);fCrtCAC(oTab);fCrtCAC_Events();};var lstCountry,lstArea,lstCity,lstDomArea,lstDomCity,lstDomHtl,lstTkRegion,lstTkCountry,lstTkCity;var lstTkRS,lstTkAir;var oFrm,searchD;var aOpts=new Array();var oRow,oCell,oSel;var sTxt,eTxt,startD,endD;if(searchType==""||sKind==""){GenListArea_Init();}
else{GenSearchArea_Init();}};GetAreaData=function(sType,sIdx,sObjId,selValue)
{if(!http_request)
{alert('Giving up :( Cannot create an XMLHTTP instance');return false;}
var sUrl,frmDB;switch(sType)
{case"DS":case"DSR":if(sIdx=="Area")
{sUrl=getPrefixPath()+"includes/dog.aspx?bone=1";}
else if(sIdx=="City")
{sUrl=getPrefixPath()+"includes/dog.aspx?bone=2&typ="+selValue;}
else if(sIdx=="Htl")
{sUrl=getPrefixPath()+"includes/dog.aspx?bone=3";}
else
{return;}
break;case"OS":case"KHH":if(sIdx=="Country")
{sUrl=getPrefixPath()+"includes/dog.aspx?bone=4";}
else if(sIdx=="Area")
{sUrl=getPrefixPath()+"includes/dog.aspx?bone=5&typ="+selValue;}
else if(sIdx=="City")
{sUrl=getPrefixPath()+"includes/dog.aspx?bone=6&typ="+selValue;}
else
{return;}
break;case"TKT":if(sIdx=="Region")
{sUrl="includes/dog.aspx?bone=7";}
else if(sIdx=="Country")
{sUrl="includes/dog.aspx?bone=8&typ="+selValue;}
else if(sIdx=="City")
{sUrl="includes/dog.aspx?bone=9&typ="+selValue;}
else if(sIdx=="AirLine")
{sUrl="includes/dog.aspx?bone=10";}
break;case"":if(sIdx=="Country")
{sUrl=getPrefixPath()+"includes/dog.aspx?bone=4";}
else if(sIdx=="Area")
{sUrl=getPrefixPath()+"includes/dog.aspx?bone=5&typ="+selValue;}
else if(sIdx=="City")
{sUrl=getPrefixPath()+"includes/dog.aspx?bone=6&typ="+selValue;}
else
{return;}
break;default:return false;}
http_request.open("Get",sUrl,false);http_request.send(null);if(http_request.readyState==4&&http_request.status==200)
{frmDB=http_request.responseText;replaceList(frmDB,sObjId);}};function replaceList(data,destId)
{if(data=="$searchD=]"){return false;}
eval(data);if(destId.slice(-3)=="TKT")
if($searchD[0][1]=="< 不限 >")
{$searchD.shift();}
var dObj=get(destId);while(dObj.length>1)
{dObj.remove(1);}
var oOpt;for(var i=0;i<$searchD.length;++i)
{oOpt=create("OPTION");oOpt.text=$searchD[i][$searchD[i].length-1];for(var j=0;j<$searchD[i].length-1;++j)
{oOpt.value+=$searchD[i][j];}
dObj.add(oOpt);}};var lstSearch=new Array();function fCrtSwitchSearch()
{if(lstSearch.length<1){return;}
var tmp;for(var i=0;i<lstSearch.length;++i)
{tmp=lstSearch[i].split(",");GenSearchArea(tmp[0],tmp[1],tmp[2],tmp[3]);}
switchSearch(lstSearch[1].split(",")[0]);};function switchSearch(lstId)
{var obj;for(var i=0;i<lstSearch.length;++i)
{obj=get(lstSearch[i].split(",")[0]);if(obj){obj.style.display="none";}}
obj=get(lstId);if(obj){obj.style.display="inline";}};fCrtCAC_Events2=function(ArrsType)
{for(var k=0;k<ArrsType.length;++k)
{var sType,ids_arr,idx_arr;sType=ArrsType[k]
switch(sType)
{case"DS":ids_arr=["lstArea_DS","lstCity_DS"];idx_arr=["City"];break;case"DSR":ids_arr=["lstArea_DSR","lstCity_DSR"];idx_arr=["City"];break;case"TKT":ids_arr=["lstRegion_TKT","lstCountry_TKT","lstCity_TKT"];idx_arr=["Country","City"];break;default:case"KHH":ids_arr=["lstCountry_OS","lstArea_OS","lstCity_OS"];idx_arr=["Area","City"];break;}
for(var i=0;i<ids_arr.length-1;++i)
{var o=get(ids_arr[i]);o.typ=sType;o.idx=idx_arr[i];o.oid=ids_arr[i+1];o.onchange=function()
{GetAreaData(this.typ,this.idx,this.oid,this.value);if(item("arriveCityCode")&&this.idx=="City")
{get(this.oid).options.remove(1);}}
if(ids_arr[i]=="lstArea_DS"){o.options[0].text="-- 請選擇 --";}
if(ids_arr[i]=="lstCountry_OS"){o.options[0].text="-- 請選擇 --";}
if(ids_arr[i]=="lstArea_OS"){o.options[0].text="-- 請選擇 --";}}
var o=get("lstCity_DS");o.options[0].text="-- 請選擇 --";if(item("arriveCityCode"))
{o.onchange=function()
{item("arriveCityCode").value=this.value;if(this.value=="")
{item("arriveCity").value="";}
else
{item("arriveCity").value=this.options[this.selectedIndex].text;}};}
o=get("lstCity_OS");o.options[0].text="-- 請選擇 --";if(item("arriveCityCode"))
{o.onchange=function()
{item("arriveCityCode").value=this.value;if(this.value=="")
{item("arriveCity").value="";}
else
{item("arriveCity").value=this.options[this.selectedIndex].text;}};}}};getDateFormat=function(n)
{var d=new Date();var typ=n.split("_")[0];var num=parseInt(n.split("_")[1]);return shiftDate(d,typ,num);};shiftDate=function(o,t,i)
{var y=0,m=0,d=0;if(t=="y"){y=i;}
else if(t=="m"){m=i;}
else if(t=="d"){d=i;}
o.setYear(o.getYear()+y);o.setMonth(eval(o.getMonth()+m));o.setDate(o.getDate()+d);return o.getYear()+"/"+FILL(eval(o.getMonth()+1),2)+"/"+FILL(o.getDate(),2);};chkSubmit2=function(searchType)
{var sendData;var depCity;var zAction;if(trim(get("dtStart").value)=="")
{alert("請選擇 [開始日期]");return;}
if(trim(get("dtEnd").value)=="")
{alert("請選擇 [結束日期]");return;}
var depCity=get("depcity_"+searchType);var oCountry=get("lstCountry_"+searchType);var oArea=get("lstArea_"+searchType);var oCity=get("lstCity_"+searchType);var oHTL=get("lstHTL_"+searchType);var oStart=get("dtStart");var oEnd=get("dtEnd");switch(searchType)
{case"DS":zAction=getPrefixPath()+"Tour/TourList.aspx";if(oArea.selectedIndex<1)
{alert("請選擇");oArea.focus();return;}
if(oCity.selectedIndex<1)
{alert("請選擇");oCity.focus();return;}
sendData=depCity.value+"^"+oArea.value+"^"+oCity.value+"^"+oStart.value+"^"+oEnd.value+"^Y";break;case"DSR":zAction=getPrefixPath()+"HTL/HTLlist.aspx";if(oArea.selectedIndex<1)
{alert("請選擇");oArea.focus();return;}
if(oCity.selectedIndex<1)
{alert("請選擇");oCity.focus();return;}
sendData=oCity.value+"^"+oArea.value+"^"+oHTL.value+"^"+oStart.value+"^"+oEnd.value;break;case"OS":case"KHH":zAction=getPrefixPath()+"Tour/TourList.aspx";if(oCountry.selectedIndex<1)
{alert("請選擇");oCountry.focus();return;}
if(oArea.selectedIndex<1)
{alert("請選擇");oArea.focus();return;}
if(oCity.selectedIndex<1)
{alert("請選擇");oCity.focus();return;}
sendData=depCity.value+"^"+oCountry.value+"^"+oCity.value+"^"+oStart.value+"^"+oEnd.value+"^N";break;case"TKT":zAction=getPrefixPath()+"TKT/TKTlist.aspx";if(get("lstRegion_TKT").selectedIndex<1)
{alert("請選擇");get("lstRegion_TKT").focus();return;}
if(get("lstCountry_TKT").selectedIndex<1)
{alert("請選擇");get("lstCountry_TKT").focus();return;}
if(get("lstCity_TKT").selectedIndex<1)
{alert("請選擇");get("lstCity_TKT").focus();return;}
sendData=get("lstDepcity_TKT").value+"^"+get("lstCountry_TKT").value+"^"+
get("lstCity_TKT").value+"^"+get("lstAir_TKT").value+"^"+get("lstSeg_TKT").value+"^"+get("lstAirClass_TKT").value+"^"+"^"+oStart.value;break;default:return;}
var oFrm=crtFormModule();wRet=oFrm.crtWin();oFrm.action=zAction;oFrm.putVar("searchD",sendData);oFrm.submit();return true;};