window.onload = writeMenuTop;

var do_linku = 'http://eurobrokers.pl/';

function writeMenuTop() {

	var menu_top = new Array()
	menu_top[1] = '<a style="width: 90px;" href="' + do_linku + 'index.html"><b>Strona główna</b></a>';
	menu_top[2] = '<a onMouseOver="dropdownmenu(this, event, menu1, 110)" + onClick="return clickreturnvalue()" + onMouseOut="delayhidemenu()" href="#">O nas</a>';
	menu_top[3] = '<a style="width: 105px;" onMouseOver="dropdownmenu(this, event, menu2, 150)" onClick="return clickreturnvalue()" onMouseOut="delayhidemenu()" href="#">Samochody nowe</a>';
   menu_top[4] = '<a style="width: 120px;" onMouseOver="dropdownmenu(this, event, menu3, 200)" onClick="return clickreturnvalue()" onMouseOut="delayhidemenu()" href="#">Samochody używane</a>';
   menu_top[5] = '<a style="width: 90px;" onMouseOver="dropdownmenu(this, event, menu4, 200)" onClick="return clickreturnvalue()" onMouseOut="delayhidemenu()" href="#">Finansowanie</a>';
	menu_top[6] = '<a onMouseOver="dropdownmenu(this, event, menu5, 200)" onClick="return clickreturnvalue()" onMouseOut="delayhidemenu()" href="#">Media</a>';
   menu_top[7] = '<a style="width: 80px;" href="' + do_linku + 'strefa-klienta.html">Strefa klienta</a>';
   menu_top[8] = '<a style="width: 60px;" href="' + do_linku + 'zapytanie-ofertowe.html">Zapytanie</a>';

	document.getElementById("menu_top").innerHTML = menu_top[1] + menu_top[2] + menu_top[3] + menu_top[4] + menu_top[5] + menu_top[6] + menu_top[7] + menu_top[8];
	
}



//Contents for menu 1
var menu1=new Array()
menu1[0]='<ul>';
menu1[1]='<li><a target="_self" href="' + do_linku + 'oeurobrokers.html">O Eurobrokers</a></li>'
menu1[2]='<li><a target="_self" href="' + do_linku + 'dane-teleadresowe.html">Dane firmy</a></li>'
menu1[3]='<li><a target="_self" href="' + do_linku + 'nasi-partnerzy.html">Nasi Partnerzy</a></li>'
menu1[4]='</ul>';

var menu2=new Array()
menu2[0]='<ul>';
menu2[1]='<li><a target="_top" href="http://eurobrokers.home.pl/www/samochody-osobowe.html/pl">Samochody &nbsp;osobowe</a></li>'
menu2[2]='<li><a target="_top" href="http://eurobrokers.home.pl/www/konfigurator.html/pl">KONFIGURATOR</a></li>'
menu2[3]='</ul>';

var menu3=new Array()
menu3[0]='<ul>';
menu3[1]='<li><a target="_top" href="' + do_linku + 'samochody-uzywane-leaseplan.html">aukcje LEASEPLAN </a></li>'
menu3[2]='<li><a target="_top" href="' + do_linku + 'samochody-uzywane-arval.html">aukcje ARVAL</a></li>'
menu3[3]='<li><a target="_top" href="' + do_linku + 'samochody-uzywane-ald.html">aukcje ALD</a></li>'
menu3[4]='<li><a target="_top" href="' + do_linku + 'samochody-uzywane-ing.html">aukcje ALPHABET</a></li>'
menu3[5]='<li><a target="_top" href="' + do_linku + 'samochody-uzywane-bca.html">aukcje BCA </a></li>'
menu3[6]='<li><a target="_top" href="' + do_linku + 'sprowadzenie-samochodu-z-niemiec.html">sprowadzenie samochodu wyszukanego przez klienta</a></li>'
menu3[7]='</ul>';


var menu4=new Array()
menu4[0]='&nbsp;&nbsp;&nbsp;&nbsp;<strong style="color: #2E68AF;">Finansowanie i ubezpieczenie</strong>'
menu4[1]='<ul>';
menu4[2]='<li><a target="_top" href="' + do_linku + 'leasing.html">leasing operacyjny</a></li>'
menu4[3]='<li><a target="_top" href="' + do_linku + 'leasingwiecej.html">więcej o leasingu 105%</a></li>'
menu4[4]='<li><a target="_top" href="' + do_linku + 'kredyt.html">kredyt</a></li>'
menu4[5]='<li><a target="_top" href="' + do_linku + 'porownanie.html">leasing a kredyt</a></li>'
menu4[6]='<li><a target="_top" href="' + do_linku + 'ubezpieczenie.html">ubezpieczenie samochodu</a></li>'
menu4[7]='</ul>';


