

//Function for number checking.
function check(s){
	if (s.value.charCodeAt(0)==32)
		s.value=s.value.substring(0,s.value.length-1);
}
//Function for search activity.
function serchIt(){
	if (document.form2.Search.value==""){
		alert("The 'ENTER' key is only valid for the \n search field in the right upper corner. \n Please use the mouse.");
		document.form2.Search.focus();
		return;
	}
	document.form2.SearchValue.value=document.form2.Search.value;
	document.form2.submit();
}

function showView(ID){
	document.form1.ShowView.value=ID;
	document.form1.submit();
	return;
	}
function Browsing(currentPage,page){	
	document.form1.Page.value=page;
 	document.form1.currentPage.value=currentPage;
 	//document.form1.action="showItems.asp";
	document.form1.submit();
	}
function goToPage(page,pageLength)
{
	document.form1.currentPage.value=page*pageLength+1;
	document.form1.Page.value=page;
	//document.form1.action="showItems.asp";
	document.form1.submit();
}

function orderUp(Num){
	document.form1.ShowView.value="1";
	document.form1.OrderBy.value=Num;
	document.form1.OrderHow.value="Asc";
	document.form1.submit();
}

function orderDown(Num){
	document.form1.ShowView.value="1";
	document.form1.OrderBy.value=Num;
	document.form1.OrderHow.value="Desc";
	document.form1.submit();
}
function showItems(subCategoryID){
	document.form1.SubCategory.value=subCategoryID;
	document.form1.submit();
}
function showItemParcel(Type){
	document.form1.showview="1";
	document.form1.action="Parcels/ShowParcelsItem.asp";
	document.form1.submit();
}
function makeDemand(type){
document.DemandForm.Item.value=type;
document.DemandForm.submit();
}

