//$Id: thresholdForm.js,v 1.1.4.1 2005/06/03 08:48:03 asivakumar Exp $



function ShowReqTab(divIdToShow)
{
  	if(divIdToShow=="long")
	{
		var idToHide = document.getElementById("pagePercent");
		eval("idToHide.style.display = 'none';");
		var idToHide = document.getElementById("pageString");
		eval("idToHide.style.display = 'none';");
        
        var idToBlock = document.getElementById("pageLongPt");
		eval("idToBlock.style.display = 'block';");

	}
	else if(divIdToShow=="string")
	{
		var idToHide = document.getElementById("pageLongPt");
		eval("idToHide.style.display = 'none';");
		var idToHide = document.getElementById("pagePercent");
		eval("idToHide.style.display = 'none';");
       
        var idToBlock = document.getElementById("pageString");
		eval("idToBlock.style.display = 'block';");

	}
	else if(divIdToShow=="percentage")
	{
	
        var idToHide = document.getElementById("pageString");
		eval("idToHide.style.display = 'none';");
	    var idToBlock1 = document.getElementById("pageLongPt");
		eval("idToBlock1.style.display = 'block';");
        
	    var idToBlock2 = document.getElementById("pagePercent");
		eval("idToBlock2.style.display = 'block';");

	}
}



function loadtheForm()
{
    if (document.ThresholdObject.actionToPerform.value == "showThreshold")
    {
        document.ThresholdObject.actionToPerform.value = "modifyThreshold";
        document.ThresholdObject.toPerform.value    = "modifyThreshold";
    }
    else if(document.ThresholdObject.actionToPerform.value == "addThresholdForm")
    {
       document.ThresholdObject.toPerform.value    = "addThreshold";
       document.ThresholdObject.kind.value="long";
    }
    ShowReqTab(document.ThresholdObject.kind.value);
}

