function oknod(adres,wys,szer) {
okno=window.open(adres,"drukk",'toolbar=no, menubar=no, personalbar=no, status=no, resizable=no,height='+wys+',width='+szer+',left=100,top=100');
}

function puste()
{
}

function otworzokno(numer,wys,szer,nazwa) {
okno=window.open("","",'toolbar=no, menubar=no, personalbar=no, status=no, resizable=no,height='+wys+',width='+szer+',left=100,top=100');
okno.document.write("<html><head><META HTTP-EQUIV='Content-type' CONTENT='text/html; charset=iso-8859-2'><link rel='stylesheet' href='style2.css' type='text/css'><title>" + nazwa + "</title></HEAD><body background='img/kolor.gif' leftmargin='0' rightmargin='0' topmargin='0' marginwidth='0' marginheight='0'><center><table border='0' cellpadding='0' cellspacing='0' width='100%' height='100%'><tr><td valign='middle' align='center'>");
okno.document.write("<a href='javascript:window.close()'><img src='pliki/" + numer + "' border=0></a><br />" + nazwa + "</td></tr></table></center></body></html>");
}
function otworzokno2(numer,wys,szer,nazwa) {
okno=window.open("","",'toolbar=no, menubar=no, personalbar=no, status=no, resizable=no,height='+wys+',width='+szer+',left=100,top=100');
okno.document.write("<html><head><META HTTP-EQUIV='Content-type' CONTENT='text/html; charset=iso-8859-2'><link rel='stylesheet' href='style2.css' type='text/css'><title>" + nazwa + "</title></HEAD><body background='img/kolor.gif' leftmargin='0' rightmargin='0' topmargin='0' marginwidth='0' marginheight='0'><center><table border='0' cellpadding='0' cellspacing='0' width='100%' height='100%'><tr><td valign='middle' align='center'>");
okno.document.write("<a href='javascript:window.close()'><img src='strony/" + numer + "' border=0></a><br />" + nazwa + "</td></tr></table></center></body></html>");
}

function otworzm1(numer,wys,szer) {
	okno=window.open("","",'toolbar=no, menubar=no, personalbar=no, status=no, resizable=no,height='+wys+',width='+szer+',left=100,top=100');
	okno.document.write("<html><title>ODDK - wersja do druku</title><body background='img/kolor.gif' leftmargin=0 rightmargin=0 topmargin=0 marginwidth=0 marginheight=0><center><table border=0 cellpadding=0 cellspacing=0 width=100% height=100%><tr><td valign=middle align=center>");
	okno.document.write("");
}

function otworzm(tytul,plik,szer,wys) {
	okno=window.open("","",'toolbar=no, menubar=no, personalbar=no, status=no, resizable=no,height='+ wys +',width='+ szer +',left=100,top=100');
	okno.document.write("<html><title>" + tytul + "</title><body background='img/kolor.gif' leftmargin=0 rightmargin=0 topmargin=0 marginwidth=0 marginheight=0><center><table border=0 cellpadding=0 cellspacing=0 width=100% height=100%><tr><td valign=middle align=center>");
	okno.document.write("<img src=ekspozycje/" + plik + " border=0></td></tr></table></center></body></html>");
}

function change_values(obj) {
   if (obj.value == obj.defaultValue)
      obj.value = "";
   else if (obj.value == "")
      obj.value = obj.defaultValue;
}




function getElementsByClassName(oElm, strTag, strClass) {
var arrElements = (strTag == "*" && oElm.all) ? oElm.all : oElm.getElementsByTagName(strTag);
var arrReturnElements = new Array();
strClass = strClass.replace(/\-/g, "\\-");
var oRegExp = new RegExp("(^|\\s)" + strClass + "(\\s|$)");
var oElement;
for (var i=0; i<arrElements.length; i++) {
oElement = arrElements[i];
if(oRegExp.test(oElement.className)) {
arrReturnElements.push(oElement);
}
}
return (arrReturnElements);
}

function zaznacz( strClass) {
var set=false;
elmnts = getElementsByClassName(document, "input", strClass);
for(var i=0; i<elmnts.length; i++) {
elmnts[i].checked=true;
}
}
function odznacz( strClass) {
var set=false;
elmnts = getElementsByClassName(document, "input", strClass);
for(var i=0; i<elmnts.length; i++) {
elmnts[i].checked=false;
}
}

function zaznacz2( strClass, wartosc ) {
var set=false;
elmnts = getElementsByClassName(document, "select", strClass);
for(var i=0; i<elmnts.length; i++) {
elmnts[i].value=wartosc;
}
}

