function doOver(u){
	document.getElementById(u).style.cursor = 'hand';
	document.getElementById(u).style.backgroundColor = '#04067D';
}

function doOut(u,v){
	if(u!=v){
		document.getElementById(u).style.backgroundColor = '#0066BB';
	}
}

function doLoad(v, lang){
	if (v == "home") {
		parent.location.href = "../pages/home.php";
	} else if (v == "homeEn") {
		parent.location.href = "../pages/home.php?lang=en";
	} else {
		parent.location.href = "../pages/wiki.php?lang=" + lang + "&pnu=" + v;
	}
}

function confirmAction(m)
{
	var agree=confirm(m);
	if (agree)
		return true;
	else
		return false ;
}

function OpenWindow(v){
	window.open(v,'harta','toolbar=no,menubar=no,status=no,scrollbars=no,resizable=no,width=700,height=615,left=250,location=no,top=150,fullscreen=no,directories=no,channelmode=no,titlebar=no');	
}



function switchMenu(obj) {
	var el = document.getElementById(obj);
	var tmp = "myvar1";
	
	for(i=1;i<=9;i++,tmp='myvar'+i)
	{
  		var tmp2 = document.getElementById(tmp);
  		tmp2.style.display = 'none';
	}
	
	if ( el.style.display != 'none' ) {
		el.style.display = 'none';
	} else {
		el.style.display = 'inline';
	}
}

function reset_intern() {
	var tmp="";
	
	for(i=1;i<=9;i++,tmp='myvar'+i) {
    	switchMenu(tmp);
	}
}


function switchMenuPdv(obj) {
	var el = document.getElementById(obj);
	var tmp = "dpdv1";
	
	for(i=1;i<=2;i++,tmp='dpdv'+i) {
  		var tmp2 = document.getElementById(tmp);
  		tmp2.style.display = 'none';
	}
		
	if ( el.style.display != 'none' ) {
		el.style.display = 'none';
	} else {
		el.style.display = 'inline';
	}
}

function reset_pdv() {
	var tmp="";
	
	for(i=1;i<=2;i++,tmp='dpdv'+i) {
    	switchMenuPdv(tmp);
	}

}


function switchMenuBuget(obj) {
	var el = document.getElementById(obj);
	var tmp = "buget1";
	
	for(i=1;i<=2;i++,tmp='buget'+i) {
  		var tmp2 = document.getElementById(tmp);
  		tmp2.style.display = 'none';
	}
	
	if ( el.style.display != 'none' ) {
		el.style.display = 'none';
	} else {
		el.style.display = 'inline';
	}
}

function reset_buget() {
	var tmp="";
	for(i=1;i<=2;i++,tmp='buget'+i) {
    	switchMenuBuget(tmp);
	}
}


function switchTransDat(obj) {
	var el = document.getElementById(obj);
	//var tmp = "buget1";
	//for(i=1;i<=2;i++,tmp='buget'+i)
	//{
	//  var tmp2 =document.getElementById(tmp);
	//  tmp2.style.display = 'none';
	//}
	if ( el.style.display != 'none' ) {
		el.style.display = 'none';
	} else {
		el.style.display = 'inline';
	}
}

var menu1=new Array()
menu1[0]='<a href="../images/reglementari/organigrama_ancpi_2006[1].pdf" target="_blank">Structura ANCPI</a>'
menu1[1]='<a href="../pages/wiki.php?pnu=declaratiePrincipii">Declaratie de principii</a>'
menu1[2]='<a href="../pages/wiki.php?pnu=scurtIstoric">Scurt istoric</a>'
menu1[3]='<a href="../pages/wiki.php?pnu=directii">Directii / Servicii ANCPI</a>'



var menu2=new Array()
menu2[0]='<a href="../pages/wiki.php?pnu=galerieImagini">Imagini</a>'
menu2[1]='<a href="../pages/wiki.php?pnu=galerieFilme">Filme</a>'


var menu3=new Array()
menu3[0]='<a href="http://www.uniuneanotarilor.ro">Uniunea Nationala a Notarilor Publici</a>'
menu3[1]='<a href="http://www.unim.ro">Uniunea Nationala a Agentiilor Imobiliare</a>'
menu3[2]='<a href="http://www.arb.ro">Asociatia Romana a Bancilor</a>'
menu3[3]='<a href="http://www.geodezie.utcb.ro">Facultatea de Geodezie</a>'
menu3[4]='<a href="http://www.posta-romana.ro/index.jsp">Compania Nationala Posta Romana</a>'
menu3[5]='<a href="http://www.executori.ro">Uniunea Nationala a Executorilor Judecatoresti</a>'
menu3[6]='<a href="http://www.unbr.ro">Uniunea Nationala a Barourilor din Romania</a>'
menu3[7]='<a href="http://www.ogr2007.ro">Ordinul Geodezilor din Romania</a>'

