// newWindow is the variable which holds the preview window
var newWindow

function fncTAFWindow(){

// this routine checks to see if a preview window is already open. If it is,
// it closes.
if (newWindow && !newWindow.closed){
	newWindow.close()
	newWindow = null
}
// newContent is the variable which holds the HTML for the pop-up window
newContent="<html><head><title>Tell a Friend about ExecSearches.com</title><link href='/exec/execSearches.css' rel='stylesheet' type='text/css' /><style>label {font-size: .8em;}</style></head>"
newContent+="<body style='background: #fff; margin: 20px; text-align: left;'>"
newContent+="<h2>Tell a Friend or Colleague about this Job Posting!</h2>"
newContent+="<form method=get action='TAFEmail.asp'>"
newContent+="<img src='/exec/images/logoWhiteBack.gif' alt='execSearches.com logo' /><br /><br />"
newContent+="<address>"
newContent+=window.document.frmparam.inpparamhtml.value
newContent+="</address><p><small><a href='"
newContent+=window.location
newContent+="' target='blank'>"
newContent+=window.location
newContent+="</a></small></p>"
newContent+="<p>To send a link to this job posting, fill out the Confidential form below and press the <strong><em>Send</em></strong> button.</p>"
newContent+="<p>The information inputted in this form is <strong><em>not</em></strong> recorded by us. This is a <strong><em>one-time</em></strong> emailing and e-mail addresses type here will not receive additional correspondence and will <strong><em>not</em></strong> be shared with others</p>"
newContent+="<label>Friend's Email Address</label><br />"
newContent+="<input type=text name='addressto' size='35' maxlength='45'><br />"
newContent+="<label>Friend's Name</label><br />"
newContent+="<input type=text name='nameto' size='35'><br />"
newContent+="<label>Your Email Address</label><br />"
newContent+="<input type=text name='addressfrom' size='35' maxlength='45'><br />"
newContent+="<label>Your Name</label><br />"
newContent+="<input type=text name='namefrom' size='35'><br />"
newContent+="<label>Message</label><br />"
newContent+="<textarea name='txtmsg' rows=5 cols=40></textarea><br />"
newContent+="<p class='pageNote banner'><input value='Send' type='submit'>&nbsp;"
newContent+="<input value='Cancel' type='reset'>"
newContent+="</p>"
newContent+="<input type='hidden' value='"
newContent+=window.location
newContent+="' name='location'>"
newContent+="<input type='hidden' value='"
newContent+=window.document.frmparam.inpparam.value
newContent+="' name='param'>"
newContent+="</form>"
newContent+="<!-- End form.htm -->"
newContent+="</body>"
newContent+="</html>"

// these lines open the preview window
newWindow=window.open("","","SCROLLBARS=yes,resizable=yes,WIDTH=500,HEIGHT=420")
newWindow.document.write(newContent)
newWindow.document.close
}
