//TJ3V2224883 For forbidden words
//TASL2225934 For Hostname
irregularString = new Array(15);
irregularString[0] ='"';
irregularString[1] ="\\";
irregularString[2] =";";
irregularString[3] =":";
irregularString[4] ="*";
irregularString[5] ="?";
irregularString[6] ="<";
irregularString[7] =">";
irregularString[8] ="/";
irregularString[9] ="|";
irregularString[10] =",";
irregularString[11] ="=";
irregularString[12] ="+";
irregularString[13] ="&";
irregularString[14] ="#";
function wordcheckEx(str){
if (str.indexOf(irregularString[0],0) >= 0 ||
    str.indexOf(irregularString[1],0) >= 0 ||
    str.indexOf(irregularString[2],0) >= 0 ||
    str.indexOf(irregularString[3],0) >= 0 ||
    str.indexOf(irregularString[4],0) >= 0 ||
    str.indexOf(irregularString[5],0) >= 0 ||
    str.indexOf(irregularString[6],0) >= 0 ||
    str.indexOf(irregularString[7],0) >= 0 ||
    str.indexOf(irregularString[8],0) >= 0 ||
    str.indexOf(irregularString[9],0) >= 0 ||
    str.indexOf(irregularString[10],0) >= 0 ||
    str.indexOf(irregularString[11],0) >= 0 ||
    str.indexOf(irregularString[12],0) >= 0 ||
    str.indexOf(irregularString[13],0) >= 0 ||
    str.indexOf(irregularString[14],0) >= 0 ){
    alert(err_message);
    return 1;
  }
  for(i=0;i<str.length;i++){
    checkchar=str.charCodeAt(i);
//  if char is not a Normal character then  .. 
    if(checkchar < 31 || checkchar >127){
      alert(err_message2);
      return 1;
    }
  }
  return 0;
}
function wordcheck(str){
if (str.indexOf(irregularString[0],0) >= 0 ||
    str.indexOf(irregularString[1],0) >= 0 ||
    str.indexOf(irregularString[2],0) >= 0 ||
    str.indexOf(irregularString[3],0) >= 0 ||
    str.indexOf(irregularString[4],0) >= 0 ||
    str.indexOf(irregularString[5],0) >= 0 ||
    str.indexOf(irregularString[6],0) >= 0 ||
    str.indexOf(irregularString[7],0) >= 0 ||
    str.indexOf(irregularString[8],0) >= 0 ||
    str.indexOf(irregularString[9],0) >= 0 ||
    str.indexOf(irregularString[10],0) >= 0 ){
    alert(err_message);
    return 1;
  }
  for(i=0;i<str.length;i++){
    checkchar=str.charCodeAt(i);
//  if char is not a Normal character then  .. 
    if(checkchar < 31 || checkchar >127){
      alert(err_message2);
      return 1;
    }
  }
  return 0;
}

function wordcheck2(str){
//TASL2225934 For Hostname
  errnum=0 ;
  for(i=0;i<str.length;i++){
    checkchar=str.charCodeAt(i);
    //  Check "-" "."
    if(checkchar == 45 || checkchar == 46){
     continue ;
    }
    //  Check "0"-"9"
    if(checkchar >= 48 && checkchar <= 57){
     continue ;
    }
    //  Check "A"-"Z"
    if(checkchar >= 65 && checkchar <= 90){
     continue ;
    }
    //  Check "a"-"z"
    if(checkchar >= 97 && checkchar <= 122){
     continue ;
    }
    errnum++ ;
  }

  if(errnum == 0){
    return 0;
  }
  else {
    alert(err_message);
    return 1;
  }
}
