//functions to change bgcolor on mouseover etc.
function button_over(eButton){
	eButton.style.backgroundColor = "#B5BDD6";
	eButton.style.borderColor = "darkblue darkblue darkblue darkblue";
}
function button_out(eButton){
	eButton.style.backgroundColor = "transparent";
	eButton.style.borderColor = "transparent";
}
function button_down(eButton){
	eButton.style.backgroundColor = "#8494B5";
	eButton.style.borderColor = "darkblue darkblue darkblue darkblue";
}
function button_up(eButton){
	eButton.style.backgroundColor = "#B5BDD6";
	eButton.style.borderColor = "darkblue darkblue darkblue darkblue";
	eButton = null; 
}
//fucntion to check to content of the submit form (contact > intGleractive)
function form_check(strLanguage){
	if (document.contact.name.value==""){
		switch(strLanguage){
			case 'en':	alert('Please fill in your name.');break;
			case 'fr':	alert('Veuillez compléter votre nom.');break;
			case 'nl':	alert('Gelieve uw naam in te vullen.');break;
		}
		document.contact.name.focus();
		return false
	}
	if (document.contact.email.value==""){
		switch(strLanguage){
			case 'en':	alert('Please fill in your email address.');break;
			case 'fr':	alert('Veuillez compléter votre addresse email.');break;
			case 'nl':	alert('Gelieve uw email adres in te vullen.');break;
		}
		document.contact.email.focus();
		return false
	}
}
function form_search(strSearchString){
	location.href='/search/index.asp?searchstring=' + strSearchString;
}
function headersubmit(){
	var iChars = "0123456789";
	if ( (document.header.pubdd.value == "dd" && document.header.pubmm.value == "mm" && document.header.pubyyyy.value == "yyyy") || (document.header.pubdd.value == "" && document.header.pubmm.value == "" && document.header.pubyyyy.value == "") ) {
		//alert('do nothing')
	}
	else {
		var strInput = document.header.pubdd.value;
		if (strInput=="")
		{
			alert('Please fill in publication day.');
			document.header.pubdd.focus();
			return false
		}
		else
		{
			for (var i = 0; i < strInput.length; i++) {
				if (iChars.indexOf(strInput.charAt(i)) == -1) {
					alert('Illegal publication day.');
					document.header.pubdd.focus();
					return false
				}
			}
		}
	   	var strInput = document.header.pubmm.value;
		if (strInput=="")
		{
			alert('Please fill in publication month.');
			document.header.pubmm.focus();
			return false
		}
		else
		{
			for (var i = 0; i < strInput.length; i++) {
				if (iChars.indexOf(strInput.charAt(i)) == -1) {
					alert('Illegal publication month.');
					document.header.pubmm.focus();
					return false
				}
			}
		}
	   	var strInput = document.header.pubyyyy.value;
		if (strInput=="")
		{
			alert('Please fill in publication year.');
			document.header.pubyyyy.focus();
			return false
		}
		else
		{
			for (var i = 0; i < strInput.length; i++) {
				if (iChars.indexOf(strInput.charAt(i)) == -1) {
					alert('Illegal publication year.');
					document.header.pubyyyy.focus();
					return false
				}
			}
		}
	}
	if ( (document.header.expdd.value == "dd" && document.header.expmm.value == "mm" && document.header.expyyyy.value == "yyyy") || (document.header.expdd.value == "" && document.header.expmm.value == "" && document.header.expyyyy.value == "") ) {
		//alert('do nothing')
	}
	else {
		var strInput = document.header.expdd.value;
		if (strInput=="")
		{
			alert('Please fill in expiration day.');
			document.header.expdd.focus();
			return false
		}
		else
		{
			for (var i = 0; i < strInput.length; i++) {
				if (iChars.indexOf(strInput.charAt(i)) == -1) {
					alert('Illegal expiration day.');
					document.header.expdd.focus();
					return false
				}
			}
		}
	   	var strInput = document.header.expmm.value;
		if (strInput=="")
		{
			alert('Please fill in expiration month.');
			document.header.expmm.focus();
			return false
		}
		else
		{
			for (var i = 0; i < strInput.length; i++) {
				if (iChars.indexOf(strInput.charAt(i)) == -1) {
					alert('Illegal expiration month.');
					document.header.expmm.focus();
					return false
				}
			}
		}
	   	var strInput = document.header.expyyyy.value;
		if (strInput=="")
		{
			alert('Please fill in expiration year.');
			document.header.expyyyy.focus();
			return false
		}
		else
		{
			for (var i = 0; i < strInput.length; i++) {
				if (iChars.indexOf(strInput.charAt(i)) == -1) {
					alert('Illegal expiration year.');
					document.header.expyyyy.focus();
					return false
				}
			}
		}
	}
	document.header.submit();
}

