kepterkep = new Object();
kepterkep[0] = "_ki";
kepterkep[1] = "_be";

function gombok(id, act)
{
	if(document.images) document.images[id].src = eval( "kepekobj." + id + kepterkep[act] + ".src");
}

kepekobj = new Object();

if (document.images) {
kepekobj.balra_ki = new Image(50,49);
kepekobj.balra_ki.src = "/img/bal.jpg";
kepekobj.balra_be = new Image(50,49);
kepekobj.balra_be.src = "/img/bal_on.jpg";
kepekobj.jobbra_ki = new Image(50,49);
kepekobj.jobbra_ki.src = "/img/jobb.jpg";
kepekobj.jobbra_be = new Image(50,49);
kepekobj.jobbra_be.src = "/img/jobb_on.jpg";
 }
 
function Nyelvvalasztas(Ny,Oldal)
{
 eval("location.href='" + Oldal + "&Ny=" + Ny + "'");
}
 
function TDele(TID,Neve,KatID,KatID2,offsetlosub)
{
if (self.confirm("Biztos, hogy le akarod törölni a " + TID + "-es sorszámú " + Neve + " növényt?"))
{
 eval("self.location='/katalogus.asp?KatalogusID=" + KatID + "&KatalogusID2=" + KatID2 + "&offsetlosub=" + offsetlosub + "&Torles=" + TID + "'");
}
}

function ADele(TID,Neve,KatID,KatID2,offsetlosub)
{
if (self.confirm("Biztos, hogy le akarod törölni a " + TID + "-es sorszámú " + Neve + " növényt az árjegyzékből?"))
{
 eval("self.location='/katalogus.asp?KatalogusID=" + KatID + "&KatalogusID2=" + KatID2 + "&offsetlosub=" + offsetlosub + "&AruTorles=" + TID + "'");
}
}

function finishorder(OrderCode)
{
 document.getElementById('OrderID').value=OrderCode;
}


function changemode()
{
 document.getElementById('Szerkesztomod').value='';
}

function goedit(pozicio,NovID,K1,K2)
{
 eval("location.href='/kepszerkesztes.asp?Pos=" + pozicio + "&NovID=" + NovID + "&KatalogusID=" + K1 + "&KatalogusID2=" + K2 + "'");
}


function URLDecode(Bela)
{
   // Replace + with ' '
   // Replace %xx with equivalent character
   // Put [ERROR] in output if %xx is invalid.
   var HEXCHARS = "0123456789ABCDEFabcdef"; 
   var encoded = Bela;
   var plaintext = "";
   var i = 0;
   while (i < encoded.length) {
       var ch = encoded.charAt(i);
	   if (ch == "+") {
	       plaintext += " ";
		   i++;
	   } else if (ch == "%") {
			if (i < (encoded.length-2) 
					&& HEXCHARS.indexOf(encoded.charAt(i+1)) != -1 
					&& HEXCHARS.indexOf(encoded.charAt(i+2)) != -1 ) {
				plaintext += unescape( encoded.substr(i,3) );
				i += 3;
			} else {
				alert( 'Bad escape combination near ...' + encoded.substr(i) );
				plaintext += "%[ERROR]";
				i++;
			}
		} else {
		   plaintext += ch;
		   i++;
		}
	} // while
   return plaintext;
};


function popup(Termek)
{
Ablak = window.open("","Ujablak",config="height=400,width=400,scrollbars=yes,resizable=yes");
Ablak.focus();
Ablak.document.write("<b" + ">Töltöm az oldalt...</" + "b>");
Ablak.location.href="/nagykep.asp?Termek=" + Termek;
}
