function delete_item(item_id) { var conf = confirm("Do you really want to delete this page?"); if (conf) { var str = 'form_' + item_id; estr = 'document.'+str+'.submit()'; eval (estr); } } function unloadWindow() { $('statusbox').style.visibility = "hidden"; new Effect.Fade('overlay', { duration: 0.2}); } function calendar_popup(event,cal_id) { if ($('calendar_event').style.visibility == "visible") { clearTimeout(holdid) } if ($('calendar_event').style.visibility != "visible") { var callstr = "/cal.php?cal_id="+cal_id; new Ajax.Updater ('calendar_event',callstr, {asynchronous:true}) var x = getX(event) - $('calendar_event').style.height; var y = getY(event) - $('calendar_event').style.width; if (((x + 250) > screen.width) || ((x+250) > window.innerWidth)) { x = x - 250; } $('calendar_event').style.visibility = "visible"; $('calendar_event').style.top = y+"px"; $('calendar_event').style.left = x+"px"; } } function calendar_blur() { holdid = setTimeout('doblur()',150); } function doblur() { $('calendar_event').style.visibility = "hidden"; } function getX(event) { return event.pageX || (event.clientX +(document.documentElement.scrollLeft || document.body.scrollLeft)); } function getY(event) { return event.pageY || (event.clientY +(document.documentElement.scrollTop || document.body.scrollTop)); } function submit_form(form) { //alert(Form.serialize($(form))); var arrayPageSize = getPageSize(); Element.setHeight('overlay', arrayPageSize[1]); new Effect.Appear('overlay', { duration: 0.2, from: 0.0, to: 0.8 }); var arrayPageSize = getPageSize(); var arrayPageScroll = getPageScroll(); var lightboxTop = arrayPageScroll[1] + (arrayPageSize[3] / 15); Element.setTop('statusbox', lightboxTop); $('statusbox').style.visibility = "visible"; new Ajax.Updater('window_message','admin.php?'+Form.serialize($(form)), {}); // new Effect.Appear('statusbox', { duration: 0.2, from: 0.0, to: 0.8 }); } function toggle_field(n) { var field = 'nav_' + n; $(field+'_img').src = '/images/'+field+'_roll.gif'; $(field).addClassName('subnav').show(); /* if ($(field).hasClassName('subnav')) { $(field).removeClassName('subnav'); allNodes = document.getElementsByClassName("subnav_bar"); for (i=0;i0&&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