
/******************************************************************************
* dhtmllib.js                                                                 *
*                                                                             *
* Copyright 1999 by Mike Hall.                                                *
* Web address: http://www.brainjar.com                                        *
* Last update: February 26, 2000.                                             *
*                                                                             *
* Provides basic functions for DHTML positioned elements which will work on   *
* both Netscape Communicator and Internet Explorer browsers (version 4.0 and  *
* up).                                                                        *
******************************************************************************/

// Determine browser.

var isMinNS4 = (navigator.appName.indexOf("Netscape") >= 0 &&
                parseFloat(navigator.appVersion) >= 4) ? 1 : 0;
var isMinIE4 = (document.all) ? 1 : 0;
var isMinIE5 = (isMinIE4 && navigator.appVersion.indexOf("5.") >= 0) ? 1 : 0;



//-----------------------------------------------------------------------------
// Image utilities.
//-----------------------------------------------------------------------------

function getImage(name) {

  if (isMinNS4) {
    return findImage(name, document);
  }
  if (isMinIE4)
    return eval('document.all.' + name);
  return null;
}

function findImage(name, doc) {

  var i, img;

  for (i = 0; i < doc.images.length; i++)
    if (doc.images[i].name == name)
      return doc.images[i];
  for (i = 0; i < doc.layers.length; i++)
    if ((img = findImage(name, doc.layers[i].document)) != null) {
      img.container = doc.layers[i];
      return img;
    }
  return null;
}

function getImagePageLeft(img) {

  var x, obj;

  if (isMinNS4) {
    if (img.container != null)
      return img.container.pageX + img.x;
    else
      return img.x;
  }
  if (isMinIE4) {
    x = 0;
    obj = img;
    while (obj.offsetParent != null) {
      x += obj.offsetLeft;
      obj = obj.offsetParent;
    }
    x += obj.offsetLeft;
    return x;
  }
  return -1;
}

function getImagePageTop(img) {

  var y, obj;

  if (isMinNS4) {
    if (img.container != null)
      return img.container.pageY + img.y;
    else
      return img.y;
  }
  if (isMinIE4) {
    y = 0;
    obj = img;
    while (obj.offsetParent != null) {
      y += obj.offsetTop;
      obj = obj.offsetParent;
    }
    y += obj.offsetTop;
    return y;
  }
  return -1;
}





//Menu object creation
oCMenu2=new makeCM("oCMenu2") //Making the menu object. Argument: menuname

//Menu properties   
oCMenu2.pxBetween=0

oCMenu2.fromLeft= getImagePageLeft(document.about) ; 
oCMenu2.fromTop=getImagePageTop(document.about);


oCMenu2.onresize=" oCMenu2.fromLeft=getImagePageLeft(document.about) ; oCMenu2.fromTop=getImagePageTop(document.about);"

oCMenu2.rows=1 
oCMenu2.menuPlacement="left"

oCMenu2.offlineRoot="" 
oCMenu2.onlineRoot="" 
oCMenu2.resizeCheck=1 
oCMenu2.wait=1000 
oCMenu2.fillImg="cm_fill.gif"
oCMenu2.zIndex=0

//Background bar properties
oCMenu2.useBar=0
oCMenu2.barWidth="100%"
oCMenu2.barHeight="menu" 
oCMenu2.barClass="cl2Bar"
oCMenu2.barX=0 
oCMenu2.barY=0
oCMenu2.barBorderX=0
oCMenu2.barBorderY=0
oCMenu2.barBorderClass=""

//Level properties - ALL properties have to be spesified in level 0
oCMenu2.level[0]=new cm_makeLevel() //Add this for each new level
oCMenu2.level[0].width=110
oCMenu2.level[0].height=27
oCMenu2.level[0].regClass="cl2Level0"
oCMenu2.level[0].overClass="cl2Level0over"
oCMenu2.level[0].borderX=0
oCMenu2.level[0].borderY=0
oCMenu2.level[0].borderClass="cl2Level0border"
oCMenu2.level[0].offsetX=5
oCMenu2.level[0].offsetY=1
oCMenu2.level[0].rows=0
oCMenu2.level[0].arrow=0
oCMenu2.level[0].arrowWidth=0
oCMenu2.level[0].arrowHeight=0
oCMenu2.level[0].align="bottom"


