<!--
var punkty = "";
var def_color1 = "menupoz";
var act_color1 = "menupoz2";
var def_color = "menu";
var act_color = "menu2";
var wysokosc_menu_level_1 = 29;
var przesuniecie_level_1 = -1;

var last;
var last_aid='';
var obji = new Array(5);
var objj = new Array(5);

var mTimer = null;

var ji = 1;
function insertSwf(plik, width, height){
 rnd = width+height+ji;
 ji++;
 document.write('<div id="f'+rnd+'" style="width:'+width+';height:'+height+'px"></div>');
 
 document.getElementById('f'+rnd).innerHTML = (
     '<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0" WIDTH="' + width + '" HEIGHT="' + height + '"><PARAM NAME=movie VALUE="' + plik + '"><PARAM NAME=quality VALUE=high><PARAM NAME=wmode VALUE=opaque><PARAM NAME=bgcolor VALUE=#FFFFFF><EMBED src="' + plik + '" quality=high wmode="opaque" bgcolor=#FFFFFF WIDTH="' + width + '" HEIGHT="'
         + height
         + '" TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash"></EMBED></OBJECT>');
 
}

function showOpis( s ){
    var oid = 'w'+s.options[s.selectedIndex].value;
    hideall();
    if( document.getElementById(oid) )
      linkuj(oid);

}

function checkAForm(){
	if( document.a.NAME.value == '' ){
		alert("Wypełnij pole 'Imię'");
		document.a.NAME.focus();
		return false;
	}
	if( document.a.SURNAME.value == '' ){
		alert("Wypełnij pole 'Nazwisko'");
		document.a.SURNAME.focus();
		return false;
	}
	if( document.a.EMAIL.value == '' ){
		alert("Wypełnij pole 'Email'");
		document.a.EMAIL.focus();
		return false;
	}
	if( document.a.ORDERDESCRIPTION.value == '' ){
		alert("Wypełnij pole 'Przedmiot wpłaty'");
		document.a.ORDERDESCRIPTION.focus();
		return false;
	}
	document.a.AMOUNT.value = document.a.AMOUNT.value.replace(/,/, '.');
	if( document.a.AMOUNT.value.match(/[^\.0-9]/) ){
		alert("Niedozwolone znaki w kwocie");
		document.a.AMOUNT.focus();
		return false;
	}
	if( document.a.AMOUNT.value == '' ){
		alert("Wypełnij pole 'Kwota'");
		document.a.AMOUNT.focus();
		return false;
	}
	document.a.pok.value = 123;
	return true;
}

function setTimer(){
     clearTimeout(mTimer);
     mTimer = setTimeout("hideT()" , 60000 );
}

function setFastTimer(){
     clearTimeout(mTimer);
     mTimer = setTimeout("hideT()" , 500 );
}

function seth(objs, c, id, h){
	if( objs ){
	   act = objs.id;
	   if( punkty && last_aid){	
				for(i=0;i<punkty.length;i++){
					if( punkty[i] ){
						if( ('a'+punkty[i][4]) == last_aid)
						   unSelectPunkt(i, 1);
					}
				}
				last_aid = '';
		}  
	  if( punkty ){	
			for(i=0;i<punkty.length;i++){
				if( punkty[i] ){
					if( ('tda'+punkty[i][3]) == act)
					   selectPunkt(i, 1);
				}
			}
	  }
      if( h == 0 && id == 0)
         hide_last();
      set(objs, c, id, h);
	}
}

function set(objs, c, id, h){
   setTimer();
   if( obji[c] != null && obji[c].className != def_color && obji[c].getAttribute('rel') != "sel" )
     unset(obji[c], c);
   obji[c] = objs;
   objs.className = act_color;

   if( id != null && h > 10 ){
       obji[c] = null;
       show(id, h);     
   }

   setTimer();
}

function unset(obju, c){
   act = "";
   if( obju )
   	act = obju.id;
   if( punkty && act ){	
			for(i=0;i<punkty.length;i++){
				if( punkty[i] ){
					if( ('tda'+punkty[i][3]) == act)
					   unSelectPunkt(i, 1);
				}
			}
	}
   setFastTimer();
   if( obji[c] != null && obji[c].getAttribute('rel') != "sel" )
      obji[c].className = def_color;
   obji[c] = obju;
}

