var current_layer;

current_layer=null;

// START OF SCRIPT FOR IMAGE SLIDE //

N = (document.all) ? 0 : 1;

var t;

var default_z;

default_z = 100;

image_slide_object = null;
image_slide_count = 0;
image_slide_current = 0;

image_slide_run = false;

function imageSlide(t, image_slide_target) {

  if(!image_slide_run) {

  image_slide_run = true;

  if(document.getElementById) {
    image_slide_object = document.getElementById(t).style;
  } else {
    if(document.all) {
      image_slide_object = eval('document.all.'+t+'.style');
    }
  }

  image_slide_count = 0;

  imageSlideCounter(image_slide_target);

  }

}

function imageSlideCounter(image_slide_target) {
  if(image_slide_target > image_slide_current) {
    image_slide_count = Math.round((image_slide_count+1)*1.03);
    image_slide_current_temp = image_slide_current+image_slide_count;
    if(image_slide_current_temp > image_slide_target) {
      image_slide_current_temp = image_slide_target;
    }
    image_slide_current = image_slide_current_temp;
    image_slide_object.left = 0-image_slide_current;
    setTimeout("imageSlideCounter("+image_slide_target+")",20);
  } else if(image_slide_target < image_slide_current) {
    image_slide_count = Math.round((image_slide_count+1)*1.03);
    image_slide_current_temp = image_slide_current-image_slide_count;
    if(image_slide_current_temp < image_slide_target) {
      image_slide_current_temp = image_slide_target;
    }
    image_slide_current = image_slide_current_temp;
    image_slide_object.left = 0-image_slide_current;
    setTimeout("imageSlideCounter("+image_slide_target+")",20);
  } else {
    image_slide_run = false;
  }
}

// END OF SCRIPT FOR IMAGE SLIDE //

