
/* PODMIANA OBRAZKOW */
function canManipulateImages() {
	if (document.images)
		return true;
	else
		return false;
}

function preLoadImage(imageURL) {
	if (gImageCapableBrowser) {
		image = new Image();
		image.src = imageURL;
		return image;
	}
}


function changeButtonImage(buttonName,sourceImage) {
	if (gImageCapableBrowser) {
		document [buttonName].src = sourceImage.src;
		return true;
	}
}

gImageCapableBrowser = canManipulateImages();

button01Inactive = preLoadImage("img/menu-oferta.jpg");
button01Active = preLoadImage("img/menu-oferta-ov.jpg");

button02Inactive = preLoadImage("img/menu-kontakt.jpg");
button02Active = preLoadImage("img/menu-kontakt-ov.jpg");

button03Inactive = preLoadImage("img/menu-onas.jpg");
button03Active = preLoadImage("img/menu-onas-ov.jpg");

button04Inactive = preLoadImage("img/menu-o_psychoterapii.jpg");
button04Active = preLoadImage("img/menu-o_psychoterapii-ov.jpg");

button05Inactive = preLoadImage("img/menu-zaprzyjaznione.jpg");
button05Active = preLoadImage("img/menu-zaprzyjaznione-ov.jpg");



/* KONIEC ZAMIANY BUTTONOW W MENU */
/* POCZATEK OKNA Z OBRAZKIEM */

// Script Source: CodeLifter.com
// Copyright 2003
// Do not remove this notice.

// SETUPS:
// ===============================

// Set the horizontal and vertical position for the popup

PositionX = 100;
PositionY = 100;

// Set these value approximately 20 pixels greater than the
// size of the largest image to be used (needed for Netscape)

defaultWidth  = 500;
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=100-(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["George"].width;');writeln('window.innerHeight=document.images["George"].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('<img onclick="window.close();" name="George" src='+imageURL+' style="display:block" border="0" alt="Kliknij w obrazek aby zamkn±æ okienko przegl±darki"></body></html>');
close();		
}}

/* slide */

/*<![CDATA[*/
// Show/Hide (10-June-2006)
// by Vic Phillips http://www.vicsjavascripts.org.uk

// To Show or Hide an Element
// Increases or decreases the height of an element between specified maximum and minimum heights.
// Optionally the element display may set to 'display:none' at the minimum height

// ***** Application Notes

// **** The HTML Code
// The element to Show/Hide must have a style 'position:relative;' or 'position:absolute;'
// e.g.
// <div id="fred1" style="position:relative;overflow:hidden;display:none;top:20px;left:20px;width:500px;height:5px;background-color:red;" ></div>
//

// **** Execution
// The effect is executed from an event call to function 'zxcShowHide'
// e.g.
// <input type="button" name="" value="Show/Hide" onclick="zxcShowHide('fred1',200,5,5,true);"/>
// where:
// parameter 0 = the element object or unique ID name. (object or string)
// parameter 1 = the maximum height. (digits)
// parameter 2 = the minimum height. (digits)
// parameter 3 = the height change increment. (digits)
// parameter 4 = optional true=display:none at minimum height. (true, false or omit)
//
// Note:
// if the initial height is less than the maximum height the height will be increased,
// if greater or equal to the maximum height the height will decrease.
//

// **** Show/Hide the Previous Element
//
// There may be more than one application on a page
//
// A customising variable 'zxcHideLast' if set to true
// Allows the Last Hide/Show Element to be Hidden.
//


// **** General
//
// All variable, function etc. names are prefixed with 'zxc' to minimise conflicts with other JavaScripts
// These characters may be changed to characters of choice using global find and replace
//
// The Functional Code (about 1K) is best as External JavaScripts.
// The Functional Code size may be reduced by including only the required functions.
//
// Tested with IE6 and Mozilla FireFox



// **** Customising Variables

var zxcHideLast=true; // if true Allows the Last Hide/Show Element to be Hidden.


// ***** Functional Code= NO NEED to CHANGE

var zxcOOPCnt=0;
var zxcLst;

function zxcShowHide(zxcid,zxcmax,zxcmin,zxcinc,zxcdis){
var zxcobj=zxcid;
if (typeof(zxcid)=='string'){ zxcobj=document.getElementById(zxcid); }
if (!zxcobj){ return; }
if (!zxcobj.oopsh){ zxcobj.oopsh=new zxcOOPSH(zxcobj,zxcmax,zxcmin,zxcinc,zxcdis); }
clearTimeout(zxcobj.oopsh.to);
zxcobj.oopsh.dir=-zxcobj.oopsh.dir;
if (zxcobj.oopsh.h<zxcobj.oopsh.minmax[1]){ zxcobj.style.display=''; }
if (zxcLst&&zxcLst!=zxcobj&&zxcHideLast){ clearTimeout(zxcLst.oopsh.to); zxcLst.oopsh.dir=-1; zxcLst.oopsh.showhide(); }
zxcLst=zxcobj;
zxcobj.oopsh.showhide();
}

function zxcOOPSH(zxcobj,zxcmax,zxcmin,zxcinc,zxcdis){
this.obj=zxcobj;
this.ref='zxcoopsh'+zxcOOPCnt++;
zxcmin=zxcmin>zxcinc?zxcmin:zxcinc+1;
zxcmax=zxcmax>zxcmin+zxcinc?zxcmax:zxcmin+zxcinc+1;
this.minmax=[zxcinc,zxcmax,zxcmin,zxcdis||false];
window[this.ref]=this;
this.to=null;
this.spd=10;
this.dir=(parseInt(zxcobj.style.height)<this.minmax[1])?-1:1;
this.h=parseInt(this.obj.style.height);
}

zxcOOPSH.prototype.showhide=function(){
this.h=parseInt(this.obj.style.height);
if ((this.dir>0&&this.h<this.minmax[1])||(this.dir<0&&this.h>this.minmax[2])){
this.obj.style.height=(this.h+=(this.minmax[0]*this.dir))+'px';
this.setTimeOut('showhide();',this.spd);
}
else {
if (this.dir>0){ this.obj.style.height=(this.minmax[1])+'px'; }
else { this.obj.style.height=(this.minmax[2])+'px'; if (this.minmax[3]){ this.obj.style.display='none'; } }
}
}

zxcOOPSH.prototype.setTimeOut=function(zxcf,zxcd){
this.to=setTimeout('window.'+this.ref+'.'+zxcf,zxcd);
}

/*]]>*/
