function ShowWindowSize() { with (document.body) { width = offsetWidth - (2 * clientLeft); height = offsetHeight - (2 * clientTop); } alert('Width = ' + width + '\nHeight = ' + height); event.returnValue=false; } function OpenWindowCentered(url, WinWidth, WinHeight, WinOptions) { // set default window width if (WinWidth == null) WinWidth = 650; // set default window height if (WinHeight == null) WinHeight = 540; if (WinOptions == null) { // set default window options WinOptions = "toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars,resizable=0"; } // half the screen width minus half the new window width (plus 5 pixel borders). var iMyWidth = (window.screen.width/2) - ((WinWidth/2) + 10); // half the screen height minus half the new window height (plus title and status bars). var iMyHeight = (window.screen.height/2) - ((WinHeight/2) + 50); // open the window var newwin = window.open(url, '_blank', "height=" + WinHeight + ",width=" + WinWidth + ",left=" + iMyWidth + ",top=" + iMyHeight + ",screenX=" + iMyWidth + ",screenY=" + iMyHeight + ',' + WinOptions); // set the focus to it if (newwin) newwin.focus(); return newwin; } function OpenWindowFullScreen(url) { var WinWidth = window.screen.width - 10 var WinHeight = window.screen.height - 28 // open the window var newwin = window.open(url, '_blank', "height=" + WinHeight + ",width=" + WinWidth + ",left=0,top=0,screenX=0,screenY=0,toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars,resizable=0"); // set the focus to it return newwin.focus() } // reopen (or create) window on the center of the screen (for dialog purposes) function OpenDialogWindow(WinName, url, scrollbars) { var DialogWindowOffset = -100 var DialogWindowResizable = '1' if (scrollbars != null && scrollbars) { WinOptions = 'toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=' + DialogWindowResizable } else { WinOptions = 'toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=' + DialogWindowResizable } //newwin = window.open(url, WinName, 'width=' + screen.width + ',height=' + screen.height + ',left='+ (screen.width+DialogWindowOffset) +',top=' + (screen.height+DialogWindowOffset) + ',' + WinOptions) newwin = window.open(url, WinName, 'width=1,height=1,left='+ ((screen.width/2)-60) +',top=' + (0.85*((screen.height/2)-60)) + WinOptions) if (newwin) newwin.focus() } function OpenPrintWindow(url) { WinOptions = "toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=0"; OpenWindowCentered(url, 700, 550, WinOptions) } function OpenInEditMode(url, widgets) { if (arguments.length == 1) widgets = true if (url.indexOf('?') >= 0) { url = url + '&' } else { url = url + '?' } if ((event && event.ctrlKey) || !widgets) { url = url + 'widgets=false' } else { url = url + 'widgets=true' } window.open(url) } function onEditPage(page_id, frontend) { if (!frontend) frontend = 0 var href = 'http://admin.eventassist.nl/cms/popups/PageProperties.cfm?id=' + page_id + '&frontend=' + frontend href = href + '&CFID=11976402&CFTOKEN=44481262' OpenDialogWindow('pageprops', href) } function onAddPage(parent_id, frontend) { if (!frontend) frontend = 0 var href = 'http://admin.eventassist.nl/cms/popups/PageProperties.cfm?parent_id=' + parent_id + '&frontend=' + frontend href = href + '&CFID=11976402&CFTOKEN=44481262' OpenDialogWindow('pageprops', href) } function onDeletePage(page_id, frontend) { if (!frontend) frontend = 0 var href = 'http://admin.eventassist.nl/cms/popups/PageDelete.cfm?id=' + page_id + '&frontend=' + frontend href = href + '&CFID=11976402&CFTOKEN=44481262' OpenDialogWindow('pageprops', href) } function onEditContent(content_id, frontend) { if (!frontend) frontend = 0 var href = 'http://admin.eventassist.nl/cms/popups/PageContentProperties.cfm?id=' + content_id + '&frontend=' + frontend href = href + '&CFID=11976402&CFTOKEN=44481262' OpenDialogWindow('contentprops', href, 1) if (event) event.cancelBubble=true } function onAddContent(page_id, section, seq, frontend) { section = isNaN(section) ? '§ion_name=' + section : '§ion_id=' + section if (!frontend) frontend = 0 var href = 'http://admin.eventassist.nl/cms/popups/PageContentProperties.cfm?page_id=' + page_id + section + '&frontend=' + frontend if (seq != null) { href = href + '&seq=' + seq } href = href + '&CFID=11976402&CFTOKEN=44481262' OpenDialogWindow('contentprops', href, 1) } function onDeleteContent(content_id, frontend) { if (!frontend) frontend = 0 if (confirm("Are you sure you want to delete this content?")) { OpenwindowActionframe.location.href="http://admin.eventassist.nl/cms/sitetree/DeleteContent.cfm?id=" + content_id + '&CFID=11976402&CFTOKEN=44481262&frontend=' + frontend } } function onEditCustomContent(objecttype, object_id) { objecttype = isNaN(objecttype) ? 'objecttype_name=' + objecttype : 'objecttype_id=' + objecttype var href = 'http://admin.eventassist.nl/objects/edit.cfm?' + objecttype + '&object_id=' + object_id + '&popupform=1' href = href + '&CFID=11976402&CFTOKEN=44481262' OpenDialogWindow('contentprops', href, 1) } function onAddCustomContent(objecttype, parent_id, website_id) { objecttype = isNaN(objecttype) ? 'objecttype_name=' + objecttype : 'objecttype_id=' + objecttype var href = 'http://admin.eventassist.nl/objects/edit.cfm?' + objecttype + '&parent_id=' + parent_id + '&popupform=1' href = href + '&CFID=11976402&CFTOKEN=44481262' if (parent_id == 0 && arguments.length == 3) { href = href + '&website_id=' + website_id } OpenDialogWindow('contentprops', href, 1) } function onDeleteCustomContent(objecttype, object_id) { objecttype = isNaN(objecttype) ? 'objecttype_name=' + objecttype : 'objecttype_id=' + objecttype var href = 'http://admin.eventassist.nl/cms/popups/CustomContentDelete.cfm?' + objecttype + '&object_id=' + object_id + '&popupform=1' href = href + '&CFID=11976402&CFTOKEN=44481262' OpenDialogWindow('contentprops', href) }