if(document.images) {

topnav_home_on = new Image;
topnav_home_off = new Image;
topnav_buildings_on = new Image;
topnav_buildings_off = new Image;
topnav_bspa_on = new Image;
topnav_bspa_off = new Image;
topnav_floorplans_on = new Image;
topnav_floorplans_off = new Image;
topnav_homebuy_on = new Image;
topnav_homebuy_off = new Image;
topnav_rentals_on = new Image;
topnav_rentals_off = new Image;
topnav_availability_on = new Image;
topnav_availability_off = new Image;
topnav_tenures_on = new Image;
topnav_tenures_off = new Image;
topnav_getthere_on = new Image;
topnav_getthere_off = new Image;
topnav_contact_on = new Image;
topnav_contact_off = new Image;
topnav_contactemail_on = new Image;
topnav_contactemail_off = new Image;
topnav_ac_contactemail_on = new Image;
topnav_ac_contactemail_off = new Image;
topnav_sjs_contactemail_on = new Image;
topnav_sjs_contactemail_off = new Image;

hb_subnav_images_on = new Image;
hb_subnav_images_off = new Image;
hb_subnav_floorplans_on = new Image;
hb_subnav_floorplans_off = new Image;
hb_subnav_availability_on = new Image;
hb_subnav_availability_off = new Image;


hb_subnav_hb_fplans_on = new Image;
hb_subnav_hb_fplans_off = new Image;

sjs_subnav_intro_on = new Image;
sjs_subnav_intro_off = new Image;
sjs_subnav_about_on = new Image;
sjs_subnav_about_off = new Image;
sjs_subnav_specs_off = new Image;
sjs_subnav_specs_tab = new Image;
sjs_subnav_lifearound_off = new Image;
sjs_subnav_lifearound_on = new Image;
sjs_subnav_floorplans_off = new Image;
sjs_subnav_floorplans_on = new Image;

sjs_subnav_design_on = new Image;
sjs_subnav_design_tab = new Image;
sjs_subnav_interiors_on = new Image;
sjs_subnav_interiors_off = new Image;
sjs_subnav_interiors_tab = new Image;
sjs_subnav_specs_on = new Image;
sjs_subnav_specs_off = new Image;
sjs_subnav_specs_tab = new Image;
sjs_subnav_private_on = new Image;
sjs_subnav_private_off = new Image;
sjs_subnav_private_tab = new Image;

sjs_subnav_register_on = new Image;
sjs_subnav_register_off = new Image;

ac_subnav_intro_on = new Image;
ac_subnav_intro_off = new Image;
ac_subnav_intro_tab = new Image;
ac_subnav_design_on = new Image;
ac_subnav_design_off = new Image;
ac_subnav_design_tab = new Image;
ac_subnav_interiors_on = new Image;
ac_subnav_interiors_off = new Image;
ac_subnav_interiors_tab = new Image;
ac_subnav_private_on = new Image;
ac_subnav_private_off = new Image;
ac_subnav_private_tab = new Image;
ac_subnav_about_on = new Image;
ac_subnav_about_off = new Image;
ac_subnav_about_tab = new Image;
ac_subnav_spapark_off = new Image;
ac_subnav_spapark_on = new Image;
ac_subnav_spapark_tab = new Image;
ac_subnav_specs_off = new Image;
ac_subnav_specs_on = new Image;
ac_subnav_specs_tab = new Image;
ac_subnav_lifearound_off = new Image;
ac_subnav_lifearound_on = new Image;
ac_subnav_lifearound_tab = new Image;
ac_subnav_environment_off = new Image;
ac_subnav_environment_on = new Image;
ac_subnav_environment_tab = new Image;
ac_subnav_floorplans_off = new Image;
ac_subnav_floorplans_on = new Image;
ac_subnav_floorplans_tab = new Image;

eh_subnav_intro_on = new Image;
eh_subnav_intro_off = new Image;
eh_subnav_intro_tab = new Image;
eh_subnav_design_on = new Image;
eh_subnav_design_off = new Image;
eh_subnav_design_tab = new Image;
eh_subnav_interiors_on = new Image;
eh_subnav_interiors_off = new Image;
eh_subnav_interiors_tab = new Image;
eh_subnav_specs_on = new Image;
eh_subnav_specs_off = new Image;
eh_subnav_specs_tab = new Image;
eh_subnav_private_on = new Image;
eh_subnav_private_off = new Image;
eh_subnav_private_tab = new Image;

bb_subnav_intro_on = new Image;
bb_subnav_intro_off = new Image;
bb_subnav_intro_tab = new Image;
bb_subnav_design_on = new Image;
bb_subnav_design_off = new Image;
bb_subnav_design_tab = new Image;
bb_subnav_interiors_on = new Image;
bb_subnav_interiors_off = new Image;
bb_subnav_interiors_tab = new Image;
bb_subnav_specs_on = new Image;
bb_subnav_specs_off = new Image;
bb_subnav_specs_tab = new Image;
bb_subnav_private_on = new Image;
bb_subnav_private_off = new Image;
bb_subnav_private_tab = new Image;

bs_topnavsub_bfs_stjames_off = new Image;
bs_topnavsub_bfs_stjames_on = new Image;

bs_topnavsub_ber_ber_off = new Image;
bs_topnavsub_ber_ber_on = new Image;
bs_topnavsub_ber_reg_off = new Image;
bs_topnavsub_ber_reg_on = new Image;
bs_topnavsub_ber_his_off = new Image;
bs_topnavsub_ber_his_on = new Image;

bs_topnavsub_ten_sha_off = new Image;
bs_topnavsub_ten_sha_on = new Image;
bs_topnavsub_ten_int_off = new Image;
bs_topnavsub_ten_int_on = new Image;
bs_topnavsub_ten_soc_off = new Image;
bs_topnavsub_ten_soc_on = new Image;

bs_topnavsub_sch_sus_off = new Image;
bs_topnavsub_sch_sus_on = new Image;
bs_topnavsub_sch_new_off = new Image;
bs_topnavsub_sch_new_on = new Image;
bs_topnavsub_sch_hyd_off = new Image;
bs_topnavsub_sch_hyd_on = new Image;

bs_ac_eco_card03_off = new Image;
bs_ac_eco_card03_a_on = new Image;
bs_ac_eco_card03_b_on = new Image;
bs_ac_eco_card03_c_on = new Image;
bs_ac_eco_card03_d_on = new Image;
bs_ac_eco_card03_e_on = new Image;

bs_ac_eco_card03_off.src = "../image/bs_ac_eco_card03_off.jpg";
bs_ac_eco_card03_a_on.src = "../image/bs_ac_eco_card03_a_on.jpg";
bs_ac_eco_card03_b_on.src = "../image/bs_ac_eco_card03_b_on.jpg";
bs_ac_eco_card03_c_on.src = "../image/bs_ac_eco_card03_c_on.jpg";
bs_ac_eco_card03_d_on.src = "../image/bs_ac_eco_card03_d_on.jpg";
bs_ac_eco_card03_e_on.src = "../image/bs_ac_eco_card03_e_on.jpg";


topnav_home_on.src = "../image/bs_topnav_home_on.gif";
topnav_home_off.src = "../image/bs_topnav_home_off.gif";
topnav_buildings_on.src = "../image/bs_topnav_buildings_on.gif";
topnav_buildings_off.src = "../image/bs_topnav_buildings_off.gif";
topnav_bspa_on.src = "../image/bs_topnav_bspa_on.gif";
topnav_bspa_off.src = "../image/bs_topnav_bspa_off.gif";
topnav_floorplans_on.src = "../image/bs_topnav_floorplans_on.gif";
topnav_floorplans_off.src = "../image/bs_topnav_floorplans_off.gif";
topnav_homebuy_on.src = "../image/bs_topnav_homebuy_on.gif";
topnav_homebuy_off.src = "../image/bs_topnav_homebuy_off.gif";
topnav_rentals_on.src = "../image/bs_topnav_rentals_on.gif";
topnav_rentals_off.src = "../image/bs_topnav_rentals_off.gif";
topnav_availability_on.src = "../image/bs_topnav_availability_on.gif";
topnav_availability_off.src = "../image/bs_topnav_availability_off.gif";
topnav_tenures_on.src = "../image/bs_topnav_tenures_on.gif";
topnav_tenures_off.src = "../image/bs_topnav_tenures_off.gif";
topnav_getthere_on.src = "../image/bs_topnav_getthere_on.gif";
topnav_getthere_off.src = "../image/bs_topnav_getthere_off.gif";
topnav_contact_on.src = "../image/bs_topnav_contact_on.gif";
topnav_contact_off.src = "../image/bs_topnav_contact_off.gif";
topnav_contactemail_on.src = "../image/bs_topnav_contactemail_on.gif";
topnav_contactemail_off.src = "../image/bs_topnav_contactemail_off.gif";
topnav_ac_contactemail_on.src = "../image/bs_topnav_ac_contactemail_on.gif";
topnav_ac_contactemail_off.src = "../image/bs_topnav_ac_contactemail_off.gif";
topnav_sjs_contactemail_on.src = "../image/bs_topnav_sjs_contactemail_on.gif";
topnav_sjs_contactemail_off.src = "../image/bs_topnav_sjs_contactemail_off.gif";

hb_subnav_hb_fplans_on.src = "../image/subnav_hb_fplans_on.gif";
hb_subnav_hb_fplans_off.src = "../image/subnav_hb_fplans_on.gif";


hb_subnav_images_on.src = "../image/bs_hb_sub_images_on.gif";
hb_subnav_images_off.src = "../image/bs_hb_sub_images_off.gif";
hb_subnav_floorplans_on.src = "../image/bs_hb_sub_floorplans_on.gif";
hb_subnav_floorplans_off.src = "../image/bs_hb_sub_floorplans_off.gif";
hb_subnav_availability_on.src = "../image/bs_hb_sub_availability_on.gif";
hb_subnav_availability_off.src = "../image/bs_hb_sub_availability_off.gif";


sjs_subnav_intro_on.src = "../image/bs_sjs_sub_intro_on.gif";
sjs_subnav_intro_off.src = "../image/bs_sjs_sub_intro_off.gif";
sjs_subnav_about_on.src = "../image/bs_sjs_sub_about_on.gif";
sjs_subnav_about_off.src = "../image/bs_sjs_sub_about_off.gif"
sjs_subnav_specs_on.src = "../image/bs_sjs_sub_specs_on.gif";
sjs_subnav_specs_off.src = "../image/bs_sjs_sub_specs_off.gif";
sjs_subnav_lifearound_on.src = "../image/bs_sjs_sub_lifearound_on.gif";
sjs_subnav_lifearound_off.src = "../image/bs_sjs_sub_lifearound_off.gif";
sjs_subnav_floorplans_on.src = "../image/bs_sjs_sub_floorplans_on.gif";
sjs_subnav_floorplans_off.src = "../image/bs_sjs_sub_floorplans_off.gif";
sjs_subnav_register_on.src = "../image/bs_sjs_sub_register_on.gif";
sjs_subnav_register_off.src = "../image/bs_sjs_sub_register_off.gif";

ac_subnav_intro_on.src = "../image/bs_ac_sub_intro_on.gif";
ac_subnav_intro_off.src = "../image/bs_ac_sub_intro_off.gif";
ac_subnav_intro_tab.src = "../image/bs_ac_sub_intro_tab.gif";
ac_subnav_design_on.src = "../image/bs_ac_sub_design_on.gif";
ac_subnav_design_off.src = "../image/bs_ac_sub_design_off.gif";
ac_subnav_design_tab.src = "../image/bs_ac_sub_design_tab.gif";
ac_subnav_interiors_on.src = "../image/bs_ac_sub_interiors_on.gif";
ac_subnav_interiors_off.src = "../image/bs_ac_sub_interiors_off.gif";
ac_subnav_interiors_tab.src = "../image/bs_ac_sub_interiors_tab.gif";
ac_subnav_private_on.src = "../image/bs_ac_sub_private_on.gif";
ac_subnav_private_off.src = "../image/bs_ac_sub_private_off.gif";
ac_subnav_private_tab.src = "../image/bs_ac_sub_private_tab.gif";
ac_subnav_private_on.src = "../image/bs_ac_sub_private_on.gif";
ac_subnav_about_off.src = "../image/bs_ac_sub_about_off.gif";
ac_subnav_about_on.src = "../image/bs_ac_sub_about_on.gif";
ac_subnav_about_tab.src = "../image/bs_ac_sub_about_tab.gif";
ac_subnav_spapark_off.src = "../image/bs_ac_sub_spapark_off.gif";
ac_subnav_spapark_on.src = "../image/bs_ac_sub_spapark_on.gif";
ac_subnav_spapark_tab.src = "../image/bs_ac_sub_spapark_tab.gif";
ac_subnav_specs_off.src = "../image/bs_ac_sub_specs_off.gif";
ac_subnav_specs_on.src = "../image/bs_ac_sub_specs_on.gif";
ac_subnav_specs_tab.src = "../image/bs_ac_sub_specs_tab.gif";
ac_subnav_lifearound_off.src = "../image/bs_ac_sub_lifearound_off.gif";
ac_subnav_lifearound_on.src = "../image/bs_ac_sub_lifearound_on.gif";
ac_subnav_lifearound_tab.src = "../image/bs_ac_sub_lifearound_tab.gif";
ac_subnav_environment_off.src = "../image/bs_ac_sub_environment_off.gif";
ac_subnav_environment_on.src = "../image/bs_ac_sub_environment_on.gif";
ac_subnav_environment_tab.src = "../image/bs_ac_sub_environment_tab.gif";
ac_subnav_floorplans_off.src = "../image/bs_ac_sub_floorplans_off.gif";
ac_subnav_floorplans_on.src = "../image/bs_ac_sub_floorplans_on.gif";
ac_subnav_floorplans_tab.src = "../image/bs_ac_sub_floorplans_tab.gif";




eh_subnav_intro_on.src = "../image/bs_eh_sub_intro_on.gif";
eh_subnav_intro_off.src = "../image/bs_eh_sub_intro_off.gif";
eh_subnav_intro_tab.src = "../image/bs_eh_sub_intro_tab.gif";
eh_subnav_design_on.src = "../image/bs_eh_sub_design_on.gif";
eh_subnav_design_off.src = "../image/bs_eh_sub_design_off.gif";
eh_subnav_design_tab.src = "../image/bs_eh_sub_design_tab.gif";
eh_subnav_interiors_on.src = "../image/bs_eh_sub_interiors_on.gif";
eh_subnav_interiors_off.src = "../image/bs_eh_sub_interiors_off.gif";
eh_subnav_interiors_tab.src = "../image/bs_eh_sub_interiors_tab.gif";
eh_subnav_specs_on.src = "../image/bs_eh_sub_specs_on.gif";
eh_subnav_specs_off.src = "../image/bs_eh_sub_specs_off.gif";
eh_subnav_specs_tab.src = "../image/bs_eh_sub_specs_tab.gif";
eh_subnav_private_on.src = "../image/bs_eh_sub_private_on.gif";
eh_subnav_private_off.src = "../image/bs_eh_sub_private_off.gif";
eh_subnav_private_tab.src = "../image/bs_eh_sub_private_tab.gif";

bb_subnav_intro_on.src = "../image/bs_bb_sub_intro_on.gif";
bb_subnav_intro_off.src = "../image/bs_bb_sub_intro_off.gif";
bb_subnav_intro_tab.src = "../image/bs_bb_sub_intro_tab.gif";
bb_subnav_design_on.src = "../image/bs_bb_sub_design_on.gif";
bb_subnav_design_off.src = "../image/bs_bb_sub_design_off.gif";
bb_subnav_design_tab.src = "../image/bs_bb_sub_design_tab.gif";
bb_subnav_interiors_on.src = "../image/bs_bb_sub_interiors_on.gif";
bb_subnav_interiors_off.src = "../image/bs_bb_sub_interiors_off.gif";
bb_subnav_interiors_tab.src = "../image/bs_bb_sub_interiors_tab.gif";
bb_subnav_specs_on.src = "../image/bs_bb_sub_specs_on.gif";
bb_subnav_specs_off.src = "../image/bs_bb_sub_specs_off.gif";
bb_subnav_specs_tab.src = "../image/bs_bb_sub_specs_tab.gif";
bb_subnav_private_on.src = "../image/bs_bb_sub_private_on.gif";
bb_subnav_private_off.src = "../image/bs_bb_sub_private_off.gif";
bb_subnav_private_tab.src = "../image/bs_bb_sub_private_tab.gif";

bs_topnavsub_bfs_stjames_off.src = "../image/bs_topnavsub_bfs_stjames_off.gif";
bs_topnavsub_bfs_stjames_on.src = "../image/bs_topnavsub_bfs_stjames_on.gif";

bs_topnavsub_ber_ber_off.src = "../image/bs_topnavsub_ber_ber_off.gif";
bs_topnavsub_ber_ber_on.src = "../image/bs_topnavsub_ber_ber_on.gif";
bs_topnavsub_ber_reg_off.src = "../image/bs_topnavsub_ber_reg_off.gif";
bs_topnavsub_ber_reg_on.src = "../image/bs_topnavsub_ber_reg_on.gif";
bs_topnavsub_ber_his_off.src = "../image/bs_topnavsub_ber_his_off.gif";
bs_topnavsub_ber_his_on.src = "../image/bs_topnavsub_ber_his_on.gif";

bs_topnavsub_ten_sha_off.src = "../image/bs_topnavsub_ten_sha_off.gif";
bs_topnavsub_ten_sha_on.src = "../image/bs_topnavsub_ten_sha_on.gif";
bs_topnavsub_ten_soc_off.src = "../image/bs_topnavsub_ten_soc_off.gif";
bs_topnavsub_ten_soc_on.src = "../image/bs_topnavsub_ten_soc_on.gif";
bs_topnavsub_ten_int_off.src = "../image/bs_topnavsub_ten_int_off.gif";
bs_topnavsub_ten_int_on.src = "../image/bs_topnavsub_ten_int_on.gif";

bs_topnavsub_sch_sus_off.src = "../image/bs_topnavsub_sch_sus_off.gif";
bs_topnavsub_sch_sus_on.src = "../image/bs_topnavsub_sch_sus_on.gif";
bs_topnavsub_sch_new_off.src = "../image/bs_topnavsub_sch_new_off.gif";
bs_topnavsub_sch_new_on.src = "../image/bs_topnavsub_sch_new_on.gif";
bs_topnavsub_sch_hyd_off.src = "../image/bs_topnavsub_sch_hyd_off.gif";
bs_topnavsub_sch_hyd_on.src = "../image/bs_topnavsub_sch_hyd_on.gif";


}

