	function mainmenuMouseover(e, pPc_id)
	{
		if (pPc_id != tplVar_main_pp_id) {
			if (pPc_id == 'home') {
				e.className = 'mainmenu-home-mouseover';
			}else{
				e.className = 'mainmenu-li-mouseover';
			}
		}
	}
	function mainmenuMouseout(e, pPc_id)
	{
		if (pPc_id != tplVar_main_pp_id) {
			if (pPc_id == 'home') {
				e.className = 'mainmenu-home';
			}else{
				e.className = 'mainmenu-li';
			}
		}
	}
	function leftmenuMouseover(e, pPc_id)
	{
		if (pPc_id != tplVar_main_pp_id) {
			if (pPc_id == '15') {
				if (tplVar_newslink == '') {
					e.className = 'design_header_menu_ul_item';
				}
			}else{
				if (pPc_id == '12') {
					e.className = 'design_header_menu_ul_home';
				}else{
					e.className = 'design_header_menu_ul_item';
				}
			}
		}
	}
	function leftmenuMouseout(e, pPc_id)
	{
		if (pPc_id != tplVar_main_pp_id) {
			if (pPc_id == '15') {
				if (tplVar_newslink == '') {
					e.className = 'design_header_menu_ul_item';
				}
			}else{
				if (pPc_id == '12') {
					e.className = 'design_header_menu_ul_home';
				}else{
					e.className = 'design_header_menu_ul_item';
				}
			}
		}
	}
	function showProductPreviewImage(e, prod, image)
	{
		e.className = 'products_product-mouseover';
		layer = document.getElementById('products_product-image-large-'+prod);
		img	= document.getElementById('products_product-image-large-img-'+prod);
		
		img.src = '/content/shop/images/small/'+image;
		layer.style.visibility = 'visible';
	}
	function hideProductPreviewImage(e, prod)
	{
		e.className = 'products_product';
		layer = document.getElementById('products_product-image-large-'+prod);
		layer.style.visibility = 'hidden';
	}
	function leftmenuClick(e, pPc_id)
	{
		if (pPc_id != tplVar_main_pp_id) {
			if (pPc_id == '15') {
				if (tplVar_newslink == '') {
					e.className = 'design_header_menu_ul_item';
				}
			}else{
				if (pPc_id == '12') {
					e.className = 'design_header_menu_ul_home';
				}else{
					e.className = 'design_header_menu_ul_item';
				}
			}
		}
	}
	function magnifyProductImage(image, width, height)
	{
		window.open('/content/shop/images/original/'+image, '', 'height='+height+', width='+width+', resizable');
	}
	function clickProductImage(image)
	{
		e = document.getElementById('product_pictures_largepicture');
		e.src = '/content/shop/images/normal/'+image;
	}
	function orderstepMouseover(e, pStep)
	{
		if (tplVar_currentStep == '') {
			tplVar_currentStep = '1';
		}
		if (pStep != tplVar_currentStep) {
			e.src = '/shared/images/custom/steps_'+pStep+'-mouseover.jpg';
			e.style.cursor = 'pointer';
		}
	}
	function orderstepMouseout(e, pStep)
	{
		if (tplVar_currentStep == '') {
			tplVar_currentStep = '1';
		}
		if (pStep != tplVar_currentStep) {
			e.src = '/shared/images/custom/steps_'+pStep+'.jpg';
			e.style.cursor = 'pointer';
		}
	}
	function searchSubmit()
	{
		form = document.getElementById('formSearch');
		form.submit();
	}
	function addtocartSubmit()
	{
		form = document.getElementById('formAddtocart');
		form.submit();
	}
	function editcartSubmit(pArtnr)
	{
		delart = document.getElementById('delartnr');
		delart.value = pArtnr;
		
		form = document.getElementById('formEditcart');
		form.submit();
	}
	function cartstep2Submit(pArtnr)
	{
		form = document.getElementById('formCartstep2');
		form.submit();
	}
	function maxiMinimize()
	{
		headerObj = document.getElementById("design_header");
		containerObj = document.getElementById("design_container");
		iconObj = document.getElementById("maxiMiniMize");
		if (headerObj.style.position == 'absolute') {
			headerObj.style.position	= 'relative';
			headerObj.style.visibility	= 'visible';
			containerObj.style.top		= '33px';
			iconObj.src					= "shared/images/custom/icon-maximize.jpg";
			createCookie('maxiMiniMize', 0, 1);
		}else{
			headerObj.style.position	= 'absolute';
			headerObj.style.visibility	= 'hidden';
			containerObj.style.top		= '0px';
			iconObj.src					= "shared/images/custom/icon-minimize.jpg";
			createCookie('maxiMiniMize', 1, 1);
		}
	}
	function selectCountryChange(e)
	{
		customCountryField = document.getElementById("customer_country-europa");
		sendpriceElement = document.getElementById("sendprice");
		endtotalElement = document.getElementById("endtotal");
		if (e.value == 'Overige EU landen') {
			customCountryField.innerHTML = '*&nbsp;&nbsp;Land&nbsp;<input name="customer_country-europa" type="text" size="37" maxlength="63"><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(Let op: verzendkosten verschillen per land)';
			customCountryField.focus();
			var sendprice = 24.95;
			sendpriceElement.innerHTML = '<font color="#990000">24,95</font>&nbsp;';
		}else if(e.value == 'Nederland') {
			customCountryField.innerHTML = '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(Let op: verzendkosten verschillen per land)';
			var sendprice = 5.5;
			sendpriceElement.innerHTML = '<font color="#990000">5,50</font>&nbsp;';
		}else if(e.value == 'Belgie/Duitsland/Luxemburg/UK') {
			customCountryField.innerHTML = '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(Let op: verzendkosten verschillen per land)';
			var sendprice = 9.95;
			sendpriceElement.innerHTML = '<font color="#990000">9,95</font>&nbsp;';
			
		}else if (e.value == 'All other EU countries') {
			customCountryField.innerHTML = '*&nbsp;&nbsp;Country&nbsp;<input name="customer_country-europa" type="text" size="37" maxlength="63"><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(Notice: The shipping costs variate by country)';
			customCountryField.focus();
			var sendprice = 22.50;
			sendpriceElement.innerHTML = '<font color="#990000">22.50</font>&nbsp;';

		}else if(e.value == 'England') {
			customCountryField.innerHTML = '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(Notice: The shipping costs variate by country)';
			var sendprice = 5.95;
			sendpriceElement.innerHTML = '<font color="#990000">5.95</font>&nbsp;';
		}else if(e.value == 'Southern areas of Scotland') {
			customCountryField.innerHTML = '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(Notice: The shipping costs variate by country)';
			var sendprice = 5.95;
			sendpriceElement.innerHTML = '<font color="#990000">5.95</font>&nbsp;';
		}else if(e.value == 'the Netherlands') {
			customCountryField.innerHTML = '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(Notice: The shipping costs variate by country)';
			var sendprice = 5.95;
			sendpriceElement.innerHTML = '<font color="#990000">5.95</font>&nbsp;';
			
		}else if(e.value == 'Isle of Wight') {
			customCountryField.innerHTML = '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(Notice: The shipping costs variate by country)';
			var sendprice = 15.95;
			sendpriceElement.innerHTML = '<font color="#990000">15.95</font>&nbsp;';
		}else if(e.value == 'Scottish Highlands') {
			customCountryField.innerHTML = '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(Notice: The shipping costs variate by country)';
			var sendprice = 15.95;
			sendpriceElement.innerHTML = '<font color="#990000">15.95</font>&nbsp;';
		}else if(e.value == 'Northern Ireland') {
			customCountryField.innerHTML = '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(Notice: The shipping costs variate by country)';
			var sendprice = 15.95;
			sendpriceElement.innerHTML = '<font color="#990000">15.95</font>&nbsp;';
			
		}else if(e.value == 'Scottish Isles') {
			customCountryField.innerHTML = '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(Notice: The shipping costs variate by country)';
			var sendprice = 21.95;
			sendpriceElement.innerHTML = '<font color="#990000">21.95</font>&nbsp;';
		}else if(e.value == 'Isle of Man') {
			customCountryField.innerHTML = '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(Notice: The shipping costs variate by country)';
			var sendprice = 21.95;
			sendpriceElement.innerHTML = '<font color="#990000">21.95</font>&nbsp;';
		}else if(e.value == 'Channel Islands') {
			customCountryField.innerHTML = '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(Notice: The shipping costs variate by country)';
			var sendprice = 21.95;
			sendpriceElement.innerHTML = '<font color="#990000">21.95</font>&nbsp;';
		}else if(e.value == 'Southern Ireland') {
			customCountryField.innerHTML = '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(Notice: The shipping costs variate by country)';
			var sendprice = 21.95;
			sendpriceElement.innerHTML = '<font color="#990000">21.95</font>&nbsp;';

		//2006-11-03 Nathan: added none-selected default value of '0'
		}else if(e.value == '') {
			customCountryField.innerHTML = '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(Let op: verzendkosten verschillen per land)';
			var sendprice = 0;
			sendpriceElement.innerHTML = '<font color="black;">0,00</font>&nbsp;';
		}

		var endtotal = (subtotal + sendprice);
		endtotal = FormatPrice(endtotal,2); //round
		endtotal = ''+endtotal; //make 'endtotal' a string
				
		var endtotalParts = endtotal.split('.');
		if (endtotalParts[1] == undefined)
			endtotalParts[1] = '00';
		if (endtotalParts[1].length == 1)
			endtotalParts[1] = endtotalParts[1]+'0';
		endtotal = endtotalParts[0]+'.'+endtotalParts[1];

		endtotalElement.innerHTML = '<font color="#dd0000">'+endtotal+'</font>&nbsp;';
	}
	function showhideIncassoForm()
	{
		paymethodIncasso = document.getElementById("paymethodIncasso");
		incassoform = document.getElementById("incassoForm");
		if (paymethodIncasso.checked == true) {
			incassoform.style.visibility	= 'visible';
		}else{;
			incassoform.style.visibility	= 'hidden';
		}
	}
	function createCookie(name,value,days)
	{
		if (days) {
			var date = new Date();
			date.setTime(date.getTime()+(days*24*60*60*1000));
			var expires = "; expires="+date.toGMTString();
		}
		else var expires = "";
		document.cookie = name+"="+value+expires+"; path=/";
	}
	function readCookie(name)
	{
		var nameEQ = name + "=";
		var ca = document.cookie.split(';');
		for(var i=0;i < ca.length;i++) {
			var c = ca[i];
			while (c.charAt(0)==' ') c = c.substring(1,c.length);
			if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length);
		}
		return null;
	}
	function onLoad()
	{
		// show maximize/minimize icon or maximize if the user pressed the button before
		/*maxiMiniMize = readCookie('maxiMiniMize');
		if (maxiMiniMize == 1) {
			maxiMinimize();
		}else{
			iconObj = document.getElementById("maxiMiniMize");
			iconObj.src	= "shared/images/custom/icon-maximize.jpg";
		}*/
		
		// mainmenu: give the selected item a diffrent classname
		if (tplVar_main_pp_id != '' && tplVar_main_pp_id != '7') {
			e = document.getElementById("mainmenuId_"+tplVar_main_pp_id);
			if (tplVar_main_pp_id == 1) {
				e.className = 'mainmenu-home-selected';
			}else{
				e.className = 'mainmenu-li-selected';
			}
		}
		
		//HACK: hacked this in to give the footer a z-index:-1 in IE
		if (navigator.appName.indexOf('Microsoft') != -1) {//IE
			document.getElementById('design_bottom').style.zIndex = '-1';
		}
	}
	
	function FormatPrice(number,decimals)
	{
		 var i,d;
		
		 // backup original number
		 var original = number; 
		 // set default values
		 if(number=="") number=parseInt("0");
		 if(decimals=="") decimals=parseInt("2");
		
		 // round number to specified number of decimals
		 number=""+Math.round(number*Math.pow(10,decimals))*Math.pow(10,-decimals);
		
		 // find index of decimal point
		 d=number.indexOf(".");
		
		 // if no decimal point, number is an integer
		 // pad number with trailing zeros
		 if(d==-1) {
		   number=number+".";
		   for(i=0;i<decimals;i++)
		     number=number+"0";
		   return number;
		 }
		
		 // if decimal point is first index
		 // pad number with leading zero
		 if(d==0) {
		   number="0"+number;
		   d++;
		 }
		
		 // if first index is negative sign
		 // pad number with leading zero
		 if(d==1 && number.substring(0,1)=="-") {
		   number="-0" + number.substring(1,number.length);
		   d++;
		 }
		
		 // truncate number to desired length
		 number=number.substring(0,d+decimals+1);
		
		 // if number is shorter than desired length
		 // pad number with trailing zeros
		 while(number.length<=d+decimals)
		   number=number+"0";
		
		 return number;
	}

