var zi = 0;
function getLeft(name){
  if (ie4 && !ie4_1){
    locLewa = document.getElementById(name).offsetLeft;
    if (parseInt(locLewa) != locLewa) locLewa = locLewa.replace('px','');
    return parseInt(locLewa);
  }else if (nn4){
    locLewa = document.layers[name].left;
  }else{
    locLewa = document.all[name].offsetLeft;}
  if (parseInt(locLewa) != locLewa) locLewa = locLewa.replace('px','');
  return parseInt(locLewa);
}
function getTop(name){
  if (ie4 && !ie4_1){
    locTop = document.getElementById(name).offsetTop;
    if (parseInt(locTop) != locTop) locTop = locTop.replace('px','');
    return parseInt(locTop);
  }else if (nn4){
    locTop = document.layers[name].top;
  }else{
    locTop = document.all[name].offsetTop;}
  if (parseInt(locTop) != locTop) locTop = locTop.replace('px','');
  return parseInt(locTop);
}
function getWidth(name){
  if (ie4 && !ie4_1){
    locWidth = document.getElementById(name).style.width;
    if (parseInt(locWidth) != locWidth) locWidth = locWidth.replace('px','');
    return parseInt(locWidth);
  }else if (nn4){
    locWidth = document.layers[name].width;
  }else{
    locWidth = document.getElementById(name).style.width};
  if (parseInt(locWidth) != locWidth) locWidth = locWidth.replace('px','');
  return parseInt(locWidth);
}
function getHeight(name){
var locHeight;
  if (ie4 && !ie4_1){
    locHeight = document.getElementById(name).style.height;
    if (parseInt(locHeight) != locHeight) locHeight = locHeight.replace('px','');
    return parseInt(locHeight);
 }else if (nn4){
    locHeight = document.layers[name].height;
  }else{
    locHeight = document.getElementById(name).style.height;}
  if (parseInt(locHeight) != locHeight) locHeight = locHeight.replace('px','');
  return parseInt(locHeight);
}
function pozycjaWarstwy(nazwa,l,t) { 
  if (ie4 && !ie4_1){
    document.getElementById(nazwa).style.left=l; 
   	document.getElementById(nazwa).style.top=t;
    return true; 
  }if (nn4){
    document.layers[nazwa].left=l; 
    document.layers[nazwa].top=t; 
  }else{
    document.all[nazwa].style.left=l; 
   	document.all[nazwa].style.top=t;
  } 
  return true; 
} 
function setTransparent(nazwa,transValue,jak,shadowValue) {
  locFilter = ""; 
  if (ie4 && !ie4_1){
  }else if (!nn4){
    if (jak) {
	  if ((jak & 1) == 1){
	    locFilter = "progid:DXImageTransform.Microsoft.Alpha(opacity=" + transValue + ")"; //przezroczystość;
	  }
	  if ((jak & 2) == 2){
	    if (shadowValue){locFilter += " progid:DXImageTransform.Microsoft.DropShadow(color=" + shadowValue + ", offX=3, offY=3, positive=1)";} //Cie&#324;;
		else{locFilter += " progid:DXImageTransform.Microsoft.DropShadow(color=#777777, offX=3, offY=3, positive=1)";} //Cień;
	  }
	  if ((jak & 4) == 4){
	    locFilter += " progid:DXImageTransform.Microsoft.GradientWipe(duration=.2, wipeStyle=1)"; //animacja;
	  }
	  if ((jak & 8) == 8){
        transValue = "50"; 
	    locFilter = "progid:DXImageTransform.Microsoft.Alpha(opacity=" + transValue + ")"; //przezroczystość;
	  }
      document.all[nazwa].style.filter = locFilter; 
      document.all[nazwa].style.visibility = "visible";
	}
  } 
  return true; 
} 
function setMyTransparent(nazwa,transValue) {
  if (ie4_1){
    locFilter = "progid:DXImageTransform.Microsoft.Alpha(opacity=" + transValue + ")"; //przezroczysto&#347;&#263;;
    document.all[nazwa].style.filter = locFilter; 
  } 
  return true; 
} 
function setMyShadow(nazwa,shadowValue,offX,offY) {
  if (ie4_1){
    locFilter = "progid:DXImageTransform.Microsoft.DropShadow(color=" + shadowValue + ", offX=" + offX + ", offY=" + offY + ", positive=1)"; //Cie&#324;;
	alert(locFilter);
    document.all[nazwa].style.filter = locFilter; 
    document.all[nazwa].style.visibility = "visible";
  } 
  return true; 
} 
function setMyAnimation(nazwa,styl) {
  if (ie4_1){
    locFilter = "progid:DXImageTransform.Microsoft.GradientWipe(duration=.2, wipeStyle=" + styl + ")"; //animacja;
	alert(locFilter);
    document.all[nazwa].style.filter = locFilter; 
    document.all[nazwa].style.visibility = "visible";
  } 
  return true; 
} 
function setVisible(nazwa) {
  if (ie4 && !ie4_1){
	document.getElementById(nazwa).style.visibility = "visible";
  }else if (!nn4){
	document.all[nazwa].style.visibility = "visible";
  } 
  return true; 
} 
function setVisibleWithOrder(nazwa) {
  if (ie4 && !ie4_1){
	document.getElementById(nazwa).style.visibility = "visible";
  }else if (!nn4){
	document.all[nazwa].style.visibility = "visible";
  } 
  zi +=1;
  document.getElementById(nazwa).style.zIndex = zi;
  return true; 
} 
function setInvisible(nazwa) {
  if (ie4 && !ie4_1){
	document.getElementById(nazwa).style.visibility = "hidden";
  }else if (!nn4){
	document.all[nazwa].style.visibility = "hidden";
  } 
  return true; 
} 
function setInvisibleNoReturn(nazwa) {
  if (ie4 && !ie4_1){
	document.getElementById(nazwa).style.visibility = "hidden";
  }else if (!nn4){
	document.all[nazwa].style.visibility = "hidden";
  } 
} 
function setHeight(nazwa,h) {
  if (ie4 && !ie4_1){
    if (typeof(document.getElementById(nazwa)) != 'undefined') {	  
	    document.getElementById(nazwa).style.height=h;
		}
    return true; 
  }else if (nn4) {
    if (typeof(document.layers[nazwa]) != 'undefined') {	  
	    document.layers[nazwa].height=h;
		}
	}
  else {
    if (typeof(document.all[nazwa]) != 'undefined') {	  
	    document.getElementById(nazwa).style.height=h;
		}
	}
	return true;
}
function setWidth(nazwa,w) {
  if (ie4 && !ie4_1){
    if (typeof(document.getElementById(nazwa)) != 'undefined') {	  
	    document.getElementById(nazwa).style.width=w;
		}
    return true; 
  }else if (nn4) {
    if (typeof(document.layers[nazwa]) != 'undefined') {	  
	    document.layers[nazwa].width=w;
		}
	}
  else if (ie4) {
    if (typeof(document.all[nazwa]) != 'undefined') {	  
	    document.all[nazwa].style.width=w;
		}
	}
	return true;
}

