if (document.images) {
  smlogin_on = new Image();
  smlogin_off = new Image();
  smlogin_on.src = "img/mini_login_on.gif";
  smlogin_off.src = "img/mini_login.gif";

  smlogout_on = new Image();
  smlogout_off = new Image();
  smlogout_on.src = "img/mini_logout_on.gif";
  smlogout_off.src = "img/mini_logout.gif";
  
  smhome_on = new Image();
  smhome_off = new Image();
  smhome_on.src = "img/mini_home_on.gif";
  smhome_off.src = "img/mini_home.gif";

  smsitemap_on = new Image();
  smsitemap_off = new Image();
  smsitemap_on.src = "img/mini_sitemap_on.gif";
  smsitemap_off.src = "img/mini_sitemap.gif";

  smcontacts_on = new Image();
  smcontacts_off = new Image();
  smcontacts_on.src = "img/mini_contacts_on.gif";
  smcontacts_off.src = "img/mini_contacts.gif";
  
  quicksearch_submit_on = new Image();
  quicksearch_submit_off = new Image();
  quicksearch_submit_on.src = "img/quicksearch/search_submit_on.gif";
  quicksearch_submit_off.src = "img/quicksearch/search_submit.gif";
  
  quicksearch_submit_big_on = new Image();
  quicksearch_submit_big_off = new Image();
  quicksearch_submit_big_on.src = "img/quicksearch/search_submit_big_on.gif";
  quicksearch_submit_big_off.src = "img/quicksearch/search_submit_big.gif";
 
  quicksearch_submit_gray_on = new Image();
  quicksearch_submit_gray_off = new Image();
  quicksearch_submit_gray_on.src = "img/quicksearch/search_submit_gray_on.gif";
  quicksearch_submit_gray_off.src = "img/quicksearch/search_submit_gray.gif";
 
  quicksearch_tab_on = new Image();
  quicksearch_tab_off = new Image();
  quicksearch_tab_on.src = "img/quicksearch/tab_mls_search_on.gif";
  quicksearch_tab_off.src = "img/quicksearch/tab_mls_search_off.gif";
 
  homes_tab_on = new Image();
  homes_tab_off = new Image();
  homes_tab_on.src = "img/quicksearch/tab_my_homes_on.gif";
  homes_tab_off.src = "img/quicksearch/tab_my_homes_off.gif";
  
  my_searches_tab_on = new Image();
  my_searches_tab_off = new Image();
  my_searches_tab_on.src = "img/quicksearch/tab_my_searches_on.gif";
  my_searches_tab_off.src = "img/quicksearch/tab_my_searches_off.gif";

  menu_home_on = new Image();
  menu_home_off = new Image();
  menu_home_on.src = "img/menu/home_on.gif";
  menu_home_off.src = "img/menu/home_off.gif";

  menu_search_on = new Image();
  menu_search_off = new Image();
  menu_search_on.src = "img/menu/search_on.gif";
  menu_search_off.src = "img/menu/search_off.gif";

  menu_buyers_on = new Image();
  menu_buyers_off = new Image();
  menu_buyers_on.src = "img/menu/buyers_on.gif";
  menu_buyers_off.src = "img/menu/buyers_off.gif";

  menu_sellers_on = new Image();
  menu_sellers_off = new Image();
  menu_sellers_on.src = "img/menu/sellers_on.gif";
  menu_sellers_off.src = "img/menu/sellers_off.gif";

  menu_learn_on = new Image();
  menu_learn_off = new Image();
  menu_learn_on.src = "img/menu/learn_on.gif";
  menu_learn_off.src = "img/menu/learn_off.gif";
  
  menu_about_us_on = new Image();
  menu_about_us_off = new Image();
  menu_about_us_on.src = "img/menu/about_us_on.gif";
  menu_about_us_off.src = "img/menu/about_us_off.gif";

  menu_my_guide_on = new Image();
  menu_my_guide_off = new Image();
  menu_my_guide_on.src = "img/menu/my_guide_on.gif";
  menu_my_guide_off.src = "img/menu/my_guide_off.gif";

  vtab_my_file_on = new Image();
  vtab_my_file_off = new Image();
  vtab_my_file_on.src = "img/vtabs/my_file_on_pop.gif";
  vtab_my_file_off.src = "img/vtabs/my_file_off.gif";

  vtab_my_favorites_on = new Image();
  vtab_my_favorites_off = new Image();
  vtab_my_favorites_on.src = "img/vtabs/my_favorites_on_pop.gif";
  vtab_my_favorites_off.src = "img/vtabs/my_favorites_off.gif";

  vtab_my_schools_on = new Image();
  vtab_my_schools_off = new Image();
  vtab_my_schools_on.src = "img/vtabs/my_schools_on_pop.gif";
  vtab_my_schools_off.src = "img/vtabs/my_schools_off.gif";

  vtab_my_homes_on = new Image();
  vtab_my_homes_off = new Image();
  vtab_my_homes_on.src = "img/vtabs/my_homes_on_pop.gif";
  vtab_my_homes_off.src = "img/vtabs/my_homes_off.gif";

  vtab_my_searches_on = new Image();
  vtab_my_searches_off = new Image();
  vtab_my_searches_on.src = "img/vtabs/my_searches_on_pop.gif";
  vtab_my_searches_off.src = "img/vtabs/my_searches_off.gif";

  ico_map_on = new Image();
  ico_map_off = new Image();
  ico_map_on.src = "img/icon_map.gif";
  ico_map_off.src = "img/icon_map_gray.gif";

  ico_magnify_on = new Image();
  ico_magnify_off = new Image();
  ico_magnify_on.src = "img/icon_magnify.gif";
  ico_magnify_off.src = "img/icon_magnify_gray.gif";

  ico_clip_on = new Image();
  ico_clip_off = new Image();
  ico_clip_on.src = "img/icon_paperclip.gif";
  ico_clip_off.src = "img/icon_paperclip_gray.gif";

  ico_vtour_on = new Image();
  ico_vtour_off = new Image();
  ico_vtour_on.src = "img/icon_vtour.gif";
  ico_vtour_off.src = "img/icon_vtour_gray.gif";

  ico_save_on = new Image();
  ico_save_off = new Image();
  ico_save_on.src = "img/icon_save.gif";
  ico_save_off.src = "img/icon_save_gray.gif";

  ico_print_on = new Image();
  ico_print_off = new Image();
  ico_print_on.src = "img/icon_print.gif";
  ico_print_off.src = "img/icon_print_gray.gif";

  ico_calendar_on = new Image();
  ico_calendar_off = new Image();
  ico_calendar_on.src = "img/icon_calendar.gif";
  ico_calendar_off.src = "img/icon_calendar_gray.gif";

  ico_reqinfo_on = new Image();
  ico_reqinfo_off = new Image();
  ico_reqinfo_on.src = "img/icon_question.gif";
  ico_reqinfo_off.src = "img/icon_question_gray.gif";

  star_on = new Image();
  star_off = new Image();
  star_off.src = "img/icons/star_gray.gif";
  star_on.src = "img/icons/star_yellow.gif";

  star_on_24 = new Image();
  star_off_24 = new Image();
  star_off_24.src = "img/icons/star_gray_24.gif";
  star_on_24.src = "img/icons/star_yellow_24.gif";

  not_interested_on = new Image();
  not_interested_off = new Image();
  not_interested_on.src = "img/icons/star_off_on.gif";
  not_interested_off.src = "img/icons/star_off_gray.gif";

  save_search_on = new Image();
  save_search_off = new Image();
  save_search_on.src = "img/save_search_on.gif";
  save_search_off.src = "img/save_search.gif";

  back_on = new Image();
  back_off = new Image();
  back_on.src = "img/arrow_left_blue.gif";
  back_off.src = "img/arrow_left_gray.gif";
}

