function SwapImageById(id,src) {
        var obj = document.getElementById(id);
        obj.src = src;
}

function RollOver(imgName,image) {
       if (document.images) {
                document[imgName].src = image;              
        }
}

function RollOut(imgName,image) {
        if (document.images) {
                document[imgName].src = image;
        }
}

/*RollOver/Out functions for input type image*/

function RollOverSubmit(imgName,image) {
       document.getElementById(imgName).src = image;
}

//__END__

function openPopup(url,name,params) {
        window.open(url,name,params);
}

var homeimg = new Image()
homeimg.src = '/images/leftnav_home_on.gif';

function closewindow(){
                window.close();
}

function openlink(link) {
        if (link != "") {
                newWindow=window.open(link)
        }
}

function open_Demo() {
        newWindow= window.open('/idemo/HR101menu.html', 'flashdemo','toolbar=no,location=no,scrollbars=no,width=760,height=500')
}

function open_Demo2() {
        newWindow= window.open('/idemo/AEmenu.html', 'flashdemo','toolbar=no,location=no,scrollbars=no,width=760,height=500')
}

function open_idemo(src) {
        newWindow= window.open('/idemo/' + src + '.html', 'flashdemo','toolbar=no,location=no,scrollbars=no,width=760,height=500')
}

function Loadup() {
        // REPOSITION FORMS FOR DIFFERENT BROWSERS
        if(navigator.appName == "Netscape") {
                if(document.getElementById('redirect_content')) {
                        document.getElementById('redirectUsername').style.top = "-4px";
                        document.getElementById('redirectPassword').style.top = "10px";
                        document.getElementById('redirectCheckbox').style.top = "17px";
                        document.getElementById('redirectLogin').style.top = "18px";
                        document.getElementById('redirectForgotPassword').style.top = "24px";
                }
                document.getElementById('searchDiv').style.top = "16px";
                if(document.getElementById('loginUsername')) {
                           document.getElementById('loginUsername').style.top = "11px";
                        document.getElementById('loginPassword').style.top = "30px";
                        document.getElementById('loginRemember').style.top = "35px";
                }
        } else if(navigator.appName == "Microsoft Internet Explorer") {
                if(document.getElementById('redirect_content')) {
                        document.getElementById('redirectUsername').style.top = "-4px";
                        document.getElementById('redirectPassword').style.top = "10px";
                        document.getElementById('redirectCheckbox').style.top = "16px";
                        document.getElementById('redirectLogin').style.top = "20px";
                        document.getElementById('redirectForgotPassword').style.top = "26px";
                }
                document.getElementById('searchDiv').style.top = "18px";
                if(document.getElementById('loginUsername')) {
                        document.getElementById('loginUsername').style.top = "11px";
                        document.getElementById('loginPassword').style.top = "28px";
                        document.getElementById('loginRemember').style.top = "32px";
                }
                if(document.getElementById('HR101Content')) {
                        document.getElementById('HR101Content').style.top = "-20px";
                }
                if(document.getElementById('askExpertContent')) {
                        document.getElementById('askExpertContent').style.top = "-20px";
                }

        }
}

function multiRollOver(imgName,image,imgName2,image2) {
        if (image2) {
                if (document.images) {
                        document[imgName].src = image;
                        document[imgName2].src = image2;
                }
        } else {
                if (document.images) {
                document[imgName].src = image;
                document.getElementById(imgName2).style.color = '#FF9900';
                }
        }
}

function multiRollOut(imgName,image,imgName2,image2) {
        if (image2) {
                if (document.images) {
                        document[imgName].src = image;
                        document[imgName2].src = image2;
                }
        } else {
                if (document.images) {
                document[imgName].src = image;
                document.getElementById(imgName2).style.color = '#800080';
                }
        }
}

var timer,layer,menu,selection,prevSelection;
function showLayer(layer) {
        document.getElementById(layer).style.visibility = 'visible';
        clearTimeout(timer);
        menu = layer;
}
function hideLayer(layer) {
        document.getElementById(layer).style.visibility = 'hidden';
}
function setTimer(menu) {
        timer = setTimeout("hideLayer(menu)",1500);
}
function maintainMenu() {
        clearTimeout(timer);
}
function setSearchDays(days,selection) {
        if(prevSelection!=selection && prevSelection) {
                document.getElementById(prevSelection).style.color = '#330033';
        }
        document.getElementById(selection).style.color = '#FF9900';
        prevSelection = selection;
        document.searchiww.days.value = days;
        return true;
}
function ShowBanner() {

document.write('<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="https://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" WIDTH="468" HEIGHT="57" id="benefits" ALIGN="">');
document.write('<PARAM NAME=movie VALUE="/banners/benefits2.swf">');
document.write('<param name="allowScriptAccess" value="sameDomain" />');
document.write('<PARAM NAME=quality VALUE=high>');
document.write('<PARAM NAME=bgcolor VALUE=#FF9900>');
document.write('<PARAM NAME="wmode" VALUE="transparent" />');
document.write('<EMBED src="/banners/benefits2.swf" wmode="transparent" quality=high bgcolor=#FF9900  WIDTH="468" HEIGHT="57" NAME="benefits" ALIGN="" TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/go/getflashplayer"></embed></object>');

}

function ShowBanner_AON(banner) {

document.write('<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="https://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" WIDTH="468" HEIGHT="57" id="benefits" ALIGN="">');
document.write('<PARAM NAME=movie VALUE="' + banner + '">');
document.write('<param name="allowScriptAccess" value="sameDomain" />');
document.write('<PARAM NAME=quality VALUE=high>');
document.write('<PARAM NAME=bgcolor VALUE=#FFFFFF>');
document.write('<EMBED src="' + banner + '" quality=high bgcolor=#FFFFFF WIDTH="468" HEIGHT="57" NAME="benefits" ALIGN="" TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/go/getflashplayer"></embed></object>');

}


function showDemo(demo) {
document.write('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" width="760" height="500" id="'+demo+'" align="middle">');
document.write('<PARAM NAME=movie VALUE="'+demo+'.swf">');
document.write('<PARAM NAME=quality VALUE=high>');
document.write('<PARAM NAME=bgcolor VALUE=#FFFFFF>');
document.write('<embed src="'+demo+'.swf" quality="high" bgcolor="#ffffff" width="760" height="500" name="'+demo+'" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" /></object>');

}

function divStatusCheck(div_id,div_inner,show_what) {
 var cur_div = document.getElementById(div_id);
 var cur_div_style = document.getElementById(div_id).style.display; 
 
 if(cur_div_style == "none")
   cur_div.style.display = "block";
    else cur_div.style.display = "none";
    
  var cur_div_inner = document.getElementById(div_inner);
  
  if(cur_div_inner.innerHTML == "x hide " + show_what)
   cur_div_inner.innerHTML = "show " + show_what;
    else cur_div_inner.innerHTML = "x hide " + show_what;
    
 
 //alert(cur_div); 
}
