var total=1;
var db = new Array();

// Format: dbAdd(parent[true|false] , description, URL [blank for nohref], level , TARGET [blank for "content"], new? [1=yes])

dbAdd( true , "HOME PAGE" , "../index.html" , 0 , "_self", 0)

 dbAdd( true , "About us" , "" , 1 , "" , 0)
	dbAdd( false , "Presentation","presentation.htm" , 2 , "_self" , 0)	 
	dbAdd( false , "Members","members.htm" ,2 , "_self" , 0)
	dbAdd( false , "Board of Administration","board.htm" ,2 , "_self" , 0)
	dbAdd( false , "Our Team","team.htm" ,2 , "_self" , 0)
	dbAdd( false , "Experts","experts.htm" ,2 , "_self" , 0)
	dbAdd( false , "Vacancies","vacancies.htm" ,2 , "_self" , 0)
	dbAdd( false , "Contact","contact.htm" ,2 , "_self" , 0)
	
  dbAdd( true , "About standards" , "" , 1 , "" , 0)
	dbAdd( false , "Definition", "definition.htm" , 2 , "_self" , 0)
	dbAdd( false , "Finding/obtaining a standard", "find.htm" , 2 , "_self" , 0)
	dbAdd( false , "New developments", "newdev.htm" ,2 , "_self" , 0)
	dbAdd( false , "Glossary & acronyms", "glossary.htm" , 2 , "_self" , 0)

  dbAdd( true , "Standardisation" , "" , 1 , "" , 0)
	dbAdd( false , "Basic principles", "principles.htm" ,2 , "_self" , 0)	 
	dbAdd( false , "Legal base/directives", "legal.htm" ,2 , "_self" , 0)
	dbAdd( false , "European standardisation", "europstand.htm" ,2 , "_self" , 0)
	dbAdd( false , "Other deliverables", "otherdeliv.htm" ,2 , "_self" , 0)	 
	dbAdd( false , "Standardisation bodies", "standbodies.htm" ,2 , "_self" , 0)
	dbAdd( false , "CE marking", "cemarking.htm" ,2 , "_self" , 0)
	dbAdd( false , "Elearning", "http://www.elearning.normapme.com" ,2 , "_self" , 0)

  dbAdd( true , "Activities", "",  1 , "" , 0)
	dbAdd( false , "Work in TCs", "tc.htm" ,2 , "_self" , 0)
	dbAdd( false , "Consultations with SMEs", "consultation.htm" ,2 , "_self" , 0)
	dbAdd( false , "Political interventions", "politics.htm" ,2 , "" , 0)
	dbAdd( false , "Defending SMEs interests", "defending.htm" ,2 , "" , 0)
	dbAdd( false , "Projects", "projects.htm" ,2 , "_self" , 0)
	dbAdd( false , "Seminars", "seminars.htm" ,2 , "_self" , 0)
	dbAdd( false , "Events ", "events.htm" ,2 , "_self" , 0)
	dbAdd( false , "Collaboration with the EC", "collaboration.htm" ,2 , "_self" , 0)

  dbAdd( true , "Sectors", "" , 1 , "" , 0)
	dbAdd( false , "Construction", "sec_constr.htm" ,2 , "_self" , 0)	 
	dbAdd( false , "Electrical installations", "sec_electric.htm" ,2 , "_self" , 0)	 
	dbAdd( false , "Energy", "sec_energy.htm" ,2 , "_self" , 0)	 
	dbAdd( false , "Environment", "sec_enviro.htm" ,2 , "_self" , 0)	 
	dbAdd( false , "Food", "sec_food.htm" ,2 , "_self" , 0)	 
	dbAdd( false , "Health", "sec_health.htm" ,2 , "_self" , 0)	 
	dbAdd( false , "ICT", "sec_ict.htm" ,2 , "_self" , 0)	 
	dbAdd( false , "Quality management", "sec_quality.htm" ,2 , "_self" , 0)	 
	dbAdd( false , "Services", "sec_services.htm" ,2 , "_self" , 0)	 
	dbAdd( false , "Textiles", "sec_textil.htm" ,2 , "_self" , 0)	 
	dbAdd( false , "Tourism", "sec_tourism.htm" ,2 , "_self" , 0)	 

  dbAdd( true , "Publications", "",  1 , "" , 0)
	dbAdd( false , "Newsletter", "newsletter.htm" ,2 , "_self" , 0)
	dbAdd( false , "Position papers", "positions.htm" ,2 , "_self" , 0)
	dbAdd( false , "Technical papers", "technicalpap.htm" ,2 , "_self" , 0)
	dbAdd( false , "Press review", "pressreview.htm" ,2 , "_self" , 0)
	dbAdd( false , "Annual reports", "annualrep.htm" ,2 , "_self" , 0)

  dbAdd( true , "Useful links", "" ,1 , "" , 0)
	dbAdd( false , "Euro Info Center", "eic.htm" ,2 , "_self" , 0)
	dbAdd( false , "Standards databases", "standatabase.htm" ,2 , "_self" , 0)
	dbAdd( false , "Patent databases", "patent.htm" ,2 , "_self" , 0)
	
  dbAdd( false , "Site Map" ,"" , 1 , "" , 0)

  dbAdd( false , "Contact us ", "mailto:info@normapme.com" , 1 , "" , 0)


  
var current=getCurrState()
function getCurrState() {
  var label = "currState="
  var labelLen = label.length
  var cLen = document.cookie.length
  var i = 0
  while (i < cLen) {
    var j = i + labelLen
    if (document.cookie.substring(i,j) == label) {
      var cEnd = document.cookie.indexOf(";",j)
      if (cEnd == -1) { cEnd = document.cookie.length }
      return unescape(document.cookie.substring(j,cEnd))
    }
    i++
  }
  return ""
}


function dbAdd(mother,display,URL,indent,top,newitem) {
  db[total] = new Object;
  db[total].mother = mother
  db[total].display = display
  db[total].URL = URL
  db[total].indent = indent
  db[total].top = top
  db[total].newitem = newitem
  total++
  }


function setCurrState(setting) {
  var expire = new Date();
  expire.setTime(expire.getTime() + ( 7*24*60*60*1000 ) );
  document.cookie = "currState=" + escape(setting) + "; expires=" + expire.toGMTString();
  }


function toggle(n) {
  if (n != 0) {
    var newString = ""
    var expanded = current.substring(n-1,n)
    newString += current.substring(0,n-1)
    newString += expanded ^ 1
    newString += current.substring(n,current.length)
    setCurrState(newString)
  }
}


function pad(n) {
  var result = ""
  for (var i = 1; i <= n; i++) { result += "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;" }
  return result
}


function explode() { //++++++++++
  current = "";
  initState="";
  for (var i = 1; i < db.length; i++) {
    initState += "1"
    current += "1"
    }
  setCurrState(initState);
  history.go(0);
  }


function contract() { //------------
  current = "";
  initState="";
  for (var i = 1; i < db.length; i++) {
    initState += "0"
    current += "0"
    }
  setCurrState(initState);
  history.go(0);
  }

function tree_close() {
   window.close();
  }
