/*
 *  Wykrywanie przegladarki
 *  @date 4. września 2007, 18:35:19
 *  @author lukasz@szakul.net
 */

var browser = {
  ie: false,
  mozilla: false,
  opera: false,
  safari: false,
  konqueror: false,
  
  detect: function() {
    if (navigator.userAgent.indexOf('Opera') > -1) { browser.opera = true; }
    if (navigator.userAgent.indexOf('AppleWebKit') > -1) { browser.safari = true; }
    if (navigator.userAgent.indexOf('Konqueror') > -1) { browser.konqueror = true; }
    if (navigator.userAgent.indexOf('compatible') > -1 && navigator.userAgent.indexOf('MSIE') > -1 && !browser.opera) { browser.ie = true; }
    if (navigator.userAgent.indexOf('Gecko') > -1 && !browser.konqueror && !browser.safari) { browser.mozilla = true; }
  }
}

browser.detect();

var contact = (function(){
  return (function(o){
    if (typeof o == 'object' && o.tagName.toLowerCase() == 'form') {
        if (!o.name.value) {
            alert('Podaj imię i nazwisko lub firmę.');
            o.name.focus();
            return false;
        }
        if (!o.email.value) {
            alert('Podaj adres e-mail.');
            o.email.focus();
            return false;
        }
        var re = /^.+@.+\..{2,4}$/;
        if (!re.test(o.email.value)) {
            alert('Podaj prawidłowy adres e-mail.');
            o.email.focus();
            return false;
        }
        if (!o.msg.value) {
            alert('Podaj treść wiadomości.');
            o.msg.focus();
            return false;
        }
    }
    return true;
  });
})();

var book = (function(){
  return (function(o){
    if (typeof o == 'object' && o.tagName.toLowerCase() == 'form') {
        if (!o.guest_name.value) {
            alert('Podaj imię, nick lub cokolwiek');
            o.guest_name.focus();
            return false;
        }
        if (!o.guest_comment.value) {
            alert('Podaj treść Twojej opini.');
            o.guest_comment.focus();
            return false;
        }
    }
    return true;
  });
})();

/*
 *  Dodaje zdarzenie do wykonania
 *  @date 7. października 2007, 12:32:20
 *  @author lukasz@szakul.net
 */
 
var myEvent = {
  add: function(oObject, sEvent, fnHandler) {
    /* DOM */
    if (window.addEventListener) {
      oObject.addEventListener(sEvent, fnHandler, false);
      return;
    }
    
    /* IE */
    if (window.attachEvent) {
      oObject.attachEvent("on"+sEvent, fnHandler);
      return;
    }
    
    /* others */
    oObject["on"+sEvent] = fnHandler;
  }
}


function Http() {
  return window.XMLHttpRequest ? new XMLHttpRequest() : new ActiveXObject("Msxml2.XMLHTTP"); 
}

var Ajax = new Object;

Ajax.get = function(sURL, fnCallback) {
  if (Http) {
      var oRequest = new Http();
      oRequest.open("get", sURL, true);
      oRequest.onreadystatechange = function() {
        if (oRequest.readyState == 4) {
            fnCallback(oRequest.responseText);
        }
      }
      oRequest.send(null);
  } else {
      throw new Error("Przeglądarka nie obsługuje żądań HTTP!");
  }
}

Ajax.post = function(sURL, sParams, fnCallback) {
  if (Http) {
      var oRequest = new Http();
      oRequest.open("post", sURL, true);
      oRequest.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
      oRequest.onreadystatechange = function() {
        if (oRequest.readyState == 4) {
            fnCallback(oRequest.responseText);
        }
      }
      oRequest.send(sParams);
  } else {
      throw new Error("Przeglądarka nie obsługuje żądań HTTP!");
  }
}

Ajax.addParam = function(sURL, sParamName, sParamValue) {
  sURL += (sURL == '' ? "" : "&");
  sURL += encodeURIComponent(sParamName) + "=" + encodeURIComponent(sParamValue);
  return sURL;
}

/*
 *  overlay.js
 *  @date 30. października 2007, 14:13:08
 */
 
function $(id) {
  return document.getElementById(id);
}
 
var Overlay = {};

