<!---
/*
    Main JavaScript File
*/



function BootUp(cur_cat,cur_page) { //Grabs the current page to apply page specific scripts
  
  // Set the 3 main columns to the same height
  //    This is done first, before site shadow
  MatchObjSize('id','offsetHeight','height','TopMenu','Content','RightSide');
  
  // Set the drop shadow
  MatchObjSize('id','offsetHeight','height','shadow_l','shadow_r','SiteHolder');
  MatchObjSize('id','offsetWidth','width','SiteHolder','shadow_b');

  // Setting the width stops shadow DIVs from movin on resize.
  //   This is not done in CSS for later flexibility is sizes are changed.
  setStyle('id','PageWrap','width',grabElement('id','PageWrap').offsetWidth+'px');
  
  
  // Highlight the TopMenu item for the given page
  //setStyle('id','tm_'+cur_cat.replace(/-/g,"_")+'_'+cur_page.replace(/-/g,"_"),'color','#996600');
  //setStyle('id','sm_'+cur_cat.replace(/-/g,"_")+'_'+cur_page.replace(/-/g,"_"),'border-bottom','1px dotted #996600');
  
}


function CenterSite() {
  var BodyWidth = document.body.offsetWidth;
  var SiteHolderWidth = grabElement('id','SiteHolder').offsetWidth;
  var ShadowWidth = grabElement('id','shadow_l').offsetWidth*2;
  var Margin = (BodyWidth - SiteHolderWidth + ShadowWidth) / 2;
  
  if (Margin<1) Margin = 10;
  var txt = Margin + "px";
  
  setStyle('id',"PageWrap","marginLeft",txt);  // Set the centering margin
  
  if (Margin==10) setStyle('id',"PageWrap","marginRight",txt); // Add a little space to the right
}

//--->