// JavaScript Document

function showResults()
{
    if (document.f1.Listtype.value == "default")
	{
	    document.getElementById("cat1").className = "hid";
		document.getElementById("cat2").className = "hid";
		document.getElementById("cat3").className = "vis";
		document.getElementById("cat4").className = "hid";
	}
	else if (document.f1.Listtype.value == "dimensional")
	{
		document.getElementById("cat1").className = "vis";
		document.getElementById("cat2").className = "hid";
		document.getElementById("cat3").className = "hid";
		document.getElementById("cat4").className = "vis";
		document.getElementById("cat5").className = "vis";
	}
	else if (document.f1.Listtype.value == "elec&temp")
	{
		document.getElementById("cat1").className = "hid";
		document.getElementById("cat2").className = "vis";
		document.getElementById("cat3").className = "hid";
		document.getElementById("cat4").className = "vis";
		document.getElementById("cat6").className = "vis";
	}
}

function submitForm()
{
	document.f1.action = "prices.do";
	document.f1.submit();
}

function nextPage()
{
	// Add 30 onto the start value
	//var start = document.f1.start.value;
	//if (start == "")
	//{	
//		start = 0;
	//}
	//start = start + 30;
	//document.f1.start.value = start;
	document.f1.action = "prices.do";
	document.f1.submit();
}

function addItems()
{
	document.addition.action = "pricelistadd.do";
	document.addition.submit();
}

function showRows(start, finish, total)
{
	//Hide all rows
	for (var j = 1; j < total; j++)
	{
		document.getElementById(j).className = "hid";
	}

	//Only show the rows we require
	for (var i = start; i < finish + 1; i++)
	{
		document.getElementById(i).className = "vis";
	}
}

function popup()
	{
	window.open( "../POA_message.html", "", "top=400, left=450, width=500, height=250");
	}

