function newImage(arg) {
        if (document.images) {
                rslt = new Image();
                rslt.src = arg;
                return rslt;
        }
}

function PCase(STRING){
  var strReturn_Value = "";
  var iTemp = STRING.length;
  if(iTemp==0){
  return"";
  }
  if (STRING == "UK" || STRING == "uk") {
    return UCase(STRING);
  }
  var UcaseNext = false;
  strReturn_Value += STRING.charAt(0).toUpperCase();
  for(var iCounter=1;iCounter < iTemp;iCounter++){
    if(UcaseNext == true){
      strReturn_Value += STRING.charAt(iCounter).toUpperCase();
    }
    else{
      strReturn_Value += STRING.charAt(iCounter).toLowerCase();
    }
    var iChar = STRING.charCodeAt(iCounter);
    if(iChar == 32 || iChar == 45 || iChar == 46){
      UcaseNext = true;
    }
    else{
      UcaseNext = false
    }
    if (iChar >= 16 && iChar <= 25) UcaseNext = true;
    if(iChar == 99 || iChar == 67){
      if(STRING.charCodeAt(iCounter-1)==77 || STRING.charCodeAt(iCounter-1)==109){
      UcaseNext = true;
    }
  }


  } //End For

  return strReturn_Value;
} //End Function

function UCase(STRING){
  var strReturn_Value = "";
  var iTemp = STRING.length;
  if(iTemp==0){
  return"";
  }
  var UcaseNext = true;
  strReturn_Value += STRING.charAt(0).toUpperCase();
  for(var iCounter=1;iCounter < iTemp;iCounter++){
    strReturn_Value += STRING.charAt(iCounter).toUpperCase();
  } //End For

  return strReturn_Value;
} //End Function



