var isNav, isIE, is4;
var coll = "";
var styleObj = "";
var posx;var posy;
var Dposx=0;var Dposy=0;
var aktiv;
var aktivMenu;
var notMove;

if (parseInt(navigator.appVersion) >= 4) {
    if (navigator.appName == "Netscape") {
      isNav = true;
			if (parseInt(navigator.appVersion) >= 5) {
    		is4=true;
       coll = "all.";
       styleObj =".style";
			}
   }
    else {
       isIE = true;
       coll = "all.";
       styleObj =".style";
    	is4=true;
   }
} else {
   	is4=false;
}

function get_div(welches) {
	return (document.getElementById) ? document.getElementById(welches) : (isNav) ? eval("document."+welches) : eval("document.all."+welches);
}
function get_obj(welches) {
	return (document.getElementById) ? document.getElementById(welches).style : (isNav) ? eval("document."+welches) : eval("document.all."+welches+".style");
}




function StyleIn (was) {

	var here = get_obj(was);
	here.color="#c6001f";
}

function setLinkStatus (theLink,theColor) {

	var here = get_obj(theLink);
	here.color=theColor;
}



function setZelleStatus(theCell, thePointerColor, theStyle)
{


    if (thePointerColor == '' || typeof(theCell.style) == 'undefined') {
        return false;
    }


    var currentColor = null;
    var newColor     = null;
    // Opera does not return valid values with "getAttribute"
    if (typeof(window.opera) == 'undefined'
        && typeof(theCell.getAttribute) != 'undefined' && typeof(theCell.getAttribute) != 'undefined') {
            theCell.setAttribute('bgcolor', thePointerColor, 0);

    }
    else {

            theCell.style.backgroundColor = thePointerColor;

    }

    return true;
} // end of the 'setPointer()' function

function setRowStatus(theRow, thePointerColor)
{


    var theCells = null;
    if (thePointerColor == '' || typeof(theRow.style) == 'undefined') {
        return false;
    }
    if (typeof(document.getElementsByTagName) != 'undefined') {
        theCells = theRow.getElementsByTagName('td');
    }
    else if (typeof(theRow.cells) != 'undefined') {
        theCells = theRow.cells;
    }
    else {
        return false;
    }


    // Opera does not return valid values with "getAttribute"
    var rowCellsCnt  = theCells.length;	
    if (typeof(window.opera) == 'undefined'
        && typeof(theRow.getAttribute) != 'undefined' && typeof(theRow.getAttribute) != 'undefined') {
        for (var c = 0; c < rowCellsCnt; c++) {
            theCells[c].setAttribute('bgcolor', thePointerColor, 0);
        } // end for


    }
    else {

        for (var c = 0; c < rowCellsCnt; c++) {
            theCells[c].style.backgroundColor = thePointerColor;
        }


    }

    return true;
} // end of the 'setPointer()' function

function vorschau_ein(bild) {
	if (fertig==1) {
   if (isNav) {
     breite= window.innerWidth;
   }
   else {
    breite= document.body.clientWidth;
   }

	var here=get_obj("rothaus");
	//here.left=(breite/2)-100;
	aktion=(isNav && !is4) ? "block" : "block";
	document.images["kleinbild"].src=kleinbild[bild].src;
	here.display=aktion;	
	}
}

function vorschau_aus(bild) {
	var here=get_obj("rothaus");
	aktion=(isNav && !is4) ? "none" : "none";	
	here.display=aktion;	
}

function checkZahl1(was) {
	if (checkLeer1(was)==0) return 0;
	was=parseInt(was);	
 if(isNaN(was) == true)  return 0;
 return was;
}

function checkLeer1(was) {

	hstr1=was.replace(/\b\s\b/g," ");
	hstr1=hstr1.replace(/\s/g,"")
	if (hstr1=="") {
		return 0;
	} else {
		return 1;	
	}
}

function checkWK() {

	x=document.Formular.elements["artikel[Anzahl]"].value;
	if (checkZahl1(x)==0) {
		alert("Bitte geben Sie Ihre gewünschte Bestellmenge ein!");
		document.Formular.elements["artikel[Anzahl]"].value="";
		return false;
	}
	warenkorb_ein();
	return true;
}

function warenkorb_ein() {
	if (fertig==1) {
   if (isNav) {
     breite= window.innerWidth;
	 hoehe=window.innerHeight;
   }
   else {
    breite= document.body.clientWidth;
	 hoehe=document.body.clientHeight;	
   }
	var here=get_obj("innen");
	h=here.height;
	
	var here=get_obj("warenkorb");
	
	var here1=get_div("wk");
	if (hoehe<600) hoehe=600;
	here.height=hoehe-141;
	here1.height=hoehe-141-72;
	//	alert(hoehe)
	aktion=(isNav && !is4) ? "show" : "visible";
	here.visibility=aktion;	
	}
}


function warenkorb_laden() {
	//x=wk.location.href;
	// alert(x);
	hstr="http://s25792651.shoplite.de/action/order.php4";
	hstr="https://ssl.kundenserver.de/s25792651.shoplite.de/action/order.php4";
	// if (x!=hstr) wk.location.href=hstr;
	 wk.location.href=hstr;
	warenkorb_ein();
}
function warenkorb_aus() {
	var here=get_obj("warenkorb");
	aktion=(isNav && !is4) ? "hide" : "hidden";	
	here.visibility=aktion;	
}

