/*
browserName = navigator.appName;
browserVer = parseInt(navigator.appVersion);
var msie4 = (browserName == "Microsoft Internet Explorer" && browserVer >= 4);
if ((browserName == "Netscape" && browserVer >= 3) || msie4 || browserName=="Konqueror" || browserName=="Opera") {version = "n3";} else {version = "n2";}
	// Blurring links:
function blurLink(theObject)	{	//
	if (msie4)	{theObject.blur();}
}
*/

function popUp(URL, window_name) {
	eval(window_name + " = window.open(URL, '" + window_name + "', 'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=1,width=640,height=700');");
}

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

function fullscreenmode() {
	self.moveTo(0,0);
	self.resizeTo(screen.availWidth,screen.availHeight);
}
function menu_over(div_id) {
  var theDiv = document.getElementById(div_id);
  theDiv.style.backgroundColor="#145B9B";
}
function menu_out(div_id) {
  var theDiv = document.getElementById(div_id);
  theDiv.style.backgroundColor="transparent";
}

var persistclose=0 //set to 0 or 1. 1 means once the bar is manually closed, it will remain closed for browser session
var startX = 0 //set x offset of bar in pixels
var startY = 0 //set y offset of bar in pixels
var verticalpos="frombottom" //enter "fromtop" or "frombottom"

function iecompattest(){
return (document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body
}

function get_cookie(Name) {
var search = Name + "="
var returnvalue = "";
if (document.cookie.length > 0) {
offset = document.cookie.indexOf(search)
if (offset != -1) {
offset += search.length
end = document.cookie.indexOf(";", offset);
if (end == -1) end = document.cookie.length;
returnvalue=unescape(document.cookie.substring(offset, end))
}
}
return returnvalue;
}

function encloseFlash() {
   document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" width="750" height="50" id="eysinkheader" align="">\n');
   document.write('<param name="movie" value="/fileadmin/templates/main/flash/eysinkheader.swf" />\n');
   document.write('<param name="quality" value="high" />\n');
   document.write('<param name="bgcolor" value="#FF0000" />\n');
   document.write('<param name="wmode" value="opaque" />\n');
   document.write('<embed src="/fileadmin/templates/main/flash/eysinkheader.swf" wmode="transparent" quality="high" bgcolor="#FF0000" width="750" height="50" name="eysinkheader" align="" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer"></embed>\n');
   document.write('</object>\n');
}

function pay(){ 
	if (document.betaalform.BPE_Issuer.value=="X"){
		alert("U kunt uitsluitend met iDeal betalen\nals u bankiert bij ŽŽn van de genoemde banken.\nAls alternatief kunt u terruggaan naar stap 1\n om een andere betaalmethode te kiezen..."); 
		return; 
	}
	window.open('','_pay','toolbar=no, location=no, directories=no, status=yes, menubar=no, scrollbars=yes, resizable=yes, width=800, height=600, top=100, left=150'); 
	document.betaalform.action="https://payment.buckaroo.nl/gateway/ideal_payment.asp" 
	document.betaalform.target="_pay";
	document.betaalform.submit();  
}

function checkZip(){
	var theInput = document.getElementById('personzip');
	var theSpan = document.getElementById('zipmessage');
	if(! /(?:\d){4}(?: )?[a-zA-Z]{2}/.test(theInput.value)) {
		theSpan.style.display="inline";
		theInput.focus();
		return false;
	} else {
		theSpan.style.display="none";
		return true;
	}
	return;
}

