/* Pop-up */
function showURL(url) {
window.open(url,'Applyscreen','width=650,height=545,scrollbars=yes,resizable=yes').focus();
}

var currentObj;

function swap(obj, state) {
  if (state != "") {
    if (state == 2) {
      obj.src = "images/buttons/" + obj.name + "_o.gif";
    } else if (state == 1) {
      obj.src = "images/buttons/" + obj.name + ".gif";
    }
    if (currentObj != null) {
      currentObj.src = "images/buttons/" + currentObj.name + "_o.gif";
    }
  }
}

var detect = navigator.userAgent.toLowerCase();
	function checkIt(string)
	{
		place = detect.indexOf(string) + 1;
		thestring = string;
		return place;
	}

function checkWholeForm(theForm) {
    var why = "";
    why += checkEmail(theForm.email.value);
    why += checkTelefoonnr(theForm.telefoonnr.value);
    why += checkNaam(theForm.naam.value);
    if (why != "") {
       alert(why);
       return false;
    }
return true;
}

// Keuze van uniek bg-plaatje
bg = new Array(9);
bg[0] = '/_images/bgbig1.gif';
bg[1] = '/_images/bgbig2.gif';
bg[2] = '/_images/bgbig3.gif';
bg[3] = '/_images/bgbig4.gif';
bg[4] = '/_images/bgbig5.gif';
bg[5] = '/_images/bgbig6.gif';
bg[6] = '/_images/bgbig7.gif';
bg[7] = '/_images/bgbig8.gif';
bg[8] = '/_images/bgbig9.gif';
bg[9] = '/_images/bgbig10.gif';
index = Math.floor(Math.random() * bg.length);
document.write("<style type=\"text/css\" media=\"screen\">#boxcontainer {background-image: url('"+bg[index]+"');}</style>");
