// JavaScript Document
function toonHeader(){
		
	document.writeln('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"');
	document.writeln('codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,79,0"');
	document.writeln('id="header" width="754" height="100">');
	document.writeln('<param name="movie" value="flash/header.swf" />');
	document.writeln('<param name="bgcolor" value="#FFFFFF" />');
	document.writeln('<param name="quality" value="high" />');
	document.writeln('<param name="menu" value="false" />');
	document.writeln('<param name="allowscriptaccess" value="samedomain" />');
	document.writeln('<param name="FlashVars" VALUE="titel='+ titel + '&afbeelding=' + afbeelding + '&breadcrum=' + breadcrum + '&bgcolor=' + bgcolor + '">'); 	
	if (navigator.mimeTypes && navigator.mimeTypes["application/x-shockwave-flash"]) {
    	document.writeln('  <embed name="header" src="flash/header.swf" FlashVars="titel='+ titel + '&afbeelding=' + afbeelding + '&breadcrum=' + breadcrum + '&bgcolor=' + bgcolor + '" quality="high" bgcolor="#FFFFFF" menu="false" swLiveConnect="true" allowScriptAccess="sameDomain" width="754" height="100" type="application/x-shockwave-flash"  pluginspage="http://www.macromedia.com/go/getflashplayer"></embed>');
	} else {
        document.writeln('<h1>' + titel + '</h1>' + '<p>' + breadcrum + '</p>');		
  }
	document.writeln('</object>');
}

function toonButton(titel, url, bgcolor, margins, titelkleur){
	if (margins == true){
		document.writeln('<div style="margin-left: 20px" class="mainButton">');
	} else {
		document.writeln('<div class="mainButton">');
	}
	document.writeln('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"');
	document.writeln('codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,79,0"');
	document.writeln('id="button" width="260" height="54">');
	document.writeln('<param name="movie" value="flash/button.swf" />');
	document.writeln('<param name="bgcolor" value="#FFFFFF" />');
	document.writeln('<param name="quality" value="high" />');
	document.writeln('<param name="menu" value="false" />');
	document.writeln('<param name="allowscriptaccess" value="samedomain" />');
	document.writeln('<param name="FlashVars" VALUE="titel=' + titel + '&url=' + url + '&bgcolor=' + bgcolor + '&titelcolor=' + titelkleur + '&afbeelding=' + url + '.jpg">'); 	
	if (navigator.mimeTypes && navigator.mimeTypes["application/x-shockwave-flash"]) {
    	document.writeln('  <embed name="button" src="flash/button.swf" FlashVars="titel='+ titel + '&url=' + url +  '&bgcolor=' + bgcolor  + '&titelcolor=' + titelkleur + '&afbeelding=' + url + '.jpg" quality="high" bgcolor="#FFFFFF" menu="false" swLiveConnect="true" allowScriptAccess="sameDomain" width="260" height="54" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer"></embed>');
	} else {
        document.writeln('   <a href="'+ url + '">' + titel + '</a>');		
  	}
	document.writeln('</object>'); 
	document.writeln('</div>'); 
}

         
function toonCategorieButton(titel, url, bgcolor, afbeelding){
	
	document.writeln('<div class="mainButton">');
	document.writeln('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"');
	document.writeln('codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,79,0"');
	document.writeln('id="categorie_button" width="260" height="54">');
	document.writeln('<param name="movie" value="flash/categorie_button.swf" />');
	document.writeln('<param name="bgcolor" value="#FFFFFF" />');
	document.writeln('<param name="quality" value="high" />');
	document.writeln('<param name="menu" value="false" />');
	document.writeln('<param name="allowscriptaccess" value="samedomain" />');
	document.writeln('<param name="FlashVars" VALUE="titel=' + titel + '&url=' + url + '&bgcolor=' + bgcolor + '&afbeelding=' + afbeelding + '">'); 	
	if (navigator.mimeTypes && navigator.mimeTypes["application/x-shockwave-flash"]) {
    	document.writeln('  <embed name="categorie_button" src="flash/categorie_button.swf" FlashVars="titel='+ titel + '&url=' + url +  '&bgcolor=' + bgcolor + '&afbeelding=' + afbeelding + '" quality="high" bgcolor="#FFFFFF" menu="false" swLiveConnect="true" allowScriptAccess="sameDomain" width="260" height="54" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer"></embed>');
	} else {
        document.writeln('   <a href="'+ url + '">' + titel + '</a>');		
  	}
	document.writeln('</object></div>'); 
}



