	function getRequestAttribute(form_id){
		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{
				attribute = attribute + "&" + input_fields[i].name + "="+ input_fields[i].value;
			}
		}
		return attribute;
	}
	function genAjaxFormSubmit(url, form_id, processReq){
		var attribute = getRequestAttribute(form_id);
//		alert(attribute);
//		window.open(url+attribute,"","");
		sendAjaxRequest(url+attribute,processReq);
	}
	var formReset=0;
	function resetSearchForm(){
		if(formReset!=0)return true;
		document.getElementById("produktsucheinput").style.color="#000000";
		document.getElementById("produktsucheinput").value='';
		formReset=1;
	}
	var offenRecommendation = false;
	var offenQuestion = false;
	var sperreQuestion = false;
	var sperreRecommendation = false;
	function showProductDetailRecommendation()
	{
		if(!sperreRecommendation){
			if(offenQuestion){
				Effect.toggle('frage','blind','showHTML');
				offenQuestion = false;
			}
			sperreQuestion = true;
			setTimeout("sperreQuestion=false;",1000);
			if(offenRecommendation)
				offenRecommendation = false;
			else
				offenRecommendation = true;
			if(offenRecommendation){
				document.getElementById("RecommendationContent").style.display = "block";
				document.getElementById("RecommendationLoad").style.display = "none";
				document.getElementById("RecommendationReady").style.display = "none";
			}
			Effect.toggle('empfehlung','blind','');
		}
	}
	function sendRecommendation(url)
	{
		document.getElementsByName("fromName")[0].style.backgroundColor = "#FFFFFF";
		document.getElementsByName("fromEmail")[0].style.backgroundColor = "#FFFFFF";
		document.getElementsByName("toName")[0].style.backgroundColor = "#FFFFFF";
		document.getElementsByName("toEmail")[0].style.backgroundColor = "#FFFFFF";
		document.getElementsByName("recommendation")[0].style.backgroundColor = "#FFFFFF";
		var error = false;
		if(document.getElementsByName("fromName")[0].value == "" || document.getElementsByName("fromName")[0].value == " "){
			document.getElementsByName("fromName")[0].style.backgroundColor = "#ed0c74";
			error = true;
		}
		if(document.getElementsByName("fromEmail")[0].value == ""){
			document.getElementsByName("fromEmail")[0].style.backgroundColor = "#ed0c74";
			error = true;
		}
		if(document.getElementsByName("toName")[0].value == ""){
			document.getElementsByName("toName")[0].style.backgroundColor = "#ed0c74";
			error = true;
		}
		if(document.getElementsByName("toEmail")[0].value == ""){
			document.getElementsByName("toEmail")[0].style.backgroundColor = "#ed0c74";
			error = true;
		}
		if(document.getElementsByName("recommendation")[0].value == ""){
			document.getElementsByName("recommendation")[0].style.backgroundColor = "#ed0c74";
			error = true;
		}
		if(!error)
		{
			document.getElementById("RecommendationErrorText").style.display = "none";
			document.getElementById("RecommendationContent").style.display = "none";
			document.getElementById("RecommendationLoad").style.display = "block";
			window.setTimeout("genAjaxFormSubmit('"+url+"', 'RecommendationForm', RecommendationRequest)", 2000);
		}else{
			document.getElementById("RecommendationErrorText").style.display = "block";
		}
	}
	function RecommendationRequest(){
		document.getElementById("RecommendationLoad").style.display = "none";
		document.getElementById("RecommendationReady").style.display = "block";
	}


	function showProductDetailQuestion()
	{
		if(!sperreQuestion){
			if(offenRecommendation)
			{
				Effect.toggle('empfehlung','blind','showHTML');
				offenRecommendation = false;
			}
			sperreRecommendation = true;
			setTimeout("sperreRecommendation=false;",1000);
			if(offenQuestion)
				offenQuestion = false;
			else
				offenQuestion = true;
			if(offenQuestion){
				document.getElementById("QuestionContent").style.display = "block";
				document.getElementById("QuestionLoad").style.display = "none";
				document.getElementById("QuestionReady").style.display = "none";
			}
			Effect.toggle('frage','blind','');
		}
	}
	function sendPRODUCT_QUESTION(url) {
		var error = false;
		document.getElementsByName("firstname")[0].style.backgroundColor = "#FFFFFF";
		document.getElementsByName("lastname")[0].style.backgroundColor = "#FFFFFF";
		document.getElementsByName("email")[0].style.backgroundColor = "#FFFFFF";
		document.getElementsByName("product_question")[0].style.backgroundColor = "#FFFFFF";
		if(document.getElementsByName("firstname")[0].value == ""){
			document.getElementsByName("firstname")[0].style.backgroundColor = "#ed0c74";
			error = true;
		}
		if(document.getElementsByName("lastname")[0].value == ""){
			document.getElementsByName("lastname")[0].style.backgroundColor = "#ed0c74";
			error = true;
		}
		if(document.getElementsByName("email")[0].value == ""){
			document.getElementsByName("email")[0].style.backgroundColor = "#ed0c74";
			error = true;
		}
		if(document.getElementsByName("product_question")[0].value == ""){
			document.getElementsByName("product_question")[0].style.backgroundColor = "#ed0c74";
			error = true;
		}
		if(!error)
		{
			document.getElementById("QuestionErrorText").style.display = "none";
			document.getElementById("QuestionContent").style.display = "none";
			document.getElementById("QuestionLoad").style.display = "block";
			window.setTimeout("genAjaxFormSubmit('"+url+"', 'ProductQuestionForm', QuestionRequest)", 2000);
		}else{
			document.getElementById("QuestionErrorText").style.display = "block";
		}
	}
	function QuestionRequest(){
		document.getElementById("QuestionLoad").style.display = "none";
		document.getElementById("QuestionReady").style.display = "block";
	}
	var showDescription = true;
	var showAcc = false;
	var sperreDescription = true;
	var sperreAcc = false;

	function showProductDescription(){
		/*if(!sperreDescription && !showDescription){
			Effect.toggle('Acc','blind','showHTML');
			showAcc = false;
			sperreAcc = true;
			setTimeout("sperreAcc=false;",1000);
			showDescription = true;
			setTimeout("Effect.toggle('DescriptionDetail','blind','');",1000);
		}*/
		document.getElementById("Acc").style.display = "none";
		document.getElementById("DescriptionDetail").style.display = "block";
	}
	function showProductAcc(){
		/*if(!sperreAcc && !showAcc){
			Effect.toggle('DescriptionDetail','blind','');
			showDescription = false;
			sperreDescription = true;
			setTimeout("sperreDescription=false;",1000);
			showAcc = true;
			setTimeout("Effect.toggle('Acc','blind','showHTML');",1000);
		}*/
		document.getElementById("DescriptionDetail").style.display = "none";
		document.getElementById("Acc").style.display = "block";
	}
	function setVendorImage(oid,url,form){
		var searchVendorElements = document.getElementsByName("searchVendor");
		for (i = 0; i < searchVendorElements.length; i++){
			if (searchVendorElements[i].value == oid && searchVendorElements[i].checked == false){
				searchVendorElements[i].checked = true;
			}else if(searchVendorElements[i].value == oid){
				searchVendorElements[i].checked = false;
			}
		}
		var attribute = getRequestAttribute(form);
		document.location.href = url+attribute;
	}
	function productListReq(){
		if(req.readyState == 4&&req.status == 200){
			document.getElementById('ProductList').innerHTML=req.responseText;
			setTimeout('document.getElementById("ProductListLoad").style.display = "none";',2000);
			document.getElementById("ProductList").style.display = "block";
			//setTimeout("Effect.toggle('ProductListLoad','blind','');",2000);
			//Effect.toggle('ProductList','blind','');
		}else if(req.readyState == 4){
			alert("Request Fail:"+req.statustext+" "+req.status);
		}
	}
	function productListSort(url,form,sort_order){
		var attribute = getRequestAttribute(form);
		document.location.href = url+"sort=0&sort_order="+sort_order+attribute;
	}
	function productListMaxRows(url,form,maxRows){
		var attribute = getRequestAttribute(form);
		document.location.href = url+attribute+"&products-per-page="+maxRows;
	}
	function productListLimit(url,session_id,form_id,limit){
		var attribute = getRequestAttribute(form_id);
		document.location.href = url+session_id+"?limit="+limit+attribute;
	}

	function printProductDetail(){
		showProductDescription();
		self.print();
	}