function pokaz_ukryj(warstwa,strClass)
{
 if (document.getElementById(warstwa).style.display!='block') {
 	document.getElementById(warstwa).style.display='block';
	
	zaznacz( strClass);
	
	/*document.forms.formularz1.text1.value */
	/*
	var strClass="klasa"+warstwa;
	
	var set=false;
	elmnts = getElementsByClassName(document, "input", strClass);
	for(var i=0; i<elmnts.length; i++) {
	elmnts[i].checked=true;
	}	
	*/
	
	/*
  var zmienna="tak"+warstwa;	
	
	document.forms.signup2.tak1[1].checked = true; 
	
	for(var i=1;i<10;i++) {

		document.signup2.zmienna[i].checked = 1; 
	}
	*/
 }
 else {
 	document.getElementById(warstwa).style.display='none';
	odznacz( strClass);
 }
}




function Set_Cookie_2( name, value, expires, path, domain, secure )
{
// set time, it's in milliseconds
var today = new Date();
today.setTime( today.getTime() );

/*
if the expires variable is set, make the correct
expires time, the current script below will set
it for x number of days, to make it for hours,
delete * 24, for minutes, delete * 60 * 24
*/
if ( expires )
{
expires = expires * 1000 * 60 * 60 * 24;
}
var expires_date = new Date( today.getTime() + (expires) );

document.cookie = name + "=" +escape( value ) +
( ( expires ) ? ";expires=" + expires_date.toGMTString() : "" ) +
( ( path ) ? ";path=" + path : "" ) +
( ( domain ) ? ";domain=" + domain : "" ) +
( ( secure ) ? ";secure" : "" );
}
	


// this fixes an issue with the old method, ambiguous values
// with this test document.cookie.indexOf( name + "=" );
function Get_Cookie_2( check_name ) {
	// first we'll split this cookie up into name/value pairs
	// note: document.cookie only returns name=value, not the other components
	var a_all_cookies = document.cookie.split( ';' );
	var a_temp_cookie = '';
	var cookie_name = '';
	var cookie_value = '';
	var b_cookie_found = false; // set boolean t/f default f

	for ( i = 0; i < a_all_cookies.length; i++ )
	{
		// now we'll split apart each name=value pair
		a_temp_cookie = a_all_cookies[i].split( '=' );


		// and trim left/right whitespace while we're at it
		cookie_name = a_temp_cookie[0].replace(/^\s+|\s+$/g, '');

		// if the extracted name matches passed check_name
		if ( cookie_name == check_name )
		{
			b_cookie_found = true;
			// we need to handle case where cookie has no value but exists (no = sign, that is):
			if ( a_temp_cookie.length > 1 )
			{
				cookie_value = unescape( a_temp_cookie[1].replace(/^\s+|\s+$/g, '') );
			}
			// note that in cases where cookie is initialized but no value, null is returned
			return cookie_value;
			break;
		}
		a_temp_cookie = null;
		cookie_name = '';
	}
	if ( !b_cookie_found )
	{
		return null;
	}
}
				
// this deletes the cookie when called
function Delete_Cookie_2( name, path, domain ) {
if ( Get_Cookie_2( name ) ) document.cookie = name + "=" +
( ( path ) ? ";path=" + path : "") +
( ( domain ) ? ";domain=" + domain : "" ) +
";expires=Thu, 01-Jan-1970 00:00:01 GMT";
}




function ukryj_pokaz(id) 
{
	if (document.getElementById('kat_'+id).style.display !='none')
	{
		document.getElementById('kat_'+id).style.display='none';
		document.getElementById('h1_'+id).style.backgroundImage ='url(_c/tlo_punkt_czer.gif)';
		document.getElementById('h1_a_'+id).style.backgroundImage ='url(_c/tlo_punkt_czer3a.gif)';
		Set_Cookie_2( 'kat_div', id, '', '/', '', '' );
	}
	else
	{
		document.getElementById('kat_'+id).style.display='inline';	
		document.getElementById('h1_'+id).style.backgroundImage ='url(_c/tlo_punkt_czer3.gif)';
		document.getElementById('h1_a_'+id).style.backgroundImage ='url(_c/tlo_punkt_czer3.gif)';
		Delete_Cookie_2( 'kat_div', '/', '' );
	}
}

function walidujtel(fform,fnazwa)
{
	zm = document[fform][fnazwa].value;
	str = document[fform][fnazwa].value;
	str2 = str.replace(/[^0-9+\-\.w ]/, '');
	document[fform][fnazwa].value = str2;
	if (str2 != str)
	{
		document.getElementById('telefon').style.display = 'block';
	}
	else
	{
		document.getElementById('telefon').style.display = 'none';
	}
}

