function checkIfOID(a){
	var oid_check=a;
	var oidArray=Array(13042, 13043, 13044, 13045,	13053, 13054, 13055, 13056, 13057);
	for(i=0; i < oidArray.length; i++){
		if(oidArray[i]==oid_check){
			document.getElementById('moebelfrontBlock').style.display="block";
		}
	}
	if(oid_check==13062){
		document.getElementById('vertrageBlock').style.display="block";
	}


}
function checkDispatch(a,id){
	var price=a;
	if(price=='0,00&euro;'){
		document.getElementById('noDispatch_'+id).style.display='block';
	}
}
function productListLimit(url,session_id,limit,action,action2,form_id){
	genAjaxFormSubmit(url+"AjaxRequest.jsp"+session_id+"?limit="+limit, form_id, productListReq2);
}
function checkGeschirr(a){
	var catname=a;
	if(catname=='Geschirrsp&uuml;ler'){
		document.getElementById('impInf1').style.display="block";
		document.getElementById('impInf2').style.display="block";
		document.getElementById('impInf3').style.display="block";
		document.getElementById('impInf4').style.display="block";
		document.getElementById('impInf5').style.display="block";
		document.getElementById('impInf6').style.display="block";

		document.getElementById('impInfDivider1').style.display="block";
		document.getElementById('impInfDivider2').style.display="block";
		document.getElementById('impInfDivider3').style.display="block";
		document.getElementById('impInfDivider4').style.display="block";
		document.getElementById('impInfDivider5').style.display="block";
		document.getElementById('impInfDivider6').style.display="block";
	}
}
function productListReq2(){
	if(req.readyState == 4&&req.status == 200){
		document.getElementById("ContentDiv").innerHTML=req.responseText;
	}else if(req.readyState == 4){
		alert("Request Fail:"+req.statustext+" "+req.status);
	}
}
function productListReq3(){
	if(req.readyState == 4&&req.status == 200){
		document.getElementById("allAjax").innerHTML=req.responseText;
	}else if(req.readyState == 4){
		alert("Request Fail:"+req.statustext+" "+req.status);
	}
}
function productListSort2(url,session_id,action,action2,form_id){

	genAjaxFormSubmit(url+"AjaxRequest.jsp"+session_id+"?action="+action+"&action2="+action2, form_id, productListReq2);
}
function genAjaxFormSubmit(url, form_id, processReq){
	var form = document.getElementById(form_id);
	var attribute = "";
	var select_fields = form.getElementsByTagName("select");
	//Select-Felder
	for(var i=0;i<select_fields.length;i++){
		attribute = attribute + "&" + select_fields[i].name + "="+ select_fields[i].options[select_fields[i].options.selectedIndex].value;
	}
	// Input-Felder
	var input_fields = form.getElementsByTagName("input");
	for(var i=0;i<input_fields.length;i++){
		if(input_fields[i].type=="checkbox"){
			if(input_fields[i].checked == true){
				attribute = attribute + "&" + input_fields[i].name + "="+ input_fields[i].value;
			}
		}else{
			if(input_fields[i].name!="action2")attribute = attribute + "&" + input_fields[i].name + "="+ input_fields[i].value;
		}
	}
//		alert(attribute);
//		window.open(url+attribute,"","");
	sendAjaxRequest(url+attribute,processReq);
}
function setVal(oidMax,oidMin,max,min,unit){
	document.getElementById('fv_max'+oidMax).value=oidMax+"_"+max;
	document.getElementById('fv_min'+oidMin).value=oidMin+"_"+min;
	var who=oidMin.search("_");
	var slider=oidMin.substr(0,who);
	slider="fn_"+slider;
	setSliderValues(min,max,slider);
	//document.getElementById('wert'+oidMax).innerHTML=max+unit;
	//document.getElementById('wert'+oidMin).innerHTML=min+unit;
}
function setSliderValues(first,second,slider){
	var element=document.getElementById(slider);
	var zwi=element.getElementsByTagName('a');
	zwi[0].innerHTML="<span style='margin-top:22px;color:#000000;display:block;'>"+first+"</span>";
	zwi[1].innerHTML="<span style='margin-top:22px;color:#000000;display:block;'>"+second+"</span>";
}
