/**/ /*
Name: Common.js
Function: Generic JavaScript script function library
Including:
1.Trim (str)--Remove the spaces on either side of the string
2.XMLEncode (str)--XML encoding of strings
3.ShowLabel (STR,STR)--Mouse prompt function (display character, prompt character)
4.IsEmpty (obj)--Verifying that the input box is empty
5.IsInt (Objstr,sign,zero)--Verifying whether an integer
6.IsFloat (Objstr,sign,zero)--Verify that it is a floating-point number
7.IsEnLetter (objstr,size)--Verify that it is 26 letters
Author: Shenwan
Date: 2004/04/14
*/
/**/ /*
==================================================================
String manipulation
Trim (String): Remove spaces on both sides of a string
==================================================================
*/
/**/ /*
==================================================================
LTrim (String): Removing space on the left
==================================================================
*/
function LTrim (str)
... {
var whitespace = new String ("");
var s = new String (str);
if (Whitespace.indexof (S.charat (0))!=-1)
... {
var j=0, i = s.length;
while (J < i && Whitespace.indexof (S.charat (j))!=-1)
... {
j + +;
}
s = s.substring (j, I);
}
return s;
}
/**/ /*
==================================================================
RTrim (String): Remove the space on the right
==================================================================
*/
function RTrim (str)
... {
var whitespace = new String ("");
var s = new String (str);
if (Whitespace.indexof (S.charat (s.length-1))!=-1)
... {
var i = s.length-1;
while (i >= 0 &&