function setp(c, id, h, mode, setpkt){
   if( punkty && last_aid){	
			for(i=0;i<punkty.length;i++){
				if( punkty[i] ){
					if( ('a'+punkty[i][4]) == last_aid)
					   unSelectPunkt(i, 1);
				}
			}
			last_aid = '';
	}  
    last_aid = id;

	if( punkty ){	
			for(i=0;i<punkty.length;i++){
				if( punkty[i] ){
					if( ('a'+punkty[i][4]) == id)
					   selectPunkt(i, 1);
				}
			}
	}
		
  setTimer();
  for (var i = 0;i<obji.length;i++)
  {
    if( obji[i] != null && obji[i].getAttribute('rel') != "sel")
      obji[i].className = def_color;
  }

  show(id, h, mode);

  if( objj[c] != null ){
     if( document.getElementById(objj[c]) && document.getElementById(objj[c]).getAttribute('rel') != "sel" ){
     document.getElementById(objj[c]).className = def_color1;
	 if( document.getElementById('h'+objj[c]) && document.getElementById(objj[c]).getAttribute('rel') != "sel" )
     document.getElementById('h'+objj[c]).className = def_color1;
     }
  }
  if( document.getElementById(id) )
  	document.getElementById(id).className = act_color1;
  if( document.getElementById('h'+id) )
  document.getElementById('h'+id).className = act_color1;
  objj[c] = id;
}

function unsetp(id, c){
  hide();
  
  if( objj[c] != null ){
	 if( document.getElementById(objj[c]) && document.getElementById(objj[c]).getAttribute('rel') != "sel" ){
     document.getElementById(objj[c]).className = def_color1;
	 } 
     if ( document.getElementById('h'+objj[c]) && document.getElementById(objj[c]).getAttribute('rel') != "sel" ){
     document.getElementById('h'+objj[c]).className = def_color1;
	 }
  }
  if( document.getElementById(id) )
  document.getElementById(id).className = act_color1;
  if( document.getElementById('h'+id) )
  document.getElementById('h'+id).className = act_color1;
  objj[c] = id;
}

function show(id, h, mode){ 
   obj = "";
   if( id ){
   	 divmenu = 'm'+id;
  	 obj = document.getElementById(divmenu);
   }
   if( obj ){   
   if( h > 10 ) {
     pos = getAnchorPosition(id);
	 if( document.getElementById('ma'+h) && document.getElementById('ma'+h).clientWidth > 0 )
		ww = document.getElementById('ma'+h).clientWidth;
	 else if( document.getElementById('ma'+h) && document.getElementById('ma'+h).offsetWidth )
		ww = document.getElementById('ma'+h).clientWidth;
     document.getElementById(divmenu).style.left = parseFloat(parseFloat(document.getElementById('ma'+h).style.left) + parseFloat(ww)+1)+'px'; 
     document.getElementById(divmenu).style.top = parseFloat(parseFloat(pos.y) - 7)+'px';
     hide_last();
     last = document.getElementById(divmenu);
   } else {
     pos = getAnchorPosition(id);
     if( mode=='center' ){
     	document.getElementById(divmenu).style.display='block';
     	document.getElementById(divmenu).style.left= parseFloat(pos.x+przesuniecie_level_1-(document.getElementById(divmenu).clientWidth/2)+(document.getElementById(id).clientWidth/2)+1)+'px';
     } else if( mode=='right' ){
     	document.getElementById(divmenu).style.display='block';
     	document.getElementById(divmenu).style.left= parseFloat(pos.x+przesuniecie_level_1-document.getElementById(divmenu).clientWidth+document.getElementById(id).clientWidth+1)+'px';
     } else
     	document.getElementById(divmenu).style.left= parseFloat(pos.x+przesuniecie_level_1)+'px';
     
     document.getElementById(divmenu).style.top= parseFloat(pos.y+wysokosc_menu_level_1)+'px';
   }
   }
   if( h == 0 ) { 
   		hide(); 
   }
   if( obj )
   	document.getElementById(divmenu).style.display='block';  
   setTimer();
}

