var DHTML_texts = new Array("<table border=0 cellspacing=0 cellpadding=0 class=alfa><tr><td><a href=/company/principles_work.php  class=DHTMLitem onMouseOver=MM_changeProp('prinz','','src','/img/menu/submenu1_01.gif','IMG') onMouseOut=MM_changeProp('prinz','','src','/img/menu/submenu_01.gif','IMG')><img src=/img/menu/submenu_01.gif width=127 height=20 border=0 name=prinz></a></td></tr><tr><td><a href=/company/sotrudniki.php  class=DHTMLitem onMouseOver=MM_changeProp('sotr','','src','/img/menu/submenu1_02.gif','IMG') onMouseOut=MM_changeProp('sotr','','src','/img/menu/submenu_02.gif','IMG')><img src=/img/menu/submenu_02.gif width=127 height=17 border=0 name=sotr></a></td></tr><tr><td><a href=/company/resources.php  class=DHTMLitem onMouseOver=MM_changeProp('res','','src','/img/menu/submenu1_03.gif','IMG') onMouseOut=MM_changeProp('res','','src','/img/menu/submenu_03.gif','IMG')><img src=/img/menu/submenu_03.gif width=127 height=17 border=0 name=res></a></td></tr></table>");
	var gposY   = new Array(250,383)
	var gposX   = new Array(73,110)
	var gHeight = new Array(50,40)
	var gWidth  = new Array(117,137)
	var mainTableWidth = 760;
var browserName = navigator.appName;

if (browserName == "Netscape") {
v  = ".top";
l  = ".left";
dS = "document.";
sD = "";
y  = "window.pageYOffset";
iW = "window.innerWidth";
iH = "window.innerHeight";
oW = -8;
}
else {
v  = ".pixelTop";
l  = ".pixelLeft";
dS = "";
sD = ".style";
y  = "document.body.scrollTop";
iW = "document.body.clientWidth";
iH = "document.body.clientHeight";
oW = 0;
}

var dhtml         = null; // Our layer
var isOver        = true;
var myTimer       = setTimeout("HideDHTML()",300);
var intCurrent    = -1;
var intNew        = -2;

var ns4 = (document.layers)? true:false
var ie4 = (document.all)? true:false

if ((ns4) || (ie4)) {
} else {
	PopUp = no_PopUp;
}

function no_PopUp() {
	return true;
}


function PopUp() {
	clearTimeout(myTimer);
	intNew = arguments[0]

	if ( intCurrent != intNew ) {
		intCurrent = intNew;
	
		// Load defaults to runtime.
		var m_frame     = self;
		var m_border    = "1";
		var m_fgcolor   = "BGCOLOR=\"#ffffff\"";
		var m_bgcolor   = "BGCOLOR=\"#ffffff\"";
		var m_height    = "HEIGHT=" + gHeight[intNew];
		var m_width     = "WIDTH=" + gWidth[intNew];
		var m_text      = DHTML_texts[intNew];
		var m_textfont  = "arial,helvetica,verdana";
		var m_textsize  = "1";
		var m_textcolor = "#ccffff";
	
		var layerhtml = "<TABLE " + m_width + " BORDER=0 CELLPADDING=" + m_border +
								" CELLSPACING=0 " + m_bgcolor + " " + m_height + "><TR><TD>" + 
								"<TABLE WIDTH=100% BORDER=0 CELLPADDING=2 CELLSPACING=0 " + m_fgcolor + 
								" " + m_height + "><TR><TD VALIGN=TOP><FONT FACE=\"" + m_textfont + "\"" +
								" COLOR=\"" + m_textcolor + "\" SIZE=\"" + m_textsize + "\">" + 
								m_text + "</FONT></TD></TR></TABLE></TD></TR></TABLE>";	
			
		if (ns4) { dhtml = m_frame.document.DHTLMenu; }
		if (ie4) { dhtml = m_frame.DHTLMenu.style; }
		
		SetPosition(intNew);
		dhtml.onmouseover = OverDHTML;
		dhtml.onmouseout = OutDHTML;
		OverDHTML();
		
	  if (ns4) {
		  var lyr = dhtml.document

		  lyr.write(layerhtml);
		  lyr.close();
		  dhtml.visibility = "show";
		}
		else if (ie4) {
			m_frame.document.all["DHTLMenu"].innerHTML = layerhtml;
			dhtml.visibility = "visible";
		}
		
		return true;
	}
}

function SetPosition(id) {
	var j = eval(iW);
	var posX = 0;
	var posY = 0;
	
	if (j <= mainTableWidth) { j = 2 }
	else { j = ((j - mainTableWidth) / 2) + oW; }
	
	if (j < 2 ) { j = 2; }
	posX = gposX[id] + j;
	
	
	var j1 = eval(iH);
	var j2 = eval(y);
	var j3 = j1 + j2;
	var j4 = gposY[id];
	var j5 = j1 + j2 - j4;
	var j6 = gHeight[id];
	var j7 = j4 - j2;
  var j8 = j4;
	
	if ((j5 < j6) && (j5 < j7)) { j8 = j4 - j6 - 30; }
	if (j8 < 0) { j8 = 0 }
	
	posY = j8;
	
	dhtml.left = posX
  dhtml.top = posY
}

function HideDHTML() {
	if (!isOver) { 
		intCurrent = -2;
		if (ns4) { dhtml.visibility = "hide" }
		else if (ie4) { dhtml.visibility = "hidden" }
	}
}

function OverDHTML() { 
	clearTimeout(myTimer); 
	isOver = true; 
}

function OutDHTML() { 
	clearTimeout(myTimer);
	isOver = false; 
	myTimer = setTimeout("HideDHTML()",300);
}

function MM_findObj(n, d) { //v4.0
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && document.getElementById) x=document.getElementById(n); return x;
}

function MM_changeProp(objName,x,theProp,theValue) { //v3.0
  var obj = MM_findObj(objName);
  if (obj && (theProp.indexOf("style.")==-1 || obj.style)) eval("obj."+theProp+"='"+theValue+"'");
}
var message="";
function clickIE() {if (document.all) {(message);return false;}}
function clickNS(e) {if 
(document.layers||(document.getElementById&&!document.all)) {
if (e.which==2||e.which==3) {
(message);
return false;}}}
if (document.layers) {
document.captureEvents(Event.MOUSEDOWN);
document.onmousedown=clickNS;
}else{
document.onmouseup=clickNS;
document.oncontextmenu=clickIE;
}
document.oncontextmenu=new Function("return false")

