// JavaScript Document

function opengalery(gid){
//window.open('/galery.php?gid='+gid, '_blank', 'width=900, height=650, menubar=0');
window.open('/index.php?gid='+gid, '_self');
//alert(gid);
}







function openowngalery(gid2){
gid=gid2;
var ptaKepHely=$("galeriakepek");//ÊrÊs
	//az updatert hasznåljuk a request helyett mivel a vålasz html-ben jÜn
	var url = "/galery.php";
	kepId = this.id ? 1 : 0;
	var params = "gid="+gid2;
	var ajax = new Ajax.Updater(
		ptaKepHely,
		url,
		{
			method: "get",
			parameters: params,
			onLoading: ptaLoading("galeriakepek"),
			onException: ptaKepHelyHiba
		}
		);
	}
function ptaLoading(hely){
	var ptaKepHely = $(hely);
	ptaKepHely.innerHTML = "<center><img src=\"/admin/ajax-loader.gif\" alt=\"Loading\" />";
	}
function ptaKepHelyHiba(ojjektum,hiba){
	ojjektum.containers.failure.innerHTML = "Valami gubanc van. " + hiba.name + " :: " + hiba.fileName + " :: " + hiba.lineNumber + " :: " + hiba.message;
	}




function incitem(itemcode){
window.open('/lib/kosar.php?incitem='+itemcode, 'serverAction');
}

function decitem(itemcode){
window.open('/lib/kosar.php?decitem='+itemcode, 'serverAction');
}


function adatmodositasAdamasolas(){
  document.adatmodform.InvoiceName.value=document.adatmodform.DeliveryName.value;
  document.adatmodform.InvoiceAddressCity.value=document.adatmodform.DeliveryAddressCity.value;
  document.adatmodform.InvoiceAddress1.value=document.adatmodform.DeliveryAddress1.value;
  document.adatmodform.InvoicePostOffice.value=document.adatmodform.DeliveryPostOffice.value;
}

/*
function openowngalery(gid){
window.open('/index.php?gid='+gid, '_self');
}
*/