//EXAMPLE SUB LEVEL[1] PROPERTIES - You have to specify the properties you want different from LEVEL[0] - If you want all items to look the same just remove this
oCMenu2.level[1]=new cm_makeLevel() //Add this for each new level (adding one to the number)
oCMenu2.level[1].width=oCMenu2.level[0].width-2
oCMenu2.level[1].height=22
oCMenu2.level[1].regClass="cl2Level1"
oCMenu2.level[1].overClass="cl2Level1over"
oCMenu2.level[1].borderX=0
oCMenu2.level[1].borderY=1
oCMenu2.level[1].align="bottom" 
oCMenu2.level[1].offsetX=-(oCMenu2.level[0].width-2)/2+20
oCMenu2.level[1].offsetY=1
oCMenu2.level[1].borderClass="cl2Level1border"


/******************************************
Menu item creation:
myCoolMenu.makeMenu(name, parent_name, text, link, target, width, height, regImage, overImage, regClass, overClass , align, rows, nolink, onclick, onmouseover, onmouseout) 
*************************************/
oCMenu2.makeMenu('top0','','','#','',87,'','/images/nav_f_about_off.gif','/images/nav_f_about_on.gif')
  oCMenu2.makeMenu('sub00','top0','Au sujet de l\'ACEPU','/about_f.asp','',125)
  oCMenu2.makeMenu('sub01','top0','Gouvernement','/governance_f.asp','',125)
  oCMenu2.makeMenu('sub02','top0','Bourse de<br>Steve Bonk','/scholarship_f.asp','',125,34)
  oCMenu2.makeMenu('sub03','top0','Convention de partenariat','/partneringagreement_f.asp','',125,34)
   oCMenu2.makeMenu('sub04','top0','Rapport de la<br>pr&eacute;sidente','/presidentsreport_f.asp','',125,34)
   oCMenu2.makeMenu('sub05','top0','Comités de l\'ACEPU','/committees_f.asp','',125)

oCMenu2.makeMenu('top1','','','','',66,'','/images/nav_f_news_off.gif','/images/nav_f_news_on.gif')
	oCMenu2.makeMenu('sub11','top1','Nouvelles courantes','/home_f.asp','',130)
	oCMenu2.makeMenu('sub12','top1','Nouvelles archives','/archivednews_f.asp','',130)
	oCMenu2.makeMenu('sub13','top1','Nouvelles f&eacute;d&eacute;rales','/federalnews_f.asp','',130)	

oCMenu2.makeMenu('top2','','','','',82,'','/images/nav_f_events_off.gif','/images/nav_f_events_on.gif')
	oCMenu2.makeMenu('sub21','top2','Calendrier des <br>&eacute;v&eacute;nements &agrave; venir ','/calendar_f.asp','',155,34)
	oCMenu2.makeMenu('sub22','top2','Conf&eacute;rence nationale sur l\'eau potable ','/13thconference_f.asp','',155,34)
	oCMenu2.makeMenu('sub23','top2','Conf&eacute;rence nationale canadienne sur les eaux us&eacute;es','/wastewaterconference_f.asp','',155,51)
	oCMenu2.makeMenu('sub24','top2','Fen&ecirc;tre sur Ottawa ','/windowonottawa_f.asp','',155)
	oCMenu2.makeMenu('sub25','top2','Journ&eacute;e mondiale<br>de l\'eau','/worldwater_f.asp','',155,34)
	oCMenu2.makeMenu('sub26','top2','Journ&eacute;e interam&eacute;ricaine<br>de l\'eau ','/iawd_f.asp','',155,34)
	
		
