doc=document;
ie=doc.all;
up5=doc.getElementById?doc.getElementsByTagName('div'):0;

function get_root() {
	s = window.location.toString(); pl = "";
	if (s.indexOf("/pokaz/")>0) pl = s.substr(0,s.indexOf("pokaz/"));
	else if (s.indexOf("/producenci/")>0) pl = s.substr(0,s.indexOf("producenci/"));
	return pl;	
}

function gL(ln){
   return document.getElementById?document.getElementById(ln):document.all?document.all[ln]:document.layers[ln]
}



//POPUPS//
PositionX = 50;
PositionY = 50;

// Set these value approximately 20 pixels greater than the
// size of the largest image to be used (needed for Netscape)

defaultWidth  = 550;
defaultHeight = 500;

// Set autoclose true to have the window close automatically
// Set autoclose false to allow multiple popup windows

var AutoClose = true;

// Do not edit below this line...
// ================================
if (parseInt(navigator.appVersion.charAt(0))>=4){
var isNN=(navigator.appName=="Netscape")?1:0;
var isIE=(navigator.appName.indexOf("Microsoft")!=-1)?1:0;}
var optNN='scrollbars=no,width='+defaultWidth+',height='+defaultHeight+',left='+PositionX+',top='+PositionY;
var optIE='scrollbars=no,width=150,height=100,left='+PositionX+',top='+PositionY;
function popImage(imageURL,imageTitle){
if (isNN){imgWin=window.open('about:blank','',optNN);}
if (isIE){imgWin=window.open('about:blank','',optIE);}
with (imgWin.document){
writeln('<html><head><title>Loading...</title><style>body{margin:0px;}</style>');writeln('<sc'+'ript>');
writeln('var isNN,isIE;');writeln('if (parseInt(navigator.appVersion.charAt(0))>=4){');
writeln('isNN=(navigator.appName=="Netscape")?1:0;');writeln('isIE=(navigator.appName.indexOf("Microsoft")!=-1)?1:0;}');
writeln('function reSizeToImage(){');writeln('if (isIE){');writeln('window.resizeTo(100,100);');
writeln('width=123-(document.body.clientWidth-document.images[0].width);');
writeln('height=100-(document.body.clientHeight-document.images[0].height);');
writeln('window.resizeTo(width,height);}');writeln('if (isNN){');       
writeln('window.innerWidth=document.images["foto"].width;');writeln('window.innerHeight=document.images["foto"].height;}}');
writeln('function doTitle(){document.title="'+imageTitle+'";}');writeln('</sc'+'ript>');
if (!AutoClose) writeln('</head><body bgcolor=000000 scroll="no" onload="reSizeToImage();doTitle();self.focus()">')
else writeln('</head><body bgcolor=000000 scroll="no" onload="reSizeToImage();doTitle();self.focus()" onblur="self.close()">');
writeln('<a href=javascript:window.close() title=zamknij_okno><img name="foto" src='+imageURL+' style="display:block" border=0></a></body></html>');
close();		
}}

Nowe=null;
function Otworz(w,s,src)
{
if (Nowe!=null)
{
Nowe.close();
Nowe=null;
}
Nowe=window.open("", "","toolbar=no,menubar=no,location=no,personalbar=no,scrollbars=no,status=no,directories=no,resizable=no,height="+w+",width="+s+"");
Nowe.document.write("<HTML><HEAD><STYLE>BODY{BACKGROUND-REPEAT:no-repeat}</STYLE></HEAD><BODY BACKGROUND="+src+"></BODY></HTML>");
Nowe.focus();
}


//---//



function clickIE() {if(document.all)return false;}
function clickNS(e) {
	if (document.layers||(document.getElementById&&!document.all)) {
		if (e.which==2||e.which==3) return false;
	}
}
if (document.layers){
	document.captureEvents(Event.MOUSEDOWN);document.onmousedown=clickNS;
}
else{
	document.onmouseup=clickNS;document.oncontextmenu=clickIE;
}
document.oncontextmenu=new Function("return false")


<!-- begin RANDOM HEADER IMAGES 
var duze = new Array()


duze[0] = 'http://www.eic.com.pl/layout/random/foto2_275.jpg'
duze[1] = 'http://www.eic.com.pl/layout/random/foto4_275.jpg'


var male = new Array()

male[0] = 'http://www.eic.com.pl/layout/random/foto80_1.jpg'
male[1] = 'http://www.eic.com.pl/layout/random/foto80_2.jpg'
male[2] = 'http://www.eic.com.pl/layout/random/foto80_3.jpg'
male[2] = 'http://www.eic.com.pl/layout/random/foto80_3.jpg'

var impreza = new Array()

