dd1=0;dd2=1;dd3=2;dd4=3;dd5=4;dd6=5;dd7=6;dd8=7;dd9=8;dd10=9;dd11=10;dd12=11;dd13=12;dd14=13;dd15=14;dd16=15;dd17=16;dd18=17;dd19=18;dd20=19;dd21=20;dd22=21;dd23=22;dd24=23;dd25=24;dd26=25;dd27=26;dd28=27;dd29=28;dd30=29;dd31=30;dd32=31;dd33=32;dd34=33;dd35=34;dd36=35;dd37=36;dd38=37;dd39=38;dd40=39;dd41=40;dd42=41;dd43=42;dd44=43;dd45=44;dd46=45;dd47=46;dd48=47;dd49=48;dd50=49;dd51=50;dd52=51;dd53=52;dd54=53;dd55=54;dd56=55;dd57=56;dd58=57;dd59=58;dd60=59;

function Druk2(){
document.write ("<BR><center><table border=\"3\" cellspacing=\"0\" bordercolor=\"#FDE492\" width=\"480\"  bgcolor=\"#FFFFFF\"><tr><td width=\"100%\"><P ALIGN=\"CENTER\"><BR><table border=\"0\" cellspacing=\"0\" bordercolor=\"#FFFFFF\" width=\"96%\"height=\"47\" bgcolor=\"#FDE492\"><tr><td width=\"100%\"><p class=\"MIN12KAT\"  align=\"center\">");
}

function Druk1() {
document.write ("&nbsp;<center><table border=\"3\" cellspacing=\"0\" bordercolor=\"#FDE492\" width=\"532\"  bgcolor=\"#FFFFFF\"><tr><td width=\"100%\"><SPAN CLASS=MIN8BP2>");
}

function Druk3() {
document.write ("</SPAN><CENTER><table border=\"2\" cellspacing=\"0\" bordercolor=\"#FFFFFF\" width=\"98%\"height=\"50\" bgcolor=\"#FDE492\"><tr><td width=\"100%\"><p class=\"MIN12KAT\"  align=\"center\" >");
}

function MM_displayStatusMsg(msgStr) { //v1.0
  status=msgStr;
  document.MM_returnValue = true;
}
function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}


DayName = new Array(7)
DayName[0] = "niedziela "
DayName[1] = "poniedziałek "
DayName[2] = "wtorek "
DayName[3] = "środa "
DayName[4] = "czwartek "
DayName[5] = "piątek "
DayName[6] = "sobota "

MonthName = new Array(12)
MonthName[0] = "stycznia "
MonthName[1] = "lutego "
MonthName[2] = "marca "
MonthName[3] = "kwietnia "
MonthName[4] = "maja "
MonthName[5] = "czerwca "
MonthName[6] = "lipca "
MonthName[7] = "sierpnia "
MonthName[8] = "września "
MonthName[9] = "października "
MonthName[10] = "listopada "
MonthName[11] = "grudnia "

function getDateStr(){
    var Today = new Date()
    var WeekDay = Today.getDay()
    var Month = Today.getMonth()
    var Day = Today.getDate()
    var Year = Today.getYear()

      if(Year <= 124)
        Year += 1900

    return DayName[WeekDay] +  " " + Day + " " + MonthName[Month] + " " + Year
}

function Druk2(){
document.write ("<BR><center><table border=\"3\" cellspacing=\"0\" bordercolor=\"#FDE492\" width=\"480\"  bgcolor=\"#FFFFFF\"><tr><td width=\"100%\"><P ALIGN=\"CENTER\"><BR><table border=\"0\" cellspacing=\"0\" bordercolor=\"#FFFFFF\" width=\"96%\"height=\"47\" bgcolor=\"#FDE492\"><tr><td width=\"100%\"><p class=\"MIN12KAT\"  align=\"center\">");
}


function Druk1() {
document.write ("&nbsp;<center><table border=\"3\" cellspacing=\"0\" bordercolor=\"#FDE492\" width=\"532\"  bgcolor=\"#FFFFFF\"><tr><td width=\"100%\"><SPAN CLASS=MIN8BP2>");
}

function Druk3() {
document.write ("</SPAN><CENTER><table border=\"2\" cellspacing=\"0\" bordercolor=\"#FFFFFF\" width=\"98%\"height=\"50\" bgcolor=\"#FDE492\"><tr><td width=\"100%\"><p class=\"MIN12KAT\"  align=\"center\" >");
}