function toonHeading(titel){
	document.writeln('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"');
	document.writeln('codebase="flash/swflash.cab#version=6,0,79,0"');
	document.writeln('id="heading" width="500" height="33">');
	document.writeln('<param name="movie" value="flash/heading.swf">');
	document.writeln('<param name="bgcolor" value="#FFFFFF">');
	document.writeln('<param name="quality" value="high" />');
	document.writeln('<param name="menu" value="false" />');
	document.writeln('<param name="allowscriptaccess" value="samedomain">');
	document.writeln('<param name="FlashVars" VALUE="titel='+ titel + '">'); 	
	if (navigator.mimeTypes && navigator.mimeTypes["application/x-shockwave-flash"]) {
    	document.writeln(' <embed type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" width="500" height="33" name="heading" src="flash/heading.swf" FlashVars="titel='+ titel + '" bgcolor="#FFFFFF" quality="high" swLiveConnect="true" allowScriptAccess="samedomain"></embed>');
	} else {
        document.writeln('<h1>' + titel + '</h1>');		
  	}
	document.writeln('</object>'); 
}

function toonHeading2(titel){
	document.writeln('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"');
	document.writeln('codebase="flash/swflash.cab#version=6,0,79,0"');
	document.writeln('id="heading2" width="250" height="33">');
	document.writeln('<param name="movie" value="flash/heading2.swf">');
	document.writeln('<param name="bgcolor" value="#FFFFFF">');
	document.writeln('<param name="quality" value="high" />');
	document.writeln('<param name="menu" value="false" />');
	document.writeln('<param name="allowscriptaccess" value="samedomain">');
	document.writeln('<param name="FlashVars" VALUE="titel='+ titel + '">'); 	
	if (navigator.mimeTypes && navigator.mimeTypes["application/x-shockwave-flash"]) {
    	document.writeln(' <embed type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" width="250" height="33" name="heading2" src="flash/heading2.swf" FlashVars="titel='+ titel + '" bgcolor="#FFFFFF" quality="high" swLiveConnect="true" allowScriptAccess="samedomain"></embed>');
	} else {
        document.writeln('<h2>' + titel + '</h2>');		
  	}
	document.writeln('</object>'); 
}
function validateUitgebreid(){
	if(
		(document.uitgebreid_zoeken.hoofdrubriek_select.selectedIndex == 0 || document.uitgebreid_zoeken.stad.value=="") &&
		(document.uitgebreid_zoeken.hoofdrubriek_select.selectedIndex == 0 || document.uitgebreid_zoeken.stad.value=="of zoek op plaats")	&&
		(document.uitgebreid_zoeken.hoofdrubriek_select.selectedIndex == 0 || document.uitgebreid_zoeken.provincie.selectedIndex == 0)
	)
	{
			return false;
	}
}

function validateTrefwoord(){
	if(document.zoek_op_trefwoord.q.value == ''){
		return false
	}
}

/**
 * function popup_url(url,body_width,body_height)
 * Voor de mouseout van een plaatje : _1.gif wordt teruggezet voor this_image
 */
function popup_url(url,body_width,body_height){

	newwin = window.open(url,"meijer","width=" + body_width + ",height=" + body_height + ",toolbar=0,location=0,directories=0,resizable=1,scrollbars=1,status=1");			
//	newwin.moveTo((screen.width/2)-(body_width/2),(screen.height/2)-(body_height/2));
	newwin.focus();

} // function popup_url

function reset_input(element){
	
	if(element.value=="of zoek op plaats"){
		element.value="";
	}
	
}
