document.observe("dom:loaded", activateHomeSections );if( FlashDetect.check() ){  //alert('flash');  document.write('<style>');  document.write('div#sBoxInner img{display:none;};');  document.write('</style>');}if( BrowserDetect.browser!='Explorer' || BrowserDetect.version>6){    var windowHeight = getWindowHeight();    if( windowHeight>800 )  {    document.write('<style>');    var topMargin = (windowHeight-780)/2;    //if( topMargin>50 ) topMargin=50;    document.write('  div#container{ margin-top:'+topMargin+'px }');    document.write('</style>');  }}function activateHomeSections(){  if( $('searchBox') )   {    swfobject.embedSWF('/flash/spring.swf', "sBoxInner", "931", "221", "8.0.0");    if( $('sBoxImg') ) $('sBoxImg').setStyle('display:none');  }    var allLinks = document.getElementsByTagName('a');    for( var i=0; i<allLinks.length; i++ )  {    var link = allLinks[i];    if( link.parentNode.parentNode.parentNode.id == 'home' )    {      if( link.innerHTML == 'Finance &amp; Banking Recruitment') link.style.color = '#002C52';      if( link.innerHTML == 'Accountancy Recruitment') link.style.color = '#004431';      if( link.innerHTML == 'International Recruitment') link.style.color = '#75042F';            Event.observe( link, 'click', updateHomeSection, false);    }  }}function updateHomeSection( Event ){  var element = Event.element();   var hash = element.hash.replace('#', '');    new Ajax.Request( '/page/homepage/section/'+hash+'.html',  {    method:'get',    onComplete: function(transport)    {      var response     = transport.responseText;      var person = Math.floor(Math.random()*5)+1;      $('home').innerHTML = response;      $('home').setStyle({background:'url(/images/home/'+hash+'_'+person+'.gif) 10px 15px no-repeat'});            if( BrowserDetect.browser!='Explorer')      {        $('home').setStyle({display:'none'});        $('home').appear({ duration: 0.5 });      }      activateHomeSections();    }  });    Event.stop();}  /** * Get the inner height of the window */function getWindowHeight(){  var height;  if(BrowserDetect.browser == 'Explorer')  {    height = document.documentElement.clientHeight;  }  else  {    height = window.innerHeight;  }  return height;}