﻿// JScript File
function showBox(id){
    document.getElementById(id).style.display='block';
}
function hideBox(id) {
    document.getElementById(id).style.display='none';
}

function showBox1(e,id) {
  var myHeight = 0;
  var posy = 0;
  var space = 0;
    if (!e) var e = window.event;
	if (e.pageX || e.pageY) 	{
		posy = e.pageY - document.body.scrollTop - document.documentElement.scrollTop;;
	}
	else if (e.clientX || e.clientY) 	{
	    posy = e.clientY;
	}
  if( typeof( window.innerWidth ) == 'number' ) {
    //Non-IE
    myHeight = window.innerHeight;
  } else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
    //IE 6+ in 'standards compliant mode'
    myHeight = document.documentElement.clientHeight;
  } else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
    //IE 4 compatible
    myHeight = document.body.clientHeight;    
  }
  space = myHeight - posy;
  if (space < 140) {
    if (id == "divHardship") {
        document.getElementById(id).className = "defBoxHardship";
    }else if (id == "divPIncome"){
        document.getElementById(id).className = "defBoxIncome";
    }else {
        document.getElementById(id).className = "defBox";
    } 
  }else{
    document.getElementById(id).className = "defBox";
  }
  showBox(id);
}
function redirect(url) {
    window.location.href=url;
}

function expenBox(dist, sour) {
    var d = document.getElementById(dist);
    var s= document.getElementById(sour);
    d.innerHTML = s.innerHTML;
    if (d.style.display == "block") {
        d.style.display = 'none';
    }else{
    d.style.display = 'block';
    }    
}

//FindAll.aspx
function BtnClick(type){
    hideBox('tbPfizer');
    hideBox('tbManaged');
    hideBox('tbIndustry');
    hideBox('tbGovernment');
    hideBox('btnPfizerOff');
    hideBox('btnManagedOff');
    hideBox('btnIndustryOff');
    hideBox('btnGovernmentOff');
    showBox('btnPfizer');
    showBox('btnManaged');
    showBox('btnIndustry');
    showBox('btnGovernment');        
    switch (type) {
        case 1:
            showBox('btnPfizerOff');
            hideBox('btnPfizer');
            showBox('tbPfizer');
        break;
        case 2:
            showBox('btnManagedOff');
            hideBox('btnManaged');
            showBox('tbManaged');
        break;
        case 3:
            showBox('btnIndustryOff');
            hideBox('btnIndustry');
            showBox('tbIndustry');
        break;
        case 4:
            showBox('btnGovernmentOff');
            hideBox('btnGovernment');
            showBox('tbGovernment');
        break;
    }
}

