var zeilen_produktzahl = 1;
if (screen.width > 1200) zeilen_produktzahl = 2;
if (screen.width > 1500) zeilen_produktzahl = 3;

function changeit()
{
    var suchform = document.getElementById('ergset');

    if(suchform.myjumpbox.options[1].selected == true)
    {
	location.href = suchform.myjumpbox.options[1].value;
    }
    if(suchform.myjumpbox.options[2].selected == true)
    {
	location.href = suchform.myjumpbox.options[2].value;
    }
    if(suchform.myjumpbox.options[3].selected == true)
    {
	location.href = suchform.myjumpbox.options[3].value;
    }
    if(suchform.myjumpbox.options[4].selected == true)
    {
	location.href = suchform.myjumpbox.options[4].value;
    }
        if(suchform.myjumpbox.options[5].selected == true)
    {
	location.href = suchform.myjumpbox.options[5].value;
    }
        if(suchform.myjumpbox.options[6].selected == true)
    {
	location.href = suchform.myjumpbox.options[6].value;
    }
        if(suchform.myjumpbox.options[7].selected == true)
    {
	location.href = suchform.myjumpbox.options[7].value;
    }
        if(suchform.myjumpbox.options[8].selected == true)
    {
	location.href = suchform.myjumpbox.options[8].value;
    }
        if(suchform.myjumpbox.options[9].selected == true)
    {
	location.href = suchform.myjumpbox.options[9].value;
    }
        if(suchform.myjumpbox.options[10].selected == true)
    {
	location.href = suchform.myjumpbox.options[10].value;
    }
}

function testes()
{
	var rgchk = document.getElementById('regchk').value;
	window.location.href = rgchk;
	//window.alert(rgchk);
	 location.replace(rgchk);
	 history.go(1);
}
function plus1(prodid)
{
	var plu_1 = document.getElementById('plu'+prodid).value;
	window.location.href = plu_1;
	var plu_2 = document.getElementById('plu2').value;
	window.location.href = plu_2;
	 location.replace(plu_2);
	 history.go(1);
}

function minus1(prodid)
{
	var min_1 = document.getElementById('min'+prodid).value;
	window.location.href = min_1;
	var plu_2 = document.getElementById('plu2').value;
	window.location.href = plu_2;
	 location.replace(plu_2);
	 history.go(1);
}

function delete1(prodid)
{
	var del_1 = document.getElementById('del'+prodid).value;
	window.location.href = del_1;
	var plu_2 = document.getElementById('plu2').value;
	window.location.href = plu_2;
	 location.replace(plu_2);
	 history.go(1);
}

function warenkorb_refresh()
{
	var wkrb = document.getElementById('wkr').value;
	window.location.href = wkrb;	
var plu_2 = document.getElementById('plu2').value;
	window.location.href = plu_2;
	history.go(1);
}

/****  STYLESHEET-WAHL  ****/
var css_url = "rot.css";


/****  PUNKTE SETZEN  ****/
function teste (inv, mind)
{
	var zeichen = '&bull;'		// Zeichen, das ausgeschrieben wird

	var inventur = parseInt(inv);
	var mindestbestand = parseInt(mind);
	var farbe = '';
	var title = '';

	if ((inventur >= mindestbestand) && (inventur != 0))
	{
		farbe = '#00DD00';
		title = 'Sofort lieferbar';

		// setze auf orange, wenn inventur < 5 !
		if (inventur < 5)
		{
			farbe = '#FFBB00';
			title = 'momentan noch verf&uuml;gbar';
		}
	}

	else if ((inventur >= 0) && (inventur < mindestbestand))
	{
		farbe = '#FFBB00';
		title = 'momentan noch verf&uuml;gbar';
	}

	else
	{
		farbe = '#EE0000';
		title = 'l&auml;ngere Lieferzeit';
	}

	var ausgabe = '<font color=' + farbe + ' title=\"' + title + '\" style=\"cursor:default\">' + zeichen + '</font>';
	return (ausgabe)
}



