

// onload event coupler
function addLoadEvent(func) {
  var oldonload = window.onload;
  if (typeof window.onload != 'function') { 
    window.onload = func;
  } else {
    window.onload = function() {
      oldonload();
      func();
    }
  }
}

addLoadEvent(function() {
  initRollover();
});


	function cleanField(){
		var fieldId = document.getElementById('keyword');
		var baseValue = fieldId.getAttribute('basevalue');
		//alert(baseValue);
		if(fieldId.value == baseValue){
			fieldId.value = '';
		}else if(fieldId.value == ''){
			fieldId.value = baseValue;
		}else{
			return false;
		}		
	}
	
	
	function checkInput(){

		var fieldId =  document.getElementById('keyword');
		var baseValue = fieldId.getAttribute('basevalue');
		var bttn = document.getElementById('submitbttn');
	
	/*
		if((fieldId.value=='') || (fieldId.value==' ') || (fieldId.value==baseValue)){
			bttn.setAttribute('disabled', true);	
			bttn.src = "/images/nav/zoek_disab.gif";			
			bttn.style.cursor = "default";
			
		}else{

			bttn.removeAttribute('disabled');			
			bttn.src = "/images/nav/zoek.gif";			
			bttn.style.cursor = 'pointer';
		}
		*/
	}
	
	
	function straightTo(theUrl){
		if(theUrl != 0){
			self.location.href = theUrl;
		}else{
			return false;
		}
		
	}
	
	function youTube(youtube_id,div_id, width, height) {
		var baseWidth = 425;
		var baseHeight = 350;
	
		if(width == undefined) {
			width = baseWidth;
		}
		if(height == undefined) {
			if(width == baseWidth) {
				height = baseHeight;
			} else {
				height = Math.round((width / baseWidth) * baseHeight);
			}
		}
	
		var flashUrl = "http://www.youtube.com/v/" + youtube_id;
		var so = new SWFObject(flashUrl, "youtube-"+youtube_id,  width, height, "6", "#FFFFFF");
		so.addParam("wmode", "transparent");
		so.write(div_id);
	}
	
	
addLoadEvent(function() {
  cleanField();
  checkInput();
});



