	function showTermsAndConditions() {
	var newwindow
		if (typeof(newWindow2) == 'object') {
			if (!newWindow2.closed) {
				newWindow2.close();
				newWindow2 = window.open('/includes/termsandconditions.asp','termsandconditions', 'width=650,height=500,resizable=0,scrollbars=yes,status=yes')
			} else {
				newWindow2 = window.open('/includes/termsandconditions.asp','termsandconditions', 'width=650,height=500,resizable=0,scrollbars=yes,status=yes')
			}
		} else {
			newWindow2 = window.open('/includes/termsandconditions.asp','termsandconditions', 'width=650,height=500,resizable=0,scrollbars=yes,status=yes')
		}
	}
	
	function showPrivacyStatement() {
	var newwindow
		if (typeof(newWindow2) == 'object') {
			if (!newWindow2.closed) {
				newWindow2.close();
				newWindow2 = window.open('/includes/privacystatement.asp','privacystatement', 'width=650,height=500,resizable=0,scrollbars=yes,status=yes')
			} else {
				newWindow2 = window.open('/includes/privacystatement.asp','privacystatement', 'width=650,height=500,resizable=0,scrollbars=yes,status=yes')
			}
		} else {
			newWindow2 = window.open('/includes/privacystatement.asp','privacystatement', 'width=650,height=500,resizable=0,scrollbars=yes,status=yes')
		}
	}	

	function checkLoginForm() {
		var strErrorMessage = ""
		if (document.login.password.value.length == 0) {
			strErrorMessage = "\n * Password was not entered" + strErrorMessage
			document.login.password.focus();
		} else {
			if (document.login.password.value.length > 50) {
				strErrorMessage = "\n * Password must not exceed 50 characters" + strErrorMessage
				document.login.password.focus();
			}
		}

		if (document.login.emailaddress.value.length > 100) {
			strErrorMessage = "\n * Email address must not exceed 100 characters" + strErrorMessage
			document.login.emailaddress.focus();
		} else {
			if (!isEmail(document.login.emailaddress.value) && (document.login.emailaddress.value != 'milbank') && (document.login.emailaddress.value != 'KREDITANSTALT')) {
				strErrorMessage = "\n * A valid email address was not entered" + strErrorMessage
				document.login.emailaddress.focus();
			}
		}
		if (strErrorMessage.length > 0 ) {
			if (strErrorMessage.indexOf("\n") != strErrorMessage.lastIndexOf("\n")) { SOrNot = "s" } else { SOrNot = "" }
			alert("The form could not be submitted because of the following error"+SOrNot+":\n" + strErrorMessage + "\n\nPlease correct the above error"+SOrNot+" and try submitting the form again");
			return false;
		} else {
			document.login.submit();
			return false;
		}
	}

	function formOK(strErrorMessage) {
		if (strErrorMessage.length > 0 ) {
			if (strErrorMessage.indexOf("\n") != strErrorMessage.lastIndexOf("\n")) { SOrNot = "s" } else { SOrNot = "" }
			alert("The form could not be submitted because of the following error"+SOrNot+":\n" + strErrorMessage + "\n\nPlease correct the above error"+SOrNot+" and try submitting the form again");
			return false;
		} else {
			return true;
		}
	}

	function isEmail(strEmail) {
		//var emailFormat = /^\w+((\.\w+)|(\-\w+))*@\w+((\.\w+)|(\-\w+))*\.\w+$/;
		var emailFormat = /^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;
	 	if (! strEmail.match(emailFormat)) {
			return false;
		} else {
			return true;
		}
	}
	
	function SubmitIt(action) {
		document.forms[0].action = action;
		document.forms[0].submit();
		return false;
	}


	var newWindow
	function selectAddress(addresstype, addressID) {
		if (typeof(newWindow) == 'object') {
			if (!newWindow.closed) {
				newWindow.close();
				newWindow = selectAddress2(addresstype, addressID)
			} else {
				newWindow = selectAddress2(addresstype, addressID)
			}
		} else {
			newWindow = selectAddress2(addresstype, addressID)
		}

	}

	function selectAddress2(addresstype, addressID) {
		return(window.open('/includes/address/editaddress.asp?showUse='+addresstype+'&aID='+addressID,'selectaddress', 'width=600,height=450,resizable=0,scrollbars=yes,status=yes'))
	}


	function UseAddress(strType, aID) {
		window.opener.changeAddress(strType, aID);
		window.close();
		return false;
	}

	function closeAddressWindow() {
		window.opener.details.elements.page.value = 101;
		window.opener.details.submit();
		window.close();
		return false;
	}


	function showReminder(page) {
		if (typeof(newWindow) == 'object') {
			if (!newWindow.closed) {
				newWindow.close();
				newWindow = window.open('/includes/login/'+page,'passwordreminder', 'width=350,height=200,resizable=0,scrollbars=no,status=no');
			} else {
				newWindow = window.open('/includes/login/'+page,'passwordreminder', 'width=350,height=200,resizable=0,scrollbars=no,status=no');
			}
		} else {
			newWindow = window.open('/includes/login/'+page,'passwordreminder', 'width=350,height=200,resizable=0,scrollbars=no,status=no');
		}
		return false;
	}



	function showPasswordReminder() {
		if (typeof(newWindow) == 'object') {
			if (!newWindow.closed) {
				newWindow.close();
				newWindow = window.open('/includes/login/passwordreminder.asp','passwordreminder', 'width=320,height=170,resizable=0,scrollbars=no,status=no');
			} else {
				newWindow = window.open('/includes/login/passwordreminder.asp','passwordreminder', 'width=320,height=170,resizable=0,scrollbars=no,status=no');
			}
		} else {
			newWindow = window.open('/includes/login/passwordreminder.asp','passwordreminder', 'width=320,height=170,resizable=0,scrollbars=no,status=no');
		}
		//return false;
	}

	function showPasswordInformer() {
		if (typeof(newWindow) == 'object') {
			if (!newWindow.closed) {
				newWindow.close();
				newWindow = window.open('/includes/login/passwordinformer.asp','passwordinformer', 'width=360,height=210,resizable=0,scrollbars=no,status=no');
			} else {
				newWindow = window.open('/includes/login/passwordinformer.asp','passwordinformer', 'width=360,height=210,resizable=0,scrollbars=no,status=no');
			}
		} else {
			newWindow = window.open('/includes/login/passwordinformer.asp','passwordinformer', 'width=360,height=210,resizable=0,scrollbars=no,status=no');
		}
		//return false;
	}

	function showElement(eleid) {
		if (typeof(newWindow) == 'object') {
			if (!newWindow.closed) {
				newWindow.close();
				newWindow = window.open('/includes/events/popup.asp?eleid='+eleid,'showelement', 'width=450,height=400,resizable=0,scrollbars=yes,status=no');
			} else {
				newWindow = window.open('/includes/events/popup.asp?eleid='+eleid,'showelement', 'width=450,height=400,resizable=0,scrollbars=yes,status=no');
			}
		} else {
			newWindow = window.open('/includes/events/popup.asp?eleid='+eleid,'showelement', 'width=450,height=400,resizable=0,scrollbars=yes,status=no');
		}
		//return false;
	}
	function showVenue(v,productid) {
		if (typeof(newWindow) == 'object') {
			if (!newWindow.closed) {
				newWindow.close();
				newWindow = window.open('/includes/events/venue.asp?v=' + v + '&productid='+productid,'showvenue', 'width=450,height=400,resizable=0,scrollbars=yes,status=no');
			} else {
				newWindow = window.open('/includes/events/venue.asp?v=' + v + '&productid='+productid,'showevenue', 'width=450,height=400,resizable=0,scrollbars=yes,status=no');
			}
		} else {
			newWindow = window.open('/includes/events/venue.asp?v=' + v + '&productid='+productid,'showvenue', 'width=450,height=400,resizable=0,scrollbars=yes,status=no');
		}
		//return false;
	}

	function showEMAF2(PUB,SID,ISS) {
		if (typeof(newWindow) == 'object') {
			if (!newWindow.closed) {
				newWindow.close();
				newWindow = window.open('/includes/EMAF.asp?PUB='+ PUB + '&SID=' + SID + '&ISS=' + ISS,'EMAF', 'width=410,height=300,resizable=0,scrollbars=no,status=no');
			} else {
				newWindow = window.open('/includes/EMAF.asp?PUB='+ PUB + '&SID=' + SID + '&ISS=' + ISS,'EMAF', 'width=410,height=300,resizable=0,scrollbars=no,status=no');
			}
		} else {
			newWindow = window.open('/includes/EMAF.asp?PUB='+ PUB + '&SID=' + SID + '&ISS=' + ISS,'EMAF', 'width=410,height=300,resizable=0,scrollbars=no,status=no');
		}
		//return false;
	}