function getHP(id)
{
    idNum = id.substr(2);
    gtype = $('mainGearType').value;
    gtype = gtype.toLowerCase();
    ptype = "NDP";
    matl = $('mainMaterial').value.toLowerCase().replaceWS();
    teeth = $('TEETH' + idNum).innerHTML;
    var rpm = rpms;
    dp = $('PITCH' + idNum).innerHTML;
    fw = $('FACE' + idNum).innerHTML;
    pa = $('PA' + idNum).innerHTML;
    partno = $('PARTNO' + idNum).innerHTML;
    pitchname = pitchTypeElem.value;
    mmInches = unitsElem.value; //'inches';
    var matStress = 29000;
    load = svcFactor;
    var hangle = '';
    if (gtype == 'helical') 
    {
        hangle = 45;
    }
    
    switch (matl)
    {
        case "17-4phcond1150":
            matStress = 53280;
            break;
        case "steel":
            matStress = 29000;
            break;
        case "hardteeth":
            matStress = 50000;
            break;
        case "aluminum":
            matStress = 13000;
            break;
        case "bronze":
            matStress = 10440;
            break;
        case "castiron":
            matStress = 12000;
            break;
        case "delrin":
            matStress = 3000;
            break;
        case "phenolic":
            matStress = 3500;
            break;
        case "stainlesssteel":
            matStress = 30000;
            break;
        default:
            matStress = 29000;
    }
    
    getPage('Tech_Tools/hpcalc.php?gtype=' + gtype + '&ptype=' + ptype + '&stress=' + matStress + '&teeth=' + teeth + '&load=' + load + '&ha=' + hangle + '&dp=' + dp + '&fw=' + fw + '&rpm=' + rpm + '&pa=' + pa + '&pitchname=' + pitchname + '&mmInches=' + mmInches + '&partno=' + partno + '&id=' + id, 'partSearchHP');
}

function hideHP()
{
    //$('hpTable').style.display = 'none';
	$('hpTable').visualEffect('Shrink');
    hideIEiframe = browserName == 'msie' ? $('HPiframeForIE').style.display = 'none' : 0;
}