// JavaScript Document
var aImages=new Array();
var nCurentImage;

function ChangeImgBg(sId){
	nCurentImage = sId;
	oTD = document.getElementById("MainIMG");
	oTD = oTD.parentNode;
	if (oTD.style.backgroundImage){
		oTD.style.backgroundImage = "url('get.php?i."+sId+":w.390:h.545')";
	} else {
		oTD.setAttribute("style", "background:url('get.php?i."+sId+":w.390:h.545')");
	}
}

function BigFotoPopUp(sName){
	openImagePopupCentered('get.php?i.'+aImages[nCurentImage]['id'], aImages[nCurentImage]['width'], aImages[nCurentImage]['height'], 'bigfoto', sName);
}

function RegisterImage(sId, sWidth, sHeight) {
	if (sId!='' && sWidth!='' && sHeight!='') {
		if (typeof(nCurentImage)=='undefined') nCurentImage = sId;
		aImages[sId] = new Array();
		aImages[sId]['id'] = sId;
		aImages[sId]['width'] = sWidth;
		aImages[sId]['height'] = sHeight;
	}
}
