var form_teksten = new Array();
form_teksten[1]='naam';
form_teksten[2]='email';
form_teksten[3]='onderwerp';
form_teksten[4]='Laat hier uw bericht achter.';

function setBgF(div,nr){
	if($(div).val()==form_teksten[nr]){
		$(div).val('');
	}
	$(div).css('color','#000000');
	$(div).css('backgroundColor','#FFFFFF');
}

function setBgB(div,nr){
	if($(div).val()==''){
		$(div).val(form_teksten[nr]);
		$(div).css('color','gray');
	}
	else{$(div).css('color','#555555');}
	$(div).css('backgroundColor','#F8F8F8');
}

function setFormTeksten(){
	setFormTekst('form_naam',1);
	setFormTekst('form_email',2);
	setFormTekst('form_onderwerp',3);
	setFormTekst('form_bericht',4);
}

function setFormTekstenError(){
	setFormTekstError('form_naam',1);
	setFormTekstError('form_email',2);
	setFormTekstError('form_onderwerp',3);
	setFormTekstError('form_bericht',4);
}

function setFormTekst(naam,nr){
	$('#'+naam).css('color','gray');
	$('#'+naam).val(form_teksten[nr]);
}
function setFormTekstError(naam,nr){
	input=$('#'+naam);
	if(input.val()=='' || input.val()==form_teksten[nr]){
		input.val(form_teksten[nr]);
		input.css('color','gray');
	}
	else{
		input.css('color','#555555');
	}
}

function getHeightWidth(){
  var myWidth = 0, myHeight = 0;
  if( typeof( window.innerWidth ) == 'number' ) {
    //Non-IE
    myWidth = window.innerWidth;
    myHeight = window.innerHeight;
  } else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
    //IE 6+ in 'standards compliant mode'
    myWidth = document.documentElement.clientWidth;
    myHeight = document.documentElement.clientHeight;
  } else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
    //IE 4 compatible
    myWidth = document.body.clientWidth;
    myHeight = document.body.clientHeight;
  }
  return Array(myWidth,myHeight);
}
function closeImger(){
	$('#bigwhite').hide();
	$('#bigwhiteimg').hide();
}

var CurFoto=0;
function showImger(img){
	CurFoto=img;
	var size = getHeightWidth();
	var left = (size[0]-620)/2;
	$('#bigfoto').attr('src','/pf_images/'+Fotos[img]);
	$('#bigwhiteimg').css('left',left+'px');
	$('#bigwhiteimg').show();
	$('#bigwhite').show();
}

function nextImg(){
	CurFoto++;
	if(Fotos.length==CurFoto){CurFoto=0;}
	$('#bigfoto').attr('src','/pf_images/'+Fotos[CurFoto]);
}
function prevImg(){
	CurFoto--;
	if(CurFoto<0){CurFoto=Fotos.length-1;}
	$('#bigfoto').attr('src','/pf_images/'+Fotos[CurFoto]);
}

function baanr_n(d){
	$('#tur').hide();
	$('#tul').css('display','inline');
	Fotos=new Array(d+"4.png",d+"5.png",d+"6.png");
	$('#brp1').attr('src','/pf_images/'+d+'4s.png');
	$('#brp2').attr('src','/pf_images/'+d+'5s.png');
	$('#brp3').attr('src','/pf_images/'+d+'6s.png');
}
function baanr_p(d){
	Fotos=new Array(d+"1.png",d+"2.png",d+"3.png");
	$('#tul').hide();
	$('#tur').css('display','inline');
	$('#brp1').attr('src','/pf_images/'+d+'1s.png');
	$('#brp2').attr('src','/pf_images/'+d+'2s.png');
	$('#brp3').attr('src','/pf_images/'+d+'3s.png');
}

function show(div){
	$('#'+div).show();
}
function hide(div){
	$('#'+div).hide();
}
function t(div,plaatje){
	$('#'+div).attr('src','/plaatjes/'+plaatje);
}