function MM_openBrWindow(theURL,winName,features) {
  window.open(theURL,winName,features);
}
function MM_displayStatusMsg(msgStr) {
  status=msgStr;
  document.MM_returnValue = true;
}

function ZmienListe(Tematyka, Nosnik){
	if (Nosnik==1 || Tematyka==1){
		document.Rodzaj_katalogu.elements[8].value=1;
		document.Rodzaj_katalogu.elements[7].value=1;
	}
	
	if (Nosnik==5){
		document.Rodzaj_katalogu.elements[8].value=1;
		document.Rodzaj_katalogu.elements[5].value=2;
	}
}

function ZmienListe1(Nosnik, Indeks, Tematyka){
	if (Nosnik==3 || Nosnik==1){
		document.Rodzaj_katalogu.elements[8].value=1;
		document.Rodzaj_katalogu.elements[7].value=1;
	}
	
	//if (Nosnik==2 || Indeks==2){
	//	document.Rodzaj_katalogu.elements[8].value=1;
	//}
}

function ZmienListe2(Indeks){
	if (Indeks !=2 ){
		document.Rodzaj_katalogu.elements[8].value=1;	
		document.Rodzaj_katalogu.elements[7].value=1;	
	}
}
function ZmienListe3(Indeks, Nosnik){
	if (Indeks==6){
		document.Rodzaj_katalogu.elements[5].value=2;	
	}
}



browserName = navigator.appName;
browserVer = parseInt(navigator.appVersion);

ns3up = (browserName == "Netscape" && browserVer >= 3);
ie4up = (browserName.indexOf("Microsoft") >= 0 && browserVer >= 4);

function doPic(imgName) {
if (ns3up || ie4up) {
imgOn = ("" + imgName);
document.mainpic.src = imgOn;
   }
}

