/// Autor: Mirosław Kuduk -  mkuduk@interia.pl

function lacz(xxx)
{

if (xxx=='kontakt') { document.location.href='kontakt.php'}
else
if (xxx=='oferta') { document.location.href='index.php'}
else

if (xxx=='omnie') { document.location.href='omnie.html'}
else
if (xxx=='portfolio') { document.location.href='portfolio.html'}

}


function czyemail(co)
{
if ((co.length < 5 ) || (co.indexOf("@")<3) || (co.indexOf(" ")>-1)|| (co.indexOf(".")<1) ){ return false}
else { return true}
}
oknoRysunekAA=''
function okno1(plik1, oknow,oknoh,pozt,pozl)
{

 oknoRysunekAA = window.open(plik1, "oknoRys","scrollbars=0, status=0, resizable=1, width="+oknow+", height="+oknoh+" , Top="+pozt+", left="+pozl)
 oknoRysunekAA.resizeTo(oknow,oknoh);
 oknoRysunekAA.focus()
}
function okno2(plik1, oknow,oknoh,pozt,pozl)
{
 oknoRysunekAA = window.open(plik1, "oknoRys","scrollbars=1, status=1, resizable=1, width="+oknow+", height="+oknoh+" , Top="+pozt+", left="+pozl)
 oknoRysunekAA.resizeTo(oknow,oknoh);
 oknoRysunekAA.focus()

}

//JavaScript:oryginalnep('p1a000.php?pl1=$partykuly/a$rekord[ida].jpg&w=0&h=0&$robd','$rekord[tytul]' )
function zdjecieozam()
{
ukryjdiv('zdjecieodiv');
ukryjdiv('divtlos');
rob="<a href='JavaScript:zdjecieozam()'   title='Zamknij' ><img name='zdjecieor' border='0' ";
rob+="src='grafika/laduj.gif'   ></a> ";
document.getElementById('zdjeciezo').innerHTML=rob;
}

function fzdjecieor()
{

if (zmienpo!=0)
{
szer=document.zdjecieor1.width;
szer3=Math.floor(szer/3)
wys=document.zdjecieor1.height;

rob="<map name='FPMapzo'>"
rob+="<area href='JavaScript:dalejp(-1)'  title='$napis[14]'  shape='rect' coords='0, 0, "+szer3+","+ wys+"'>"
rob+="<area href='JavaScript:zdjecieozam()'  title='$napis[1]'  shape='rect' coords='"+szer3+", 0, "+2*szer3+","+ wys+"'>"
rob+="<area href='JavaScript:dalejp(1)'  title='$napis[15]'  shape='rect' coords='"+2*szer3+", 0, "+szer+","+wys+"'>"
rob+="</map>";
rob+="<img name='zdjecieor' border='0' src='"
 rob+=document.zdjecieor1.src+"'  usemap='#FPMapzo'>"
document.getElementById('zdjeciezo').innerHTML=rob;
}
}
/////////////
//////////////////////////////////////////


function oryginalnep(kto,napis)
{


//  tmp = new Date();
 // tmp=tmp.getTime();

  document.zdjecieor.src='grafika/laduj.gif'
  document.zdjecieor.src=kto
  document.getElementById('tytulz').innerHTML=napis
  document.getElementById('divtlos').style.width=document.body.scrollLeft+screen.width+100
  document.getElementById('divtlos').style.height=document.body.scrollTop+screen.height+1200
  document.getElementById('divtlos').style.visibility='visible'
  pokazdiv('zdjecieodiv',0,0,screen.width-100,200)

}


function oknodivp(kto)
{

 ookno.document.location.href=kto;

  document.getElementById('divtlos').style.width=document.body.scrollLeft+screen.width+100
  document.getElementById('divtlos').style.height=document.body.scrollTop+screen.height+1200
  document.getElementById('divtlos').style.visibility='visible'

 lewo=Math.floor(((screen.width)-100)/2)

  pokazdiv('oknodiv',10,lewo,100,10)

}

function rozmiaroknadivp(szerokosc,wysokosc)
{

document.getElementById('ookno').style.height=wysokosc
document.getElementById('ookno').style.width=szerokosc
szerokosc=Math.floor((screen.width-szerokosc)/2)
if(szerokosc<0){szerokosc=0}
document.getElementById('oknodiv').style.left=szerokosc

}
function zamknijoknodivp()
{
  ukryjdiv('oknodiv');
  ukryjdiv('divtlos')


}

///////
function zamknijp()
{

if (oknoRysunek)
{

oknoRysunek.close();

}
}


function pokazdiv(kto1,top1,left1,width1,height1)
{
//dialog1
///<a href="JavaScript:pokazdiv('dialog1',0,0,screen.width,screen.height)">tutaj</a>
// document.getElementById(kto1).style.width=screen.width
// document.getElementById(kto1).style.height=screen.height
 document.getElementById(kto1).style.width=width1
 document.getElementById(kto1).style.height=height1

 document.getElementById(kto1).style.top=document.body.scrollTop+top1;
 document.getElementById(kto1).style.left=document.body.scrollLeft+left1;
 document.getElementById(kto1).style.visibility='visible'
}

function ukryjdiv(kto1)
{
 document.getElementById(kto1).style.visibility='hidden'
 document.zdjecieor.src='grafika/laduj.gif';
}

/////////