Overlay.sAbout = '<div id="js-overlay-window-footer"><p>Przeglądaj zdjęcia używając strzałek w lewo i w prawo na klawiaturze.</p><p>Zamknij okno klikając na <strong>X</strong> lub wciśnij <strong>Esc</strong>.</p></div>';
Overlay.sClose = 'X';

Overlay.init = function(oConfig) {
 if (typeof oConfig == 'object') {
     var cLinks = document.getElementsByTagName("a");
     if (cLinks.length) {
         for (var i = 0; i < cLinks.length; i++) {
              if (oConfig.sClass == cLinks[i].className) {
                  cLinks[i].onclick = function() {
                    Overlay.show(this, oConfig);
                    return false;
                  }
              }
         }
     }
 }
};

Overlay.show = function(oObject) {
  if (arguments[1]) {
      var oConfig = arguments[1];
  }
  
  if ($('js-overlay-conteiner')) {
      document.body.removeChild($('js-overlay-conteiner'));
  }
      
  if (!$('js-overlay')) {
      var oOverlay = document.createElement('div');
      oOverlay.id = 'js-overlay';
      document.body.appendChild(oOverlay);
  }
      
  var oConteiner = document.createElement('div');
  oConteiner.id = 'js-overlay-conteiner';
  oConteiner.innerHTML = '<div id="js-overlay-window-wrapper"><div id="js-overlay-window"></div></div>';
  oConteiner.style.visibility = 'hidden';
  document.body.appendChild(oConteiner);
  
  function closeWindow() {
    Overlay.close();
    return false;
  }
  
  // fixed...
  if (window.ActiveXObject) {
      document.documentElement.style.overflow = 'hidden';
      document.body.style.overflow = 'hidden';
  }      
  
  document.documentElement.style.width = '100%';
  document.documentElement.style.height = '100%';
  document.body.style.height = '100%';
  document.body.style.width = '100%';
  
  if (!$('js-overlay-window-preloader')) {
      var oPreloader = document.createElement('div');
      oPreloader.id = 'js-overlay-window-preloader';
      document.body.appendChild(oPreloader);
  }
  
  $('js-overlay-window-preloader').style.display = 'block';
  
  if (/(.jpeg|.jpg|.gif|.png|.bmp)$/.test(oObject.href)) {
      $('js-overlay-window-preloader').innerHTML = '<p>Trwa ładowanie zdjęcia...</p>';
      
      var aImages = new Array;
      if (oObject.rel != '') {
          for (var i = 0; i < document.links.length; i++) {
               if (document.links[i].className == oConfig.sClass && document.links[i].rel == oObject.rel) {
                   aImages.push(document.links[i]);
               }
          }
      } else {
          aImages.push(oObject);
      }
      
      if (aImages.length) {
          for (var i = 0; i < aImages.length; i++) {
               if (aImages[i].href == oObject.href) {
                   var iIndex = i;
                   break;
               }
          }
      }
      
      var oLoadedImage = new Image();
      
      oLoadedImage.onload = function() {
        oLoadedImage.onload = null;
        
        var sHtml = '';
        
        $('js-overlay-window').style.width = (oLoadedImage.width + 20) + "px";
        
        sHtml += '<img title="Zakmnij" id="js-overlay-gallery-img" src="' + oObject.href + '" width="' + oLoadedImage.width + '" height="' + oLoadedImage.height + '" alt="Zamknij" />';
        
        if (oObject.title != '') {
            sHtml += '<div id="js-overlay-gallery-desc">' + oObject.title + '</div>';
        }
        
        if (aImages.length > 1 && oConfig.iDuration > 0) {
            sHtml += '<div id="js-overlay-gallery-slide"><label for="run-slide">Slajdy</label> <input type="checkbox" name="run-slide" id="run-slide" value="" /></div>';
        }
        
        if (aImages.length > 1) {
            sHtml += '<div id="js-overlay-gallery-counter">Obrazek: <strong>' + (iIndex + 1) + '</strong> z ' + aImages.length + '</div>';
        }
        
        if (aImages.length > 1) {
            sHtml += '<div id="js-overlay-gallery-nav">';
            if (iIndex > 0) {
                sHtml += '<a href="#" id="js-nav-prev">&#171; Poprzednie</a>';
            }
            if (iIndex < aImages.length - 1) {
                sHtml += '<a href="#" id="js-nav-next">Następne &#187;</a>';
            }
            sHtml += '</div>';
        }
     
        if (oConfig.iThumbs > 0 && oObject.firstChild.tagName == 'IMG' && aImages.length > 1) {
            var iFactor = Math.floor(oConfig.iThumbs / 2), iFirstThumb, iLastThumb;
            
            if (iIndex <= iFactor) {
                iFirstThumb = 0;
                iLastThumb = oConfig.iThumbs - 1;
            } else {
                iFirstThumb = iIndex - iFactor;
                iLastThumb = iIndex + iFactor;
            }
   
            if (iLastThumb >= aImages.length) {
                var iStart = aImages.length - 1 - (iFactor * 2);
                iFirstThumb = iStart < 0 ? 0 : iStart;
                iLastThumb = aImages.length - 1;
            }
        
            sHtml += '<div id="js-overlay-gallery-thumbs">';
            for (var i = iFirstThumb; i <= iLastThumb; i++) {
              sHtml += '<a href="'+ aImages[i].href + '" id="js-overlay-gallery-thumb-' + i + '" class="' + aImages[i].className + '" rel="' + aImages[i].rel + '"><img src="' + aImages[i].firstChild.src + '" alt="" /></a>';
            }
            sHtml += '</div>';
            
            var bThumb = true;
        }
        
        sHtml += Overlay.sAbout;
        sHtml += '<a href="#" id="js-overlay-gallery-close" title="Zamknij">' + Overlay.sClose + '</a>';
        
        $('js-overlay-window-preloader').style.display = 'none';
        
        $('js-overlay-window').innerHTML = sHtml;
        $('js-overlay-conteiner').style.visibility = 'visible';
        
        if ($('js-nav-prev')) {
            function goPrev() {
              if (Overlay.iTimer) {
                  clearTimeout(Overlay.iTimer);
              }
              Overlay.show(aImages[iIndex - 1], oConfig);
              return false;
            }
            $('js-nav-prev').onclick = goPrev; 
        }
          
        if ($('js-nav-next')) {
            function goNext() {
              if (Overlay.iTimer) {
                  clearTimeout(Overlay.iTimer);
              }
              Overlay.show(aImages[iIndex + 1], oConfig);
              return false;
            }
            $('js-nav-next').onclick = goNext;
        }
        
        if (bThumb === true) {
            for (var i = iFirstThumb; i <= iLastThumb; i++) {
              if ($('js-overlay-gallery-thumb-' + i)) {
                  if (iIndex != i) {
                      $('js-overlay-gallery-thumb-' + i).onclick = function() {
                        Overlay.show(this, oConfig);
                        return false;
                      }
                  } else {
                      $('js-overlay-gallery-thumb-' + i).onclick = function() {
                        return false;
                      }
                  }
              }
            }
        }
        
        if ($('js-overlay-gallery-img')) {
            $('js-overlay-gallery-img').onclick = closeWindow;
        }
        
        if ($('js-overlay-gallery-close')) {
            $('js-overlay-gallery-close').onclick = closeWindow;
        }
        
        function nextSlide() {
          var iNext = iIndex == aImages.length - 1 ? 0 : iIndex + 1;
          oConfig.bSlide = true;
          Overlay.show(aImages[iNext], oConfig);
          return false;
        }
        
        if (oConfig.bRunSlideAtStart === true) {
            if ($('run-slide')) {
                $('run-slide').checked = true;
                oConfig.bRunSlideAtStart = false;
                Overlay.iTimer = setTimeout(function(){
                  nextSlide();
                }, oConfig.iDuration);
            }
        } else {
            if (oConfig.iDuration > 0) {
                if (oConfig.bSlide === true) {
                    if ($('run-slide')) {
                        $('run-slide').checked = true;
                    }
                    Overlay.iTimer = setTimeout(function(){
                      nextSlide();
                    }, oConfig.iDuration);
                }
            }
        }
        
        if ($('run-slide')) {
            $('run-slide').onclick = function() {
              if (this.checked === true) {
                  Overlay.iTimer = setTimeout(function() {
                    nextSlide();
                  }, oConfig.iDuration);
              } else {
                  clearTimeout(Overlay.iTimer);
                  oConfig.bSlide = false;
              }
            }
        }
         
        document.onkeydown = function(e) {
          if (window.event) {
              e = window.event;
          }
          
          if (e.keyCode == 27) {
              closeWindow()
          } else if (e.keyCode == 39) {
              if ($('js-nav-next')) {
                  document.onkeydown = '';
                  goNext();
              }
          } else if (e.keyCode == 37) {
              if ($('js-nav-prev')) {
                  document.onkeydown = '';
                  goPrev();
              }
          } 
        }
      }
      
      oLoadedImage.src = oObject.href;
  } else {
      var sURI = (oObject.href || oObject.action);
      var oProperties = new Object;
      
      if (sURI.indexOf("?") !== -1) {
          var aParts = sURI.split("?");
          var sBaseURI = aParts[0]; 
          oProperties = Overlay.parseQuery(aParts[1]);
      } else {
          var sBaseURI = sURI;
          oProperties = new Object;
      }
    
      if (oProperties['width']) {
          $('js-overlay-window').style.width = oProperties['width'];
      }
      if (oProperties['height']) {
          $('js-overlay-window').style.height = oProperties['height'];
      }
    
      function loadPage(sResponse) {
        sHtml += sResponse;
               
        $('js-overlay-window-preloader').style.display = 'none';
                  
        $('js-overlay-window').innerHTML = sHtml;
        $('js-overlay-conteiner').style.visibility = 'visible';
                 
        if ($('js-overlay-window-close')) {
            $('js-overlay-window-close').onclick = closeWindow;
        }
                  
        document.onkeydown = function(e) {
          if (window.event) {
              e = window.event;
          }
                   
          if (e.keyCode == 27) {
              closeWindow();
          }
        }
      }
    
      var sHtml = '<a href="#" id="js-overlay-window-close" title="Zamknij okno">' + Overlay.sClose + '</a>';
      sHtml += '<div id="js-overlay-window-title"><p>' + (oObject.title || oObject.alt || 'Okno') + '</p></div>';
        
      $('js-overlay-window-preloader').innerHTML = '<p>Trwa wczytywanie strony...</p>';
    
      if (typeof oObject == 'string') {
          setTimeout(function() {
            loadPage(oObject.toString());
          }, 450);
      } else {
         if (typeof Ajax == 'object') {
             if (oObject.tagName.toUpperCase() == 'FORM') {
                 var sPostParams = '';
                 for (var i = 0; i < oObject.elements.length; i++) {
                   if (typeof oObject.elements[i].name != 'undefined' && oObject.elements[i].name != '') {
                       if ((oObject.elements[i].type == 'checkbox' ||  oObject.elements[i].type == 'radio') && oObject.elements[i].checked != true) {
                           continue
                       } 
                       sPostParams = Ajax.addParam(sPostParams, oObject.elements[i].name, oObject.elements[i].value);
                   }
                 }
             }
             
             if (oProperties['ajax'] && oProperties['ajax'].toLowerCase() == 'post') {
                 Ajax.post(sBaseURI, sPostParams, function(sResponse) {
                   loadPage(sResponse);
                 });
             } else {
                 Ajax.get(sBaseURI, function(sResponse) {
                   loadPage(sResponse);
                 });
             }
         }
      }
  }
  
  return false;
};

