function init(){
   
	if (document.getElementById("RegistrationForm")){

		setLoginRegBackgroundControl("LCUser", "images/formUsername.gif", "images/LformUsername.gif");
		setLoginRegBackgroundControl("LCPass", "images/formPassword.gif", "images/LformPassword.gif");
		setLoginRegBackgroundControl("LCRegUser", "images/formUsername.gif", "images/LformUsername.gif");
		setLoginRegBackgroundControl("LCRegPass", "images/formPassword.gif", "images/LformPassword.gif");
		setLoginRegBackgroundControl("LCRegPass2", "images/formPassword2.gif", "images/LformPassword2.gif");
		setLoginRegBackgroundControl("LCRegEmail", "images/formEmail.gif", "images/LformEmail.gif");
		document.getElementById("regDay").onchange = function initchange(){document.getElementById("regDOB").style.backgroundColor = "#ffffff";	document.getElementById("regDOB").style.border = "0px solid #ff0000"; document.getElementById("regSubmit").style.backgroundColor = "";};
		document.getElementById("regMonth").onchange = function initchange(){document.getElementById("regDOB").style.backgroundColor = "#ffffff";	document.getElementById("regDOB").style.border = "0px solid #ff0000"; document.getElementById("regSubmit").style.backgroundColor = "";};
		document.getElementById("regYear").onchange = function initchange(){document.getElementById("regDOB").style.backgroundColor = "#ffffff";	document.getElementById("regDOB").style.border = "0px solid #ff0000"; document.getElementById("regSubmit").style.backgroundColor = "";};
		document.getElementById("regTerms").onclick = function initchange(){document.getElementById("regTermDiv").style.backgroundColor = "#ffffff";	document.getElementById("regTermDiv").style.border = "0px solid #ff0000"; document.getElementById("regSubmit").style.backgroundColor = "";};

	}

	setContentMinHeight();
	if (document.getElementById("RegistrationForm")){
		document.getElementById("RegistrationForm").onsubmit = validateRegForm;
	}
	if (parseInt(navigator.appVersion)>3) {
	 if (navigator.appName=="Netscape") {
		firefoxHeightWorkaround();
	 }
	 if (navigator.appName.indexOf("Microsoft")!=-1) {
		document.body.onresize = setContentMinHeight;
	 }
	}


}
if (navigator.appName=="Netscape") {
var startsize = window.innerHeight;
}
function firefoxHeightWorkaround(){
	setContentMinHeight();
	setTimeout('firefoxHeightWorkaround()', 100);

}
function setContentMinHeight(){
	if (parseInt(navigator.appVersion)>3) {
	 if (navigator.appName=="Netscape") {
	  winH = window.innerHeight;
	 }
	 if (navigator.appName.indexOf("Microsoft")!=-1) {
	  winH = document.documentElement.clientHeight;
	 }
	}

	var minheight = (winH - 300) + "px";
	document.getElementById("contentArea").style.minHeight = minheight;
}
function validateRegForm(){
	var valid = 1;
	if (document.getElementById("LCRegUser").value == ""){
		document.getElementById("LCRegUser").style.borderColor = "#ff0000";
		valid = 0;
	}
	if (document.getElementById("LCRegPass").value == ""){
		document.getElementById("LCRegPass").style.borderColor = "#ff0000";
		document.getElementById("LCRegPass2").style.borderColor = "#ff0000";
		valid = 0;
	}
	if (document.getElementById("LCRegPass").value != document.getElementById("LCRegPass2").value){
		document.getElementById("LCRegPass2").style.borderColor = "#ff0000";
		valid = 0;
	}
	if (document.getElementById("LCRegEmail").value == ""){
		document.getElementById("LCRegEmail").style.borderColor = "#ff0000";
		valid = 0;
	}
	if (document.getElementById("regDay").value == "" || document.getElementById("regMonth").value == "" || document.getElementById("regYear").value == ""){
		document.getElementById("regDOB").style.backgroundColor = "#ffEEEE";
		document.getElementById("regDOB").style.border = "2px solid #ff0000";
		valid = 0;
	}
	if (document.getElementById("regTerms").checked == false){
		document.getElementById("regTermDiv").style.backgroundColor = "#ffEEEE";
		document.getElementById("regTermDiv").style.border = "2px solid #ff0000";
		valid = 0;
	}
	if (valid == "0"){
		document.getElementById("regSubmit").style.backgroundColor = "#ffcccc";
		return false;
	}else{
		return true;
	}
}

function setLoginRegBackgroundControl(objname, darkimage, lightimage){
	document.getElementById(objname).onkeyup = function initname(){clearLoginRegFormField(objname, lightimage);};
	document.getElementById(objname).onfocus = function initname(){clearLoginRegFormField(objname, lightimage);};
	document.getElementById(objname).onblur = function initname(){clearLoginRegFormField(objname, darkimage);};
}
function clearLoginRegFormField(fieldid, origurl){
	if (document.getElementById(fieldid).value != ""){
		document.getElementById(fieldid).style.backgroundImage = "url('images/spacer.gif')";
		document.getElementById(fieldid).style.borderColor = "";
		document.getElementById("regSubmit").style.backgroundColor = "";
	}else{
		document.getElementById(fieldid).style.backgroundImage = "url('" + origurl + "')";
	}
}


