
function checkLogin(){
var userpass= document.getElementById("ctl00_Ctr_userLogin1_txt_password").value;
var username= document.getElementById("ctl00_Ctr_userLogin1_txt_userName").value;

if(userpass==""||username=="" ||username=="User Email"){
alert("Please enter both a username and password when logging in.");
return false;

}

}

function checkAdd(){
var username= document.getElementById("ctl00_cph_body_txt_name").value;
var useremail= document.getElementById("ctl00_cph_body_txt_email").value;

if(username==""||useremail==""){
alert("Please enter both a username and email when signing up.");
return false;

}

}

function checkRemove(){
var username= document.getElementById("ctl00_cph_body_txt_removeName").value;
var useremail= document.getElementById("ctl00_cph_body_txt_removeEmail").value;

if(username==""||useremail==""){
alert("Please enter both a username and email when removing yourself from the newsletter system.");
return false;

}

}



function init(){
	var inp = document.getElementsByTagName('input');
	for(var i = 0; i < inp.length; i++) {
		if(inp[i].id == 'ctl00_txt_password','ctl00_btn_login') {
			inp[i].setAttribute('rel',inp[i].defaultValue)
			inp[i].onfocus = function() {
				if(this.value == this.getAttribute('rel')) {
				if(this.value!="login" && this.value!="Submit" && this.value!="Enter"){
					this.value = '';
					}
					MM_swapImage('extranet','','media/images/footer_r1_c2_f2.png',1);
					
				} else {
					return false;
				}
			}
			inp[i].onblur = function() {
				if(this.value == '') {
					this.value = this.getAttribute('rel');
					MM_swapImgRestore();
					
				} else {
					return false;
				}
			}
			inp[i].ondblclick = function() {
				this.value = this.getAttribute('rel')
			}
		}
	}
}
if(document.childNodes) {
	window.onload = init
}