function framecheck()
{
//zet frame in juiste frameset
if (parent.location.href == self.location.href)
   {
   window.location.replace ('index.asp');
   }
}//einde framecheck


//start Showpic;
var PicDisp=null;
function ShowPic(image,B,H,Titel)
{

if (PicDisp != null && PicDisp.open) PicDisp.close()
PicDisp = null

if (H > (screen.height-50))
   {
   features="status=no,dependent=yes,scrollbars=yes"
   H=screen.height-85
   B=B+25
   }
else
	features="status=no,dependent=yes"
ImageB = B + 25;
ImageH = H + 35;

if (window.screen)
{
PicDisp=window.open("", "Afbeelding", "width=" +ImageB +",height=" + ImageH + "," + features);
var BldStr = '<html><head><title>' + Titel + '</title></head>'
BldStr += '<body bgcolor="#000000">'
BldStr += '<table border="0" width="100%" height="100%"><tr><td align="center" valign="middle">'
BldStr += '<img src="/pics/'+ image +'"><br></td></tr></table>'
BldStr += '</body></html>'

var picdoc = PicDisp.document
picdoc.open()
picdoc.write(BldStr)
picdoc.close()
}
}

function blowOut() 
{
if (PicDisp != null && PicDisp.open) PicDisp.close()
}

window.onfocus = blowOut
if (location.search && window.focus) 
{ // for NN2
if (location.search.indexOf("buFocus") >= 0) 
{
top.focus()
} 
}

//einde Showpic;

function ValOrderNL(f)
{
//naam
  if(f[4].value == '')
  {
    alert("We willen wel graag uw naam weten!");
	f[4].focus();
    return(false);
  }
  
//Woonplaats
  if(f[7].value == '')
  {
    alert("Zonder woonplaats komt uw bestelling niet aan.");
	f[7].focus();
    return(false);
  }
//Telefoon
var s;
  for(var i = 0; i < f[9].value.length; i++)
  {

    // In s wordt het huidige teken opgeslagen.
    s = f[9].value.charAt(i);

    // Geldige tekens: spaties, haakjes, "/", "-" en "+".
    if( !((s >= 0) && (s <= 9))
     && (s != ' ') && (s != '-') && (s != '+')
     && (s != '/') && (s != '(') && (s != ')'))
    {
      alert('Het telefoonnummer mag alleen getallen, '
       + 'spaties, haakjes, "/", "-" en "+" bevatten.');
	   f[9].focus();
      return(false);
    }
  }
  
//email
  if(f[11].value == '')
  {
    alert('Graag een E-mail adres invoeren, dit gebruiken we als belangrijkste contactmiddel .');
	f[11].focus();
    return(false);
  }

  if(f[11].value.search(/ /) != '-1')
  {
    alert('Er mogen geen spaties voorkomen in uw e-mailadres!');
	f[11].focus();
    return(false);
  }

  s = f[11].value.split(/@/);

  // Bij een "@" zijn er maar twee delen mogelijk.
  if((s.length != 2) || s[0] == '' || s[1] == '')
  {
    alert('E-mailadressen moeten deze vorm hebben: "gebruiker@domein",\n');
	f[11].focus();
    return(false);
  }
  
for (i=11 ; i<f.length ;i++)
{
 	if (f[i].value=='')
	{
	f[i].disabled="off";
	}
}
  return(true);
} //einde ValorderNL