function imgOn(imgName) {
  if (document.images) {
    document[imgName].src = eval(imgName + "_on.src");
  }
}

function imgOff(imgName) {
  if (document.images) {
    document[imgName].src = eval(imgName + "_off.src");
  }
}

function imgOnCustom(imgName, imgToSet) {
  if (document.images) {
    var img;
    if (imgName.indexOf('ico_magnify') > -1) 
      img = ico_magnify_on;
    else if (imgName.indexOf('ico_save') > -1)
      img = ico_save_on;
    else if (imgName.indexOf('ico_print') > -1)
      img = ico_print_on;
    else if (imgName.indexOf('ico_calendar') > -1)
      img = ico_calendar_on;
    else if (imgName.indexOf('ico_map') > -1)
      img = ico_map_on;
    else if (imgName.indexOf('ico_clip') > -1)
      img = ico_clip_on;
    else if (imgName.indexOf('ico_reqinfo') > -1)
      img = ico_reqinfo_on;
    else if (imgName.indexOf('ico_vtour') > -1)
      img = ico_vtour_on;

    document[imgName].src = eval("img.src");
  }
}

function imgOffCustom(imgName, imgToSet) {
  if (document.images) {
    var img;
    if (imgName.indexOf('ico_magnify') > -1) 
      img = ico_magnify_off;
    else if (imgName.indexOf('ico_save') > -1)
      img = ico_save_off;
    else if (imgName.indexOf('ico_print') > -1)
      img = ico_print_off;
    else if (imgName.indexOf('ico_calendar') > -1)
      img = ico_calendar_off;
    else if (imgName.indexOf('ico_map') > -1)
      img = ico_map_off;
    else if (imgName.indexOf('ico_clip') > -1)
      img = ico_clip_off;
    else if (imgName.indexOf('ico_reqinfo') > -1)
      img = ico_reqinfo_off;
    else if (imgName.indexOf('ico_vtour') > -1)
      img = ico_vtour_off;

    document[imgName].src = eval("img.src");
  }
}


