function jsFlash(plik ,width ,height ,bgcolor ,wersja ,align ,FlashVars){
document.write('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version='+wersja+',0,0,0" width="'+width+'" height="'+height+'" id="'+plik+'" align="'+align+'">');
document.write('<param name="allowScriptAccess" value="sameDomain" />');
document.write('<param name="movie" value="'+plik+'" />');
document.write('<param name="menu" value="false" />');
document.write('<param name="FlashVars" value="'+FlashVars+'"/>');
document.write('<param name="quality" value="high" />');
	if (bgcolor!=''){
	    document.write('<param name="bgcolor" value="'+bgcolor+'" />');
	}else{
	    document.write('<param name="wmode" value="transparent" />');
	}
		document.write('<embed src="'+plik+'" quality="high" ');
	if (bgcolor!=''){
		document.write('bgcolor="'+bgcolor+'"');
	}else{
		document.write('wmode="transparent"');
	}
document.write(' width="'+width+'" height="'+height+'" FlashVars="'+FlashVars+'" name="'+plik+'" align="'+align+'" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />');
document.write('</object>');
}

function MM_swapImgRestore() { //v3.0

  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;

}



function MM_preloadImages() { //v3.0

  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();

    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)

    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}

}



function MM_findObj(n, d) { //v4.0

  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {

    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}

  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];

  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);

  if(!x && document.getElementById) x=document.getElementById(n); return x;

}



function MM_swapImage() { //v3.0

  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)

   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}

}



function MM_showHideLayers() { //v3.0

  var i,p,v,obj,args=MM_showHideLayers.arguments;

  for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2];

    if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v='hide')?'hidden':v; }

    obj.visibility=v; }

}

function hideMenu(name) {
	styl = document.getElementById(name).className;
	if ( styl == 'hide' ) {
    	document.getElementById(name).className='';
	} else {
		document.getElementById(name).className='hide';
	}

}


function isDigit (c)
{
var re = new RegExp("[0-9]","gi");
return (numer=c.replace(re,""))
}

function checkPhone(t){
switch(t.length) 
{
 case 10: 
 	  	   var c1 = t.charAt(0)+t.charAt(1);
		   var c2 = t.charAt(2)+t.charAt(3)
		   var c = c1 +c2;
		   if ((c=='0700')||(c=='0800')||(c1=='00')){
		   alert('Błędnie podałeś/aś numeru telefonu\n---------------------------------------------------------\nPodaj numer telefonu wpisując numer kierunkowy oraz numer telefonu w jednym ciągu.\nNie używaj znaków - + ( )\nPrzykład 0226521367.');
		   return false;
		   }
 	  	  break; 
 case 9:  var c1 = t.charAt(0);
 	      var c2 = t.charAt(1)+t.charAt(2);
		  var c = c1 +c2;
		  if ((c=='700')||(c=='800')||(c1=='0')){
 	  	  alert('Błędnie podałeś/aś numeru telefonu\n---------------------------------------------------------\nPodaj numer telefonu wpisując numer kierunkowy oraz numer telefonu w jednym ciągu.\nNie używaj znaków - + ( )\nPrzykład 226521367.');
    	  return false;
		  }
		  numer= '0'+t;
		  return numer;
 	  	  break; 
 case 7:  var c1 = t.charAt(0);
		  if (c1=='0'){
 	  	  alert('Błędnie podałeś/aś numeru telefonu\n---------------------------------------------------------\nPodaj numer telefonu wpisując numer kierunkowy oraz numer telefonu w jednym ciągu.\nNie używaj znaków - + ( )\nPrzykład 6521367.');
    	  return false;
		  }
 	  	  break;
 default: alert('Za krótki  numeru telefonu\n---------------------------------------------------------\nPodaj numer telefonu wpisując numer kierunkowy oraz numer telefonu w jednym ciągu.\nNie używaj znaków - + ( )\nPrzykład 0226521367.') 
 return false; //gdyby żaden warunek nie został spełniony
}
return true;
}



function sprawdz(f){
if (f.imie_nazwisko.value=='') {
	alert('Nie podałeś/aś swojego imienia, nazwiska');
	return false;
}
if (f.telefon1.value+f.telefon2.value==''){
	alert('Nie podałeś/aś numeru telefonu\n---------------------------------------------------------\nPodaj numer telefonu wpisując numer kierunkowy oraz numer telefonu w jednym ciągu.\nPrzykład 0226521367.');
	return false;
}
	else{
	if (isDigit(f.telefon1.value+f.telefon2.value)!='') {
	alert('Błędnie podałeś/aś numer telefonu. \n---------------------------------------------------------\n');
	return false;
	}
if (checkPhone(f.telefon1.value+f.telefon2.value)==false){
		return false;
	}
	}
if ( ((f.email.value.indexOf('@',1))==-1)||(f.email.value.indexOf('.',1))==-1 ){
	alert('Nie podałeś/aś lub źle wpisałeś adres email\n---------------------------------------------------------\n');
	return false;
}
if (f.dorosli.value==''){
	alert('Nie podałeś/aś liczby gości\n---------------------------------------------------------\n');
	return false;
}
else{
	if (isDigit(f.dorosli.value)!='') {
	alert('Błędnie podałeś/aś liczbę gości. \n---------------------------------------------------------\n');
	return false;
	}
}

if (f.godzina_hh.selectedIndex <= 0){
	alert('Nie podałeś/aś godziny rozpoczęcia\n---------------------------------------------------------\n');
	return false;
}


return true;
}


PositionX = 100;
PositionY = 100;
defaultWidth  = 550;
defaultHeight = 550;

// 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=auto,width=150,height=100,left='+PositionX+',top='+PositionY;
  
function pokazZdjecia(zdjecie_url){

    if (isNN){imgWin=window.open('about:blank','',optNN);}
    if (isIE){imgWin=window.open('about:blank','',optIE);}
    with (imgWin.document){
    writeln('<html><head><title>Ładowanie...</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["zdjecie"].width;');writeln('window.innerHeight=document.images["zdjecie"].height;}}');
	writeln('</sc'+'ript>');
	writeln('</head><body bgcolor=000000 scroll="no" onload="reSizeToImage();self.focus()"">');
	writeln('<img name="zdjecie" src=\"'+zdjecie_url+'\" style="display:block"></body></html>');
	close();	  
    }}


function DoAutorotationStop() {
var pt = document.getElementById("ptviewer");
    pt.stopAutoPan();
}
function DoZoomIn() {
	var pt = document.getElementById("ptviewer");
    pt.startAutoPan( 0.0, 0.0, 1/1.03 )
}

function DoZoomOut() {
	var pt = document.getElementById("ptviewer");
    pt.startAutoPan( 0.0, 0.0, 1.03 );
}
function DoAutorotationStart() {
	var pt = document.getElementById("ptviewer");
    pt.startAutoPan( 0.3, 0.0, 1.0 );
}

function checkSound()
{
if (top.fr_dzwiek) {
	
	if(parent.fr_dzwiek.location.href.search("dzwiek.php")==-1)
	{
	parent.fr_dzwiek.location.href="dzwiek.php";
	}
	else	
	{
	parent.fr_dzwiek.location.href="dzwiek0.php";
	}	
}
}