function hide_last(){
  if( last ){
    last.style.display='none'; 
  }
}
function hideT(){
   if( punkty && last_aid){	
			for(i=0;i<punkty.length;i++){
				if( punkty[i] ){
					if( ('a'+punkty[i][4]) == last_aid)
					   unSelectPunkt(i, 1);
				}
			}
			last_aid = '';
	}  	
	hide();
}
function hide() {
  for (var i = 0;i<objj.length;i++)
  {
  	 if( objj[i] != null && document.getElementById(objj[i]) && document.getElementById(objj[i]).getAttribute('rel') != "sel"){
     	document.getElementById(objj[i]).className = def_color1;
     }
     if(objj[i] && document.getElementById('h'+objj[i]) && document.getElementById(objj[i]).getAttribute('rel') != "sel")
     	document.getElementById('h'+objj[i]).className = def_color1;
  }
 
     var Nodes = document.getElementsByTagName('div');
     var max = Nodes.length;
     for(var i=0;i<max;i++) {
                 var nodeObj = Nodes.item(i);                                
                 if(nodeObj.id.indexOf('ma')!=-1 ) {
                    nodeObj.style.display = 'none';                                
                 }
     }
}    

function czysc(o){
  for (var i=0; i<o.length;i++) {
      if( o[i].type!= 'hidden' && o[i].type!= 'submit' && o[i].type!= 'button'){
        o[i].value = "";
      }
  }
}

function go(url){
  document.location.href = url;
}

function go_form(f, url){
   f.action = url;
   f.submit();
}

function selecturl(s) {
	var gourl = s.options[s.selectedIndex].value;	document.location.href = gourl;
}

function otworz( host, url, tytul, szer, wys, extra_foto ){
    if (parseInt(szer) > 800 || parseInt(wys) > 800){
        NoweOkienko=window.open(host+'/'+url, tytul);
    } else{
		if( extra_foto )
			wys = parseInt(wys)+50;
		if( parseInt(szer) < 150 )
			szer = 350;

        config='left=100,top=100,width='+szer+',height='+wys+',innerheight='+wys+',innerwidth='+szer+',toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no';
        NoweOkienko=window.open('', tytul, config);
        NoweOkienko.document.open();
        NoweOkienko.document.write('<HTML>');
        NoweOkienko.document.write('<HEAD>');
        NoweOkienko.document.write('<TITLE>'+tytul+'</TITLE>');
        NoweOkienko.document.write('</HEAD>');
        NoweOkienko.document.write('<body style="padding: 0px; margin: 0px;" bgcolor="#ffffff">');
        if( extra_foto )
			NoweOkienko.document.write('<table height="50" cellpadding="0" cellspacing="0" width="100%"><tr><td><img src="'+host+'/logo.gif"></td><td align="right"><img src="'+host+'/'+extra_foto+'"></td></tr></table>');
        NoweOkienko.document.write('<div align="center"><A HREF=# onclick="javascript:self.close();"><IMG SRC="'+host+'/'+url+'" BORDER=0 ALT="Zamknij"></A></div>');
        NoweOkienko.document.write('</BODY>');
        NoweOkienko.document.write('</HTML>');
        NoweOkienko.document.close();
        NoweOkienko.focus();
    }
}
function otworz_url( url, szer, wys, scroll ){
	if( !scroll )
		scroll = "no";
    config='left=100,top=100,width='+szer+',height='+wys+',innerheight='+wys+',innerwidth='+szer+',toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars='+scroll+',resizable=yes';
    NoweOkienko=window.open(url, '', config);
}

