1function callfrm(dest){ 2 document.frmConsole.target = "_self" 3 document.frmConsole.action = dest 4 document.frmConsole.method = "POST" 5 document.frmConsole.submit() 6} 7 8function callfrm2(dest){ 9 document.frmConsole.target = "_blank" 10 document.frmConsole.action = dest 11 document.frmConsole.method = "POST" 12 document.frmConsole.submit() 13} 14 15function openNew(dest,popname,width,height){ 16 var popup=window.open(dest,popname,"left="+ (((800-width)/2)) + ",top=" + (((600-height)/2)) +",width="+width+",height="+height+",resizable=no,menubar=0,scrollbars=yes,location=no,alwaysRaised=yes"); 17 popup.focus(); 18 19} 20 21function openNewPrint(dest,popname,width,height){ 22 popup=window.open(dest,popname,"left="+ (((800-width)/2)) + ",top=" + (((600-height)/2)) +",width="+width+",height="+height+",toolbar=no,resizable=no,menubar=1,scrollbars=yes,location=no,alwaysRaised=yes"); 23 popup.focus(); 24} 25 26function changerow(row){ 27 for(i=0;i<15;i++){ 28 if(i<row){ 29 jQuery("#tr_upload"+i).show(); 30 }else{ 31 jQuery("#tr_upload"+i).hide(); 32 } 33 } 34} 35 36function checkboxNum(chk) { 37 var total = 0; 38 var max = eval('document.frmConsole.' + chk + '.length'); 39 for (var idx = 0; idx < max; idx++) { 40 if (eval('document.frmConsole.'+ chk +'[' + idx + '].checked') == true) { 41 total += 1; 42 } 43 } 44 return total; 45} 46 47function DigitOnly() { 48 if ((event.keyCode>=96)&&(event.keyCode<=105)) 49 return; 50 if ((event.keyCode>=48)&&(event.keyCode<=57)) 51 return; 52 if (event.keyCode==8 || event.keyCode==9) 53 return; 54 if ((event.keyCode==37)||(event.keyCode==39)||(event.keyCode==46)) 55 return; 56 if ((event.keyCode==110)||(event.keyCode==190)) 57 return; 58 event.returnValue=false; 59} 60 61function DigitOnly2(e,obj) { 62 var keyCode = e.keyCode || e.which; 63 var keyChar = String.fromCharCode(keyCode); 64 var CharShow=""; 65 var isThai=false; 66 67 if (keyChar == "1" || keyChar == "2" || keyChar == "3" || keyChar == "4" || keyChar == "5" || keyChar == "6" || keyChar== "7" || keyChar == "8" 68 || keyChar == "9" || keyChar == "0" || keyCode==8 || keyCode==9){ 69 return true; 70 }else{ 71 for(i=0;i<obj.value.length;i++){ 72 if (obj.value.charAt(i) == "1" || obj.value.charAt(i) == "2" || obj.value.charAt(i) == "3" || obj.value.charAt(i) == "4" 73 || obj.value.charAt(i) == "5" || obj.value.charAt(i) == "6" || obj.value.charAt(i) == "7" || obj.value.charAt(i) == "8" 74 || obj.value.charAt(i) == "9" || obj.value.charAt(i) == "0"){ 75 CharShow += obj.value.charAt(i); 76 } 77 } 78 79 obj.value = CharShow; 80 return false; 81 } 82} 83 84function hasWhiteSpace(s) 85{ 86 reWhiteSpace = new RegExp(/\s/); 87 if (reWhiteSpace.test(s)) { 88 return false; 89 } 90 return true; 91} 92 93function EngOnly(){ 94 if (String.fromCharCode(event.keyCode) < '~'){ 95 return; 96 } 97 event.returnValue=false; 98} 99 100function EngOnly2(){ 101 var keyblock = new Array(33,64,35,36,37,94,38,42,40,41,95,43,61,92,123,125,91,93,58,59,34,39,60,62,44,46,63,47); 102 var cChr; 103 cChr = window.event.keyCode; 104// alert(cChr); 105 106 for(var i=0 ; i<keyblock.length ; i++){ 107 if(cChr == keyblock[i]){ 108 event.returnValue=false; 109 } 110 } 111 112 if (String.fromCharCode(event.keyCode) < '~'){ 113 return; 114 } 115 event.returnValue=false; 116} 117 118function EngOnly4(e,obj){ 119 var keyCode = e.keyCode || e.which; 120 var keyChar = String.fromCharCode(keyCode); 121 var CharShow=""; 122 var isThai=false; 123 124 if(keyChar >= '~'){ 125 return false; 126 } 127 128 for(i=0;i<obj.value.length;i++){ 129 if(obj.value.charAt(i) >= '~') { 130 isThai = true; 131 }else{ 132 CharShow += obj.value.charAt(i); 133 } 134 } 135 136 obj.value = CharShow; 137 if(isThai == true){ 138 return false; 139 }else{ 140 return true; 141 } 142} 143 144function CloseWindows(){ 145 window.close(); 146} 147 148function CheckEnter(callFunction,valueFunction){ 149 var cChr; 150 cChr = window.event.keyCode; 151 if (cChr == 13) 152 { 153 callFunction(valueFunction); 154 } 155} 156 157function OnMouseOver(obj,color){ 158 obj.style.background=color; 159} 160 161function noRightClick(){ 162 if(event.button==2){ 163 document.oncontextmenu =function(){ 164 return false; 165 } 166 } 167} 168 169function Trim(TRIM_VALUE){ 170 if(TRIM_VALUE.length < 1){ 171 return""; 172 } 173 TRIM_VALUE = RTrim(TRIM_VALUE); 174 TRIM_VALUE = LTrim(TRIM_VALUE); 175 if(TRIM_VALUE==""){ 176 return ""; 177 } 178 else{ 179 return TRIM_VALUE; 180 } 181} 182 183function RTrim(VALUE){ 184 var w_space = String.fromCharCode(32); 185 var v_length = VALUE.length; 186 var strTemp = ""; 187 if(v_length < 0){ 188 return""; 189 } 190 var iTemp = v_length -1; 191 192 while(iTemp > -1){ 193 if(VALUE.charAt(iTemp) == w_space){ 194 } 195 else{ 196 strTemp = VALUE.substring(0,iTemp +1); 197 break; 198 } 199 iTemp = iTemp-1; 200 201 } //End While 202 return strTemp; 203 204} //End Function 205 206function LTrim(VALUE){ 207 var w_space = String.fromCharCode(32); 208 if(v_length < 1){ 209 return""; 210 } 211 var v_length = VALUE.length; 212 var strTemp = ""; 213 214 var iTemp = 0; 215 216 while(iTemp < v_length){ 217 if(VALUE.charAt(iTemp) == w_space){ 218 } 219 else{ 220 strTemp = VALUE.substring(iTemp,v_length); 221 break; 222 } 223 iTemp = iTemp + 1; 224 } //End While 225 return strTemp; 226} //End Function 227 228function EngOnly3(e){ 229 var isThai=false; 230 var keyCode = e.keyCode || e.which; 231 var keyChar = String.fromCharCode(keyCode); 232 var keyblock = new Array(33,64,35,36,37,94,38,42,40,41,95,43,61,92,123,125,91,93,58,59,34,39,60,62,44,46,63,47);
233 var CharShow = ""; 234 235 for(var k=0 ; k<keyblock.length ; k++){ 236 if(keyCode == keyblock[k]){ 237 return false; 238 } 239 } 240 if(keyChar >= '~'){ 241 return false; 242 } 243 244 for(i=0 ; i < document.frmConsole.d_name_new.value.length ; i++){ 245 if(document.frmConsole.d_name_new.value.charAt(i) >= '~') { 246 isThai = true; 247 }else{ 248 CharShow += document.frmConsole.d_name_new.value.charAt(i); 249 } 250 } 251 252 document.frmConsole.d_name_new.value = CharShow; 253 if(isThai == true){ 254 return false; 255 }else{ 256 return true; 257 } 258} 259 260function CheckEnterNew(callFunction,valueFunction,e){ 261 var cChr; 262 cChr = e.keyCode || e.which; 263 if (cChr == 13) 264 { 265 callFunction(e,valueFunction); 266 } 267} 268function noRightClick(){ 269 if(event.button==2){ 270 document.oncontextmenu =function(){ 271 return false; 272 } 273 } 274} 275 276function checkIE(){ 277 var ie = (navigator.appName.indexOf("Microsoft") != -1);if(ie) return true;return false; 278} 279 280function CheckDigitOnly(obj){ 281 var strOutput = obj.value; 282 var lengtStr = obj.value.length; 283 for(var i=0;i<lengtStr;i++){ 284 if(strOutput.charAt(i) >='0' && strOutput.charAt(i) <='9'){ 285 286 }else{ 287 obj.value=""; 288 return 0; 289 } 290 } 291} 292 293function formatNumber(num, decplaces) { 294 num = parseFloat(num); 295 if (!isNaN(num)) { 296 var str = "" + Math.round (eval(num) * Math.pow(10,decplaces)); 297 if (str.indexOf("e") != -1) { 298 return "Out of Range"; 299 } 300 while (str.length <= decplaces) { 301 str = "0" + str; 302 } 303 304 var decpoint = str.length - decplaces; 305 var tmpNum = str.substring(0,decpoint); 306 //---------------Add Commas-------------------------- 307 var numRet = tmpNum.toString(); 308 var re = /(-?\d+)(\d{3})/; 309 while (re.test(numRet)) { 310 numRet = numRet.replace(re, "$1,$2"); 311 } 312 return numRet + "." + str.substring(decpoint,str.length); 313 // return numRet; 314 } else { 315 return "0.00"; 316 } 317} 318 319function roll_over(img_name, img_src){ 320 document[img_name].src = img_src; 321} 322 323function mouseOverChangImage(obj , image){ 324 obj.src = image; 325} 326
327function mouseOverChangBackground(obj , color){ 328 obj.style.background = color; 329} 330 331function changeColorDialog(obj , spanId){ 332 var len_txt = obj.value.length; 333 if(obj.value.search(/^#[a-fA-F0-9]{6}$/) != -1){ 334 document.getElementById(spanId).style.backgroundColor = obj.value; 335 }else{ 336 alert("à¸à¸à¸à¸ ัยรูà¸à¹à¸à¸à¹à¸¡à¹à¸à¸¹à¸à¸à¹à¸à¸"); 337 obj.value = "#FFFFFF"; 338 document.getElementById(spanId).style.backgroundColor = obj.value; 339 document.getElementById(spanId).focus(); 340 } 341}//end function changeColorDialog 342 343function checkDigitJQuery(objectJQuery , StringExcep , StringType){ 344 if (StringExcep == "+") 345 { 346 var intRegex = /^[+]?\d+$/; // /^[-+]?\d+[,]?\d+$/; 347 }else if (StringExcep == "-") 348 { 349 var intRegex = /^[-]?\d+$/; 350 }else if (StringExcep == "+-" || StringExcep == "-+") 351 { 352 var intRegex = /^[+-]?\d+$/; 353 }else{ 354 var intRegex = /^\d+$/; 355 } 356 357 if(StringType == "integer"){ 358 var str = objectJQuery.val(); 359 if(intRegex.test(str)){ 360 return true; 361 }else{ 362 return false; 363 } 364 }else if(StringType == "float"){ 365 var floatRegex = /^((\d+(\.\d *)?)|((\d*\.)?\d+))$/; 366 var str = objectJQuery.val(); 367 if(intRegex.test(str) || floatRegex.test(str)){ 368 return true; 369 }else{ 370 return false; 371 } 372 } 373}//end function checkDigitOnly 374 375/** START Equal Height Columns with jQuery **/ 376 function equalHeight(group) { 377 tallest = 0; 378 jQuery(group).each(function() { 379 thisHeight = jQuery(this).height(); 380 if(thisHeight > tallest) { 381 tallest = parseInt(thisHeight); 382 }else{ 383 tallest = tallest; 384 } 385 }); 386 387 jQuery(group).height(tallest); 388 //alert(tallest); 389 } 390 /** END Equal Height Columns with jQuery **/ 391 392 function cheackFileSize(name,maxsize){ 393 try { var picsize = jQuery("#"+name)[0].files[0].size; } catch (e) { var picsize = "undified"; } 394 if(picsize=="undified"){ 395 return true; 396 }else{ 397 if(picsize<=maxsize){ return true; } 398 else{ return false; } 399 } 400 } 401 402 function checkFloat(obj){ 403 var strOutput = obj.value; 404 var lengtStr = obj.value.length; 405 for(var i=0;i<lengtStr;i++){ 406 if((strOutput.charAt(i) >='0' && strOutput.charAt(i) <='9') || (strOutput>=0)){ 407 408 }else{ 409 obj.value=""; 410 return 0; 411 } 412 } 413 } 414 415 function checkNumber(elem){ 416 var numericExpression = /^[0-9]+$/; 417 if(elem.value.match(numericExpression) && ( elem.value*1 >= 0) ){ 418 return true; 419 }else{ 420 elem.value=elem.value.substr(0,elem.value.length-1); 421 elem.focus(); 422 return false; 423 } 424 } 425 426function dialogImagesSilde(rid,pid,typename){ 427 var currenturl = jQuery(location).attr('href'); 428 arrurl = currenturl.split('/'); 429 430 jQuery("#dialoggalleria").dialog({ 431 dialogClass : "dialog-fixed", 432 draggable : false, 433 bgiframe : false, 434 height : parseInt(660), 435 width : parseInt(807), 436 modal : true, 437 closeOnEscape : true, //need to take care of cancel_callback() 438 autoOpen : false, 439 resizable : false, //close: function(event, ui) { jQuery("#show_lightbox").remove(); } 440 position : ['center',100], 441 open: function() { 442 jQuery(".ui-widget-header").css({"background":"none", "border":"none" ,"line-height":"2px"}); 443 jQuery(".ui-dialog-content").css({"padding":"0.5em 0.2em"}); 444 jQuery("#dialoggalleria").load("http://"+arrurl[2]+"/include/box_galleria/galleria.php?typeid="+typename+"&keyid="+rid+"&position="+pid); 445 } 446 }); 447 jQuery('#dialoggalleria').html(""); 448 jQuery('#dialoggalleria').dialog('open'); 449}
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.