<!--
function	NewSelect(bPos,ReturnPosition,bVariant,ProdukteTypeKey,SelectDetailS1,SelectDetailS2) {
  //Varianten
  parent.frames[0].location='Liste.asp?bPos='+bPos+'&ReturnPosition='+ReturnPosition+'&bVariant='+bVariant+'&ProdukteTypeKey='+ProdukteTypeKey+'&SelectDetailS1='+SelectDetailS1+'&SelectDetailS2='+SelectDetailS2+'#Position'+ReturnPosition;
}

var i=0;
function	RShop(Command,ShopInhaberID,sExt) {
	i=i+1;
	var URL='rshop.asp?Command='+Command+'&ShopInhaberID='+ShopInhaberID+sExt+'&Temp='+i;
	if (Command=='ProdukteListe'){
	  parent.frames[1].location.replace(URL);
	}else{
    if (window.name=='Liste'){
	    parent.location=URL;
	  }else{
	    location=URL;
	  }
	}
}

function	RShopInput(Command,ShopInhaberID,sInputParameter,sInputText,sDefaultValue) {
		var sInput;
		var date = new Date();
		if (sDefaultValue=='#TIME#'){
				sDefaultValue=''+date.getFullYear()+
							(''+(date.getMonth() + 1)).replace(/(\b\d\b)/,"0$1")+
							(''+date.getDate()).replace(/(\b\d\b)/,"0$1")+
							(''+date.getHours()).replace(/(\b\d\b)/,"0$1")+
							(''+date.getMinutes()).replace(/(\b\d\b)/,"0$1")+
							(''+date.getSeconds()).replace(/(\b\d\b)/,"0$1");
		} else if (sDefaultValue=='#PROMPT#'){
				if (confirm(sInputText)) {
          RShop(Command,ShopInhaberID,'');
				}
			  return;
		}
		sInput = window.prompt(sInputText, sDefaultValue);
		if (sInput){
				if (sInput==''){
				  alert('Bitte zuerst Feld ausfüllen');
				}else{
          RShop(Command,ShopInhaberID,sInputParameter+escape(sInput));
				}
		}
}

function InProdukteListe(ShopInhaberID,ProdukteTypeKey,objProdukteListe,obj,FilePathInsert,FilePathRemove,objAnzahl){
	if (isNaN(parseInt(objAnzahl.value,10))){
  	objAnzahl.value=1;
	}
  if ((objAnzahl.value>=1)){
	  obj.src=FilePathInsert;
  	RShop('ProdukteListe',ShopInhaberID,"&SubCommand=Insert&ProdukteTypeKey="+ProdukteTypeKey+"&Liste="+objProdukteListe.options[objProdukteListe.selectedIndex].value+"&Anzahl="+objAnzahl.value);
	}else{
	  obj.src=FilePathRemove;
  	objAnzahl.value=0;
  	RShop('ProdukteListe',ShopInhaberID,"&SubCommand=Remove&ProdukteTypeKey="+ProdukteTypeKey+"&Liste="+objProdukteListe.options[objProdukteListe.selectedIndex].value+"&Anzahl="+objAnzahl.value);
	}
}


function AddAnzahl(obj,z) {
	if (isNaN(parseInt(obj.value,10))){
		if (z>0){
			obj.value=z;
		} else{
			obj.value=0;
		}
	} else {
		obj.value=parseInt(obj.value,10)+z;
		if (obj.value<0){
			obj.value=0
		}
	}
}

function SetAnzahl(obj,z) {
	if (isNaN(parseInt(z,10))){
		obj.value=1;
	} else {
		obj.value=parseInt(z,10);
		if (obj.value<0){
			obj.value=0;
		}
	}
}


function AddAnzahlPLExt(ShopInhaberID,ProdukteTypeKey,objAnzahl,objProdukteListe,obj,FilePathInsert,FilePathRemove,z) {
	AddAnzahl(objAnzahl,z);
	InProdukteListe(ShopInhaberID,ProdukteTypeKey,objProdukteListe,obj,FilePathInsert,FilePathRemove,objAnzahl,0);
}

function AddAnzahlExt(ProdukteTypeKey,objAnzahl,obj,ReturnPosition,z,path) {
	AddAnzahl(objAnzahl,z);
	InDenKorbLegen(ProdukteTypeKey,objAnzahl,obj,ReturnPosition,path);
}

