diff --git a/notifications/js/notificationajaxpopup.js b/notifications/js/notificationajaxpopup.js index c088cb681f..1b4b272331 100644 --- a/notifications/js/notificationajaxpopup.js +++ b/notifications/js/notificationajaxpopup.js @@ -9,7 +9,7 @@ */ var notifymessages = new Array(); - + function notificationwindow_init() { window.setTimeout("notificationwindow_refresh();", 1000); } @@ -25,14 +25,17 @@ function notificationwindow_refresh() { function notificationwindow_display() { var notificationwindow; var notificationwindow_message; + var Browserwidth; + var Browserheight; notificationwindow = document.getElementById("notificationwindow"); notificationwindow_message = document.getElementById("notificationwindow_message"); - notificationwindow_ok_button = document.getElementById("notificationwindow_ok_button"); notificationwindow.style.display = "inline"; notificationwindow.style.position = "absolute"; notificationwindow.style.width = "500px"; - notificationwindow.style.left = screen.availWidth/2 - 250 + "px"; - notificationwindow.style.top = screen.availHeight/4 + "px"; + Browserwidth = (window.innerWidth || document.body.clientWidth || 640) + Browserheight = (window.innerHeight || document.body.clientHeight || 480) + notificationwindow.style.left = (Browserwidth/2 - 250) + "px"; + notificationwindow.style.top = (Browserheight/4) + "px"; notificationwindow.style.height = "100%"; notificationwindow_message.innerHTML = notifymessages[0]; if(notifymessages.length-1 > 0 ) { @@ -40,6 +43,7 @@ function notificationwindow_display() { } else { notificationwindow_ok_button.value = "OK"; } + } function notificationbell_switch(mode) {