	function detailSwitch(block){
		if(block=='descriptionBlock'){
			document.getElementById('descriptionBlock').style.display='block';
			document.getElementById('featuresBlock').style.display='none';
			document.getElementById('ratingBlock').style.display='none';
			document.getElementById('queAnsBlock').style.display='none';
			document.getElementById('finBlock').style.display='none';
			document.getElementById('proDescBtn').style.backgroundImage = "url(/images/detBtn193-red.jpg)";
			document.getElementById('techBtn').style.backgroundImage = "url(/images/detBtn2-grey.jpg)";
			document.getElementById('ratingBtn').style.backgroundImage = "url(/images/detBtn3-grey.jpg)";
			document.getElementById('quAnswBtn').style.backgroundImage = "url(/images/detBtn4-grey.jpg)";
			document.getElementById('proDescBtnTxt').className = "det_btn_txt_1";
			document.getElementById('techBtnTxt').className = "det_btn_txt_2";
			document.getElementById('ratingBtnTxt').className = "det_btn_txt_2";
			document.getElementById('quAnswBtnTxt').className = "det_btn_txt_2";
		}
		if(block=='featuresBlock'){
			document.getElementById('descriptionBlock').style.display='none';
			document.getElementById('featuresBlock').style.display='block';
			document.getElementById('ratingBlock').style.display='none';
			document.getElementById('queAnsBlock').style.display='none';
			document.getElementById('finBlock').style.display='none';
			document.getElementById('proDescBtn').style.backgroundImage = "url(/images/detBtn1-grey.jpg)";
			document.getElementById('techBtn').style.backgroundImage = "url(/images/detBtn2-red.jpg)";
			document.getElementById('ratingBtn').style.backgroundImage = "url(/images/detBtn3-grey.jpg)";
			document.getElementById('quAnswBtn').style.backgroundImage = "url(/images/detBtn4-grey.jpg)";
			document.getElementById('proDescBtnTxt').className = "det_btn_txt_2";
			document.getElementById('techBtnTxt').className = "det_btn_txt_1";
			document.getElementById('ratingBtnTxt').className = "det_btn_txt_2";
			document.getElementById('quAnswBtnTxt').className = "det_btn_txt_2";

		}
		if(block=='ratingBlock'){
			document.getElementById('descriptionBlock').style.display='none';
			document.getElementById('featuresBlock').style.display='none';
			document.getElementById('ratingBlock').style.display='block';
			document.getElementById('queAnsBlock').style.display='none';
			document.getElementById('finBlock').style.display='none';
			document.getElementById('proDescBtn').style.backgroundImage = "url(/images/detBtn1-grey.jpg)";
			document.getElementById('techBtn').style.backgroundImage = "url(/images/detBtn2-grey.jpg)";
			document.getElementById('ratingBtn').style.backgroundImage = "url(/images/detBtn3-red.jpg)";
			document.getElementById('quAnswBtn').style.backgroundImage = "url(/images/detBtn4-grey.jpg)";
			document.getElementById('proDescBtnTxt').className = "det_btn_txt_2";
			document.getElementById('techBtnTxt').className = "det_btn_txt_2";
			document.getElementById('ratingBtnTxt').className = "det_btn_txt_1";
			document.getElementById('quAnswBtnTxt').className = "det_btn_txt_2";
		}
		if(block=='queAnsBlock'){
			document.getElementById('descriptionBlock').style.display='none';
			document.getElementById('featuresBlock').style.display='none';
			document.getElementById('ratingBlock').style.display='none';
			document.getElementById('finBlock').style.display='none';
			document.getElementById('queAnsBlock').style.display='block';
			document.getElementById('proDescBtn').style.backgroundImage = "url(/images/detBtn1-grey.jpg)";
			document.getElementById('techBtn').style.backgroundImage = "url(/images/detBtn2-grey.jpg)";
			document.getElementById('ratingBtn').style.backgroundImage = "url(/images/detBtn3-grey.jpg)";
			document.getElementById('quAnswBtn').style.backgroundImage = "url(/images/detBtn4-red.jpg)";
			document.getElementById('proDescBtnTxt').className = "det_btn_txt_2";
			document.getElementById('techBtnTxt').className = "det_btn_txt_2";
			document.getElementById('ratingBtnTxt').className = "det_btn_txt_2";
			document.getElementById('quAnswBtnTxt').className = "det_btn_txt_1";
		}
		if(block=='finanz'){
			document.getElementById('descriptionBlock').style.display='none';
			document.getElementById('featuresBlock').style.display='none';
			document.getElementById('ratingBlock').style.display='none';
			document.getElementById('queAnsBlock').style.display='none';
			document.getElementById('finBlock').style.display='block';
			document.getElementById('proDescBtn').style.backgroundImage = "url(/images/detBtn1-grey.jpg)";
			document.getElementById('techBtn').style.backgroundImage = "url(/images/detBtn2-grey.jpg)";
			document.getElementById('ratingBtn').style.backgroundImage = "url(/images/detBtn3-grey.jpg)";
			document.getElementById('quAnswBtn').style.backgroundImage = "url(/images/detBtn4-grey.jpg)";
			document.getElementById('proDescBtnTxt').className = "det_btn_txt_2";
			document.getElementById('techBtnTxt').className = "det_btn_txt_2";
			document.getElementById('ratingBtnTxt').className = "det_btn_txt_2";
			document.getElementById('quAnswBtnTxt').className = "det_btn_txt_2";
		}
	}
function topKatsShow(id){
	if(document.getElementById(id).style.display=='none'){
		document.getElementById(id).style.display='block';
	}else{
		document.getElementById(id).style.display='none';
	}

}

