function setBackground() {
    
    var img = document.getElementById('img_visual');
    var divje = document.getElementById('div_background');
    var img_background;
    		
    if (img != null){
    			var img_name = img.name;
    			switch (img_name){
	    			case 'profielen':
	    				img_background = 'url(/img/bgcontent/bg_welkom.jpg)';
	    				break;
	    			case 'profielen_en':
	    				img_background = 'url(/img/bgcontent/bg_engels.jpg)';
	    				break;
	    			case 'profielen_fr':
	    				img_background = 'url(/img/bgcontent/bg_frans.jpg)';
	    				break;
	    			case 'profielen_de':
	    				img_background = 'url(/img/bgcontent/bg_duits.jpg)';
	    				break;
	    			case 'profielen_ru':
	    				img_background = 'url(/img/bgcontent/bg_russisch.jpg)';
	    				break;				
	    			case 'diensten':
	    				img_background = 'url(/img/bgcontent/bg_diensten.jpg)';
	    				break;
	    			case 'contact':
	    				img_background = 'url(/img/bgcontent/bg_contact.jpg)';
	    				break;	
	    			case 'downloads':
	    				img_background = 'url(/img/bgcontent/bg_downloads.jpg)';
	    				break;
	    			case 'faq':
	    				img_background = 'url(/img/bgcontent/bg_faq.jpg)';
	    				break;
	    			case 'nieuws':
	    				img_background = 'url(/img/bgcontent/bg_nieuws.jpg)';
	    				break;
	    			case 'over vwe':
	    				img_background = 'url(/img/bgcontent/bg_vwe.jpg)';
	    				break;
	    			case 'algemene page':
	    				img_background = 'url(/img/bgcontent/bg_welkom.jpg)';
	    				break;	
	    			default:
	    				img_background = 'url(/img/bgcontent/bg_welkom.jpg)';
	    				break;		
	    	
	    		}
	    		if (navigator.appName == 'Netscape')
	    	  {
	    	  	divje.style.background = img_background + ' no-repeat scroll 100% 0%';
	    	  	
	    	  	//divje.style.margin = 0px; 0px;
	    	  	
	    		}
	    		else
	    			divje.style.background = img_background + ' no-repeat scroll 100% 0px';
	     		
 		}
}


function ge(obj) {
	return document.getElementById(obj);
}
function setStyleById(i, p, v) {
	var n = ge(i);
	n.style[p] = v;
}
function changeClass() {
//	alert('er gaat iets niet goed: ');
//		setStyleById(id,margin-top,100px;);
//	ge(id).style.class=cla;
}

function Kenteken()
{
	if (document.getElementById('txtKentekenveldTmp').value.length != 0) 
	{
		document.forms['kentekenformulier']['txtKentekenveld'].value=document.getElementById('txtKentekenveldTmp').value; 
		document.forms['kentekenformulier'].submit();
	}
}

function searchTrefwoord(trefwoord) {
	location.href='/home/Page/Search.aspx?page=1&amp;search='+trefwoord;
}

function formSubmit()
{
	document.getElementById("zoekwoordform").submit()
}




/***********************************************
* Random Content Order script- © Dynamic Drive DHTML code library (www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit Dynamic Drive at http://www.dynamicdrive.com/ for full source code
***********************************************/

function randomizeContent(classname){
var contents=randomizeContent.collectElementbyClass(classname)
contents.text.sort(function() {return 0.5 - Math.random();})
for (var i=0; i<contents.ref.length; i++){
contents.ref[i].innerHTML=contents.text[i]
contents.ref[i].style.visibility="visible"
}
}

randomizeContent.collectElementbyClass=function(classname){ //return two arrays containing elements with specified classname, plus their innerHTML content
var classnameRE=new RegExp("(^|\\s+)"+classname+"($|\\s+)", "i") //regular expression to screen for classname within element
var contentobj=new Object()
contentobj.ref=new Array() //array containing references to the participating contents
contentobj.text=new Array() //array containing participating contents' contents (innerHTML property)
var alltags=document.all? document.all : document.getElementsByTagName("*")
for (var i=0; i<alltags.length; i++){
if (typeof alltags[i].className=="string" && alltags[i].className.search(classnameRE)!=-1){
contentobj.ref[contentobj.ref.length]=alltags[i]
contentobj.text[contentobj.text.length]=alltags[i].innerHTML
}
}
return contentobj
}


function RedirectActueel(){
    window.location="http://www.vwe.nl";
}

function entsub(event,ourform) {
  if (event && event.which == 13)
    ourform.submit();
  else
    return true;
}

function isEnterEvent(event) {
  if ((event.which && event.which == 13) || 
      (event.keyCode && event.keyCode == 13))
    return true;
  else
    return false;
} 