function swapImage(f,n) {
  f = "document."+f;
  f = eval(f);
  n = eval(n);
  f.src = n.src;
}

function showHideLayer(t,sh) {
  if(document.getElementById) {
    layer_object = document.getElementById(t).style;
  } else {
    if(document.all) {
      layer_object = eval('document.all.'+t+'.style');
    }
  }
  if(sh == "show") {
    //alert("SHOW: "+layer_object);
    layer_object.visibility = "visible"; 
  } else {
    //alert("HIDE: "+layer_object);
    layer_object.visibility = "hidden";
  }
}

function zIndexTop(t) {
  if(document.getElementById) {
    layer_object = document.getElementById(t).style;
  } else {
    if(document.all) {
      layer_object = eval('document.all.'+t+'.style');
    }
  }
  layer_object.zIndex = default_z;
  default_z++;
}

function zIndexBot(t) {
  if(document.getElementById) {
    layer_object = document.getElementById(t).style;
  } else {
    if(document.all) {
      layer_object = eval('document.all.'+t+'.style');
    }
  }
  layer_object.zIndex = default_z;
  default_z--;
}

function showHideLayer_2(t) {
  if(document.getElementById) {
    layer_object = document.getElementById(t).style;
  } else {
    if(document.all) {
      layer_object = eval('document.all.'+t+'.style');
    }
  }

  layer_object.visibility = "visible";
  if(current_layer && (current_layer !== layer_object)) {
    current_layer.visibility = "hidden";
  }
  current_layer = layer_object;

}


// START OF SCRIPT FOR RANDOM LOGO IMAGE 

// Set up the image files to be used.
var theImages = new Array() 

theImages[0] = '../image/bs_topnav_logo_01.gif'
theImages[1] = '../image/bs_topnav_logo_03.gif'
theImages[2] = '../image/bs_topnav_logo_04.gif'
theImages[3] = '../image/bs_topnav_logo_05.gif'
theImages[4] = '../image/bs_topnav_logo_06.gif'

// do not edit anything below this line

var j = 0
var p = theImages.length;
var preBuffer = new Array()
for (i = 0; i < p; i++){
   preBuffer[i] = new Image()
   preBuffer[i].src = theImages[i]
}

var whichImage = Math.round(Math.random()*(p-1));

function randomLogo(){
document.write('<img src="'+theImages[whichImage]+'" alt="Bermondsey Spa">');
}