function walidujfax(fform,fnazwa)
{
	zm = document[fform][fnazwa].value;
	str = document[fform][fnazwa].value;
	str2 = str.replace(/[^0-9+\-\.w ]/, '');
	document[fform][fnazwa].value = str2;
	if (str2 != str)
	{
		document.getElementById('fax').style.display = 'block';
	}
	else
	{
		document.getElementById('fax').style.display = 'none';
	}
}


function submitenter(myfield,e)
{
	var keycode;
	if (window.event) keycode = window.event.keyCode;
	else if (e) keycode = e.which;
	else return true;

	if (keycode == 13)
	   {
	   myfield.form.submit();
	   return false;
	   }
	else
	   return true;
}





					/***********************************************
					* Cool DHTML tooltip script II- &#169; Dynamic Drive DHTML code library (www.dynamicdrive.com)
					* This notice MUST stay intact for legal use
					* Visit Dynamic Drive at http://www.dynamicdrive.com/ for full source code
					***********************************************/

					var offsetfromcursorX=12 //Customize x offset of tooltip
					var offsetfromcursorY=10 //Customize y offset of tooltip

					var offsetdivfrompointerX=10 //Customize x offset of tooltip DIV relative to pointer image
					var offsetdivfrompointerY=20 //Customize y offset of tooltip DIV relative to pointer image. Tip: Set it to (height_of_pointer_image-1).

					document.write('<div id="dhtmltooltip"></div>') //write out tooltip DIV
					document.write('<img id="dhtmlpointer" src="_c/arrow2.png">') //write out pointer image

					var ie=document.all
					var ns6=document.getElementById && !document.all
					var enabletip=false
					if (ie||ns6)
					var tipobj=document.all? document.all["dhtmltooltip"] : document.getElementById? document.getElementById("dhtmltooltip") : ""

					var pointerobj=document.all? document.all["dhtmlpointer"] : document.getElementById? document.getElementById("dhtmlpointer") : ""

					function ietruebody(){
					return (document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body
					}

					function ddrivetip(thetext, thewidth, thecolor){
					if (ns6||ie){
					if (typeof thewidth!="undefined") tipobj.style.width=thewidth+"px"
					if (typeof thecolor!="undefined" && thecolor!="") tipobj.style.backgroundColor=thecolor
					tipobj.innerHTML=thetext
					enabletip=true
					return false
					}
					}

					function positiontip(e){
					if (enabletip){
					var nondefaultpos=false
					var curX=(ns6)?e.pageX : event.clientX+ietruebody().scrollLeft;
					var curY=(ns6)?e.pageY : event.clientY+ietruebody().scrollTop;
					//Find out how close the mouse is to the corner of the window
					var winwidth=ie&&!window.opera? ietruebody().clientWidth : window.innerWidth-20
					var winheight=ie&&!window.opera? ietruebody().clientHeight : window.innerHeight-20

					var rightedge=ie&&!window.opera? winwidth-event.clientX-offsetfromcursorX : winwidth-e.clientX-offsetfromcursorX
					var bottomedge=ie&&!window.opera? winheight-event.clientY-offsetfromcursorY : winheight-e.clientY-offsetfromcursorY

					var leftedge=(offsetfromcursorX<0)? offsetfromcursorX*(-1) : -1000

					//if the horizontal distance isn't enough to accomodate the width of the context menu
					if (rightedge<tipobj.offsetWidth){
					//move the horizontal position of the menu to the left by it's width
					tipobj.style.left=curX-tipobj.offsetWidth+"px"
					nondefaultpos=true
					}
					else if (curX<leftedge)
					tipobj.style.left="5px"
					else{
					//position the horizontal position of the menu where the mouse is positioned
					tipobj.style.left=curX+offsetfromcursorX-offsetdivfrompointerX+"px"
					pointerobj.style.left=curX+offsetfromcursorX+"px"
					}

					//same concept with the vertical position
					if (bottomedge<tipobj.offsetHeight){
					tipobj.style.top=curY-tipobj.offsetHeight-offsetfromcursorY+"px"
					nondefaultpos=true
					}
					else{
					tipobj.style.top=curY+offsetfromcursorY+offsetdivfrompointerY+"px"
					pointerobj.style.top=curY+offsetfromcursorY+"px"
					}
					tipobj.style.visibility="visible"
					if (!nondefaultpos)
					pointerobj.style.visibility="visible"
					else
					pointerobj.style.visibility="hidden"
					}
					}

					function hideddrivetip(){
					if (ns6||ie){
					enabletip=false
					tipobj.style.visibility="hidden"
					pointerobj.style.visibility="hidden"
					tipobj.style.left="-1000px"
					tipobj.style.backgroundColor=''
					tipobj.style.width=''
					}
					}

					document.onmousemove=positiontip