function SetAnzahlExt(ProdukteTypeKey,objAnzahl,obj,ReturnPosition,z,path) {
	SetAnzahl(objAnzahl,z);
	InDenKorbLegen(ProdukteTypeKey,objAnzahl,obj,ReturnPosition,path);
}

function VariantenAuswahl(BestellNr,ReturnPosition) {
	parent.location='rshop.asp?Command=Katalog&KatalogTyp=101&Backup=Variante&BestellNr='+BestellNr+'&ResultatTyp=1&VariantenReturnPosition='+ReturnPosition;
}

function VariantenZurueck(ReturnPosition) {
	parent.location='rshop.asp?Command=Katalog&Restore=Variante&MoveTo='+ReturnPosition;
}

function InDenKorbLegen(ProdukteTypeKey,objAnzahl,obj,ReturnPosition,path) {
	var PictureNr="";
	if (isNaN(parseInt(objAnzahl.value,10))){
		//bei keiner Eingabe
		objAnzahl.value=1;
	}
	if ((isNaN(parseInt(objAnzahl.value,10)))||(objAnzahl.value>=10000000000)){
		parent.frames[1].location='ErrorMessage.asp?Message=keine%20Zahl';
	}else{
    var URL="UpdateInsertToCart.asp?ProdukteTypeKey="+ProdukteTypeKey+"&Anzahl="+parseInt(objAnzahl.value,10)+"&ReturnPosition="+ReturnPosition;
	  parent.frames[1].location.replace(URL);
		if (parseInt(objAnzahl.value,10)==0){
			obj.src=path+'cart.gif';
		}else if (parseInt(objAnzahl.value,10)==1){
			obj.src=path+'cartfull1.gif';
		}else if (parseInt(objAnzahl.value,10)==2){
			obj.src=path+'cartfull2.gif';
		}else if (parseInt(objAnzahl.value,10)==3){
			obj.src=path+'cartfull3.gif';
		}else if (parseInt(objAnzahl.value,10)==4){
			obj.src=path+'cartfull4.gif';
		}else if (parseInt(objAnzahl.value,10)==5){
			obj.src=path+'cartfull5.gif';
		}else {
			obj.src=path+'cartfullgr5.gif';
		}
	}
}

function InDenKorbLegenType3(ProdukteTypeKey,objAnzahl,obj) {
	if (isNaN(parseInt(objAnzahl.value,10))){
		objAnzahl.value=1;
	}
	if (isNaN(parseInt(objAnzahl.value,10))){
		parent.frames[1].location='ErrorMessage.asp?Message=keine%20Zahl';
	}else{
		parent.frames[1].location='UpdateInsertToCart.asp?ProdukteTypeKey='+ProdukteTypeKey+"&Anzahl="+parseInt(objAnzahl.value,10);
	}
}

function ProduktMarkieren(ProdukteTypeKey,objAnzahl,obj,ReturnPosition,FilePlus,FileMinus) {
	if (objAnzahl.value==1){
		objAnzahl.value=0;
		obj.src=FilePlus;
	}else{
		objAnzahl.value=1;
		obj.src=FileMinus;
	}
	parent.frames[1].location='UpdateInsertToCart.asp?ProdukteTypeKey='+ProdukteTypeKey+"&Anzahl="+objAnzahl.value+"&ReturnPosition="+ReturnPosition
}

function AnzahlOnChange(obj)
{
	obj.value=parseInt(obj.value,10);
	if (isNaN(obj.value)){
		obj.value="0";
		parent.frames[1].location='ErrorMessage.asp?Message=keine%20Zahl';
	}
	if (obj.value<0){
	  obj.value=-obj.value;
	}
}

function AnzahlOnChangeExt(ProdukteTypeKey,objAnzahl,obj,ReturnPosition,path)
{
	AnzahlOnChange(objAnzahl);
	InDenKorbLegen(ProdukteTypeKey,objAnzahl,obj,ReturnPosition,path);
}

function help_window(freshurl)
{
	SmallWin = window.open(freshurl, 'HelpWindow','scrollbars,resizable,toolbar,height=480,width=471');
	if (window.focus) {
		SmallWin.focus();
	}
	if (SmallWin.opener == null) SmallWin.opener = window;
		SmallWin.opener.name = "PUMain";
}
//-->



