var sCS = "This functionality is not yet complete, please try back at a later time.";

function f_OpenWindow(sPage, iWidth, iHeight,bScroll){
	var win = window.open(sPage,"RTSA","location=0,status=0,titlebar=0,toolbar=0,scrollbars=" + bScroll + ",width=" + iWidth + ",height=" + iHeight + ",top=100,left=100");
	win.focus();
}
function f_OpenPayment(){
	f_OpenWindow("http://www.rostraversewage.com/agreement.html",900,800,"yes");
	//var win = window.open("http://www.rostraversewage.com/agreement.html","RTSA","location=no,scrollbars=yes");
	//win.focus();
}

function f_Validate(myForm){
	return f_Agreement();
}

function f_Accept(){
	f_HidePicture("agreement");
	scroll(0,0);
}

function f_Deny(){
	window.location = "index.jsp";
}

function f_Agreement(){

	var msg = "RTSA accepts in-person credit and debit card payments from VISA, Mastercard and Discover for customer accounts.   No minimum payment is required.\n\n";
	msg += "Credit card payments will only be processed by the (1) Authority Manager; (2) Authority Office Manager; or (3) Customer Service Representative with the cardholder present or via on-line payment.  RTSA will maintain transaction records in compliance with PNC requirements.\n\n";
	msg += "If an in-person credit or debit card payment is made, upon completion of an approved transaction, RTSA shall provide a copy of the transaction receipt to the customer.\n\n";
	msg += "Once the transaction is completed, it shall be provided to the Customer Service Representative for submittal and processing.\n\n";
	msg += "RTSA shall maintain copies of the sales receipts in a separate file drawer to be organized by the date.  All original copies of each sales slip, credit slip and other related documents will be maintained for no less than 365 days from the transaction date and a legible copy, e.g. microfilm or microfiche, for no less than three years from the transaction date.\n\n";
	msg += "Any questions regarding this process should be directed to the Office Manager.\n\n";
	msg += "This website is not a secured site for storing and processing personal information. However, this page stores no data. The information entered to make a payment is sent to a secure payment gateway through a direct, secure connection.\n\n";
	msg += "There is not fee for Rostraver Sewage Customers to use this gateway for bill paying.";
	msg += "\n\n\nClick 'OK' to agree to terms, or click 'CANCEL' to exit.";
	if(confirm(msg)){
		return true;
	}

	return false;	
}

function f_ShowBill(){
	document.getElementById("bill").style.visibility = "visible";
}

function f_ShowCVM(){
	document.getElementById("cvm").style.visibility = "visible";
}

function f_SetMethod(myForm, vMethod){
	//alert("here " + vMethod);
	myForm.method.value = vMethod;
	myForm.submit();
}

function f_ForgotPass(myForm){
	//alert(myForm.loginAcct.value);
	if(myForm.loginAcct.value == ""){
		alert("Please enter your valid account number in the 'Account' field!");
		myForm.loginAcct.focus();
		return;
	}
	
	if(confirm("rostraversewage.com will send Account Login information to your EMAIL account, continue?")){
		f_SetMethod(myForm,"sendLoginInfo");
	}
}
function f_TimeOut(){
	setTimeout("window.location='index.jsp'",5000);
}
function f_ShowPicture(element){
	document.getElementById(element).style.visibility = "visible";
}

function f_HidePicture(element){
	document.getElementById(element).style.visibility = "hidden";
}
