<HTML> <BODY> <SCRIPT language="JavaScript"> <!-- var the_name="abc"; first_char=the_name.charAt(0); if (first_char=="S") { document.write(the_name); } else { document.write(first_char); } //--> </SCRIPT> </BODY> </HTML>