
  function setVariables() {
      if (navigator.appName == "Netscape") {
          off_y = "window.pageYOffset";
      }
      else {
          off_y = "document.body.scrollTop";
      }
  }

function MessageBoxFadeStop(obj) { 
  SetOpacity($(obj),0);
  $(obj).style.display='none';
} 

function MessageBoxFadeIn(obj) { 
  var off_y = (navigator.appName == "Netscape") ? window.pageYOffset : document.body.scrollTop;
  var off_x = (navigator.appName == "Netscape") ? window.pageXOffset : document.body.scrollLeft;
 
  SetOpacity($(obj),0);
  $(obj).style.display='block';
  $(obj).style.top  = off_y + document.body.clientHeight/2 - $(obj).clientHeight/2;
  $(obj).style.left = off_x + document.body.clientWidth/2  - $(obj).clientWidth/2;
  mint.fx.Fade(obj, 100, 10, 300);
//  SetOpacity($(obj),100);
} 

function MessageBoxFadeOut(obj) { 
  SetOpacity($(obj),100);
  mint.fx.Fade(obj, 0, 10, 300,null,MessageBoxFadeStop);
//  SetOpacity($(obj),0);
//  $(obj).style.display='none';
} 



function windowInfo(url,ow,oh)
{
return window.open(url,'Informacja','width='+ow+',height='+oh+',screenX='+(screen.width-ow)/2+',screenY='+(screen.height-oh)/2);
}



function windowPopup(url,ow,oh,opcje)
{
if (opcje!='') opcje=','+opcje;
window.open(url,'Informacja','width='+ow+',height='+oh+',left='+(screen.width-ow)/2+',top='+(screen.height-oh)/2+opcje);
}




function MenuLeftOver(co) {
 co.style.background='#0a67cb';
 co.style.color='#FFFFFF';
}




function MenuLeftOut(co) {
 co.style.background='#ffcc00';
 co.style.color='#000000';
}



function MenuButtonOver(co,col1,col2) {
 co.style.background=col2;
 co.style.color=col1;
}

function MenuButtonOut(co,col1,col2) {
 co.style.background=col2;
 co.style.color=col1;
}




function imgpop(Url){
	window.open(Url, 'obrazek', 'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,copyhistory=no,width=10,height=10,left=10,top=10');
}


function listapop(){
	window.open('clear.php?id=pirotechnika/referencjeall', 'lista', 'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=no,copyhistory=no,width=700,height=480,left=10,top=10');
}


function flipVis(co)
{
	if (document.getElementById(co).style.display=='none') {
		document.getElementById(co).style.display='block';
		return true;
		} else {
		document.getElementById(co).style.display='none';
		return false;
		}
}


function potwierdz(txt,url) {
	if (confirm(txt))
		{
		document.location.href=url;
		return true;
		}
	else
		return false;
}


function switchMore(div_id, h)
{
	if ($(div_id).style.height == h+'px')
	{
		mint.fx.Style(div_id, "height", null, 0, 20, 100, null, function() { mint.fx.Fade(div_id, 0,  25, 200); $(div_id).style.display = 'none'; });
		$(div_id+'_btn').innerHTML = 'wiêcej >>';
	}
	
	else
	{		
		mint.fx.Style(div_id, "height", null, h, 20, 100, null, function() { mint.fx.Fade(div_id, 100, 25, 200); $(div_id).style.display = 'block'; });
		$(div_id+'_btn').innerHTML = '<< mniej';
	}
}