OK I figured it out but now when I past the code into another page it doesnt work anymore. Here is the code.
<html>
<head>
<LINK href="stylefonts.css" type=text/css rel=stylesheet>
<title>Quick Links</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<!-------------------------------------------------Phonetic Generator----------------------------------------------->
<script>
function jargon(string){
var A= [], tem, temp, index= 0, len,
keys={
' ':'[space]', '-':'Dash', '.':'Dot', '/':'Slash', ':':'Colon', ',':'Comma',
'0':'Zero', '1':'One', '2':'Two', '3':'Three', '4':'Four', '5':'Five', '6':'Six',
'7':'Seven', '8':'Eight', '9':'Nine', 'a':'Alpha', 'b':'Bravo', 'c':'Charlie',
'd':'Delta', 'e':'Echo', 'f':'Foxtrot', 'g':'Golf', 'h':'Hotel', 'i':'India',
'j':'Juliet', 'k':'Kilo', 'l':'Lima', 'm':'Mike', 'n':'November', 'o':'Oscar',
'p':'Papa', 'q':'Quebec', 'r':'Romeo', 's':'Sierra', 't':'Tango', 'u':'Uniform',
'v':'Victor', 'w':'Whiskey', 'x':'X-Ray', 'y':'Yankee', 'z':'Zulu'
}
if(string=== true) return keys;
string= string.replace(/[A-Za-z0-9 ,.\/:-]/g, '').replace(/([ \/:,-]) +/g, '$1').replace(/(\d). +(\d)/g, '$1.$2');
len= string.length;
while(index<len){
tem= string.charAt(index++) || '';
if(tem){
temp= keys[tem.toLowerCase()] || '';
if(tem!== tem.toLowerCase()) temp= temp.toUpperCase();
A.push(temp);
}
}
return A.join(' ');
}
function fromJargon(string){
var len, index= 0, tem, A= [], keys= {},
k= jargon(true);
for(var p in k){
if(k.hasOwnProperty(p)){
keys[k[p]]= p;
if(/[a-z]/.test(p)){
keys[k[p].toUpperCase()]= p.toUpperCase();
}
}
}
string= string.split(/\s+/);
len= string.length;
while(index<len){
tem= string[index++];
A.push(keys[tem] || '');
}
return A.join('');
}
function tag(tagname, n){
if(n== undefined) n= 0;
return document.getElementsByTagName(tagname)[n];
}
function printJargon(){
var val, err, inp= tag('input'), outp= tag('textarea'),
val= inp.value.replace(/[A-Za-z0-9 ,.\/:-]/g, '');
if(!/[a-zA-Z0-9]/.test(val)){
zapJargon();
alert('You need some letters or digits to convert');
inp.focus();
}
else{
outp.value= jargon(val);
tag('input').value= '';
outp.focus();
}
}
function phoneticgen(){
tag('textarea').value= '';
tag('input').value= '';
tag('input').focus();
}
window.onload= function(){
phoneticgen();
tag('button', 1).onclick= printJargon;
tag('button', 2).onclick= printJargon;}
</script>
<!-----------------------------------------------Phonetic Generator End------------------------------------------->
<SCRIPT LANGUAGE="JavaScript">
<!--
// Use the following variable to specify
// the number of random words
var NumberOfWords = 27
var words = new BuildArray(NumberOfWords)
// Use the following variables to
// define your random words:
words[1] = "Aliant"
words[2] = "Sunday"
words[3] = "Quebec"
words[4] = "Sunset"
words[5] = "Friday"
words[6] = "Monday"
words[7] = "Soccer"
words[8] = "Tennis"
words[9] = "Hockey"
words[10] = "Winter"
words[11] = "Canada"
words[12] = "Summer"
words[13] = "United"
words[14] = "August"
words[15] = "Orange"
words[16] = "Island"
words[17] = "Ottawa"
words[18] = "Regina"
words[19] = "Acadia"
words[20] = "Coffee"
words[21] = "Copper"
words[22] = "Spring"
words[23] = "Desert"
words[24] = "Yellow"
words[25] = "Violet"
words[26] = "Office"
words[27] = "Oxford"
function BuildArray(size){
this.length = size
for (var i = 1; i <= size; i++){
this = null}
return this
}
function PickRandomWord(frm) {
// Generate a random number between 1 and NumberOfWords
var rnd = Math.ceil(Math.random() NumberOfWords)
var rannumb = Math.floor ( Math.random ( ) 89 + 10 )
// Display the word inside the text box
frm.WordBox.value = (words[rnd]+rannumb)
}
//-->
</SCRIPT>
<style type="text/css">
textarea{
width:100%;
min-width:100px;
max-width:500px;
border:none;
overflow:hidden
}
/---------------------------NB Ticket assignment tool tip-------------------------/
{
font-family:Verdana, Arial, Helvetica, sans-serif;
font-size:11px;
text-decoration: none;
color: #000000;
}
a:hover {background:#ffffff; text-decoration:none;} /BG color is a must for IE6/
a.tooltip span {
display:none;
margin-left:-700px;
width:400px;
margin-top: -200px;
padding-top: 5px;
padding-right: 3px;
padding-bottom: 2px;
padding-left: 5px;
}
a.tooltip:hover span{
display:inline;
position:absolute;
border:1px solid #cccccc;
background:#ffffff;
}
/--------------------------------Tool tip end-------------------------------------*/
#header {
font-family: Tahoma, Geneva, sans-serif;
font-size: 18px;
line-height: 30px;
color: #000000;
font-style: normal;
min-width: 300px;
height: 30px;
padding-top: 2px;
padding-left: 5px;
width: 100%;
border-bottom-width: 1px;
border-bottom-style: dotted;
border-bottom-color: #000000;
}
form {
margin: 0px;
color: #000;
min-width: 300px;
padding-top: 0px;
padding-right: 0px;
padding-bottom: 0px;
padding-left: 0px;
}
.button {
color: #000;
font-weight: lighter;
}
body {
margin-left: 0px;
color: #333;
font-family: Tahoma, Geneva, sans-serif;
padding-left: 20px;
}
body h1 {
font-family: Tahoma, Geneva, sans-serif;
font-size: 24px;
text-decoration: none;
text-transform: none;
line-height: 40px;
}
body p {
color: #000000;
text-decoration: underline;
font-weight: normal;
margin-bottom: -15px;
margin-top: 5px;
}
body a:link {
color: #990000;
text-decoration: none;
font-size: 14px;
}
body a:hover {
text-decoration: underline;
}
body a:visited {
color: #990000;
text-decoration: none;
font-size: 14px;
}
#left_table {
float: left;
width: 50%;
}
#devider {
float: left;
width: 30px;
}
#right_table {
width: 100%;
}
</style>
</head>
<body link="#990000" vlink="#990000" alink="#990000">
<div id="left_table"><table width="100%" height="107" border="0" cellpadding="5" cellspacing="0">
<tr>
<td height="37" colspan="2" align="left" valign="bottom"><div id="header"> Password & Phonetic Generator</div></td>
</tr>
<tr>
<td width="40%" height="33" valign="middle"><FORM NAME="WordForm">
<input type=BUTTON class="button" onClick="PickRandomWord(document.WordForm)"
value="Generate" />
<input type=TEXT name="WordBox" size="15" />
</FORM></td>
<td width="60%" height="33" valign="middle"><button type="button">Client Code</button>
<input type="text" size="20"></td>
</tr>
<tr>
<td height="37" colspan="2" align="left" valign="bottom"><textarea name="textarea" rows="2" ></textarea></td>
</tr>
</table>
</div>
<div id="devider">
<table width="10" border="0" cellpadding="0" cellspacing="0">
<tr>
<td> </td>
</tr>
</table>
</div>
</body>
</html>