/*==============================================================================
// Internet Explorer Fixes
// Jeremy Morgan <jdmorgan@syr.edu>
//============================================================================*/

if (isIE()) {
  if (window.XMLHttpRequest) {
    //IE == 7
    
  } else {
    //IE <= 6
    document.write('<link href="/css/main_ie.css" rel="stylesheet" type="text/css"/>');
  }
}

function fixMenus(divID) {
  if (isIE()) {
    if (window.XMLHttpRequest) {
      //IE == 7
      //alert('ie7');
      document.getElementById('third_nav').style.margin='-4px 0px 0px 0px';
      //document.getElementById('main_nav').style.margin='0px 0px 4px 0px';
      document.getElementById('second_main_nav').style.margin='0px 0px 4px 0px';
      document.getElementById('second_search_tabs').style.margin='4px 45px -2px 0px';
      document.getElementById('tab_all').style.padding='0px 3px 3px 0px';
      //document.getElement('ul').style.color='red';
    } else {
      //IE <= 6
      document.getElementById('second_top_nav').style.margin='-11px 0px 0px 0px';
      document.getElementById('head_home_container').style.height='224px';
      document.getElementById('second_search_tabs').style.margin='2px 45px -2px 0px';
      document.getElementById('tab_all').style.padding='0px 3px 3px 0px';
      document.getElementById('head_second').style.margin='0px 0px -82px 0px';
      
      //document.getElementById('utility_link_div').style.margin='-23px 20px 10px 0px';
      //document.getElementById('utility_link_div').style.margin='0px 20px 0px 0px';
      //document.getElementById('breadcrumb_div').style.margin='-23px 0px 0px 25px';
      //document.getElementById('body_second_container').style.margin='-82px auto 0px auto';
      //document.getElementById('body_second_content').style.float='right';
      
      //========================================================================
      //var heightAdjust = document.getElementById('third_nav').offsetHeight - 20;
      //alert(heightAdjust);
      //document.getElementById('body_second_container').style.margin= '-'+heightAdjust+'px auto -82px auto';
      //document.getElementById('copyright_container').style.margin= '164px auto 0px auto';
      //========================================================================
      
    }
  }
}

function fixHeight() {
  if (isIE()) {
    //var heightAdjust = document.getElementById('third_nav').offsetHeight - 20;
    //heightAdjust = (heightAdjust - 481);
    //heightAdjust = (heightAdjust - 533);
    //alert(heightAdjust);
    
    //document.getElementById('body_second_container').style.position = 'absolute';
    //document.getElementById('body_second_container').style.zIndex = '1';
    
    //document.getElementById('left_nav').style.position = 'absolute';
    //document.getElementById('left_nav').style.zIndex = '2';
    
    //document.getElementById('body_second_container').style.margin= '-'+heightAdjust+'px auto -82px auto';
    //document.getElementById('copyright_container').style.margin= '82px auto 0px auto';
    
    //document.getElementById('body_second_content').style.float='right';
  }
}

function fixMenusSearch(divID) {
  if (isIE()) {
    if (window.XMLHttpRequest) {
      //IE == 7
      document.getElementById('third_nav').style.margin='-4px 0px 0px 0px';
      document.getElementById('main_nav').style.margin='0px 0px 4px 0px';
      //document.getElementById('second_main_nav').style.margin='0px 0px 4px 0px';
      //document.getElementById('second_search_tabs').style.margin='2px 45px -2px 0px';
      //document.getElement('ul').style.color='red';
    } else {
      //IE <= 6
      //document.getElementById('second_top_nav').style.margin='-11px 0px 0px 0px';
      //document.getElementById('utility_link_div').style.margin='-23px 20px 10px 0px';
      //document.getElementById('breadcrumb_div').style.margin='-23px 0px 0px 25px';
      document.getElementById('body_second_container').style.margin='-82px auto 0px auto';
      document.getElementById('head_home_container').style.height='224px';
      //document.getElementById('second_search_tabs').style.margin='2px 45px -2px 0px';
      //document.getElementById('tab_all').style.padding='0px 3px 3px 0px';
      document.getElementById('head_second').style.margin='0px 0px -82px 0px';
    }
  }
}

function fixSearchTable() {
  if (isIE()) {
    //document.getElementById('meta_search_table').style.width='800px';
    //document.getElementById('meta_search_table').style.text-align='center';
    document.getElementById('meta_search_table').style.margin='10px 0px 10px -247px';
    document.getElementById('meta_search_table').style.padding='0px 0px 0px 0px';
    //document.getElementById('body_second_container').style.margin='-82px auto 0px auto';
    document.getElementById('ie_search_table_container').style.margin='0px auto 0px auto';
    document.getElementById('ie_search_table_container').style.left='12px';
    document.getElementById('ie_search_table_container').style.position='relative';
  }
}