/*

Dyskretny Otwarty Samodzialajacy Inicjator Ajaxa

Laduje obrazek
*/
function LoadImage(offset) {
 if(offset>(maxPhoto-1)) {
 	offset=0;
 	galeryOffset = offset;
 } else if (offset<0) {
 	offset=(maxPhoto-1);
 	galeryOffset = offset;
 }
	new Ajax.Request(ajaxLoadPhoto,
  {
    method:'post',
    parameters: {offset: offset},
    onSuccess: function(transport){
      var response = transport.responseText;
      eval(response);
    },
    onFailure: function(){ alert('Something went wrong...') }
  });
}
