IE = (document.all);
NC = (document.layers);
Opera = (document.getElementById);

function getDocumentHeight()
{
return (document.body.scrollHeight > document.body.offsetHeight)?document.body.scrollHeight:document.body.offsetHeight;
}

function getHeight() {
if (IE || Opera) send = document.body.clientHeight;
if (NC) send = window.innerHeight;
return send;
}

function getWidth() {
if (IE || Opera) send = document.body.clientWidth;
if (NC) send = window.innerWidth;
return send;
}

function putLayer() {
widthBrowser= (getWidth() / 2)-100;
 
 
IE = (document.all);
NC = (document.layers);
Opera = (document.getElementById);

h1= getHeight();
h2= getDocumentHeight();

 heightBrowser=h1-80-200;

// перенос нижней таблиці вниз окна
//if(IE) eval('document.all["apDiv"].style.height = heightBrowser');
//if(NC) eval('document.layers["apDiv"].height = heightBrowser');
//if(Opera) eval('document.getElementById("apDiv").style.height = heightBrowser');
 

h2= getDocumentHeight();
heightBrowser=h2-42;
if(IE) eval('document.all["apDiv2"].style.top = heightBrowser');
if(NC) eval('document.layers["apDiv2"].top = heightBrowser');
if(Opera) eval('document.getElementById("apDiv2").style.top = heightBrowser'); 
 
if(IE) eval('document.all["apDiv2"].style.left = widthBrowser');
if(NC) eval('document.layers["apDiv2"].left = widthBrowser');
if(Opera) eval('document.getElementById("apDiv2").style.left = widthBrowser');

if(IE) eval('document.all["apDiv2"].style.visibility = "visible"') ; 
if(NC) eval('document.layers["apDiv2"].visibility ="visible"');
if(Opera) eval('document.getElementById("apDiv2").style.visibility = "visible"');

// вівод логотипа в в крайний правій ряд
//if(IE) eval('document.all["xyz"].style.left = widthBrowser');
//if(NC) eval('document.layers["xyz"].left = widthBrowser');
//if(Opera) eval('document.getElementById("xyz").style.left = widthBrowser');
//if(IE) eval('document.all["xyz"].style.visibility = "visible"') ; 
//if(NC) eval('document.layers["xyz"].visibility ="visible"');
//if(Opera) eval('document.getElementById("xyz").style.visibility = "visible"');

setTimeout('putLayer()',1000);
}