<!--



function check_userpass() {
if(navigator.userAgent.indexOf("Firefox")==-1){
e_k=event.keyCode
if ((e_k < 13) || (e_k >13 && e_k < 45) || (e_k > 45 && e_k < 48) || (e_k > 57 && e_k < 65) || (e_k > 90 && e_k < 95) || (e_k > 95 && e_k < 97) || (e_k > 122)) {
event.returnValue = false;
alert("ต้องเป็นตัวอักษรภาษาอังกฤษ (a-z, A-Z), ตัวเลข (0-9), เครื่องหมาย \"-\", เครื่องหมาย \"_\" เท่านั้น  \nและห้ามมีการเว้นวรรคเด็ดขาด กรุณาตรวจสอบข้อมูลของท่านอีกครั้ง... \n(Must be at letters(a-z, A-Z), number (0-9), \"-\" sign, \"_\" sign, but no space \nPlease enter your information again...)");
}
}
}



function check_email() {
if(navigator.userAgent.indexOf("Firefox")==-1){
e_k=event.keyCode
if ((e_k > 160)) {
event.returnValue = false;
alert("ต้องเป็นตัวอักษรภาษาอังกฤษเท่านั้น และห้ามมีการเว้นวรรคเด็ดขาด \nกรุณาตรวจสอบข้อมูลของท่านอีกครั้ง...\n(Must be at English characters Please enter your information again...)");
}
}
}



function check_number() {
if(navigator.userAgent.indexOf("Firefox")==-1){
e_k=event.keyCode
//if (((e_k < 48) || (e_k > 57)) && e_k != 46 ) {
if (e_k != 13 && (e_k < 48) || (e_k > 57)) {
event.returnValue = false;
alert("ต้องเป็นตัวเลขเท่านั้น กรุณาตรวจสอบข้อมูลของท่านอีกครั้ง...\n(Must be at Number Please enter your information again...)");
}
}
}




function check_user_shopname_url(vname,vurl) {
 cusuwinpopup=window.open(vurl+'?vquery='+vname.value,'','toolbar=no,location=no,directories=no,menubar=no,status=yes,scrollbars=yes,resizable=no,width=380,height=200');
}


function character_count(fieldfrom,fieldto,fieldmaxlimit) {
if (fieldfrom.value.length > fieldmaxlimit)
fieldfrom.value = fieldfrom.value.substring(0, fieldmaxlimit);
else 
fieldto.value=fieldfrom.value.length;
}





function Window_Popup( iStrUrl , iStrWindowName , iIntToolbar , iIntLocation , iIntStatus , iIntMenubar , iIntScrollbars , iIntResizable , iIntWidth , iIntHeight ) {

	// --- iStrUrl [Str]
	// --- iStrWindowName [Str]
	// --- iIntToolbar to iIntResizable [Int] ( 0 --> No , 1 --> Yes )
	// --- iIntWidth , iIntHeight [Int]

	var vStrWindow_Popup = window.open( iStrUrl , iStrWindowName , 'toolbar=' + iIntToolbar + ' , location=' + iIntLocation + ' , directories=0 , status=' + iIntStatus + ' , menubar=' + iIntMenubar + ' , scrollbars=' + iIntScrollbars + ' , resizable=' + iIntResizable + ' , width=' + iIntWidth + ', height=' + iIntHeight );
	vStrWindow_Popup.focus();

}


function Window_Popup_Html( iStrCodeHtml , iStrWindowName , iIntToolbar , iIntLocation , iIntStatus , iIntMenubar , iIntScrollbars , iIntResizable , iIntWidth , iIntHeight ) {

	// --- iStrCodeHtml [Str]
	// --- iStrWindowName [Str]
	// --- iIntToolbar to iIntResizable [Int] ( 0 --> No , 1 --> Yes )
	// --- iIntWidth , iIntHeight [Int]

	var vStrWindow_Popup_Html = window.open( '' , iStrWindowName , 'toolbar=' + iIntToolbar + ' , location=' + iIntLocation + ' , directories=0 , status=' + iIntStatus + ' , menubar=' + iIntMenubar + ' , scrollbars=' + iIntScrollbars + ' , resizable=' + iIntResizable + ' , width=' + iIntWidth + ', height=' + iIntHeight );
	vStrWindow_Popup_Html.document.write( iStrCodeHtml );

}



function Delete_Sure(dsrUrl)
{
if (confirm("Are you sure you want to delete ?                        "))
window.location = dsrUrl;
}



  function DeleteCheckBoxAll()
  {
    for (var i=0;i<document.FormName.elements.length;i++)
    {
      var e = document.FormName.elements[i];
      var boolValue = document.FormName.selectAll.checked;
      if (e.name != 'selectAll')
	  {
        e.checked = boolValue;
	  }
    }
  }


//-->