function getAnchorPosition(anchorname) {
	// This function will return an Object with x and y properties
	var useWindow=false;
	var coordinates=new Object();
	var x=0,y=0;
	// Browser capability sniffing
	var use_gebi=false, use_css=false, use_layers=false;
	if (document.getElementById) { use_gebi=true; }
	else if (document.all) { use_css=true; }
	else if (document.layers) { use_layers=true; }
	// Logic to find position
 	if (use_gebi && document.all) {
		x=AnchorPosition_getPageOffsetLeft(document.all[anchorname]);
		y=AnchorPosition_getPageOffsetTop(document.all[anchorname]);
		}
	else if (use_gebi) {
		var o=document.getElementById(anchorname);
		x=AnchorPosition_getPageOffsetLeft(o);
		y=AnchorPosition_getPageOffsetTop(o);
		}
 	else if (use_css) {
		x=AnchorPosition_getPageOffsetLeft(document.all[anchorname]);
		y=AnchorPosition_getPageOffsetTop(document.all[anchorname]);
		}
	else if (use_layers) {
		var found=0;
		for (var i=0; i<document.anchors.length; i++) {
			if (document.anchors[i].name==anchorname) { found=1; break; }
			}
		if (found==0) {
			coordinates.x=0; coordinates.y=0; return coordinates;
			}
		x=document.anchors[i].x;
		y=document.anchors[i].y;
		}
	else {
		coordinates.x=0; coordinates.y=0; return coordinates;
		}
	coordinates.x=x;
	coordinates.y=y;
	return coordinates;
	}

// getAnchorWindowPosition(anchorname)
//   This function returns an object having .x and .y properties which are the coordinates
//   of the named anchor, relative to the window
function getAnchorWindowPosition(anchorname) {
	var coordinates=getAnchorPosition(anchorname);
	var x=0;
	var y=0;
	if (document.getElementById) {
		if (isNaN(window.screenX)) {
			x=coordinates.x-document.body.scrollLeft+window.screenLeft;
			y=coordinates.y-document.body.scrollTop+window.screenTop;
			}
		else {
			x=coordinates.x+window.screenX+(window.outerWidth-window.innerWidth)-window.pageXOffset;
			y=coordinates.y+window.screenY+(window.outerHeight-24-window.innerHeight)-window.pageYOffset;
			}
		}
	else if (document.all) {
		x=coordinates.x-document.body.scrollLeft+window.screenLeft;
		y=coordinates.y-document.body.scrollTop+window.screenTop;
		}
	else if (document.layers) {
		x=coordinates.x+window.screenX+(window.outerWidth-window.innerWidth)-window.pageXOffset;
		y=coordinates.y+window.screenY+(window.outerHeight-24-window.innerHeight)-window.pageYOffset;
		}
	coordinates.x=x;
	coordinates.y=y;
	return coordinates;
	}

// Functions for IE to get position of an object
function AnchorPosition_getPageOffsetLeft (el) {
	var ol=el.offsetLeft;
	while ((el=el.offsetParent) != null) { ol += el.offsetLeft; }
	return ol;
	}
function AnchorPosition_getWindowOffsetLeft (el) {
	return AnchorPosition_getPageOffsetLeft(el)-document.body.scrollLeft;
	}	
function AnchorPosition_getPageOffsetTop (el) {
	var ot=el.offsetTop;
	while((el=el.offsetParent) != null) { ot += el.offsetTop; }
	return ot;
	}
function AnchorPosition_getWindowOffsetTop (el) {
	return AnchorPosition_getPageOffsetTop(el)-document.body.scrollTop;
	}

function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);

function sortp(s, k){
    var gourl = s.options[s.selectedIndex].value;
	if( k )
    	document.location.href= k+"&sort="+gourl;
	else
    	document.location.href= "?sort="+gourl;
}

function getcheck(a, b){
   if( a.checked )
     hideall("block", b);
   else
     hideall("none", b);
}

function hideall(all, b) {
                        var Nodes = document.getElementsByTagName('table')
                        var max = Nodes.length
                        for(var i=0;i<max;i++) {
                                var nodeObj = Nodes.item(i);                                
                                if(nodeObj.id.indexOf(b)!=-1) {
                                   nodeObj.style.display = all;                                
                                }
                        }
}       
function hideallt(all, ids, tag) {
                        var Nodes = document.getElementsByTagName(tag)
                        var max = Nodes.length
                        for(var i=0;i<max;i++) {
                                var nodeObj = Nodes.item(i);                                
                                if(nodeObj.id.indexOf(ids)!=-1) {
                                   nodeObj.style.display = all;                                
                                }
                        }
}

function zaplataSelect(){
	document.zamow.action = location.href+"&nc=1";
	document.zamow.submit();
}

function mailer(pre, dom, c){
	document.write("<a href='mailto:"+pre+"@"+dom+"' "+c+">"+pre+"@"+dom+"</a>");
}

