function populateCatagories(cattype,selectedValue)		
{
	var arraytouse;
	var theList = document.presssearch.catagory ;
	
	//remove current options
	while(theList.length>0) {
		theList.options[0] = null ;
	}
	
	var currentItem;
	for(i = 0;i<allcats[cattype].length;i++) {
		currentItem = allcats[cattype][i].split("|");
		opt = new Option(currentItem[1], currentItem[0]) ;
		theList.options[theList.options.length] = opt ;
	}
	
	for(i=0;i<theList.length;i++)
	{
		if (selectedValue == theList[i].value)
		{
			theList.selectedIndex = i
			break;
		}	
	}
	
}

function viewMoreRecords(MoveDirection)
{
	
	switch(MoveDirection)
	{
		case "next" :
		{
			document.presssearch.position.value = parseInt(document.presssearch.position.value) + 1;
			break;
		}
		case "previous" :
		{
			document.presssearch.position.value = parseInt(document.presssearch.position.value) - 1;
			break;
		}
	}
	document.presssearch.submit();
	
	return false;
}