Overlay.close = function() {
  if ($('js-overlay-conteiner')) {
      document.body.removeChild($('js-overlay-conteiner'));
  }
  
  if (Overlay.iTimer) {
      clearTimeout(Overlay.iTimer);
      delete Overlay.iTimer;
  }
  
  if ($('js-overlay')) {
      document.body.removeChild($('js-overlay'));
  }
  
  if ($('js-overlay-window-preloader')) {
      document.body.removeChild($('js-overlay-window-preloader'));
  }
  
  document.documentElement.removeAttribute('style');
  document.body.removeAttribute('style');
    
  document.onkeydown = '';
  
  return false;
};

Overlay.parseQuery = function(sQuery) {
  var oQueryParams = new Object;
  if (sQuery.indexOf("&")) {
      var aParams = sQuery.split("&");
      for (var i = 0; i < aParams.length; i++) {
        if (aParams[i].indexOf("=")) {
            var aValues = aParams[i].split("=");
            oQueryParams[unescape(aValues[0])] = unescape(aValues[1]);
        }
      }
  }
  return oQueryParams;
};


ssobject = (function(){
  
  var fade = function(img, conteiner){
    if (img) {
      if (window.attachEvent && !browser.opera) {
        var opacity = parseInt(img.style.filter.slice(14, 17)); 
      } else {
        var opacity = img.style.opacity * 100;
      }

      if (opacity < 100) {
        if (window.attachEvent && !browser.opera) {
          img.style.filter = 'Alpha(Opacity='+(opacity += 5)+')';
        } else {
          img.style.opacity = parseFloat((opacity / 100) + 0.05); 
        }
        
        setTimeout(function(){
          fade(img, conteiner);
        }, 1);
      } else {
        if (conteiner.childNodes) {
          if (conteiner.lastChild.previousSibling.tagName == 'IMG') {
            conteiner.removeChild(conteiner.lastChild.previousSibling);
          }
        }
      }
    }
  };
  
  var next = function(options, current){
    if (options.conteiner != '') {
      var conteiner = document.getElementById(options.conteiner);
      
      if (conteiner) {
        conteiner.style.position = 'relative';  
        
        var img = document.createElement('img');
        
        if (img) {
          img.style.position = 'absolute';
          img.style.left = 0;
          img.style.top = 0;

          if (options.fade === true) {
            if (window.attachEvent && !browser.opera) {
              img.style.filter = 'Alpha(Opacity=0)'; // IE 6
            } else {
              img.style.opacity = 0;
            }
          }
            
          if (options.type == 'random') {
            current = Math.floor(Math.random() * options.photos.length);
          } else if (options.type == 'sequence') {
            if (current == options.photos.length - 1) {
              current = 0;
            } else {
              current++;
            }
          }
          
          img.src = options.photos[current];
          conteiner.appendChild(img);
          
          if (options.fade === true) {
            setTimeout(function(){
              fade(img, conteiner)
            }, 1);
          }
          
          setTimeout(function(){
            next(options, current)
          }, options.speed);
        }
      }
    }
  };
  
  return (function(options){
    if (options.photos.length) {
      for (var i = 0; i < options.photos.length; i++) {
        var loader = new Image;
        loader.src = options.photos[i];
      }

      if (options.speed > 0) {
        setTimeout(function(){
          next(options, 0)
        }, options.speed);
      }
    }
  });
  
})();


