home *** CD-ROM | disk | FTP | other *** search
/ Chip 2002 October / Chip_2002-10_cd1.bin / tema / webhosting / hyperlink.mht / Function.js < prev    next >
Encoding:
Text File  |  2002-09-07  |  530 b   |  32 lines

  1. function GoToUrl(strPath)
  2. {
  3.     location.href = strPath
  4. }
  5.  
  6. function Focus(objElement)
  7. {
  8.     objElement.focus();
  9. }
  10.  
  11. function ClearElement(objElement, strValue)
  12. {
  13.     if(objElement.value == strValue)
  14.     {
  15.         objElement.value = '';
  16.     }
  17. }
  18.  
  19. function CheckDiacritics(strText)
  20. {
  21.     var strASCII= 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_.-0123456789';
  22.     var intLen= strText.length;
  23.     for (var i= 0; i < intLen; i++)
  24.     {
  25.         if (strASCII.indexOf(strText.charAt(i)) < 0)
  26.         {
  27.             return true;
  28.         }
  29.     }
  30.     return false;
  31. }
  32.