var menu4=new Array()
menu4[0]='<a href="../pages/wiki.php?pid=116">Cooperare internationala...de ce?</a>'
menu4[1]='<a href="../pages/wiki.php?pid=18">Organizatii internationale</a>'
menu4[2]='<a href="../pages/wiki.php?pid=17">Proiecte internationale</a>'
menu4[3]='<a href="../pages/wiki.php?pid=16">Reprezentativitate</a>'
menu4[4]='<a href="../pages/wiki.php?pid=122">Calendar 2009</a>'
menu4[5]='<a href="../pages/wiki.php?pid=123">Noutati</a>'
menu4[6]='<a href="../pages/wiki.php?pid=124">Stiati ca...?</a>'

var menu5=new Array()
menu5[0]='<a href="../images/reglementari/organigrama_ancpi_2006.pdf" target="_blank">Organization chart</a>'
menu5[1]='<a href="../pages/wiki.php?lang=en&pnu=statementOfPrinciple">Statement of principle</a>'
menu5[2]='<a href="../pages/wiki.php?lang=en&pnu=background">Background</a>'



var menu6=new Array()
menu6[0]='<a href="../pages/wiki.php?lang=en&pnu=imageGallery">Images</a>'
menu6[1]='<a href="../pages/wiki.php?lang=en&pnu=movieGallery">Movies</a>'


var menu7=new Array()
menu7[0]='<a href="http://www.uniuneanotarilor.ro">National Union of Public Notaries</a>'
menu7[1]='<a href="http://www.unim.ro">National Union of Real Estate Agiencies</a>'
menu7[2]='<a href="http://www.arb.ro">Romanian Banks Association</a>'
menu7[3]='<a href="http://www.geodezie.utcb.ro">Faculty of Geodesy</a>'
menu7[4]='<a href="http://www.posta-romana.ro/index.jsp">National Company of Romanian Post</a>'
menu7[5]='<a href="http://www.executori.ro">National Union of Legal Executors</a>'
menu7[6]='<a href="http://www.unbr.ro">National Union of Barr Associations in Romania</a>'

var menu8=new Array()
menu8[0]='<a href="../pages/wiki.php?lang=en&pid=46">International cooperation … why?</a>'
menu8[1]='<a href="../pages/wiki.php?lang=en&pid=45">International organizations</a>'
menu8[2]='<a href="../pages/wiki.php?lang=en&pid=129">International projects</a>'
menu8[3]='<a href="../pages/wiki.php?lang=en&pid=130">Representativeness</a>'
menu8[4]='<a href="../pages/wiki.php?lang=en&pid=131">International events 2009</a>'
menu8[5]='<a href="../pages/wiki.php?lang=en&pid=132">News</a>'
menu8[6]='<a href="../pages/wiki.php?lang=en&pid=133">Did you know that…?</a>'


var menuwidth='165px'
var menubgcolor='#0066BB'
var disappeardelay=250
var hidemenu_onclick="yes"



var ie4=document.all
var ns6=document.getElementById&&!document.all

if (ie4||ns6)
document.write('<div id="dropmenudiv" style="visibility:hidden;width:'+menuwidth+';background-color:'+menubgcolor+'" 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="-500px"
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 topedge=ie4 && !window.opera? iecompattest().scrollTop : window.pageYOffset
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){ //move up?
edgeoffset=dropmenuobj.contentmeasure+obj.offsetHeight
if ((dropmenuobj.y-topedge)<dropmenuobj.contentmeasure) //up no good either?
edgeoffset=dropmenuobj.y+obj.offsetHeight-topedge
}
}
return edgeoffset
}

function populatemenu(what){
if (ie4||ns6)
dropmenuobj.innerHTML=what.join("")
}


function dropdownmenu(obj, e, menucontents, menuwidth, u){
if (window.event) event.cancelBubble=true
else if (e.stopPropagation) e.stopPropagation()
clearhidemenu()
dropmenuobj=document.getElementById? document.getElementById("dropmenudiv") : dropmenudiv
populatemenu(menucontents)

 document.getElementById(u).style.cursor = 'hand';
        document.getElementById(u).style.backgroundColor = '#04067D';

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=3+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(u,v){

 if(u!=v){
                document.getElementById(u).style.backgroundColor = '#0066BB';
        }

if (ie4||ns6)
delayhide=setTimeout("hidemenu()",disappeardelay)
}

function clearhidemenu(){
if (typeof delayhide!="undefined")
clearTimeout(delayhide)
}

if (hidemenu_onclick=="yes")
document.onclick=hidemenu
