if(window != top){top.location.href="http://www.pasteuning.nl";};

function runflash(url,width,height)
{
  document.writeln('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="'+width+'" height="'+height+'">');
  document.writeln('<param name="movie" value="'+url+'">');
  document.writeln('<param name="quality" value="best">');
  document.writeln('<param name="menu" value="false">');
  document.writeln('<param name="wmode" value="transparent">');
  document.writeln('<embed src="'+url+'" quality="best" menu="false" wmode="transparent" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="'+width+'" height="'+height+'"></embed>');
  document.writeln('</object>');
}

function preloadImages()
{
  if(document.images)
  {
    if(!document.imageArray) document.imageArray = new Array();
    var i,j = document.imageArray.length, args = preloadImages.arguments;
    
    for(i=0; i<args.length; i++)
    {
      if (args[i].indexOf("#")!=0)
      {
        document.imageArray[j] = new Image;
        document.imageArray[j++].src = args[i];
      }
    }
  }
}

function openwindow(wurl,wwidth,wheight)
{
  var scrollVar       = 1;
  var width     	  = wwidth;
  var height		  = wheight;
  var url 			  = wurl;
  var str = "height="+height+",innerHeight="+height+",width="+width+",innerWidth="+width+",scrollbars="+scrollVar;
  if(window.screen)
  {
	var xc = 0;
	var yc = 0;
	str += ",left="+xc+",screenX="+ xc+",top="+yc+",screenY="+yc;
  } 
  centerwindow=window.open(url, "center", str);
}

function MM_swapImgRestore() 
{
  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_findObj(n, d) 
{ 
  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() 
{ 
  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 submitme()
{
	var error = "";
	var filledIn = 0;
	for (var i=0; i<document.search.length; i++)
	{
		var type = document.search[i].type;
		if (type == "hidden" || type == "file" || type == "button" || type == "image" || type == "reset" || type == "submit") { continue; }
		var name = document.search[i].name;
		value = document.search[name].value;
		if (value != "" && value != "kies type...") { filledIn++; }
	}
	if (filledIn < 1) {	alert ("U moet tenminste \351\351n zoekveld invullen."); }
	else { document.search.submit(); }
}

function onDown(e)
{
	if (e.keyCode==13) 
	{ 
		submitme();
	} else if (e.which == 13) {
		submitme();
	}
}


function sendFormC()
{
  var first   = document.contact.voornaam.value;
  var last    = document.contact.achternaam.value;
  var phone   = document.contact.telefoon.value;
  var email   = document.contact.email.value;
  var filter  = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/;
  if(first!=""&&last!=""&&email!=""&&phone!=""&&first!="vul in a.u.b."&&last!="vul in a.u.b."&&email!="vul in a.u.b."&&phone!="vul in a.u.b.")
  {
	if(filter.test(email)){document.contact.submit();}else{document.contact.email.value="ongeldig e-mail adres";}
  }
  else
  {
    if(first==""||first=="vul in a.u.b."){document.contact.voornaam.value="vul in a.u.b.";};
    if(last==""||last=="vul in a.u.b."){document.contact.achternaam.value="vul in a.u.b.";};
    if(email==""||email=="vul in a.u.b."){document.contact.email.value="vul in a.u.b.";};
	if(phone==""||phone=="vul in a.u.b."){document.contact.telefoon.value="vul in a.u.b.";};
  }	
}