// Functions.js

// Initializes forms
function init() {
	if(document.userSigninForm) {
		document.userSigninForm.username.value = "";
		document.userSigninForm.password.value = "";
	
		document.userSigninForm.username.focus();
	}
	if(document.searchInputForm) {
		document.searchInputForm.partyName.value = "";
		document.searchInputForm.caseNumber.value = "";
		document.searchInputForm.plaintiffName.value = "";
		document.searchInputForm.defendantName.value = "";
	
		document.searchInputForm.partyName.focus();
	}
	if(document.IndexsearchInputForm) {
		document.IndexsearchInputForm.grantor.value = "";
		document.IndexsearchInputForm.grantee.value = "";
		document.IndexsearchInputForm.volume.value = "";
		document.IndexsearchInputForm.page.value = "";
	
		document.IndexsearchInputForm.grantor.focus();
	}
}

// Validates username and password
function checkSigninData() {
	/*var usr = document.userSigninForm.username.value;
	var pswrd = document.userSigninForm.password.value;
		
	if(usr.length != 0) {
		if(pswrd.length == 0) {
			alert("Please enter a password.");
			event.returnValue=false;
		}
	}
	if(usr.length == 0) {
		alert("Please enter a Login name.");
		event.returnValue=false;			
	}*/
}
// Submit order to Certified Payments
function submitOrder() {
	var emailAddress = document.emailForm.emailAddress.value;
	var newURL = document.emailForm.forwardURL.value + "&email=" + emailAddress;
	var sameURL = document.emailForm.originalURL;
	self.location=newURL;
}
// Opens the RVI document
function openDocument() {
	var rvidocument = document.openDocumentForm.rviDoc;
	alert(rvidocument); 
}

