/*****************************************/
/*       Created by Piotr Kaluzynski     */
/*              Prostin                  */
/*       www.prostin.w.inds.pl           */
/*       email: prostin@inds.pl          */
/*****************************************/
//xmlHttp = createXmlHttpRequest();
var busy = false;
var activeDzial = '';
var activeGaleria = '';




function checkMouseOver (idElem, img, color) {
   if (idElem != 'dzialCont' + activeDzial) {
      lightOff (idElem, img, color);
   }
}

function checkMouseOverGal (idElem, img, color) {
   if (idElem != 'GalCont' + activeGaleria) {
      lightOff (idElem, img, color);
   }
}

function lightOn (idElem, img, color) {
   var elem = $(idElem);
 
   elem.firstChild.firstChild.src = 'img/' + img;
   elem.style.cursor = 'pointer';
   elem.style.letterSpacing = '0px';
   elem.childNodes[1].firstChild.firstChild.style.color = color;
}

function lightOff (idElem, img, color) {
      var elem = $(idElem);
      elem.firstChild.firstChild.src = 'img/' + img;
      elem.style.cursor = 'default';
      elem.style.letterSpacing = '0px';
      elem.childNodes[1].firstChild.firstChild.style.color = color;
}


function lightOnFolder (elem, img) {
   elem.style.cursor = 'pointer';
   if (czyIE6()) {
      img.style.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader" + "(src=\'http://localhost/html/Betezda/img/folder_on.png\', sizingMethod=\'scale\')";
   } else {
      img.src = "img/folder_on.png";
   }
}

function lightOffFolder (elem, img) {
   elem.style.cursor = 'default';
   if (czyIE6()) {
      img.style.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader" + "(src=\'http://localhost/html/Betezda/img/folder.png\', sizingMethod=\'scale\')";
   } else {
      img.src = "img/folder.png";
   }
}

function lightOnGallery (elem, img) {
   elem.style.cursor = 'pointer';
   if (czyIE6()) {
      img.style.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader" + "(src=\'http://localhost/html/Betezda/img/gallery_on.png\', sizingMethod=\'scale\')";
   } else {
      img.src = "img/gallery_on.png";
   }
}

function lightOffGallery (elem, img) {
   elem.style.cursor = 'default';
   if (czyIE6()) {
      img.style.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader" + "(src=\'http://localhost/html/Betezda/img/gallery.png\', sizingMethod=\'scale\')";
   } else {
      img.src = "img/gallery.png";
   }
}