function anAusBlock(id){
	var bloecke = new Array('weiterEmpfBlock','DruckAnsichtBlock','FragProdBlock','RueckRufBlock','FehlerMeldenBlock');
	for (var i = 0; i < bloecke.length; i++) {
		if(id==bloecke[i]){
			document.getElementById(id).style.display='block';
		}else{
			document.getElementById(bloecke[i]).style.display='none';
		}
	}
}
function AusBlock(id){
	document.getElementById(id).style.display='none';
}
function switchBgAndColor(id){
	document.getElementById(id).style.color='#9D9D9D';
	document.getElementById(id).style.backgroundColor='#ffffff';
}
function switchBgAndColorAus(id){
	document.getElementById(id).style.color='#3F3F3F';
	document.getElementById(id).style.backgroundColor='#F2F2F2';
}

function switchColor(id){
	document.getElementById(id).style.color='#D8110A';
}
function switchColorAus(id){
	document.getElementById(id).style.color='#3F3F3F';
}

function startSwitch(block){
	if(block=='specBlock'){
		document.getElementById('specBlock').style.display='block';
		document.getElementById('newBlock').style.display='none';
		document.getElementById('topBlock').style.display='none';
		document.getElementById('specBlockBtn').style.backgroundImage = "url(/images/firstBtn-red.png)";
		document.getElementById('newBlockBtn').style.backgroundImage = "url(/images/secondBtn-grey.png)";
		document.getElementById('topBlockBtn').style.backgroundImage = "url(/images/thirdBtn-grey.png)";
		document.getElementById('specBlockBtnTxt').style.color = "#ffffff";
		document.getElementById('newBlockBtnTxt').style.color = "#000000";
		document.getElementById('topBlockBtnTxt').style.color = "#000000";
	}
	if(block=='newBlock'){
		document.getElementById('specBlock').style.display='none';
		document.getElementById('newBlock').style.display='block';
		document.getElementById('topBlock').style.display='none';
		document.getElementById('specBlockBtn').style.backgroundImage = "url(/images/firstBtn-grey-x2.png)";
		document.getElementById('newBlockBtn').style.backgroundImage = "url(/images/secondBtn-red-x2.png)";
		document.getElementById('topBlockBtn').style.backgroundImage = "url(/images/thirdBtn-grey.png)";
		document.getElementById('specBlockBtnTxt').style.color = "#000000";
		document.getElementById('newBlockBtnTxt').style.color = "#ffffff";
		document.getElementById('topBlockBtnTxt').style.color = "#000000";

	}
	if(block=='topBlock'){
		document.getElementById('specBlock').style.display='none';
		document.getElementById('newBlock').style.display='none';
		document.getElementById('topBlock').style.display='block';
		document.getElementById('specBlockBtn').style.backgroundImage = "url(/images/firstBtn-grey-x2.png)";
		document.getElementById('newBlockBtn').style.backgroundImage = "url(/images/secondBtn-grey.png)";
		document.getElementById('topBlockBtn').style.backgroundImage = "url(/images/thirdBtn-red-x2.png)";
		document.getElementById('specBlockBtnTxt').style.color = "#000000";
		document.getElementById('newBlockBtnTxt').style.color = "#000000";
		document.getElementById('topBlockBtnTxt').style.color = "#ffffff";
	}
}

function toggleShowHide(ele,contn){
	var gert=document.getElementById(contn).getElementsByTagName("div").length;

	if(gert<=6){
		document.getElementById(contn).style.width=170+"px";
	}else if(gert<=12){
		document.getElementById(contn).style.width=340+"px";
	}else if(gert<=18){
		document.getElementById(contn).style.width=510+"px";
	}else if(gert<=24){
		document.getElementById(contn).style.width=680+"px";
	}else if(gert<=30){
		document.getElementById(contn).style.width=850+"px";
	}else{
		document.getElementById(ele).className+=" extended";
	}

	if(document.getElementById(ele).style.display=="block"){
		document.getElementById(ele).style.display="none";
	}else{
		document.getElementById(ele).style.display="block"
	}

}

function sortListSearch2(zwSp){
	document.getElementById('ContentDiv').innerHTML='<p style="padding:20px;text-align:center;"><img src="/images/ajaxLoader.gif" alt="loading..." /></p>';
	var sortUrl=document.getElementById('sortListUrl').value;
	if(zwSp=="pUp"){
		productListSort2(sortUrl,"specSearch",0);
	}
	if(zwSp=="pDown"){
		productListSort2(sortUrl,"specSearch",1);
	}
	if(zwSp=="dUp"){
		productListSortName2(sortUrl,"specSearch",0);
	}
	if(zwSp=="dDown"){
		productListSortName2(sortUrl,"specSearch",1);
	}
	if(zwSp=="a10"){
		productListMaxRows2(sortUrl,"specSearch",10);
	}
	if(zwSp=="a20"){
		productListMaxRows2(sortUrl,"specSearch",20);
	}
	if(zwSp=="a50"){
		productListMaxRows2(sortUrl,"specSearch",50);
	}
	if(zwSp=="a100"){
		productListMaxRows2(sortUrl,"specSearch",100);
	}
}
function productListSort2(url,form,sort_order){
	var attribute = getRequestAttribute(form);
	sendAjaxRequest(url+"?sort_order="+sort_order+"&sort=0"+attribute,productListReq2);
}
function productListSortName2(url,form,SortName){
	var attribute = getRequestAttribute(form);
	sendAjaxRequest(url+"?sort_order="+SortName+"&sort=1"+attribute,productListReq2);
}
function productListMaxRows2(url,form,maxRows){
	var attribute = getRequestAttribute(form);
	sendAjaxRequest(url+"?products-per-page="+maxRows+attribute,productListReq2);
}
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 productListSort2(url,form_id,sort_order){

//	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 =null 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);
}