var menu5=new Array()
menu5[0]='<ul>';
menu5[1]='<li><a target="_top" href="' + do_linku + 'multimedia_zdjecia.html">zdjęcia</a></li>'
menu5[2]='<li><a target="_top" href="' + do_linku + 'multimedia.html">filmy</a></li>'
menu5[3]='<li><a target="_top" href="' + do_linku + 'newsy.html">newsy</a></li>'
menu5[4]='<li><a target="_top" href="' + do_linku + 'blog.html">blog o branży automotive</a></li>'
menu5[5]='<li><a target="_top" href="' + do_linku + 'dane-techniczne-spalanie-samochody-nowe.html">dane techniczne i spalanie</a></li>'
menu5[6]='<li><a target="_top" href="http://eurobrokers.home.pl/www/opinie-forum-samochody-nowe.html">opinie i forum</a></li>'
menu5[7]='</ul>';

		
var menuwidth='10px' //default menu width
var menubgcolor='#ffffff'  //menu bgcolor
var disappeardelay=0  //menu disappear speed onMouseout (in miliseconds)
var hidemenu_onclick="no" //hide menu when user clicks within menu?

/////No further editting needed

var ie4=document.all
var ns6=document.getElementById&&!document.all

if (ie4||ns6)
document.write('<div id="dropmenudiv" onMouseover="clearhidemenu()" onMouseout="dynamichide(event)"></div>')

function getposOffset(what, offsettype){
var totaloffset=(offsettype=="left")? what.offsetLeft : what.offsetTop;
var parentEl=what.offsetParent;
while (parentEl!=null){
totaloffset=(offsettype=="left")? totaloffset+parentEl.offsetLeft : totaloffset+parentEl.offsetTop;
parentEl=parentEl.offsetParent;
}
return totaloffset;
}


function showhide(obj, e, visible, hidden, menuwidth){
if (ie4||ns6)
dropmenuobj.style.left=dropmenuobj.style.top=-500
if (menuwidth!=""){
dropmenuobj.widthobj=dropmenuobj.style
dropmenuobj.widthobj.width=menuwidth
}
if (e.type=="click" && obj.visibility==hidden || e.type=="mouseover")
obj.visibility=visible
else if (e.type=="click")
obj.visibility=hidden
}

function iecompattest(){
return (document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body
}

function clearbrowseredge(obj, whichedge){
var edgeoffset=0
if (whichedge=="rightedge"){
var windowedge=ie4 && !window.opera? iecompattest().scrollLeft+iecompattest().clientWidth-15 : window.pageXOffset+window.innerWidth-15
dropmenuobj.contentmeasure=dropmenuobj.offsetWidth
if (windowedge-dropmenuobj.x < dropmenuobj.contentmeasure)
edgeoffset=dropmenuobj.contentmeasure-obj.offsetWidth
}
else{
var windowedge=ie4 && !window.opera? iecompattest().scrollTop+iecompattest().clientHeight-15 : window.pageYOffset+window.innerHeight-18
dropmenuobj.contentmeasure=dropmenuobj.offsetHeight
if (windowedge-dropmenuobj.y < dropmenuobj.contentmeasure)
edgeoffset=dropmenuobj.contentmeasure+obj.offsetHeight
}
return edgeoffset
}

function populatemenu(what){
if (ie4||ns6)
dropmenuobj.innerHTML=what.join("")
}


function dropdownmenu(obj, e, menucontents, menuwidth){
if (window.event) event.cancelBubble=true
else if (e.stopPropagation) e.stopPropagation()
clearhidemenu()
dropmenuobj=document.getElementById? document.getElementById("dropmenudiv") : dropmenudiv
populatemenu(menucontents)

if (ie4||ns6){
showhide(dropmenuobj.style, e, "visible", "hidden", menuwidth)
dropmenuobj.x=getposOffset(obj, "left")
dropmenuobj.y=getposOffset(obj, "top")
dropmenuobj.style.left=dropmenuobj.x-clearbrowseredge(obj, "rightedge")+"px"
dropmenuobj.style.top=dropmenuobj.y-clearbrowseredge(obj, "bottomedge")+obj.offsetHeight+"px"
}

return clickreturnvalue()
}

function clickreturnvalue(){
if (ie4||ns6) return false
else return true
}

function contains_ns6(a, b) {
while (b.parentNode)
if ((b = b.parentNode) == a)
return true;
return false;
}

function dynamichide(e){
if (ie4&&!dropmenuobj.contains(e.toElement))
delayhidemenu()
else if (ns6&&e.currentTarget!= e.relatedTarget&& !contains_ns6(e.currentTarget, e.relatedTarget))
delayhidemenu()
}

function hidemenu(e){
if (typeof dropmenuobj!="undefined"){
if (ie4||ns6)
dropmenuobj.style.visibility="hidden"
}
}

function delayhidemenu(){
if (ie4||ns6)
delayhide=setTimeout("hidemenu()",disappeardelay)
}

function clearhidemenu(){
if (typeof delayhide!="undefined")
clearTimeout(delayhide)
}

if (hidemenu_onclick=="yes")
document.onclick=hidemenu

