1
0
Fork 0
mirror of https://github.com/Oreolek/ifhub.club.git synced 2024-07-16 21:34:25 +03:00
ifhub.club/templates/skin/habra/js/windows.js
2008-09-21 06:36:57 +00:00

28 lines
865 B
JavaScript

function MoveCenterScreen(objID)
{
var innerHeight_ = window.innerHeight ? window.innerHeight : document.documentElement.offsetHeight;
var obj = document.getElementById(objID);
obj.style.left = ( document.body.clientWidth / 2 - obj.clientWidth / 2 + document.body.scrollLeft) + 'px';
obj.style.top = ( document.documentElement.scrollTop + innerHeight_ / 2 - obj.clientHeight / 2 + document.body.scrollTop - 160) + 'px';
}
function showWindow(sId) {
var obj = document.getElementById(sId);
obj.style.display='block';
MoveCenterScreen(sId);
}
function closeWindow(sId) {
var obj = document.getElementById(sId);
obj.style.display='none';
}
function showWindowStatus(sText) {
var obj = document.getElementById('window_status_text');
obj.innerHTML=sText;
showWindow('window_status');
}
function closeWindowStatus() {
closeWindow('window_status');
}