function qSearchVoordeel(){
	var qstr = "";
	qstr = qstr + document.q_zoeken.kleur.value + "_";  
	qstr = qstr + document.q_zoeken.prijs.value + "_";
	qstr = qstr + document.q_zoeken.materiaal.value + "_";
	qstr = qstr + document.q_zoeken.afmetingen.value + "_";
	window.location.href = '/qzoeken/1/' + qstr; 
}

function makePrijs(){
		phpNaarDiv('prijs_gadgets','/action/custom/gadgetsMakePrijs.php',false,'&id1='+document.getElementById('pro1').value+'&id2=' + +document.getElementById('pro2').value);
}

function showAflever(){
	document.getElementById('afleverDiv1').style.display = 'block';
	phpNaarDiv('afleverDiv1','/action/databases/ajax.afleveradres.php',false,''); 
}
function veranderTekst(){ 
	document.getElementById('aflevertekst').innerHTML = "<a href=\"javascript:phpNaarDiv('afleverDiv1','/action/databases/ajax.afleveradres.php',false,'&verberg=J');\" >Geen afleveradres >></a>";
}
function doLogin(){
	document.checkout_form.action.value = 'login_now'; 
	postForm(document.checkout_form,'checkout_form','checkout_div','/action/databases/ajax.checkout3.php');

}		
function doVergeten(){
	document.checkout_form.action.value = 'vergeten'; 
	postForm(document.checkout_form,'checkout_form','checkout_div','/action/databases/ajax.checkout3.php');

	}
function doLogin2(){
	document.checkout_form.action.value = 'mijn-account-login'; 
	postForm(document.checkout_form,'checkout_form','checkout_div','/action/databases/ajax.checkout3.php');

	}
function checkAlgemeneVoorwaarden(){
	if(document.getElementById('nieuwsbrief') == null){
		phpNaarDiv('checkout_div','/action/databases/ajax.checkout3.php',false,'&action=update_form&go_to=3');
	} else {
		if(document.getElementById('nieuwsbrief').checked == true){
			//window.alert('nieuwsbrief');
			phpNaarDiv('checkout_div','/action/databases/ajax.checkout3.php',false,'&action=update_form&go_to=3&nb=' + document.getElementById('nieuwsbrief').value);
		} else {
			phpNaarDiv('checkout_div','/action/databases/ajax.checkout3.php',false,'&action=update_form&go_to=3');
		}
	}
}  
function loadAdd(){
	document.getElementById('inhoudLight').style.width = 620 + 'px';
	document.getElementById('contentLight').style.width = 620 + 'px';
	document.getElementById('inhoudLight').style.height = 150 + 'px';
	document.getElementById('contentLight').style.height = 170 + 'px';

	phpNaarDiv('contentLight','/action/ajax.loadVoordeel.php',false,'&divNaam=contentLight');
	document.getElementById('headerLight').innerHTML = '&nbsp;';
	loadLight(); 
	centerPopup();
}
function loadCheckout(){
    //window.alert('Go'); 
	document.getElementById('inhoudLight').style.width = 820 + 'px';
	document.getElementById('contentLight').style.width = 820 + 'px';
	document.getElementById('inhoudLight').style.height = 680 + 'px';
	document.getElementById('contentLight').style.height = 680 + 'px';

	
	document.getElementById('headerLight').innerHTML = '&nbsp;';
	loadLight(); 
	centerPopup();
	setTimeout("phpNaarDiv('contentLight','/action/databases/ajax.loadcheckout.php',false,'');",1000);
}
function replaceT(obj){
	var newO=document.createElement('input');
	newO.setAttribute('type','password');
	newO.setAttribute('name',obj.getAttribute('name'));
	newO.setAttribute('id',obj.getAttribute('id'));
	obj.parentNode.replaceChild(newO,obj);
	//setTimeout("newO.focus();",100);
	setTimeout("document.getElementById('pass1').focus();",100);
	//$('#pass1').focus();
}