/**
 * SWFObject v1.5: Flash Player detection and embed - http://blog.deconcept.com/swfobject/
 *
 * SWFObject is (c) 2007 Geoff Stearns and is released under the MIT License:
 * http://www.opensource.org/licenses/mit-license.php
 *
 */
if(typeof deconcept=="undefined"){var deconcept=new Object();}if(typeof deconcept.util=="undefined"){deconcept.util=new Object();}if(typeof deconcept.SWFObjectUtil=="undefined"){deconcept.SWFObjectUtil=new Object();}deconcept.SWFObject=function(_1,id,w,h,_5,c,_7,_8,_9,_a){if(!document.getElementById){return;}this.DETECT_KEY=_a?_a:"detectflash";this.skipDetect=deconcept.util.getRequestParameter(this.DETECT_KEY);this.params=new Object();this.variables=new Object();this.attributes=new Array();if(_1){this.setAttribute("swf",_1);}if(id){this.setAttribute("id",id);}if(w){this.setAttribute("width",w);}if(h){this.setAttribute("height",h);}if(_5){this.setAttribute("version",new deconcept.PlayerVersion(_5.toString().split(".")));}this.installedVer=deconcept.SWFObjectUtil.getPlayerVersion();if(!window.opera&&document.all&&this.installedVer.major>7){deconcept.SWFObject.doPrepUnload=true;}if(c){this.addParam("bgcolor",c);}var q=_7?_7:"high";this.addParam("quality",q);this.setAttribute("useExpressInstall",false);this.setAttribute("doExpressInstall",false);var _c=(_8)?_8:window.location;this.setAttribute("xiRedirectUrl",_c);this.setAttribute("redirectUrl","");if(_9){this.setAttribute("redirectUrl",_9);}};deconcept.SWFObject.prototype={useExpressInstall:function(_d){this.xiSWFPath=!_d?"expressinstall.swf":_d;this.setAttribute("useExpressInstall",true);},setAttribute:function(_e,_f){this.attributes[_e]=_f;},getAttribute:function(_10){return this.attributes[_10];},addParam:function(_11,_12){this.params[_11]=_12;},getParams:function(){return this.params;},addVariable:function(_13,_14){this.variables[_13]=_14;},getVariable:function(_15){return this.variables[_15];},getVariables:function(){return this.variables;},getVariablePairs:function(){var _16=new Array();var key;var _18=this.getVariables();for(key in _18){_16[_16.length]=key+"="+_18[key];}return _16;},getSWFHTML:function(){var _19="";if(navigator.plugins&&navigator.mimeTypes&&navigator.mimeTypes.length){if(this.getAttribute("doExpressInstall")){this.addVariable("MMplayerType","PlugIn");this.setAttribute("swf",this.xiSWFPath);}_19="<embed type=\"application/x-shockwave-flash\" src=\""+this.getAttribute("swf")+"\" width=\""+this.getAttribute("width")+"\" height=\""+this.getAttribute("height")+"\" style=\""+this.getAttribute("style")+"\"";_19+=" id=\""+this.getAttribute("id")+"\" name=\""+this.getAttribute("id")+"\" ";var _1a=this.getParams();for(var key in _1a){_19+=[key]+"=\""+_1a[key]+"\" ";}var _1c=this.getVariablePairs().join("&");if(_1c.length>0){_19+="flashvars=\""+_1c+"\"";}_19+="/>";}else{if(this.getAttribute("doExpressInstall")){this.addVariable("MMplayerType","ActiveX");this.setAttribute("swf",this.xiSWFPath);}_19="<object id=\""+this.getAttribute("id")+"\" classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" width=\""+this.getAttribute("width")+"\" height=\""+this.getAttribute("height")+"\" style=\""+this.getAttribute("style")+"\">";_19+="<param name=\"movie\" value=\""+this.getAttribute("swf")+"\" />";var _1d=this.getParams();for(var key in _1d){_19+="<param name=\""+key+"\" value=\""+_1d[key]+"\" />";}var _1f=this.getVariablePairs().join("&");if(_1f.length>0){_19+="<param name=\"flashvars\" value=\""+_1f+"\" />";}_19+="</object>";}return _19;},write:function(_20){if(this.getAttribute("useExpressInstall")){var _21=new deconcept.PlayerVersion([6,0,65]);if(this.installedVer.versionIsValid(_21)&&!this.installedVer.versionIsValid(this.getAttribute("version"))){this.setAttribute("doExpressInstall",true);this.addVariable("MMredirectURL",escape(this.getAttribute("xiRedirectUrl")));document.title=document.title.slice(0,47)+" - Flash Player Installation";this.addVariable("MMdoctitle",document.title);}}if(this.skipDetect||this.getAttribute("doExpressInstall")||this.installedVer.versionIsValid(this.getAttribute("version"))){var n=(typeof _20=="string")?document.getElementById(_20):_20;n.innerHTML=this.getSWFHTML();return true;}else{if(this.getAttribute("redirectUrl")!=""){document.location.replace(this.getAttribute("redirectUrl"));}}return false;}};deconcept.SWFObjectUtil.getPlayerVersion=function(){var _23=new deconcept.PlayerVersion([0,0,0]);if(navigator.plugins&&navigator.mimeTypes.length){var x=navigator.plugins["Shockwave Flash"];if(x&&x.description){_23=new deconcept.PlayerVersion(x.description.replace(/([a-zA-Z]|\s)+/,"").replace(/(\s+r|\s+b[0-9]+)/,".").split("."));}}else{if(navigator.userAgent&&navigator.userAgent.indexOf("Windows CE")>=0){var axo=1;var _26=3;while(axo){try{_26++;axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash."+_26);_23=new deconcept.PlayerVersion([_26,0,0]);}catch(e){axo=null;}}}else{try{var axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7");}catch(e){try{var axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");_23=new deconcept.PlayerVersion([6,0,21]);axo.AllowScriptAccess="always";}catch(e){if(_23.major==6){return _23;}}try{axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash");}catch(e){}}if(axo!=null){_23=new deconcept.PlayerVersion(axo.GetVariable("$version").split(" ")[1].split(","));}}}return _23;};deconcept.PlayerVersion=function(_29){this.major=_29[0]!=null?parseInt(_29[0]):0;this.minor=_29[1]!=null?parseInt(_29[1]):0;this.rev=_29[2]!=null?parseInt(_29[2]):0;};deconcept.PlayerVersion.prototype.versionIsValid=function(fv){if(this.major<fv.major){return false;}if(this.major>fv.major){return true;}if(this.minor<fv.minor){return false;}if(this.minor>fv.minor){return true;}if(this.rev<fv.rev){return false;}return true;};deconcept.util={getRequestParameter:function(_2b){var q=document.location.search||document.location.hash;if(_2b==null){return q;}if(q){var _2d=q.substring(1).split("&");for(var i=0;i<_2d.length;i++){if(_2d[i].substring(0,_2d[i].indexOf("="))==_2b){return _2d[i].substring((_2d[i].indexOf("=")+1));}}}return "";}};deconcept.SWFObjectUtil.cleanupSWFs=function(){var _2f=document.getElementsByTagName("OBJECT");for(var i=_2f.length-1;i>=0;i--){_2f[i].style.display="none";for(var x in _2f[i]){if(typeof _2f[i][x]=="function"){_2f[i][x]=function(){};}}}};if(deconcept.SWFObject.doPrepUnload){if(!deconcept.unloadSet){deconcept.SWFObjectUtil.prepUnload=function(){__flash_unloadHandler=function(){};__flash_savedUnloadHandler=function(){};window.attachEvent("onunload",deconcept.SWFObjectUtil.cleanupSWFs);};window.attachEvent("onbeforeunload",deconcept.SWFObjectUtil.prepUnload);deconcept.unloadSet=true;}}if(!document.getElementById&&document.all){document.getElementById=function(id){return document.all[id];};}var getQueryParamValue=deconcept.util.getRequestParameter;var FlashObject=deconcept.SWFObject;var SWFObject=deconcept.SWFObject;


