function onclickSearchField(elem,defaultText){
	if(elem.value == defaultText){
		elem.value = '';
	}
}
function releaseSearchField(elem,defaultText){
	if(elem.value == ''){
		elem.value = defaultText;
	}
}


function viewFoto(url){var Maxbreedte=screen.width-50;var Maxhoogte=screen.height-100;Nieuwscherm=window.open(url,"foto_up","toolbar=no,"+"location=no,"+"scrollbars=yes,"+"status=no,"+"menubar=no,"+"resizable=yes,"+"width="+Maxbreedte+"px,"+"height="+Maxhoogte+"px");Nieuwscherm.focus();}
function openUrl(url){var Maxbreedte=screen.width-50;var Maxhoogte=screen.height-100;Nieuwscherm=window.open(url,"foto_up","toolbar=no,"+"location=no,"+"scrollbars=yes,"+"status=no,"+"menubar=no,"+"resizable=yes,"+"width="+Maxbreedte+"px,"+"height="+Maxhoogte+"px");Nieuwscherm.focus();}
function confirmLink(link, vraag, plak_achter){if (confirm(vraag)){link.href += plak_achter;}return is_confirmed;}
function confirmButton(vraag, location){if(confirm(vraag)){self.location=''+location;}}
function disableRightClick(e){if(e.button==2){if(document.all){e.cancelBubble=true;e.returnValue=false;}else{e.preventDefault();}return false;}}
function disableCopyPaste(e){if((e.ctrlKey||e.metaKey)&&(e.keyCode==86||e.keyCode==67||e.keyCode==88)){if(document.all){e.cancelBubble=true;e.returnValue=false;}else{e.preventDefault();}return false;}}

$(document).ready(function() {
	var total = $("#header_slider img").length,
			rand = Math.floor(Math.random()*total),
			nivoOptions = {
				effect:				"fade", 	// Specify sets like: "fold,fade,sliceDown"
				slices:				30,
				animSpeed:			500,
				pauseTime:			6000,
				startSlide:			rand, 		// Set starting Slide (0 index)  |  rand
				directionNav:		false, 		// Next & Prev
				directionNavHide:	false, 		// Only show on hover
				controlNav:			false, 		// 1,2,3...
				keyboardNav:		false, 		// Use left & right arrows
				pauseOnHover:		true, 		// Stop animation while hovering
				captionOpacity:		0 		// Universal caption opacity
			};	
	
	$("#fotofade").nivoSlider(nivoOptions);
	
	nivoOptions.pauseTime = 6000;
	$("#header_slider").nivoSlider(nivoOptions);
});
