var banners = new Array();
var bans = null;
var showed = new Array();
var tohide = new Array();
var is_popupscript=1;

function showPopupBunner(a)
{
obj = (a) ? a.target : event.srcElement;
bans = obj;
setTimeout(showPopupBunner_, 200);
}
function showPopupBunner_()
{
if(bans != null)
{
obj = document.getElementById(bans.id+'_big');
obj.style.display='block';
showed[bans.id] = true;
tohide[bans.id] = false;
}
}
function hidePopupBunner(a)
{
obj = (a) ? a.target : event.srcElement;
bans = banners[obj.id];
tohide[bans] = true;
setTimeout('hidePopupBunner_(\''+bans+'\')', 1000);
}
function hidePopupBunner_(name)
{
if(showed[name] == true && tohide[name] == true)
{
obj = document.getElementById(name+'_big');
obj.style.display='none';
bans = null;
showed[name] = false;
tohide[name] = false;
}
}
function popupMouseMove(a)
{
obj = (a) ? a.target : event.srcElement;
if(bans != null && showed[bans.id] == false)
{
if(obj != bans)
bans = null;
}
if(bans != null && showed[bans.id] == true && tohide[bans.id] == false)
{
if(obj.id != bans.id+'_hide')
{
tohide[bans.id] = true;
bans = bans.id;
setTimeout('hidePopupBunner_(\''+bans+'\')', 1000);
}
}
}

function addPopupBanner(name,doc)
{
banners[name+'_hide'] = name;
doc.getElementById(name).onmouseover = showPopupBunner;
doc.getElementById(name+'_hide').onmouseout = hidePopupBunner;
doc.body.onmousemove = popupMouseMove;
showed[name] = false;
tohide[name] = false;
}

function fillIFrame(doc, name,text)
{
obj = doc.getElementById(name).contentWindow.document;
if(obj != 'undefined')
{
obj.open();
obj.write(text);
obj.close();
}
}