//System Work indicator
var myGlobalHandlers = {
onCreate: function(){
if (window.innerHeight && window.scrollMaxY) {
xScroll = document.body.scrollWidth;
yScroll = window.innerHeight + window.scrollMaxY;
} else if (document.body.scrollHeight > document.body.offsetHeight){
xScroll = document.body.scrollWidth;
yScroll = document.body.scrollHeight;
} else {
xScroll = document.body.offsetWidth;
yScroll = document.body.offsetHeight;
}
if ($('systemWorking')) {
$('systemWorking').style.top = '0 px';
$('systemWorking').style.left = '0 px';
$('systemWorking').style.height = (yScroll + 'px');
$('systemWorking').style.width = (xScroll + 'px');
$('systemWorking').innerHTML='';
Element.show('systemWorking');
new Effect.SlideDown('systemWorking');
}
},onComplete: function(request, transport){
if(transport.responseText=='OFFLINE'){
//Windows.closeAll();
LoginForm();
return false;
}
new Effect.BlindUp('systemWorking');
//if(originalRequest.responseText=='OFFLINE')
//if(Ajax.activeRequestCount == 0){new Effect.BlindUp('systemWorking');}
}
};
Ajax.Responders.register(myGlobalHandlers);
//window.onerror = function(){return true;}
GetLoading=function (){
return '<div align="center" dir="ltr"><b>Please Wait Loading... </b><br><img src="ajax/progress.gif" border="0"></div>';
}
LoadPage=function(url,idl){var pars = '';
$(idl).innerHTML='<div align="center" dir="ltr" style="font-size:11px"><b>Please Wait Loading... </b><br><img src="ajax/progress.gif" border="0"></div>';
var myAjax = new Ajax.Updater(idl, url, {method: 'get', parameters: pars,evalScripts:true});
if($(idl).style.display=='none' && idl=='center'){$(idl).show();}
}