//window.onresize= doreload;

function doreload() {
  window.location.reload()
}

//actief menutiem
function active(pos){
	document.getElementById(pos).style.color='#f01a25';
}

function sc_prijs_aantal(aant,land){
//	alert(aant);
	
	if(land=='nl'){
		prijs = aant * 8.95;	
		if(aant<5){
			verzend = 2.95;
		}else{
			verzend = 4.95;
		}
	}else{
		prijs = aant * 11.75;
		if(aant<5){
			verzend = 4.25;
		}else{
			verzend = 7.70;
		}
	}
	totaal = prijs + verzend;
	
	verzend = verzend.toFixed(2);
	totaal = totaal.toFixed(2);
	prijs = prijs.toFixed(2);
	
	verzend = verzend.replace(".",",");
	prijs = prijs.replace(".",",");
	totaal = totaal.replace(".",",");
	document.getElementById("scprijs").innerHTML='<p style="text-align:right">'+prijs+'</p>';
	document.getElementById("vkprijs").innerHTML='<p style="text-align:right">'+verzend+'</p>';
	document.getElementById("ttprijs").innerHTML='<p style="text-align:right">'+totaal+'</p>';
}

function sc_prijs_aantal_partner(aant, land){
//	alert(aant);
	prijs = aant * 182.50;
	if(land=='nl'){
		verzend = 6.20 * aant;
	}else{
		if(aant==1){
			verzend = 18.50;
		}else{
			verzend = 26.00;
		}
	}
	totaal = prijs + verzend;
	
	verzend = verzend.toFixed(2);
	totaal = totaal.toFixed(2);
	prijs = prijs.toFixed(2);
	
	verzend = verzend.replace(".",",");
	prijs = prijs.replace(".",",");
	totaal = totaal.replace(".",",");
	document.getElementById("scprijs").innerHTML='<p style="text-align:right">'+prijs+'</p>';
	document.getElementById("vkprijs").innerHTML='<p style="text-align:right">'+verzend+'</p>';
	document.getElementById("ttprijs").innerHTML='<p style="text-align:right">'+totaal+'</p>';
}

//alleen getal bij aantal
function numbersonly(myfield, e, dec)
{
var key;
var keychar;

if (window.event)
   key = window.event.keyCode;
else if (e)
   key = e.which;
else
   return true;
keychar = String.fromCharCode(key);

// control keys
if ((key==null) || (key==0) || (key==8) || 
    (key==9) || (key==13) || (key==27) )
   return true;

// numbers
else if ((("0123456789").indexOf(keychar) > -1))
   return true;

// decimal point jump
else if (dec && (keychar == "."))
   {
   myfield.form.elements[dec].focus();
   return false;
   }
else
   return false;
}

// correctly handle PNG transparency in Win IE 5.5 & 6. 
function correctPNG(){ 
   var arVersion = navigator.appVersion.split("MSIE") 
   var version = parseFloat(arVersion[1]) 
   if ((version >= 5.5) && (version < 7) && (document.body.filters)){ 
      for(var i=0; i<document.images.length; i++){ 
         var img = document.images[i] 
         var imgName = img.src.toUpperCase() 
         if (imgName.substring(imgName.length-3, imgName.length) == "PNG"){ 
            var imgID = (img.id) ? "id='" + img.id + "' " : "" 
            var imgClass = (img.className) ? "class='" + img.className + "' " : "" 
            var imgTitle = (img.title) ? "title='" + img.title + "' " : "title='" + img.alt + "' " 
            var imgStyle = "display:inline-block;" + img.style.cssText 
            if (img.align == "left") imgStyle = "float:left;" + imgStyle 
            if (img.align == "right") imgStyle = "float:right;" + imgStyle 
            if (img.parentElement.href) imgStyle = "cursor:hand;" + imgStyle 
            var strNewHTML = "<span " + imgID + imgClass + imgTitle 
            + " style=\"" + "width:" + img.width + "px; height:" + img.height + "px;" + imgStyle + ";" 
            + "filter:progid:DXImageTransform.Microsoft.AlphaImageLoader" 
            + "(src=" + img.src + ", sizingMethod=scale);\"></span>" 
            img.outerHTML = strNewHTML 
            i = i-1 
         } 
      } 
   }     
} 
//window.attachEvent("onload", correctPNG); 
