function change_img(destination,source)
{
	STPE.I()[destination].src=source;
}

function go_href(link)
{
 location.href=link;
}

noweOkienko = null;

function ShowItem(src){
if(noweOkienko){noweOkienko.close();}
if(noweOkienko==null || noweOkienko.closed){
 settings=
 "left=30,"
 +"top=30,"
 +"toolbar=no,"
 +"location=no,"
 +"directories=no,"
 +"status=no,"
 +"menubar=no,"
 +"scrollbars=no,"
 +"width=100"
 +"height=100"
 +"resizable=no"
 noweOkienko = window.open("",'galeria_tequila',settings);
}
noweOkienko.document.open();
noweOkienko.document.clear();
noweOkienko.document.write(
"<html>\n"
+"<head>\n"
+"<title>Galeria zdjęć - TEQUILA</title>\n"
+"</head>\n"
+"<script>\n"
+"function resize() {\n"
+"window.resizeTo(document.images[0].width+10, document.images[0].height+30);}\n"
+"</script>\n"
+"<body background=" + src + " topmargin=0 leftmargin=0 onLoad=resize(); onclick=window.close(); bgcolor=#FFFFFF style='background-repeat:no-repeat;'>\n"
+"<img src=" + src + " border=0 style='visibility:hidden;'>\n"
+"</body>\n"
+"</html>"
);
noweOkienko.document.close();
noweOkienko.focus();
}

// DYMKI do obiektów

// Skrypt wymaga umieszczenia znacznika

// <div id="dymek" style="position: absolute; visibility: hidden;"></div>

// na początku dokumentu

var IE = document.all?true:false

if (!IE) {
   document.captureEvents(Event.MOUSEMOVE);
   document.onmousemove=mousePos;
   var netX, netY;
}

function posX() {
	if (IE) {
	   tempX=document.body.scrollLeft + event.clientX;
	}
	if (tempX<0) {
	   tempX=0;
	}
	return tempX;
}

function posY(e) {
	if (IE) {
	    tempY = event.clientY + document.body.scrollTop;
	}
	if (tempY<0) {
	   tempY=0;
	}
	return tempY;
}

function mousePos(e) {
	netX=e.pageX;
	netY=e.pageY;
}

function dymekPokaz(pX, pY, src) {
	if (IE) {
	   document.all.dymek.style.visibility='visible';
	   document.all.dymek.innerHTML=src;
	   document.all.dymek.style.left=posX()+pX+"px";
	   document.all.dymek.style.top=posY()+pY+"px";
	}
	else {
		 document.getElementById("dymek").style.visibility='visible';
		 document.getElementById("dymek").style.left=netX+pX+"px";
		 document.getElementById("dymek").style.top=netY+pY+"px";
		 document.getElementById("dymek").innerHTML=src;
	}
}

function dymekPrzesun(pX, pY) {
	if (IE) {
	   document.all.dymek.style.left=posX()+pX+"px";
	   document.all.dymek.style.top=posY()+pY+"px";
	}
	else {
		 document.getElementById("dymek").style.left=netX+pX+"px";
		 document.getElementById("dymek").style.top=netY+pY+"px";
	}
}

function dymekZamknij() {
	if (IE) {
	   document.all.dymek.innerHTML='';
	   document.all.dymek.style.visibility='hidden';
	}
	else {
		 document.getElementById("dymek").style.visibility='hidden';
		 document.getElementById("dymek").innerHTML='';
	}
}

function dymekKom(tresc) {
	text='<table cellspacing=2 cellpadding=3 cellpadding=2>';
	text+='<tr><td style="font-size: 11px; font-family:tahoma; background-color: #F7F5ED; border: 1px solid #000000; ">'+tresc+'</td></tr></table>';
	dymekPokaz(0, 15, text);
}

function dymekLinkPrzesun() {
	dymekPrzesun(0, 15);
}

function openwindow(src, w, h)
{
 ustawienia= "left=100," +"top=100," +"width=" + w + "," +"height=" + h + "," +"toolbar=no," +"location=no," +"directories=no," +"status=no," +"menubar=no," +"scrollbars=yes," +"resizable=no";
 NewWindow = window.open(src,'TEQUILA',ustawienia);
 NewWindow.focus();
}

function Pisz(co)
{
 var d=document;
 if(d.layers)with(d.layers["zegar"].document){
 write(co);close();return}
 if(d.getElementById){d.getElementById("zegar").innerHTML=co;return}
 if(d.all)d.all["zegar"].innerHTML=co;
}

function Zegar()
{
 var T,G,M,S,s;
 T=new Date();
 G=T.getHours();
 M=T.getMinutes();
 S=T.getSeconds();
 
 s=(G<10?"0":" ")+G;
 s+=(M<10?":0":":")+M;
 s+=(S<10?":0":":")+S;
 Pisz(s);
}

function actual_date()
{
 var dayNames = new Array("Niedziela","Poniedziałek","Wtorek","Środa","Czwartek","Piątek","Sobota");
 var monthNames = new Array("stycznia","lutego","marca","kwietnia","maja","czerwca","lipca","sierpnia","września","października","listopada","grudnia");
 var now = new Date();
 document.write(dayNames[now.getDay()] + ", " + now.getDate() + " " + monthNames[now.getMonth()] + " " + now.getYear());
}

