function add_to_cart(loc,id,artikel,preis,menge,detail,show_angebote) {
	var l = loc + '?action=add_to_cart&artikel_id=' + id + '&artikel=' + artikel + '&preis=' + preis + "&menge=" + menge + "&detail=" + detail+"&show_angebote="+show_angebote;
	if(loc=="detail.php")
		l+="&id="+id;
	window.location.href = l;
	}

function showDetailrow(id,show_angebote){
	var show = true;
	if(window.event.srcElement.name != null){
		if((window.event.srcElement.name == "imagelink") || (window.event.srcElement.name == "bezlink") || (window.event.srcElement.name == "addimage") || (window.event.srcElement.name.substring(0,6) == "menge_")){
			show = false;
			}
		}
	if(show == true){
		showDetail(id,show_angebote);
		}
	}

function showDetail(id,show_angebote){
	window.location.href="detail.php?isbn="+id;
	}

function doCartReload(){
	setTimeout("CartReload()",500);
	}
function CartReload(){
	location.href="kategorie.php";
	}
function Change_APS(ANZ){
	location.href="kategorie.php?artikel_ps="+ANZ+'&show_angebote=';
	}
function OpenFilter(){
	window.open('filter.php','Filter','width=600,height=450,scrollbars=yes');
	}
function DbgObject(Ob){
	var debugtext = "";

	for(var i in Ob){
		debugtext += i+" = "+Ob[i]+"<br>\n";
		}
	document.write(debugtext);
	}
function CheckKommentarForm(){

var noteSelected = false;
for (i = 0;  i < kommentar.note.length;  i++){
	if (kommentar.note[i].checked)
		noteSelected = true;
	}


if(kommentar.kname.value==""){
	alert('Sie haben das Feld "Name" nicht ausgefüllt');
	return false;
	}
if((kommentar.kkommentar.value=="") && (!noteSelected)){
	alert('Sie müssen entweder einen Kommentar oder eine Bewertung abgeben');
	return false;
	}
return true;
}
/*
function ScrollIt(obj){
	//parent.frames["listhead_right"].document.body.scrollLeft=document.body.scrollLeft;
	//parent.frames["list_left"].document.body.scrollTop=document.body.scrollTop;
	}
*/