function doPic1(imgName) {
if (ns3up || ie4up) {
imgOn = ("" + imgName);
document.mainpic1.src = imgOn;
   }
}


	var slideshow2_noFading = false;	// Just normal show/hide without fading ?
	var slideshow2_timeBetweenSlides = 1500;	// Amount of time between each image(1000 = 1 second)
	var slideshow2_fadingSpeed = 20;	// Speed of fading
	
	
	/* Don't change any of these values */
	var slideshow2_galleryHeigh;	// Height of galery	
	var slideshow2_galleryContainer;	// Reference to the gallery div
	var slideshow2_galleryWidth;	// Width of gallery	
	var slideshow2_slideIndex = -1;	// Index of current image shown
	var slideshow2_slideIndexNext = false;	// Index of next image shown
	var slideshow2_imageDivs = new Array();	// Array of image divs(Created dynamically)
	var slideshow2_currentOpacity = 100;	// Initial opacity
	var slideshow2_imagesInGallery = false;	// Number of images in gallery
	
	function getGalleryImageSize(imageIndex)
	{
		if(imageIndex==slideshow2_imagesInGallery){			
			showGallery();
		}else{
			var imgObj = document.getElementById('galleryImage' + imageIndex);
			var imgWidth = imgObj.width;
			var imgHeight = imgObj.height;
			if(imgWidth>50){						
				var tmpDiv = document.createElement('DIV');
				tmpDiv.id = 'galleryDiv' + imageIndex;
				tmpDiv.style.visibility = 'hidden';
				tmpDiv.className='imageInGallery';
				slideshow2_galleryContainer.appendChild(tmpDiv);
				tmpDiv.appendChild(imgObj);
				imgObj.style.left = Math.round((slideshow2_galleryWidth - imgWidth)/2)  + "px";
				imgObj.style.top = Math.round((slideshow2_galleryHeight - imgHeight)/2)  + "px";
				tmpDiv.style.visibility = 'hidden';
				slideshow2_imageDivs.push(tmpDiv);
				imageIndex++;
				getGalleryImageSize(imageIndex);
			}else{
				setTimeout('getGalleryImageSize(' + imageIndex + ')',10);
			}
		}		
	}
	
	function showGallery()
	{
		if(slideshow2_slideIndex==-1)slideshow2_slideIndex=0; else slideshow2_slideIndex++;	// Index of next image to show
		if(slideshow2_slideIndex==slideshow2_imageDivs.length)slideshow2_slideIndex=0;
		slideshow2_slideIndexNext = slideshow2_slideIndex+1;	// Index of the next next image
		if(slideshow2_slideIndexNext==slideshow2_imageDivs.length)slideshow2_slideIndexNext = 0;
		
		slideshow2_currentOpacity=100;	// Reset current opacity

		// Displaying image divs
		slideshow2_imageDivs[slideshow2_slideIndex].style.visibility = 'visible';
		if(navigator.userAgent.indexOf('Opera')<0){
			slideshow2_imageDivs[slideshow2_slideIndexNext].style.visibility = 'visible';
		}
		
		
		if(document.all){	// IE rules
			slideshow2_imageDivs[slideshow2_slideIndex].style.filter = 'alpha(opacity=100)';
			slideshow2_imageDivs[slideshow2_slideIndexNext].style.filter = 'alpha(opacity=1)';
		}else{
			slideshow2_imageDivs[slideshow2_slideIndex].style.opacity = 0.99;	// Can't use 1 and 0 because of screen flickering in FF
			slideshow2_imageDivs[slideshow2_slideIndexNext].style.opacity = 0.01;
		}		
		

		setTimeout('revealImage()',slideshow2_timeBetweenSlides);		
	}
	
	function revealImage()
	{
		if(slideshow2_noFading){
			slideshow2_imageDivs[slideshow2_slideIndex].style.visibility = 'hidden';
			showGallery();
			return;
		}
		slideshow2_currentOpacity--;
		if(document.all){
			slideshow2_imageDivs[slideshow2_slideIndex].style.filter = 'alpha(opacity='+slideshow2_currentOpacity+')';
			slideshow2_imageDivs[slideshow2_slideIndexNext].style.filter = 'alpha(opacity='+(100-slideshow2_currentOpacity)+')';
		}else{
			slideshow2_imageDivs[slideshow2_slideIndex].style.opacity = Math.max(0.01,slideshow2_currentOpacity/100);	// Can't use 1 and 0 because of screen flickering in FF
			slideshow2_imageDivs[slideshow2_slideIndexNext].style.opacity = Math.min(0.99,(1 - (slideshow2_currentOpacity/100)));
		}
		if(slideshow2_currentOpacity>0){
			setTimeout('revealImage()',slideshow2_fadingSpeed);
		}else{
			slideshow2_imageDivs[slideshow2_slideIndex].style.visibility = 'hidden';			
			showGallery();
		}
	}
	
	function initImageGallery()
	{
		slideshow2_galleryContainer = document.getElementById('imageSlideshowHolder');
		slideshow2_galleryWidth = slideshow2_galleryContainer.clientWidth;
		slideshow2_galleryHeight = slideshow2_galleryContainer.clientHeight;
		galleryImgArray = slideshow2_galleryContainer.getElementsByTagName('IMG');
		for(var no=0;no<galleryImgArray.length;no++){
			galleryImgArray[no].id = 'galleryImage' + no;
		}
		slideshow2_imagesInGallery = galleryImgArray.length;
		getGalleryImageSize(0);		
		
	}

function Active(what)
{
	what.style.backgroundColor='';
}

function NotActive(what)
{
	what.style.backgroundColor='';
}

function storeCaret(textEl)
{
	if (textEl.createTextRange) textEl.caretPos = document.selection.createRange().duplicate();
}

function emoticon(text)
{
	if (document.post.pof2.createTextRange && document.post.pof2.caretPos)
	{
		var caretPos = document.post.pof2.caretPos;
		caretPos.text = caretPos.text.charAt(caretPos.text.length - 1) == ' ' ? text + ' ' : text;
		document.post.pof2.focus();
	}
	else if (document.post.pof2.selectionStart != undefined)
	{
		document.post.pof2.value = document.post.pof2.value.substring(0, document.post.pof2.selectionStart) + text + document.post.pof2.value.substring(document.post.pof2.selectionStart);
		document.post.pof2.focus();
	}
	else
	{
		document.post.pof2.value += text;
		document.post.pof2.focus();
	}
}

function showtab(id) {
  elem=document.getElementById('dva'+id)
  eval('stan=dd'+id)
  if (stan==id-1) {
    elem.style.display='';
  } else {
    elem.style.display='none';
  }
  eval('dd'+id+'=1-stan');
}
















