function byId(id){return document.getElementById(id);}function confirmed(){var result = confirm('Czy jesteś pewien?');if(result){return true;} else {return false;}}function email(user, domain){location.href = 'mailto:'+user+'@'+domain;}function link(url, new_window){window.open(url, new_window == 'y' ? '_blank' : '_self');}function move_bar(name, direction, step){var container_size = direction == 'h' ? byId(name+'_container').offsetWidth : byId(name+'_container').offsetHeight;var bar_size = direction == 'h' ? byId(name+'_bar').offsetWidth : byId(name+'_bar').offsetHeight;var bar_position = direction == 'h' ? byId(name+'_bar').offsetLeft : byId(name+'_bar').offsetTop;if((bar_size > container_size) && ((step > 0) && (bar_position < 0))){if(direction == 'h'){$('#'+name+'_bar').animate({'left': Math.min(bar_position + (step), 0) + 'px'}, 'slow');} else {$('#'+name+'_bar').animate({'top': Math.min(bar_position + (step), 0) + 'px'}, 'slow');}}if((bar_size > container_size) && ((step < 0) && ((bar_position + bar_size) > container_size))){if(direction == 'h'){$('#'+name+'_bar').animate({'left': Math.max(bar_position + (step), container_size - bar_size) + 'px'}, 'slow');} else {$('#'+name+'_bar').animate({'top': Math.max(bar_position + (step), container_size - bar_size) + 'px'}, 'slow');}}if(bar_size > container_size){if(byId(name+'_prev')) byId(name+'_prev').style.display = 'block';if(byId(name+'_next')) byId(name+'_next').style.display = 'block';}}/*PAGE*/function page_shadow_init(id, clear){var div = document.createElement('div');div.id = id;div.className = 'page_shadow';div.innerHTML = '<iframe class="page_shadow" frameborder="0"></iframe><div class="page_shadow_shadow" onclick="page_shadow_hide(\''+id+'\', '+clear+')"></div><div id="'+id+'-content" class="center"></div>';document.body.appendChild(div);}function page_shadow_hide(id, clear){var div = byId(id);div.style.display = 'none';if(clear){ byId(id+'-content').innerHTML = ''; }}function page_shadow_show(id, content, w, h, close){var pt = Math.max(document.documentElement.scrollTop, document.body.scrollTop) + Math.max(Math.floor((document.documentElement.clientHeight-h)/2), 0);var div_content = byId(id+'-content');if(content != null){if(close){content = '<a href="" onclick="page_shadow_hide(\''+id+'\', true); return false;" class="page_shadow_close">Zamknij</a>'+content;h = Number(h) + 24;}div_content.innerHTML = content;}div_content.style.width = w+'px';div_content.style.height = h+'px';div_content.style.paddingTop = pt+'px';var div = byId(id);div.style.width = Math.max(document.documentElement.clientWidth, document.body.clientWidth)+'px';div.style.height = Math.max(Math.max(document.documentElement.clientHeight, document.body.clientHeight), h)+'px';div.style.display = 'block';}/*GALLERY*/function gallery_init(t, w, h){var id = 'gallery';page_shadow_init(id, false);$(t).bigPicture({'id': id, 'w': w+20, 'h': h+42, 'hideLabel': 'Zamknij', 'enableInfo': 1, 'boxEaseSpeed': 0});}/*PLAYER*/function player_show(t, f, w, h, v){var id = 'player';var content = '<object type="application/x-shockwave-flash" data="templates/default/img/'+f+'" width="'+w+'" height="'+h+'"><param name="movie" value="templates/default/img/'+f+'" /><param name="allowFullScreen" value="true" /><param name="FlashVars" value="t='+t+'&amp;v='+v+'&amp;autoplay=1" /><div class="page_swf" style="width:'+w+'px; height:'+h+'px" onclick="window.location.href=\'http://www.adobe.com\'"></div></object>';page_shadow_show(id, content, w, h, true);}/*EDITOR*/function editor_init(p_id, p_dir, p_width, p_height, params){tinyMCE.init({/*General options*/mode : 'exact',elements : 'editor_' + p_id,theme : 'advanced',language : 'pl',plugins : 'pagebreak,style,layer,table,save,advhr,advimage,advlink,emotions,iespell,inlinepopups,insertdatetime,preview,media,searchreplace,print,contextmenu,paste,directionality,fullscreen,noneditable,visualchars,nonbreaking,xhtmlxtras,template,video,wordcount,advlist,autosave',width : p_width,height : p_height,convert_urls : false,document_base_url : 'http://www.art-nova.pl/',relative_path : p_dir,host_root : '/',plugin_preview_pageurl : 'http://www.art-nova.pl/util_preview/e.' + p_id,params : params,force_p_newlines : false,force_br_newlines : true,forced_root_block : '',/*Theme options*/theme_advanced_buttons1 : "save,newdocument,|,bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,styleselect,formatselect,fontselect,fontsizeselect",theme_advanced_buttons2 : "cut,copy,paste,pastetext,pasteword,|,search,replace,|,bullist,numlist,|,outdent,indent,blockquote,|,undo,redo,|,link,unlink,anchor,image,cleanup,code,|,insertdate,inserttime,preview,|,forecolor,backcolor",theme_advanced_buttons3 : "tablecontrols,|,hr,removeformat,visualaid,|,sub,sup,|,charmap,emotions,iespell,media,video,advhr,|,print,|,ltr,rtl,|,fullscreen",theme_advanced_buttons4 : "insertlayer,moveforward,movebackward,absolute,|,styleprops,|,cite,abbr,acronym,del,ins,attribs,|,visualchars,nonbreaking,template,pagebreak",theme_advanced_toolbar_location : "top",theme_advanced_toolbar_align : "left",theme_advanced_statusbar_location : "bottom",theme_advanced_resizing : true,/*CSS*/content_css : "http://www.art-nova.pl/templates/default/style.css?01"});}/*TAB*/function tab_show(id){var i = 1;var elem = null;while(elem = byId('lib_tab'+i)){elem.style.display = (id == i) ? 'block' : 'none';byId('lib_tab'+i+'l').className = (id == i) ? 'selected' : '';i++;}}
