/* Constants */
/*var sIFRHide = {
   hide : function(selectors) {
      document.write('<style type="text/css">');
      document.write(selectors.join(", ") + ' {visibility:hidden;}');
      document.write('</style>');
   }
};
sIFRHide.hide(['.h_col1 h2', '.h_col2 h2', '.h_col3 h2', 'h1', 'h2.pagetitle', '.s_col3 h3', '#col3 h2', '#col2 h2.replace',
        'div.welcome', 'p.summary', 'span.summary', 'h2.title', 
        '.ticker h3']);*/

var rootDirectory = "";

PINT_BrowserDetection("browserupgrade.htm");

function init() {
        // Sets a load delay on the pngfix and sIFR to fix a PWP load clobbering bug
        if (PINT.isEditing) {
          if (PINT.util.browser.bIe6) var pnginit = setTimeout('PINT.util.pngFix()', 1000); // uncomment if using pngfix
        } else {
          if (PINT.util.browser.bIe6) PINT.util.pngFix();  // uncomment if using pngfix
        }

	var fileName  = PINT_GetCurrentFileName();
	var directory = PINT_GetCurrentDirectory();
	//PINT_sifr();
        if(document.getElementById("nav")){
        var navItems = document.getElementById("nav").getElementsByTagName('li');

	PINT_productsTab(navItems[0], document.getElementById('about_nav'), "about_nav");
	PINT_productsTab(navItems[1], document.getElementById('product_nav'), "product_nav");
	PINT_productsTab(navItems[2], document.getElementById('neuro_nav'), "neuro_nav");
	PINT_productsTab(navItems[3], document.getElementById('medical_nav'), "medical_nav");
	PINT_productsTab(navItems[4], document.getElementById('patient_nav'), "patient_nav");
	PINT_productsTab(navItems[5], document.getElementById('investor_nav'), "investor_nav");
	PINT_productsTab(navItems[6], document.getElementById('press_nav'), "press_nav");
	PINT_productsTab(navItems[7], document.getElementById('careers_nav'), "careers_nav");

/*
	PINT_productsTab(navItems[0], document.getElementById('about_drop'), "about_nav");
	PINT_productsTab(navItems[1], document.getElementById('product_drop'), "product_nav");
	PINT_productsTab(navItems[2], document.getElementById('neuro_drop'), "neuro_nav");
	PINT_productsTab(navItems[3], document.getElementById('medical_drop'), "medical_nav");
	PINT_productsTab(navItems[4], document.getElementById('patient_drop'), "patient_nav");
	PINT_productsTab(navItems[5], document.getElementById('investor_drop'), "investor_nav");
	PINT_productsTab(navItems[6], document.getElementById('press_drop'), "press_nav");
	PINT_productsTab(navItems[7], document.getElementById('careers_drop'), "careers_nav");
*/
        }
//	tabAssist();

    if (PINT.util.browser.bIe6) PINT.util.pngFix();

    PINT.widget.lightbox.init();

    // showhide
    var get_info = document.getElementById('h_get_info');
    var panel = document.getElementById('h_info_panel');
    if(panel){
    panel.style.display = 'none';
    get_info.onmouseover = function(){ if(panel.style.display == 'none'){panel.style.display = 'block';}else{panel.style.display = 'none';} };
    }

    var get_info = document.getElementById('h_get_info_2');
    var panel2 = document.getElementById('h_info_panel_2');
    if(panel2){
    panel2.style.display = 'none';
    get_info.onmouseover = function(){ if(panel2.style.display == 'none'){panel2.style.display = 'block';}else{panel2.style.display = 'none';} };
    }

    if (typeof('YAHOO') != 'undefined' && YAHOO.widget != null && YAHOO.widget.TabView != null) {
        var prod_detail_assets = new YAHOO.widget.TabView('asset_switch');
        var prod_detail_specs = new YAHOO.widget.TabView('prod_specs');
    }

}

function cleanup(){}

function tabAssist() {
  var container = document.getElementById('tabContainer');
  if (!container) { return; };
  container.appendChild( (function blanket() {
    var div = document.createElement('div');
    div.className = 'blanket';
    return div;
  })() );
}

function colorTable(){
   $(".table_generic tr:even").addClass("alt");
   $(".table_generic tr:odd").addClass("norm");
   $(".table_generic tr:first").css("background-color", "#ffffff");
   $(".table_generic th").css("background-color", "#ffffff");
   $(".table_generic tr:last td").css("border-bottom", "solid #555 1px");
   $(".tablename").css("border", "none").css("background", "transparent");
   $(".table_generic tbody tr:first").css("background", "transparent");
   $(".table_generic tbody tr:first td").css("height", "30px").css("color", "#ffffff")
   $(".table_generic").css("margin-bottom", "10px");
   $(".table_generic:first").addClass("first");
}

window.onload = init;
window.onunload = cleanup;

