var active_item ; function calendarShow(id){ if (active_item) { document.getElementById(active_item).style.display = 'none'; } active_item = id ; if (window.wind) { window.wind.style.display = 'none'; } var item = document.getElementById(id).style.display; document.getElementById(id).style.width ='600px'; document.getElementById(id).style.height ='400px'; if (item == 'none'){ document.getElementById(id).style.display = 'block'; document.getElementById(id).style.left = ((screen.width/2)-300)+'px'; document.getElementById(id).style.top = ((screen.height/3)-200)+'px'; } window.wind = document.getElementById(id); document.body.appendChild(wind); window.onmousedown = function(ev) { if (ev.target == window.wind) { document.getElementById(id).style.display='none'; window.onmousedown = null; } } if (window.event.stopPropagation) { window.event.stopPropagation(); } window.event.cancelBubble = true; } function calendarClose(_object){ //alert(object.previousSibling.previousSibling.previousSibling.id); _object.parentNode.parentNode.style.display = 'none'; } function ru(url,dst){ //document.getElementById(obj.tag).innerHTML = ''; //document.getElementById(obj.tag).innerHTML = 'Proszê czekaæ!!!!'; advAJAX.setDefaultParameters({ onInitialization : function(obj) { }, onLoading : function(obj) { }, onSuccess : function(obj) { document.getElementById(obj.tag).innerHTML = obj.responseText; }, onError : function(obj) { document.getElementById(obj.tag).innerHTML = 'Error...'; } }); advAJAX.get({ url : url, tag : dst }); } function lll(cM,cY){ if (active_item) { document.getElementById(active_item).style.display = 'none'; } var url = '/modules/mod_artcalendar/mod_artcalendar.php?ajax=true&ca=calendar&cM='+cM+'&cY='+cY ; ru(url,'callendar_modules'); } function ll(){ if (active_item) { document.getElementById(active_item).style.display = 'none'; } ru('/modules/mod_artcalendar/mod_artcalendar.php?ajax=true&ca=list','callendar_modules'); } function lc(){ if (active_item) { document.getElementById(active_item).style.display = 'none'; } ru('/modules/mod_artcalendar/mod_artcalendar.php?ajax=true&ca=calendar','callendar_modules'); } function showImg(ev,chu){ //var icatch = document.getElementById('image_holder') ; //icatch.style.display='block'; var x = ev.pageX?parseFloat(ev.pageX):parseFloat(window.event.clientX)+parseFloat(document.body.scrollLeft)-parseFloat(document.body.clientLeft); var y = ev.pageY?parseFloat(ev.pageY):parseFloat(window.event.clientY)+parseFloat(document.body.scrollTop)-parseFloat(document.body.clientTop); x=x+15; y=y+15; var img = document.createElement('img'); img.src='/upload/'+chu; img.style.position='absolute'; img.style.zIndex='1000'; img.setAttribute('id','id_nowego_oblaska'); img.style.top =y+'px' ; img.style.left = x+'px'; document.body.appendChild(img); //icatch.innerHTML =''; } function hiddeImg(){ var ku = document.getElementById('id_nowego_oblaska'); if (ku) ku.parentNode.removeChild(ku); //var icatch = document.getElementById('image_holder') ; //icatch.style.display='none'; }