function validateForms(login) { if(login=="adreports"){ var f=document.forms.adreports; if (f.username.value==''){ alert("Please enter your username"); return false; } if (f.user_password.value==''){ alert("Please enter your password"); return false; } if (f.extranet_agree.checked==false) { alert("You must agree to the Data Reporting Policy to log into the system."); return false; } }else{ var f=document.forms.datatool; if (f.username.value==''){ alert("Please enter your username"); return false; } if (f.password.value==''){ alert("Please enter your password"); return false; } if (document.forms.datatool.datatool_agree.checked==false) { alert("You must agree to the Data Management Policy to log into the system."); return false; } } return true; }
function jwUnescape(str) { str = '' + str; while (true) { var ii = str.indexOf ('+'); if (ii < 0) break; str = str.substring (0, i) + ' ' + str.substring(ii + 1, str.length); } return unescape(str); }
function args_init(){ var theargs = new Array (); var argstring = window.location.search; if (argstring.charAt(0) != '?') return; argstring = argstring.substring(1, argstring.length); var argarray = argstring.split('&'); var ii; var singlearg; for (ii = 0; ii < argarray.length; ++ii) { singlearg = argarray[ii].split('='); if (singlearg.length != 2) continue; var key = jwUnescape(singlearg[0]); var value = jwUnescape(singlearg[1]); theargs[key] = value; } return theargs; }
function getParam()
{
	var g_args = args_init();
	if (g_args == undefined)
		g_args = new Array();
	try
	{		
		if (g_args['lfail'] == '1' || g_args['dfail'] == '1')
			alert('Sorry, that username and/or password do not match those on file. Please try again or contact JiWire.');
		if (g_args['reset'] == '1')
			alert('Password reset successful.  Please check your email.');
	}catch(e){alert(e);}
}
