// JavaScript Document

//submits the top dropdown selector form, refreshes the alldata page
function GetRecords()
{
window.document.forms.filter.submit();
}

function EditRecord(refnum)
{
window.document.forms.filter.thisrecordID.value=refnum;
window.document.forms.filter.action="showrecord.php";
window.document.forms.filter.submit();
}


function confirmDeleteListPage(refnum)
{
if(confirm("DELETION WARNING\n\nAre you sure you want to delete?\n\nThis action cannot be reversed...."))
	{
	window.document.forms.filter.thisrecordID.value=refnum;
	window.document.forms.filter.dowhat.value="DEL";
	window.document.forms.filter.action="H_control.php";
	window.document.forms.filter.submit();	
	}
}

function backToListings()
{
window.document.forms.dataform.action="index.php";
window.document.forms.dataform.submit();	
}

function confirmDelete()
{
if(confirm("DELETION WARNING\n\nAre you sure you want to delete?\n\nThis action cannot be reversed...."))
	{
	window.document.forms.dataform.dowhat.value="DEL";
	window.document.forms.dataform.submit();
	}
}

// checks for valid entry prior to add and update
function checkdata()
{
window.document.forms.dataform.submit();
}

function infopopscroll(w,h,page)
{
wintype = "location=no,scrollbars=yes,status=no,menubar=0,left=0,top=0,screenx=0,screeny=0,width="+w+",height="+h;
win=window.open(page,"newwin",wintype); 
win.focus();
}