impreza[0] = 'http://www.eic.com.pl/layout/random/foto80_imp1.jpg'
impreza[1] = 'http://www.eic.com.pl/layout/random/foto80_imp2.jpg'


function showImage(tabname){
tab = eval(tabname);
var p = tab.length;
var whichImage = Math.round(Math.random()*(p-1))
document.write('<img border="0"  src="'+tab[whichImage]+'">');
}



function PowiekszZdjecie(co) {
	scr_w = screen.width;
	scr_h = screen.height;
	xpos = parseInt((scr_w)/2);
	ypos = parseInt((scr_h)/2);;
	okno = window.open(get_root()+'pokaz/popup/zdjecie/'+co,'zdjecie','width=1,height=1,left=0,top=0,resizable=no,scrollbars=no,menubar=no,directories=no,toolbar=no,location=no,status=no');
}

function getObject( obj ) {

  // step 1
  if ( document.getElementById ) {
    obj = document.getElementById( obj );

  // step 2
  } else if ( document.all ) {
    obj = document.all.item( obj );

  //step 3
  } else {
    obj = null;
  }

  //step 4
  return obj;
  }
  
  function moveObject( obj, e ) {

  // step 1
  var tempX = 0;
  var tempY = 0;
  var offset = 5;
  var objHolder = obj;

  // step 2
  obj = getObject( obj );
  if (obj==null) return;

  // step 3
  if (document.all) {
    tempX = event.clientX + document.body.scrollLeft;
    tempY = event.clientY + document.body.scrollTop;
  } else {
    tempX = e.pageX;
    tempY = e.pageY;
  }

  // step 4
  if (tempX < 0){tempX = 0}
  if (tempY < 0){tempY = 0}

  // step 5
  obj.style.top  = (tempY + offset) + 'px';
  obj.style.left = (tempX + offset) + 'px';

  // step 6
  displayObject( objHolder, true );
  }

function displayObject( obj, show ) {

  // step 1
  obj = getObject( obj );
  if (obj==null) return;

  // step 2
  obj.style.display = show ? 'block' : 'none';
  obj.style.visibility = show ? 'visible' : 'hidden';
  }

var warstwy = new Array();
function create_layer(ident,u){
	warstwy[ident]=new warstwa();
	if(u==true) {
		gL(ident).style.display = "none";
		warstwy[ident].rozwinieta=false;
	}
}
function change_display(ident){
	warstwa_rozwinieta = warstwy[ident].rozwinieta;
	for(i in warstwy) {
		if(warstwy[i].rozwinieta) {
			gL(i).style.display = "none";
			warstwy[i].rozwinieta=false;
		}
	}
	if(!warstwa_rozwinieta) {
		gL(ident).style.display = "block";
		warstwy[ident].rozwinieta=true;
	}
}
function warstwa(name){this.rozwinieta = true;}

function rollover_ini() {
	rollovers = new Array();
	var img=document.body.getElementsByTagName('img');
	for(var i=0; i<img.length; i++) {
		if(img[i].className=='rollover') {
			img[i].src.match(/(.*)\.([a-z0-9]+)$/i);
			var src_act=RegExp.$1+'_act.'+RegExp.$2;
			rollovers[i]=document.createElement('img');
			rollovers[i].src=src_act;
			img[i].alt=src_act;
			img[i].onmouseover = function () {
				var buff= new String(this.src);
				this.src=this.alt;
				this.alt=buff; 	
			}
			
			img[i].onmouseout = function () {
				var buff= new String(this.src);
				this.src=this.alt; 
				this.alt=buff;	
			}
			
			
		}
	}
}

function Init() {
	rollover_ini();
}

function putFlashHere( sPath, iWidth, iHeight, sID) {
with (document) {
write('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="../download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0/#version=5,0,0,0/default.htm" width="'+iWidth+'" height="'+iHeight+'" id="'+sID+'" style="z-index:0;" >');
write('  <param name="movie" value="'+sPath+'" />');
write('  <param name="quality" value="best" />');
write('  <param name="wmode" value="transparent" />');
write('  <param name="menu" value="false" />');
write('  <embed src="'+sPath+'" quality="best" wmode="transparent" menu="false" width="'+iWidth+'" height="'+iHeight+'" swLiveConnect=true name="'+sID+'" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="../www.macromedia.com/go/getflashplayer" />');
write('</object>');
}
}

function sh(id) {
   /*
 predefiniowana tablica z
 elementami obslugiwanymi 
 przez menu
*/
   modules = new Array('krotki', 'pelny');
   for (i = 0; i < modules.length; i++) {
    if (i != id) {
           //alert(modules[i] + ' != ' + modules[id]);
           document.getElementById(modules[i]).style.display = 'none';
       } else {
           //alert(modules[i] + ' == ' + modules[id]);
           document.getElementById(modules[i]).style.display = 'block';
       }
}
}