function imgHover (imgContainer, img) {
	imgContainer.src = img;
}

function changeImg(imgContainer, waarde){
	if(		waarde == 1){img = "images/interface/nederland.gif";}
	else if(waarde == 2){img = "images/interface/belgie.gif";}
	else if(waarde == 3){img = "";}
	document.getElementById(imgContainer).src = img;
}

window.activeImg = "";


function setActiveImg(imgContainer, newActive){
	activeImg = newActive;
	document.getElementById(activeImg).src = imgContainer +''+activeImg+ '_small-on.jpg';	
}

function viewProductImg(waarde, imgContainer){
	
	//alert(imgContainer + " \n"+ activeImg);
	if(activeImg != ""){document.getElementById(activeImg).src = waarde +''+activeImg+ '_small.jpg';}
	
	document.getElementById(imgContainer).src = waarde +''+imgContainer+ '_small-on.jpg';
	document.getElementById('productImgContainerLarge').src =  waarde +''+imgContainer+'.jpg';
			
	activeImg = imgContainer;
	
}

function showProductImg(waarde, imgContainer){
	document.getElementById(imgContainer).src = waarde +''+imgContainer+ '_small-on.jpg';
	document.getElementById('productImgContainerLarge').src =  waarde +''+imgContainer+'.jpg';
}




// ---------------------------------------------------------------SUBMENU

function showElement(elementId){
	foundElement = document.getElementById(elementId);
	
	if(foundElement.style.display == "none"){foundElement.style.display = "block";}
	else{foundElement.style.display = "none";}
	
}


// ---------------------------------------------------------------Show dealers



var defaultFontSize = 11;


var currentFontSize = defaultFontSize;

function changeFontSize(sizeDifference){

	currentFontSize = parseInt(currentFontSize) + parseInt(sizeDifference);


	if(currentFontSize > 15){

		currentFontSize = 15;

	}else if(currentFontSize < 11){

		currentFontSize = 11;

	}


	setFontSize(currentFontSize);

};




function setFontSize(fontSize){

	//var stObj = (document.getElementById) ? document.getElementById('wrapper') : document.all('wrapper');
	defaultFontSize = fontSize; 
	currentFontSize = fontSize;

	document.body.style.fontSize = fontSize + 'px';
	date = new Date();
	date.setTime(date.getTime()+(30*24*60*60*1000));
	date = date.toGMTString();
	
	document.cookie = "fontsize="+fontSize+"; expires="+date+"; path=/"


};

function findFondSize(){
	fontsize = getCookie("fontsize");
	setFontSize(fontsize);	
}

function getCookie(c_name){
	if (document.cookie.length>0)
	  {
	  c_start=document.cookie.indexOf(c_name + "=");
	  if (c_start!=-1)
	    { 
	    c_start=c_start + c_name.length+1; 
	    c_end=document.cookie.indexOf(";",c_start);
	    if (c_end==-1) c_end=document.cookie.length;
	    return unescape(document.cookie.substring(c_start,c_end));
	    } 
	  }
	return 11;
}

function changeLanguage(value){
	
if(value == 1){	action = "http://www.revatak.nl/nl/";	}
	if(value == 2){	action = "http://www.revatak.de/";	}
	if(value == 3){	action = "http://www.revatak.eu/en/";	}
	
	form = document.getElementById('frm_taalKeuze');
	
	form.action = action;
	
	document.getElementById('frm_taalKeuze').submit();
}

