function validateMailinglistform(theform) {
	var msg = '';
	if (theform.elements['f[firstname]'].value == '')
		msg += "Please fill in your first name.\n"
	if (theform.elements['f[lastname]'].value == '')
		msg += "Please fill in your last name.\n"
	if (theform.elements['f[email]'].value == '')
		msg += "Please fill in your e-mail address.\n"
	if (msg != '') {
		alert(msg);
		return false;
	}
	var response = prompt("In order to prevent spam message from appearing in our mailbox, please enter 234...", '');
	if (! response || response.length == 0 || response != '234') {
		alert("We have not received the correct number combination.");
		return false;
	}
	alert("Thank you for your interest! You will receive an automatic confirmation message in your inbox.");
	return true;
}
function validateMleform(theform) {
	if (theform.elements['f[firstname]'].value == theform.elements['f[firstname]'].defaultValue &&
theform.elements['f[lastname]'].value == theform.elements['f[lastname]'].defaultValue &&
theform.elements['f[email]'].value == theform.elements['f[email]'].defaultValue) {
		alert("There is nothing to be updated, since the data have not been altered.");
		return false;
	}
	if (theform.theaction.value == 'delete') {
		if (! confirm("Are you sure you want your data removed?")) {
			theform.theaction.value = '';
			return false;
		}
	}
	alert("Your request will be processed. You will receive an automatic confirmation message in your inbox.\n\nYou will now be redirected to our homepage.");
	return true;
}
function unobtrusive(doc) {
//alert(doc);
	var alllinks = doc.getElementsByTagName("a");
//alert(alllinks.length);
	for (var i = 0; i < alllinks.length; i++) {
		if (alllinks[i].href.substr(0,7)  != 'http://') continue;
		if (alllinks[i].href.substr(0,30) == 'http://www.outlineamsterdam.nl') continue;
		if (alllinks[i].href.substr(0,31) == 'http://2009.outlineamsterdam.nl') continue;
		alllinks[i].target = "_blank";
	}
	for (var i = 0; i < alllinks.length; i++) {
		if (alllinks[i].rel && alllinks[i].rel=='external') {
//			alert(alllinks[i].rel);
			alllinks[i].target = "_blank";
		}
	}
}
