/*
This function can be used to add unlimited window.onload events.
*/
function addLoadEvent(func) {
    var oldonload = window.onload;
        if (typeof window.onload != 'function') {
            window.onload = func;
        } else {
            window.onload = function() {
            if (oldonload) {
                oldonload();
            }
            func();
        }
    }
}

/*
This function is used to disable the form to help prevent 
double submits.

Usage: 
<form onsubmit="submitAndDisableForm(this);return void;">
*/
function submitAndDisableForm(form)
{
    form.submit();
    var elements = form.elements();
    for(var i=0;i<elements.length;i++) {
        elements[i].disabled=true;
    }
}

/*
This function can be used to disable the "Enter" key for 
stricter control over forms.
Usage:
document.onkeypress = disableEnterKey;
*/
function disableEnterKey(e)
{
     var key;
     if(window.event)
          key = window.event.keyCode;     //IE
     else
          key = e.which;     //firefox

     if(key == 13)
          return false;
     else
          return true;
}


if (document.images) {

 about_uson = new Image();
 about_uson.src = "/images/menu_about_us_on.gif";

 about_usoff = new Image();
 about_usoff.src = "/images/menu_about_us_off.gif";

 real_estateon = new Image();
 real_estateon.src = "/images/menu_real_estate_on.gif";

 real_estateoff = new Image();
 real_estateoff.src = "/images/menu_real_estate_off.gif";

 technologyon = new Image();
 technologyon.src = "/images/menu_technology_on.gif";

 technologyoff = new Image();
 technologyoff.src = "/images/menu_technology_off.gif";

 financial_serviceson = new Image();
 financial_serviceson.src = "/images/menu_financial_services_on.gif";

 financial_servicesoff = new Image();
 financial_servicesoff.src = "/images/menu_financial_services_off.gif";

 educationon = new Image();
 educationon.src = "/images/menu_education_on.gif";

 educationoff = new Image();
 educationoff.src = "/images/menu_education_off.gif";

 contact_uson = new Image();
 contact_uson.src = "/images/menu_contact_us_on.gif";

 contact_usoff = new Image();
 contact_usoff.src = "/images/menu_contact_us_off.gif";

 site_mapon = new Image();
 site_mapon.src = "/images/menu_site_map_on.gif";

 site_mapoff = new Image();
 site_mapoff.src = "/images/menu_site_map_off.gif";

}
 

