//=====================================================================
//  DOM Image Rollover v3 (hover)
//
//  Demo: http://chrispoole.com/scripts/dom_image_rollover_hover
//  Script featured on: Dynamic Drive (http://www.dynamicdrive.com)
//=====================================================================
//  copyright Chris Poole
//  http://chrispoole.com
//  This software is licensed under the MIT License 
//  <http://opensource.org/licenses/mit-license.php>
//=====================================================================

function domRollover() {
	if (navigator.userAgent.match(/Opera (\S+)/)) {
		var operaVersion = parseInt(navigator.userAgent.match(/Opera (\S+)/)[1]);
	}
	if (!document.getElementById||operaVersion <7) return;
	var imgarr=document.getElementsByTagName('img');
	var imgPreload=new Array();
	var imgSrc=new Array();
	var imgClass=new Array();
	for (i=0;i<imgarr.length;i++){
		if (imgarr[i].className.indexOf('domroll')!=-1){
			imgSrc[i]=imgarr[i].getAttribute('src');
			imgClass[i]=imgarr[i].className;
			imgPreload[i]=new Image();
			if (imgClass[i].match(/domroll (\S+)/)) {
				imgPreload[i].src = imgClass[i].match(/domroll (\S+)/)[1]
			}
			imgarr[i].setAttribute('xsrc', imgSrc[i]);
			imgarr[i].onmouseover=function(){
				this.setAttribute('src',this.className.match(/domroll (\S+)/)[1])
			}
			imgarr[i].onmouseout=function(){
				this.setAttribute('src',this.getAttribute('xsrc'))
			}
		}
	}
}
function domBookmark() {
	if(!document.getElementsByTagName('a')) return true;
	var urlarr=document.getElementsByTagName('a');
	for (i=0;i<urlarr.length;i++){
		if(urlarr[i].className=="bookmark"){
			urlarr[i].onclick= function(){
				if (document.all)
				window.external.AddFavorite(this, "Heartdanceaward");
				else if (window.sidebar)
				alert("Helaas is het niet mogelijk om automatisch te bookmarken vanuit Firefox. Click op 'Ctrl-d' om te bookmarken!");
				// window.addPanel("Heartdanceaward", this, "");
			return false;
			
			}
		}
	}
}

function popUp(URL) {

day = new Date();

id = day.getTime();

eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=390,height=400,left = 329.5,top = 239');");

}

function Venster(URL) {
venster = window.open(URL, 'popupvenster', 'width=460, height=470, resizable=no, menubar=no, scrollbars=no, status=no, toolbar=no');
}

function CheckInput(deForm,checkfield_array) {
	//alert('checkinput');
	// var checkfield_array=new Array("naam","email","adres","plaats","postcode","telefoon","sexe","gebdate");
	var i=0;
	var maxi=checkfield_array.length;
	for (i=0; i<maxi; i++)
	{
		if(deForm.elements[checkfield_array[i]].value==""){
			alert("Je moet de velden met een * invullen!");	
			return false;
		}
		
	}	 
	return true;
}