function init_lay(){
		move =1;
		document.getElementById('layer').style.position = "absolute";
		document.getElementById('layer2').style.position = "absolute";
}
var alerted =0;
function floatMail(id) {

var nn = (navigator.appName.indexOf("Netscape") != -1);
var dD = document, dH = dD.html, dB = dD.body, px = dD.layers ? '' : 'px';
x = document.getElementById('layer');

    

if( !document.all )
  iY = innerHeight - x.offsetHeight;
else if( x.clientHeight > 0 ){
  iY = document.body.offsetHeight - x.clientHeight;
} else
  iY = 0;

  var L = dD.getElementById ? dD.getElementById(id) : dD.all ? dD.all[id] : dD.layers[id];
  this[id + 'O'] = L;

  if (dD.layers) L.style = L;

  L.iY = iY;
  L.nY = 7;
  L.P = function(y) {
		if( move )
		    this.style.top = y + px;
  };
  
  
  L.Fm = function() {
    var pY;
    pY = (nn ? window.pageYOffset : (nn && dH.scrollTop ? dH.scrollTop :  (document.documentElement.scrollTop ? document.documentElement.scrollTop : dB.scrollTop)));

    this.nY += 0.1 * (pY + 7 - this.nY);

	if( this.nY > document.body.scrollHeight - (dB.clientHeight - iY) - 7 )
		 this.nY = document.body.scrollHeight - (dB.clientHeight - iY) - 7;

	if( this.nY < 0 )
		 this.nY = 0;
		 
    this.P(this.nY);
    setTimeout(this.id + 'O.Fm()', 30);
  };

  return L;
}

			function browserDetect() {
			  this.getById = document.getElementById ? true : false;
			  this.layers = document.layers ? true : false;
			  this.ns4 = ((this.layers) && (!this.getById));
			  this.ns6 = ((navigator.userAgent.indexOf('Netscape6') != -1) && (this.getById));
			  this.moz = ((navigator.appName.indexOf('Netscape') != -1) && (this.getById) && (!this.ns6));
			  this.ie = ((!this.layers) && (this.getById) && (!(this.ns6 || this.moz)));
			  this.opera = window.opera ? true : false;
			}
			var type = new browserDetect();
			

  function sprawdzDate(par){
    mth = document.main_finder.month
    month = mth.options[mth.selectedIndex].value;
    
    mth2 = document.main_finder.month_to;
    month_to = mth2.options[mth2.selectedIndex].value;

	if( parseFloat(month) < act_month )
		month_2 = parseFloat(month) + 12;
	else
		month_2 = parseFloat(month);
	if( parseFloat(month_to) < act_month )
		month_to_2 = parseFloat(month_to) + 12;
	else
		month_to_2 = parseFloat(month_to);

    if( par == 1 ){
		if( month_to == act_month ){ 
			for(i=0;i<mth2.options.length;i++){
			if( mth.options[i].value == act_month){
			    mth.options[i].selected = true;
			}
		    }
		} else if( month_to_2 < month_2 ){
		    for(i=0;i<mth2.options.length;i++){
			if( mth.options[i].value == month_to){
			    j = i;
			    j--;
			    if( j == -1 )
			        j = 11;
			    mth.options[j].selected = true;
			}
		    }
		}
    } else {
		if( parseFloat(month) == parseFloat(act_month) - 1 ){ 
			for(i=0;i<mth2.options.length;i++){
			if( mth2.options[i].value == month){
			    mth2.options[i].selected = true;
			}
		    }
		} else if( month_to_2 <  month_2 ){
			for(i=0;i<mth2.options.length;i++){
			    if( mth2.options[i].value == month ){
				i++;
				j = i;
				if( j>11 )
				    j = 0;
				mth2.options[j].selected = true;
			    }
			}
	    }
	}  
  }
  
  
function artykol(url){
    config='left=100,top=100,width=400,height=220,innerheight=220,innerwidth=400,toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=yes';
    NoweOkienko=window.open('/artykol.php?file='+url, '', config);
    
}  


if (window != top) 
	top.location.href = 'http://www.dive-away.pl';


// -->  

