function adjust_menu(){if($("colmid").className==""){$("colmid").className="collapsed";$("colleft").style.display="none"}else{$("colmid").className="";$("colleft").style.display=""}}function showHelpTopic(B){var C="/help_query.php?help_id="+B;$("help_content").innerHTML="";$("help_content").style.background="url('/images/loading_icon_b.gif') no-repeat center";var A=YAHOO.util.Connect.asyncRequest("GET",C,help_callback)}var help_callback={success:function(D){if(D.responseText!=undefined){$("help_content").style.background="";var A=D.responseText.indexOf("[FAIL]");if(A!=-1){$("help_content").innerHTML="<h4>เกิดข้อผิดพลาดขึ้นค่ะ</h4><div>หัวข้อช่วยเหลือที่ท่านเลือก อาจจะถูกย้ายไปแล้วหรือมีความผิดพลาดระหว่างดำเนินการค่ะ</div>"}else{$("help_content").innerHTML=D.responseText;var B="[at]";var C="%5Bat%5D";while(($("help_content").innerHTML.indexOf(B)!=-1)||($("help_content").innerHTML.indexOf(C)!=-1)){$("help_content").innerHTML=$("help_content").innerHTML.replace(B,"@");$("help_content").innerHTML=$("help_content").innerHTML.replace(C,"@")}}}},failure:function(A){$("help_content").style.background="";alert("fail to connect to server")}};function showHelpType(C){var B=false;if($("help_cache_"+C)==undefined){oElem=document.createElement("input");oElem.type="hidden";oElem.id="help_cache_"+C;$("help_cache").appendChild(oElem)}else{if($("help_cache_"+C).value!=""){$("tlhelp").innerHTML=$("help_cache_"+C).value;B=true}}if(!B){var E="/help_query.php?help_type="+C+"&help_content";var F="/help_query.php?help_type="+C+"&help_toc";$("tlhelp").style.background="url('../images/loading_icon_b.gif') no-repeat center";$("help_content").style.background="url('../images/loading_icon_b.gif') no-repeat center";var D=YAHOO.util.Connect.asyncRequest("GET",E,help_type_callback);var A=YAHOO.util.Connect.asyncRequest("GET",F,help_typem_callback)}}var help_type_callback={success:function(D){$("help_content").style.background="";if(D.responseText!=undefined){var A=D.responseText.indexOf("[FAIL]");if(A!=-1){$("help_content").innerHTML="<h4>เกิดข้อผิดพลาดขึ้นค่ะ</h4><div>หัวข้อช่วยเหลือที่ท่านเลือก อาจจะถูกย้ายไปแล้วหรือมีความผิดพลาดระหว่างดำเนินการค่ะ</div>"}else{$("help_content").innerHTML=D.responseText;var B="[at]";var C="%5Bat%5D";while(($("help_content").innerHTML.indexOf(B)!=-1)||($("help_content").innerHTML.indexOf(C)!=-1)){$("help_content").innerHTML=$("help_content").innerHTML.replace(B,"@");$("help_content").innerHTML=$("help_content").innerHTML.replace(C,"@")}}}},failure:function(A){$("help_content").style.background="";alert("fail to connect to server")}};var help_typem_callback={success:function(D){$("tlhelp").style.background="";if(D.responseText!=undefined){var B=D.responseText.indexOf("[FAIL]");if(B!=-1){$("tlhelp").innerHTML="<h4>เกิดข้อผิดพลาดขึ้นค่ะ</h4><div>หัวข้อช่วยเหลือที่ท่านเลือก อาจจะถูกย้ายไปแล้วหรือมีความผิดพลาดระหว่างดำเนินการค่ะ</div>"}else{var C=D.responseText;var A="";if(D.responseText.indexOf("[HELPTYPE=")!=-1){var E=/\[HELPTYPE=.\]/i;help_str=D.responseText.match(E);A=help_str[0].substr(10,help_str[0].length-help_str[0].indexOf("]"));htmlstr=D.responseText.replace(E,"");if($("help_cache_"+A)!=undefined){$("help_cache_"+A).value=htmlstr}}$("tlhelp").innerHTML=htmlstr}}},failure:function(A){$("tlhelp").style.background="";alert("fail to connect to server")}};function help_submit(){help_search()}function help_search(){if($("help_search_txt").value.replace(/ /g,"")==""){alert("กรุณาใส่คำที่ต้องการค้นหาด้วยค่ะ");return false}var C=$("help_search_form");YAHOO.util.Connect.setForm(C,false,true);if($("P0")!=null){$("P0").innerHTML='<a href="javascript:showResult()" onclick="oh(\'P0\')" title="หัวข้อในการค้นหา">หัวข้อในการค้นหา</a>'}var B="/help_query.php?search";$("tlhelp").style.background="url('../images/loading_icon_b.gif') no-repeat center";var A=YAHOO.util.Connect.asyncRequest("POST",B,help_search_callback);return false}var help_search_callback={success:function(F){$("tlhelp").style.background="";if(F.responseText!=undefined){var B=F.responseText.indexOf("[FAIL]");if(B!=-1){var G="";if(F.responseText.indexOf("[NOT FOUND]")){G="<h4>หัวข้อในการค้นหา (0)</h4><div>เคล็ดลับสำหรับการค้นหาวิธีใช้:<ul class=\"toc\"><li>ตรวจสอบการสะกดคำของคุณว่าถูกต้องหรือไม่</li><li>ลองใช้คำเหมือนเช่น ใช้คำว่า 'สมัครสมาชิก' แทน 'ลงทะเบียน'</li><li>ลองใช้คำที่มีความหมายกว้างขึ้นเช่น ใช้คำว่า 'ชำระเงิน' แทน 'การจ่ายค่าบริการ'</ul></div>"}else{G="<h4>เกิดข้อผิดพลาดขึ้นค่ะ</h4><div>หัวข้อช่วยเหลือที่ท่านเลือก อาจจะถูกย้ายไปแล้วหรือมีความผิดพลาดระหว่างดำเนินการค่ะ</div>"}$("tlhelp").innerHTML=G;$("help_search_cache").value=G;var D=$("helpmenu").getElementsByTagName("li");var E=D.length;for(i=0;i<E;i++){if(D[i].id.indexOf("P")!=-1){D[i].className=""}}if($("P0")==undefined){var A=$("helpmenu").getElementsByTagName("ul");var C=A[0].innerHTML;A[0].innerHTML='<li class="selected" id="P0"><a title="หัวข้อในการค้นหา" onclick="oh(\'P0\')" href="javascript:showResult()">หัวข้อในการค้นหา</a></li>'+C}else{$("P0").className="selected"}}else{$("tlhelp").innerHTML=F.responseText;$("help_search_cache").value=F.responseText;var D=$("helpmenu").getElementsByTagName("li");var E=D.length;for(i=0;i<E;i++){if(D[i].id.indexOf("P")!=-1){D[i].className=""}}if($("P0")==undefined){var A=$("helpmenu").getElementsByTagName("ul");var C=A[0].innerHTML;A[0].innerHTML='<li class="selected" id="P0"><a title="หัวข้อในการค้นหา" onclick="oh(\'P0\')" href="javascript:showResult()">หัวข้อในการค้นหา</a></li>'+C}else{$("P0").className="selected"}}}},failure:function(A){$("tlhelp").style.background="";alert("fail to connect to server")}};function showResult(){$("tlhelp").innerHTML=$("help_search_cache").value}function tti(E,D){var B=document.getElementsByTagName("img");var A=B.length;for(i=0;i<A;i++){if(B[i].id==E){if(D=="r"){var C=B[i].src.replace(/rest/,"hover")}else{var C=B[i].src.replace(/hover/,"rest")}B[i].src=C}}}function ttb(G){var B=false;var A=document.getElementsByTagName("div");var E=A.length;for(i=0;i<E;i++){if(A[i].id==G){if(A[i].style.display=="none"){A[i].style.display="block";B=true}else{A[i].style.display="none"}}}var D=document.getElementsByTagName("img");var C=D.length;for(i=0;i<C;i++){if(D[i].id=="I"+G){if(B){var F=D[i].src.replace(/expand/,"collapse")}else{var F=D[i].src.replace(/collapse/,"expand")}D[i].src=F}}}function oh(A){var D=document.getElementById("helpmenu");var C=D.getElementsByTagName("li");var B=C.length;for(i=0;i<B;i++){if(C[i].id==A){C[i].className="selected"}else{C[i].className=""}}}
