/* navjava.js
common javascript functions used throughout the site
hence the being called from the nav */
var TheBrowserName = navigator.appName;
var TheBrowserVersion = parseFloat(navigator.appVersion);
function tdOn(td, location, color){
td.style.backgroundColor=color;
if ((TheBrowserName == 'Netscape') && (TheBrowserVersion >= 5)) {
td.style.cursor="pointer";
} else {
td.style.cursor="hand";
}
// equivalent to style="cursor:pointer;cursor:hand;"
window.status=location;
}
function tdOff(td, location, color){
td.style.backgroundColor=color;
td.style.cursor="default";
window.status=location;
}
function rolloverImage(cellName, imageName){
if(document.images){
document[cellName].src = imageName;
}
}
function SubmitForm(formname) {
document.forms[formname].submit();
// usage -- href="javascript:SubmitForm('formname');"
}
function ResetForm(formname) {
document.forms[formname].reset();
// usage -- href="javascript:ResetForm('formname');"
}
function openhelpWin(keyword,ht,wd){
var x = (screen.width)/(2)-((wd)/(2)), y = (screen.height)/(2)-((ht)/(2));
var myBars = 'toolbar=no,menubar=no,resizable=yes,scrollbars=no,status=no,location=no';
var myOptions = 'width=' + wd + ',height=' + ht;
var myFeatures = myBars + ',' + myOptions;
var myURL = '/helpinfo.html?keyword=' + keyword;
var newWin = open(myURL,'myDoc',myFeatures);
newWin.moveTo(x,y);
newWin.focus();
}
// old mouseover javascript - get rid of this as soon as possible -- berto_s 12.01.2002
function MM_swapImgRestore() { //v3.0
var i,x,a=document.MM_sr; for(i=0;a&&i0&&parent.frames.length) {
d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i= 7) return true;
}
return false;
}
function clearSearchBox() // clears search boxes on click
{
if(document.google.q.value=="Keyword Search") {
document.google.q.value = "";
}
}
function pageRedirect(url) {
window.location.href=url;
return false;
}
function characterCheck(maxchars) {
var si = document.edit_job_posting.special_instructions;
if(si.value.length > maxchars) {
alert('Too many characters! Please remove '+ (si.value.length - maxchars)+ ' characters from the Special Instructions box.');
return false;
} else return true;
}
function sendSnippet(snippet) {
url = '/snippets.php?snippet_id=' + snippet;
window.open(url, 'redirect_popup', 'width=650, height=580, left=860, top=130, menubar=no, status=no, location=no, toolbar=no, scrollbars=yes, resizable=yes');
return false;
}
function clearLocBox() // clears search boxes on click
{
if(document.google.l.value=="Location") {
document.google.l.value="";
}
}
function clearTextBox(formValue) {
if(document.google.q.value=="Keyword Search") {
document.google.q.value = "";
}
if(document.google.l.value=="Location") {
document.google.l.value="";
}
}
function clearZipBox() // clears search boxes on click
{
if(document.featured_city.featuredZip.value=="Zip Code") {
document.featured_city.featuredZip.value="";
}
}
//Real Media Validation Added CGE 4/14/03
//--------------------------------------------------------------
var RMRunCheck = 'http://images.traderonline.com/img/rm_on.gif';
bAllowRealMedia = true;
var imageChecker = new Image();
function RMnoShow() {
bAllowRealMedia = false;
}
imageChecker.onerror = RMnoShow;
imageChecker.src = RMRunCheck;
//---------------------------------------------------------------
///toggled off real media
//bAllowRealMedia = false;
var oas='http://ads.traderonline.com/RealMedia/ads/';
var RN = new String (Math.random());
var RNS = RN.substring (2,11);
function DisplayAds(page, sitepage, category, location, keywords, position, width , height) {
//keywords = '#rm_target_string#';
var oaspage = sitepage + page + '/1' + RNS + '@' + position + '?' +category + location + keywords;
//Conditional Statement Part of the Real Media Validation
if (bAllowRealMedia == true) {
if ( _version < 11 ) {
document.write ('
');
document.write ('
');
}
else {
document.write ('