// JavaScript Document
var preloaded = new Array();
function preload_images() {
    for (var i = 0; i < arguments.length; i++){
        preloaded[i] = document.createElement('img');
        preloaded[i].setAttribute('src',arguments[i]);
    }
}

function validate_comment() {	
    tipOp=1;
    var nick = document.forms['comment'].nick.value;
	var email = document.forms['comment'].email.value;
	var comment = document.forms['comment'].comment.value;
	
	if (nick.length==0) {
			alert("Please enter a nickname");
			return false;
			}
	
	if (email.length!=0){
			validRegExp = /^[^@]+@[^@]+.[a-z]{2,}$/i;
			strEmail = email;									
		if (strEmail.search(validRegExp) == -1){
			alert("A valid email address is required");
			return false;
			} 
		}
	else{
		alert("Please enter your email address");
		return false;
	}
	
	if(comment.length==0 ){
		alert("Please enter a comment");
		return false;
	}
	
	
	document.forms['comment'].submit();
}

function goToAnchor(page,anc) {
location.hash = anc;
}

// This function executes the menu selection
function goToSelection(dropJump) {
  window.location.href = 'http://www.besteuro2008.info/'+document.getElementById(dropJump).value;
  document.getElementById(dropJump).selectedIndex = 0;
}

