// ###########################################################################################
var win=null;

function NewWindow(mypage,myname,w,h,scroll,pos){
	if(pos=="random"){LeftPosition=(screen.width)?Math.floor(Math.random()*(screen.width-w)):100;TopPosition=(screen.height)?Math.floor(Math.random()*((screen.height-h)-75)):100;
	}
	if(pos=="center"){LeftPosition=(screen.width)?(screen.width-w)/2:100;TopPosition=(screen.height)?(screen.height-h)/2:100;
	}
	else if((pos!="center" && pos!="random") || pos==null){LeftPosition=0;TopPosition=20
	}
	settings='width='+w+',height='+h+',top='+TopPosition+',left='+LeftPosition+',scrollbars='+scroll+',location=no,	directories=no,status=no,menubar=no,toolbar=no,resizable=no';
	win=window.open(mypage,myname,settings);
}
// ###########################################################################################
function isEmpty( str ){
    strRE = new RegExp( );
    strRE.compile( '^[\s ]*$', 'gi' );
    return strRE.test( str.value );
	}
function notValidEmail( str ){
    mailRE = new RegExp( );
    mailRE.compile( '^[\._a-z0-9-]+@[\.a-z0-9-]+[\.]{1}[a-z]{2,4}$', 'gi' );
    return !(mailRE.test( str.value ));
	}
function notChecked( box ){
    if( box.checked ){
        return false;
    }
    else{
        return true;
    }
	}
function checkContactForm( form ){
    if( isEmpty( form.Naam ) ){
        alert( 'Het veld Naam is niet ingevuld!' );
		document.Form1.Naam.focus();
        return false;
    }
    if( isEmpty( form.Land ) ){
        alert( 'Het veld Land is niet ingevuld!' );
		document.Form1.Land.focus();
        return false;
    }
    if( isEmpty( form.Telefoonnummer ) ){
        alert( 'Het veld Telefoonnummer is niet ingevuld!' );
		document.Form1.Telefoonnummer.focus();
        return false;
    }
    if( notValidEmail( form.Emailadres ) ){
        alert( 'Het veld E-mailadres is niet ingevuld of ongeldig!' );
		document.Form1.Emailadres.focus();
        return false;
    }
    if( isEmpty( form.Bericht ) ){
        alert( 'Het veld Vraag of opmerking is niet ingevuld!' );
		document.Form1.Bericht.focus();
        return false;
    }
    return true;
	} 	
// ###########################################################################################
