/* 
  ------------------------------------------------
  PVII Uberlink
  Current Page Link Highlighter
  Copyright (c) 2007 Project Seven Development
  www.projectseven.com
  Version: 1.0.0
  ------------------------------------------------
*/
function P7_Uberlink(cl,d){
	var i,ob,tA,h=document.location.href;
	if(document.getElementById){
	ob=(d)?document.getElementById(d):document;
	if(ob){
	tA=ob.getElementsByTagName('A');
	for(i=0;i<tA.length;i++){
	if(tA[i].href==h){
	tA[i].className=cl;
}}}}}

function changeBG(objRow, mouseState) {
    if (mouseState == 'on') {
            sColor = '#DFE8E7';            
    }
    else if (mouseState == 'off') {
            sColor = '#F8F8F8';
    }
    objRow.bgColor = sColor;
}

function insertAdres() {	
	var i = document.aanmeldForm.addadres.value;
	    i++;
	var mycurrent_row = document.getElementById("adrestabel").insertRow(-1);
    
	var mycurrent_cell_1 = document.createElement('td'); 
	var mycurrent_cell_2 = document.createElement('td'); 
	var mycurrent_cell_3 = document.createElement('td'); 
	var mycurrent_cell_4 = document.createElement('td'); 
	
	input_type_select = document.createElement('select');
	input_type_select.name = 'type_'+i;
	input_type_select.className = 'select2';
	
		input_option = document.createElement('option'); 
		input_option.text = 'Selecteer type'; 
		input_option.value = ''; 
		input_type_select.options.add(input_option); 
		
		input_option = document.createElement('option'); 
		input_option.text = 'Beide'; 
		input_option.value = 'beide'; 
		input_type_select.options.add(input_option); 
	
		input_option = document.createElement('option'); 
		input_option.text = 'Factuuradres'; 
		input_option.value = 'factuuradres'; 
		input_type_select.options.add(input_option); 
		
		input_option = document.createElement('option'); 
		input_option.text = 'Bezorgadres'; 
		input_option.value = 'bezorgadres'; 
		input_type_select.options.add(input_option); 
	
	input_adres = document.createElement('input');
	input_adres.setAttribute('type', 'text');
	input_adres.name = 'adres_'+i;
	input_adres.className = 'tekstveld2';
	
	input_postcode = document.createElement('input');
	input_postcode.setAttribute('type', 'text');
	input_postcode.name = 'postcode_'+i;
	input_postcode.className = 'tekstveld2';

	input_plaats = document.createElement('input');
	input_plaats.setAttribute('type', 'text');
	input_plaats.name = 'plaats_'+i;
	input_plaats.className = 'tekstveld2';
	
	mycurrent_cell_1.appendChild(input_type_select); 
	mycurrent_cell_2.appendChild(input_adres); 
	mycurrent_cell_3.appendChild(input_postcode); 
	mycurrent_cell_4.appendChild(input_plaats); 

	mycurrent_row.appendChild(mycurrent_cell_1);  
	mycurrent_row.appendChild(mycurrent_cell_2);
	mycurrent_row.appendChild(mycurrent_cell_3);
	mycurrent_row.appendChild(mycurrent_cell_4);
	
	document.aanmeldForm.addadres.value = i;

}	

