function enableCat(idcheck, idlist) {
	if(document.getElementById(idlist) != null) {
		if(document.getElementById(idcheck).checked){
			document.getElementById(idlist).disabled=false;
		} else {
			document.getElementById(idlist).disabled=true;
		}
	}
}
function enableSearchEngine() {
	enableCat("se","key");
	enableCat("se","cat1");
	/* // enableCat("se","cat1list"); */
	enableCat("se","cat2");
	enableCat("se","cat2list");
	enableCat("se","dsyes");
	enableCat("se","dsno");
}
function enableGearTitle(){
	if(document.getElementById("geartitle").checked){
		document.getElementById("geartitlelabel").disabled=false;
	} else {
		document.getElementById("geartitlelabel").disabled=true;
	}
}
function initialise(){
	enableSearchEngine();
}
function enableInputs(){
	document.getElementById("cartEmail").disabled=false;
}
function disableInputs(){
	document.getElementById("cartEmail").disabled=true;
}
function setInput(){	
	if(document.getElementById("cartActive").checked){
		enableInputs();
	} else {
		disableInputs();
	}
}
function windowOpen(url) {
	newWindow = window.open(url, 'wpop', 'menubar=No,toolbar=No,titlebar=No,location=No,height=550px,width=650px,scrollbars=yes,resizable=yes,status=yes');
}
function openPopup(context,file,cssURL,pageLightColor,titleColor,titleBackgroundColor,bundle) {
	var url = context + "/html/" + file + "?cssURL=" + cssURL + "&pageLightColor=" + pageLightColor + "&titleColor=" + titleColor + "&titleBackgroundColor=" + titleBackgroundColor + "&bundle=" + bundle;
	// remove extension
	var title = file.replace(/\W.+/,"");
	var params  = "menubar=No,toolbar=No,titlebar=No,location=No,scrollbars=yes,resizable=yes,status=yes,height=350px,width=650px";
	newWindow = window.open(url, title, params);
	newWindow.self.focus();
}
function submitOrder(){
	if(document.forms.orderform.testAlaNoix.value!="0"){
		document.forms.orderform.testAlaNoix.value = "0";
		document.forms.orderform.submit();
	}	
}
