function bluring(){ 
if(event.srcElement.tagName=="A"||event.srcElement.tagName=="IMG") document.body.focus(); 
} 
document.onfocusin=bluring; 

var bennerHeight = 0;
var heigthBlank = 160;

var isDOM = (document.getElementById ? true : false);  
var isIE4 = ((document.all && !isDOM) ? true : false); 
var isNS4 = (document.layers ? true : false); 

function getRef(id) { 
if (isDOM) return document.getElementById(id); 
if (isIE4) return document.all[id]; 
if (isNS4) return document.layers[id]; 
}  

var isNS = navigator.appName == "Netscape";  

function moveRightEdge() { 
var yMenuFrom, yMenuTo, yOffset, timeoutNextCheck;  

if (isNS4) { 
yMenuFrom   = divMenu.top; 
yMenuTo     = windows.pageYOffset + 100; 
} else if (isDOM) { 
yMenuFrom   = parseInt (divMenu.style.top, 10); 
yMenuTo     = (isNS ? window.pageYOffset : document.body.scrollTop) + heigthBlank; 
} 
timeoutNextCheck = 30;  

if (yMenuFrom != yMenuTo) { 
yOffset = Math.ceil(Math.abs(yMenuTo - yMenuFrom) / 20); 
if (yMenuTo < yMenuFrom) 
yOffset = -yOffset; 
if (isNS4) 
divMenu.top += yOffset; 
else if (isDOM) 
divMenu.style.top = parseInt (divMenu.style.top, 10) + yOffset; 
timeoutNextCheck = 5; 
} 
setTimeout ("moveRightEdge()", timeoutNextCheck); 
} 

function na_open_window(name, url, left, top, width, height, toolbar, menubar, statusbar, scrollbar, resizable)
{
  toolbar_str = toolbar ? 'yes' : 'no';
  menubar_str = menubar ? 'yes' : 'no';
  statusbar_str = statusbar ? 'yes' : 'no';
  scrollbar_str = scrollbar ? 'yes' : 'no';
  resizable_str = resizable ? 'yes' : 'no';

  cookie_str = document.cookie;
  cookie_str.toString();

  pos_start  = cookie_str.indexOf(name);
  pos_end    = cookie_str.indexOf('=', pos_start);

  cookie_name = cookie_str.substring(pos_start, pos_end);

  pos_start  = cookie_str.indexOf(name);
  pos_start  = cookie_str.indexOf('=', pos_start);
  pos_end    = cookie_str.indexOf(';', pos_start);
  
  if (pos_end <= 0) pos_end = cookie_str.length;
  cookie_val = cookie_str.substring(pos_start + 1, pos_end);
  if (cookie_name == name && cookie_val  == "done")
    return;

  window.open(url, name, 'left='+left+',top='+top+',width='+width+',height='+height+',toolbar='+toolbar_str+',menubar='+menubar_str+',status='+statusbar_str+',scrollbars='+scrollbar_str+',resizable='+resizable_str);
}

