/**
 * BDKObject v1.0.2
 * (c) 2010 BDK
 * http://www.bdk-info.pl
 */
var bdkobject=function(k){var l="1.0.1";var m="http://domax.api.bdk-info.pl/domax/anim3d/";var n='159566';var o=function(a){return(a===undefined?false:true)};var p=function(a){return document.getElementById(a)};var q=function(){var a=navigator.appVersion.split("MSIE");var b=parseFloat(a[1]);return(b>=5.5&&b<7?(document.body.filters?true:false):false)};var r=o(window.swfobject);var s=null;var t=o(window.jQuery);var u=true;var v={color:'#000',opacity:70};var w={label:'',icon:true,css:null};var x={Background:null,FlashWrapper:null,FlashContainer:null,CloseButton:null};var y={registeredAnimation:(new Function("return {'type':'html','url':'Prezentacja 3D nie może zostać wyświetlona.','width':600,'height':30}"))(),version:function(){return l},init:function(){var a=document.getElementsByTagName('head')[0];if(!o(window.swfobject)){var b=document.createElement('script');b.setAttribute('type','text/javascript');b.setAttribute('src',m+'js/swfobject.js');a.appendChild(b);s=true}else{s=o(swfobject.removeSWF);if(!s){alert('UWAGA!\n\nKonflikt wersji SWFObject.\n\nDo prezenacji widoku 3D, wymagana jest biblioteka SWFObject co najmniej w wersji 2.2.\n(!) Zajrzyj do dokumentacji.\n\n ');return false}}return true},configure:function(a){for(var i in a){switch(i){case'backgroundVisible':u=a[i];break;case'backgroundColor':v['color']=a[i];break;case'backgroundOpacity':v['opacity']=a[i];break;case'closeLabel':w['label']=a[i];break;case'closeIcon':w['icon']=a[i];break;case'closeCss':w['css']=a[i];break}}w['icon']=((w['label']===''&&w['css']===null)?true:w['icon'])},registerAnimation:function(a){if(s){if(o(a)&&o(n)){if(p(a)){p(a).onclick=function(){bdkobject.loadAnimation(n);return false};return true}}}return false},loadAnimation:function(a){with(this.registeredAnimation){var b=type;var c=url;var d=width;var e=height}if(u){with(document){var f=q()?Math.max(body.scrollWidth,documentElement.clientWidth):Math.max(body.offsetWidth,documentElement.scrollWidth);var g=Math.max(body.scrollHeight,body.offsetHeight,documentElement.clientHeight,documentElement.offsetHeight,documentElement.scrollHeight)}x['Background']=document.createElement('div');with(x['Background']){with(style){position="absolute";top="0";left="0";width=f+"px";height=g+"px";zIndex="1000";background=v['color'];opacity=v['opacity']/100;filter="alpha(opacity="+v['opacity']+")"}}document.body.appendChild(x['Background'])}x['FlashWrapper']=document.createElement('div');with(x['FlashWrapper']){with(style){position="absolute";top="0";left="0";width="100%";height="auto";zIndex="1001";textAlign="center"}}document.body.appendChild(x['FlashWrapper']);x['FlashContainer']=document.createElement('div');with(x['FlashContainer']){id="BDK-Anim3D-Container";with(style){margin="50px auto 0";width=d+"px";height=e+"px";position="relative";if(b=='html'){padding="50px 15px";backgroundColor='white';border='1px solid red';fontSize='22px';fontFamily='Verdana';textAlign='center'}else{padding="15px";background="black url("+m+"img/loader.gif) no-repeat center center";border="1px solid #666"}}}x['FlashWrapper'].appendChild(x['FlashContainer']);x['CloseButton']=document.createElement('a');with(x['CloseButton']){if(w['css']===null){with(style){display="inline-block";position="absolute";right=0;top=0;height="30px";margin="5px";color="#888";fontWeight="bold";fontSize="13px";lineHeight="26px";textAlign="left"}}else{className=w['css']}appendChild(document.createTextNode(w['label']));href="";onclick=function(){bdkobject.closeAnimation();return false};if(w['icon']){closeIcon=document.createElement('span');with(closeIcon.style){if(q()){filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+m+"img/closebox.png', sizingMethod='crop')";background="transparent"}else{background="transparent url("+m+"img/closebox.png) no-repeat scroll center right"}display="inline-block";height="30px";width="30px";marginLeft="5px";padding=0;cssFloat="right"}x['CloseButton'].appendChild(closeIcon)}}x['FlashContainer'].appendChild(x['CloseButton']);var h=document.createElement('div');h.id="BDK-Anim3D-Flash";x['FlashContainer'].appendChild(h);switch(b){case'flash':var i={Alpha:"30"};var j={menu:"false",scale:"noscale",allowScriptAccess:"never",wmode:"opaque",base:m};swfobject.embedSWF(c,"BDK-Anim3D-Flash",d,e,"9.0.0","expressInstall.swf",i,j);break;case'html':default:h.appendChild(document.createTextNode(c));break}return false},closeAnimation:function(){for(var i in x){try{document.body.removeChild(x[i])}catch(e){}x[i]=null}swfobject.removeSWF("BDK-Anim3D-Flash");return false}};return(y.init()?y:null)}();

