function leftNavOver(element) {
	if (element.className == "nav1RightBack") {
		element.className = "nav1LeftBack";
	} else {
		element.className = "nav1RightBack";
	}
}
function leftNavOver2(element) {
	if (element.className == "nav2RightBack") {
		element.className = "nav2LeftBack";
	} else {
		element.className = "nav2RightBack";
	}
}
function button_on( buttonname )
{
    if (document.images) {
      document[ buttonname ].src = eval( buttonname + "_on.src" );
    }
}
function button_off ( buttonname )
{
    if (document.images) {
      document[ buttonname ].src = eval( buttonname + ".src" );
    }
}
function openLibrary(url) {
	window.open(url,'HRSentryLibrary','toolbar=yes,scrollbars=yes,width=700,height=500,resizable=yes').focus();
}
function openPage(url) {
	window.open(url,'HRSentryPage','toolbar=yes,scrollbars=yes,width=700,height=500,resizable=yes').focus();
}
function openPageSmall(url) {
	window.open(url,'HRSentryPage','toolbar=yes,scrollbars=yes,width=600,height=300,resizable=yes').focus();
}
function fileAlert() {
	window.open('../fileAlert.html','HRSentryPage','toolbar=no,scrollbars=no,width=400,height=200,resizable=yes');
}
function demoAlert() {
	window.open('../demoAlert.html','HRSentryPage','toolbar=no,scrollbars=no,width=400,height=200,resizable=yes');
}
function textPadAlert() {
	window.open('../textPadAlert.html','HRSentryPage','toolbar=no,scrollbars=no,width=400,height=200,resizable=yes');
}
function searchAlert() {
	window.open('../searchAlert.html','HRSentryPage','toolbar=no,scrollbars=no,width=400,height=200,resizable=yes');
}
function regAlert() {
	window.open('../regAlert.html','HRSentryPage','toolbar=no,scrollbars=no,width=400,height=200,resizable=yes');
}
function pageRedirect(url){
	location.href=(url);
}
function image() {
};
function randomImage(){
	image = new image();
	number = 0;

	// imageArray
	image[number++] = "../images/top_left2.jpg"
	image[number++] = "../images/top_left3.jpg"
	image[number++] = "../images/top_left4.jpg"
	image[number++] = "../images/top_left5.jpg"
	image[number++] = "../images/top_left6.jpg"
	image[number++] = "../images/top_left7.jpg"
	image[number++] = "../images/top_left8.jpg"
	// keep adding items here...

	increment = Math.floor(Math.random() * number);

	document['topLeft'].src = image[increment];
}
function validate(form){
	 var email = form.email.value;
	 var msg = "";
	 if (true){
	 if (email == ""){
	 msg = "Please enter a valid email address";
	 }
	 }
	 if (msg == ""){
	 form.submit();
	 } else {
	 alert(msg);
	 return false;
	 }
	 }
function validatePassword(form){
	 var pwd = form.password.value.toString();
	 var pwdConfirm = form.passwordConfirm.value.toString();
	 var msg = "";
	 if (true){
	 if (pwd != pwdConfirm){
	 msg = "Password and password confirmation are not the same";
	 }
	 }
	 if (msg == ""){
	 form.submit();
	 } else {
	 alert(msg);
	 return false;
	 }
	 }
function openDemo(url) {
	window.open(url,'HRSentryDemo','toolbar=no,scrollbars=no,width=780,height=575,resizable=yes');
}
function openFlashDemo(url) {
	window.open(url,'HRSentryDemo','toolbar=no,scrollbars=no,width=400,height=200,resizable=yes');
}
function fileAlert() {
	window.open('../fileAlert.html','HRSentryPage','toolbar=no,scrollbars=no,width=400,height=200,resizable=yes');
}
function searchAlert() {
	window.open('../searchAlert.html','HRSentryPage','toolbar=no,scrollbars=no,width=400,height=200,resizable=yes');
}
function archiveAlert() {
	window.open('../archiveAlert.html','HRSentryPage','toolbar=no,scrollbars=no,width=400,height=200,resizable=yes');
}
function auditAlert() {
	window.open('../auditAlert.html','HRSentryPage','toolbar=no,scrollbars=no,width=400,height=220,resizable=yes');
}
function libraryAlert() {
	window.open('../libraryAlert.html','HRSentryPage','toolbar=no,scrollbars=no,width=400,height=200,resizable=yes');
}
function openTextPad() {
	window.open('TextPad','HRSentryTextPad','toolbar=no,scrollbars=yes,width=360,height=450,resizable=yes');
}
function validateAccount(form){
	 var pwd = form.password.value.toString();
	 var login = form.login.value;
	 var firstName = form.firstName.value;
	 var lastName = form.lastName.value;
	 var email = form.email.value;
	 var pwdConfirm = form.passwordConfirm.value.toString();
	 var msg = "";
	 if (true){
	 if (pwd != pwdConfirm){
	 msg = "Your passwords do not match.  Please Re-type.";
	 }
	 }
	 if (login=="" | firstName=="" | lastName=="" | email==""){
	 msg = "Please complete all required fields in order to create your account."
	 }
	 if (msg == ""){
	 form.submit();
	 } else {
	 alert(msg);
	 return false;
	 }
	 }
	 function validateDemo(form){
	 var firstName = form.firstName.value;
	 var lastName = form.lastName.value;
	 var email = form.email.value;
	 var msg = "";
	 if (firstName=="" | lastName=="" | email==""){
	 msg = "Please complete all required fields in order to continue with the online demo."
	 }
	 if (msg == ""){
	 form.submit();
	 } else {
	 alert(msg);
	 return false;
	 }
	 }