oCMenu2.makeMenu('top3','','','','',67,'','images/nav_f_policies_off.gif','/images/nav_f_policies_on.gif')
	oCMenu2.makeMenu('sub31','top3','Politiques','/policy_f.asp','',118)
	oCMenu2.makeMenu('sub32','top3','Prises de position','/position_f.asp','',118)
	oCMenu2.makeMenu('sub33','top3','R&eacute;solutions','/resolution_f.asp','',118)
		
oCMenu2.makeMenu('top4','','','','',121,'','/images/nav_f_data_off.gif','/images/nav_f_data_on.gif')
	oCMenu2.makeMenu('sub41','top4','Bases de donn&eacute;es accessibles','/databaselist_f.asp','',190)
	oCMenu2.makeMenu('sub42','top4','Législation canadienne sur les biosolides','/Biosolids_Legislation_f.asp','',190,34)
	
	
oCMenu2.makeMenu('top5','','','','',68,'','/images/nav_f_membership_off.gif','/images/nav_f_membership_on.gif')
	oCMenu2.makeMenu('sub51','top5','R&eacute;pertoire des membres','/membershipdirectory_f.asp','',172)
	oCMenu2.makeMenu('sub52','top5','Information sur la<br>demande d\'adh&eacute;sion','/membershipapplication_f.asp','',172,34)
	
oCMenu2.makeMenu('top6','','','','',81,'','/images/nav_f_pub_off.gif','/images/nav_f_pub_on.gif')
	oCMenu2.makeMenu('sub61','top6','Librairie de l\'ACEPU','/publicationorder_f.asp','',140)
	oCMenu2.makeMenu('sub62','top6','Points forts du bulletin','/bulletin_f.asp','',140)
	oCMenu2.makeMenu('sub63','top6','Publications gratuites','/freepub_f.asp','',140)

oCMenu2.makeMenu('top7','','','','',58,'','/images/nav_f_careers_off.gif','/images/nav_f_careers_on.gif')
	oCMenu2.makeMenu('sub71','top7','Postes de travail','/jobpage_f.asp','',118)
	

oCMenu2.makeMenu('top8','','','','',60,'','/images/nav_f_topics_off.gif','/images/nav_f_topics_on.gif')
	oCMenu2.makeMenu('sub81','top8','R&eacute;seau biosolides','/net_biosolids_f.asp','',168)
	oCMenu2.makeMenu('sub82','top8','R&eacute;seau conservation','/net_conservation_f.asp','',168)
	oCMenu2.makeMenu('sub83','top8','R&eacute;seau contr&ocirc;le de source','/net_sourcecontrol_f.asp','',168)
	oCMenu2.makeMenu('sub84','top8','R&eacute;seau am&eacute;nagement de bassins versants','/net_watershed_f.asp','',168,34)
	oCMenu2.makeMenu('sub85','top8','R&eacute;seau qualit&eacute; de l\'eau potable','/net_drinkingwater_f.asp','',168,34)
	oCMenu2.makeMenu('sub86','top8','R&eacute;seau securit&eacute;','/net_security_f.asp','',168)
	oCMenu2.makeMenu('sub87','top8','R&eacute;seau effluents','/net_effluents_f.asp','',168)
	
	
oCMenu2.makeMenu('top9','','','','',70,'','/images/nav_f_faq_off.gif','/images/nav_f_faq_on.gif')
	oCMenu2.makeMenu('sub91','top9','Services municipaux<br>des eaux potables','/faqmunicipal_f.asp','',132,34)
	oCMenu2.makeMenu('sub92','top9','Services municipaux<br>des eaux us&eacute;es','/faqwastewater_f.asp','',132,34)
	oCMenu2.makeMenu('sub93','top9','Approvisionnement<br>en eau priv&eacute;','/faqprivate_f.asp','',132,34)
	oCMenu2.makeMenu('sub94','top9','Traitement des eaux priv&eacute; us&eacute;es sur l\'emplacement','/faqonsiteseptic_f.asp','',132,51)
	oCMenu2.makeMenu('sub95','top9','R&eacute;sidus organiques','/faqbiosolids_f.asp','',132)


//Leave this line - it constructs the menu
oCMenu2.construct()		