var Subscriber = (function() {
  var green = '#73A91F';
  var red = 'red';
  var hint = function(o, v) {
    if (typeof o == 'object') {
        if (o.value == v || o.value == '') {
            o.removeAttribute('style');
            return;
        };
        var oReg = /^.+@.+\..{2,4}$/;
        if (!oReg.test(o.value)) {
            o.style.borderColor = red;
            o.style.color = red;
        } else {
            o.style.borderColor = green;
            o.style.color = green;
        }
    }
  };
  var set = function(o, v) {
    if (o.value == '') {
        o.value = v;
    }
  };
  var clear = function(o, v) {
    if (o.value == v) {
        o.value = '';
    }
  };
  return (function(o, v){
    if (typeof o == 'object') {
        o.value = v;
        o.onkeyup = function() {
          hint(this, v);
        }
        o.onblur = function() {
          hint(this, v);
          set(this, v);
        }
        o.onclick = function() {
          hint(this, v);
          clear(this, v);
        }
    }
  });
})();



var Newsletter = (function() {
  return (function(o, load, e) {
    if (typeof o == 'object' && o.tagName.toLowerCase() == 'form') {
        if (Ajax) {
            if (o.subscriber) {
                var reg = /^.+@.+\..{2,4}$/;
                if (!reg.test(o.subscriber.value)) {
                    alert(e);
                    return false;
                }
                var p = Ajax.addParam('', 'subscriber', o.subscriber.value);
                var action = o.action;
                o.innerHTML = '<img src=\"'+load+'\" />';
                setTimeout(function(){
                  if (action != '') {
                      Ajax.post(action, p, function(r) {
                        o.innerHTML = r;
                      });
                  }
                }, 300);
            }
        }
    }
    return false;
  });
})();


  myEvent.add(window, 'load', function(){
    Overlay.init(
      {
        sClass: 'overlay'
      }
    );
    
    var subscriber = document.getElementById('subscriber');
    if (subscriber) {
        Subscriber(subscriber, 'twój e-mail');
    }

    setTimeout(function(){
      var so = new SWFObject("flash/rose.swf", "flash-01", "230", "220", "8", "#FFFFFF");
      so.addParam("quality", "hight");
      so.addParam("wmode", "transparent");
      so.write("rose");
    }, 300);
    
  });
  function submitForm(id) {
     var o = document.getElementById(id);
     if (o) {
         o.submit();
     }
   }


