// 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=250,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>Pobieram dane...</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=666666 scroll="no" onload="reSizeToImage();doTitle();self.focus()">')
else writeln('</head><body bgcolor=666666 scroll="no" onload="reSizeToImage();doTitle();self.focus()" onblur="self.close()">');
writeln('<img name="George" src='+imageURL+' style="display:block"></body></html>');
close();		
}}



<!-- This script and many more are available free online at -->
<!-- The JavaScript Source!! http://javascript.internet.com -->
<!-- Original:  ScriptBreaker (admin@scriptbreaker.com) -->
<!-- Web Site:  http://www.ScriptBreaker.com -->
<!-- Begin
function locktrueie(myform){myform.ie.checked=true;}
function lockfalsenet(myform){myform.nets.checked=true;}
function goToURL() { window.location = "http://www.javascriptsource.com"; }

function nochange(mycheckbox)
{
   if (mycheckbox.checked == true){mycheckbox.checked = false;}else{mycheckbox.checked = true;}
}

//  End -->

function fadeImg2(teller)
{
 apl[teller][1] = "Up";
 changes();
}

function fadeImgend2(teller)
{
 apl[teller][1] = "Down";
 setTimeout("changes()",50);
}

function changes()
{
 next_loop = true;
 for (i=0;i<apl.length;i++)
 {
  obj = link_table.rows[i].cells[0];
  opacity = apl[i][0]
  if (apl[i][1] == "Up")
  {
     opacity += nPlus;
     apl[i][0] = opacity;
     if (apl[i][0] > 105) 
      {apl[i][1] = "";}
     else
     {next_loop = false;}
	 nOpac = opacity;
  }
  else
  {
  if (apl[i][1] == "Down")
  {
     opacity -= nMin;
     apl[i][0] = opacity;
     if (apl[i][0] < 45) 
      {apl[i][1] = "";}
     else
     {next_loop = false;}
	 nOpac = opacity;
  }
  }
  if(ie5){ 
	obj.style.filter="alpha(opacity="+opacity+")";
    }
  if(ns6){ 
   	obj.style.MozOpacity = opacity + '%';
   }
 }
 if (next_loop == false)
  {
   timer = setTimeout("changes()",speed);
  }
  else
  {
   clearTimeout(timer);
  }
}



function check_form() {
	try
	{
			var error = 0;
			var error_message = "Popraw dane w formularzu\n\n";
			var realname = document.f.realname.value;
			var street = document.f.street.value;
			var code = document.f.code.value;
			var post_office = document.f.post_office.value;
			var s = document.f.s.value;
			var e = document.f.e.value;
			var chow_bydla_miesnego = document.f.chow_bydla_miesnego.value;  
			var chow_bydla_mlecznego = document.f.chow_bydla_mlecznego.value;
			var technika_i_zasady_w_zywieniu_swin = document.f.technika_i_zasady_w_zywieniu_swin.value;
			var content = document.f.content.value;
			

			if (!realname) {
				error_message = error_message + "* Podaj imię i nazwisko.\n";
				error = 1;
			}
		  	
			
			
			if (!street) {
				error_message = error_message + "* Podaj ulicę i numer.\n";
				error = 1;
			}

			if ((!code) || (!post_office)) {
				error_message = error_message + "* Podaj kod i pocztę.\n";
				error = 1;
			}
			
			if (s)
			{
				if ((isNaN(parseInt(s))) || (s<1) || (s>12) ) {
					error_message = error_message + "* Rozpoczęcie prenumeraty ( tylko liczby od 1 do 12 )  \n";
					error = 1;
				}
			}
			if (e)
			{
				if ((isNaN(parseInt(e))) || (e<1) || (e>12) ) {
					error_message = error_message + "* Zakończenie prenumeraty ( tylko liczby od 1 do 12 )  \n";
					error = 1;
				}
			}
			
			if((s == "") || (e == ""))
			{
				error_message = error_message + "* Wypełnij prawidłowo okres prenumeraty  \n";
				error = 1;
			}
			
			/*
			if( s != "" && e != "") 
			{
				if( s > e )
				{
					error_message = error_message + "* Rozpoczęcie prenumeraty większe niż zakończenie  \n";
					error = 1;
				}
			}
			*/
			/*
			if (((s) && (!e)) || ((e) && (!s)) || (s > e)) {
				error_message = error_message + "* Wypełnij prawidłowo okres prenumeraty  \n";
					error = 1;
			
			}
			*/
			
			if ( (chow_bydla_miesnego) && (isNaN(parseInt(chow_bydla_miesnego))) ) {
				error_message = error_message + "* Podaj prawidłowo liczbę egemplarzy \n";
				error = 1;
			}
			if ( (chow_bydla_mlecznego) && (isNaN(parseInt(chow_bydla_mlecznego))) ) {
				error_message = error_message + "* Podaj prawidłowo liczbę egemplarzy \n";
				error = 1;
			}
			if ( (technika_i_zasady_w_zywieniu_swin) && (isNaN(parseInt(technika_i_zasady_w_zywieniu_swin))) ) {
				error_message = error_message + "* Podaj prawidłowo liczbę egemplarzy \n";
				error = 1;
			}

			
											
			if (error == 1) {
				alert(error_message);
				return false;
			}
			else {
				return true;
			}
	}
	catch(err)
	{			
	
		return false;
		
	}
}

function openWindow(url, width, height, slide, foot) {
    if (!slide) slide = 'no';
    if (!foot) foot = 'no';
    var left = (screen.width-width)/2;
    var top = (screen.height-height)/2 - 35;
    window.open(url,"okno",'width='+ width +',height='+ height +',resizable=yes,scrollbars='+ slide + ',menubar=no,status='+foot+',top='+top+',left='+left+'');
}

function zoom(url) {
    window.open(url,'ImageWindow','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=yes,copyhistory=no,width=100,height=100,screenX=150,screenY=150,top=150,left=150')
}



