//  This file has changed all references to "/images" has been changed to "images"
//  for use on our local machines.
//
//  Center for IBM e-Business Innovation - Toronto
//  Iron Coder Victor Chan vwchan@ca.ibm.com - 12-05-2000  .
//  Copyright (c) IBM Canada - www.can.ibm.com
//
//  Bojan: added base URL variable for links - can be set to city-dev, city-qa, etc
//         added "+base+" to each href reference in the str variables

var iu='images/'; 
var mOverExt='_on.gif';
var mOutExt='_off.gif';
var base='http://www.toronto.ca' // base url for links

var str1="<table width=\"140\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\" height=\"112\"><tr><td><a href=\""+base+"/services/index.htm\" onMouseOver=\"mOver('menu1','menu1-1','City services'); return true\" onMouseOut=\"mOut('menu1','menu1-1');hide=true; timeOut('menu1',200); return true\"><img src=\"images/menu1-1_off.gif\" border=\"0\" width=\"140\" height=\"16\" name=\"menu1-1\" alt=\"City services\"></a></td></tr><tr><td><a href=\""+base+"/your_city/index.htm\" onMouseOver=\"mOver('menu1','menu1-2','Your city'); return true\" onMouseOut=\"mOut('menu1','menu1-2');hide=true; timeOut('menu1',200); return true\"><img src=\"images/menu1-2_off.gif\" border=\"0\" width=\"140\" height=\"16\" name=\"menu1-2\" alt=\"Your city\"></a></td></tr><tr><td><a href=\""+base+"/getting_around/index.htm\" onMouseOver=\"mOver('menu1','menu1-3','Getting around'); return true\" onMouseOut=\"mOut('menu1','menu1-3');hide=true; timeOut('menu1',200); return true\"><img src=\"images/menu1-3_off.gif\" border=\"0\" width=\"140\" height=\"16\" name=\"menu1-3\" alt=\"Getting around\"></a></td></tr><tr><td><a href=\""+base+"/attractions/index.htm\" onMouseOver=\"mOver('menu1','menu1-4','Things to do'); return true\" onMouseOut=\"mOut('menu1','menu1-4');hide=true; timeOut('menu1',200); return true\"><img src=\"images/menu1-4_off.gif\" border=\"0\" width=\"140\" height=\"16\" name=\"menu1-4\" alt=\"Things to do\"></a></td></tr><tr><td><a href=\""+base+"/environment/index.htm\" onMouseOver=\"mOver('menu1','menu1-5','Environment'); return true\" onMouseOut=\"mOut('menu1','menu1-5');hide=true; timeOut('menu1',200); return true\"><img src=\"images/menu1-5_off.gif\" border=\"0\" width=\"140\" height=\"16\" name=\"menu1-5\" alt=\"Environment\"></a></td></tr><tr><td><a href=\""+base+"/your_health/index.htm\" onMouseOver=\"mOver('menu1','menu1-6','Health'); return true\" onMouseOut=\"mOut('menu1','menu1-6');hide=true; timeOut('menu1',200); return true\"><img src=\"images/menu1-6_off.gif\" border=\"0\" width=\"140\" height=\"16\" name=\"menu1-6\" alt=\"Health\"></a></td></tr><tr><td><a href=\""+base+"/awards_grants/index.htm\" onMouseOver=\"mOver('menu1','menu1-7','Awards & grants'); return true\" onMouseOut=\"mOut('menu1','menu1-7');hide=true; timeOut('menu1',200); return true\"><img src=\"images/menu1-7_off.gif\" border=\"0\" width=\"140\" height=\"16\" name=\"menu1-7\" alt=\"Awards and grants\"></a></td></tr></table>";

var str2="<table border =\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"140\" height=\"128\"><tr><td width=\"140\" height=\"16\"><a href=\""+base+"/toronto_overview/index.htm\" onMouseOver=\"mOver('menu2','menu2-1','About Toronto'); return true\" onMouseOut=\"mOut('menu2','menu2-1');hide=true; timeOut('menu2',200); return true\"><img src=\"images/menu2-1_off.gif\" border=\"0\" width=\"140\" width=\"140\" height=\"16\" name=\"menu2-1\" alt=\"About Toronto\"></a></td></tr>  <tr><td width=\"140\" height=\"16\"><a href=\""+base+"/economic_profile/index.htm\" onMouseOver=\"mOver('menu2','menu2-2','Economic profile'); return true\" onMouseOut=\"mOut('menu2','menu2-2');hide=true; timeOut('menu2',200); return true\"><img src=\"images/menu2-2_off.gif\" border=\"0\" width=\"140\" width=\"140\" height=\"16\" name=\"menu2-2\" alt=\"Economic profile\"></a></td></tr><tr><td width=\"140\" height=\"16\"><a href=\""+base+"/quality_of_life/index.htm\" onMouseOver=\"mOver('menu2','menu2-3','Quality of life'); return true\" onMouseOut=\"mOut('menu2','menu2-3');hide=true; timeOut('menu2',200); return true\"><img src=\"images/menu2-3_off.gif\" border=\"0\" width=\"140\" width=\"140\" height=\"16\" name=\"menu2-3\" alt=\"Quality of life\"></a></td></tr><tr><td width=\"140\" height=\"16\"><a href=\""+base+"/city_initiatives/index.htm\" onMouseOver=\"mOver('menu2','menu2-4','City initiatives'); return true\" onMouseOut=\"mOut('menu2','menu2-4');hide=true; timeOut('menu2',200); return true\"><img src=\"images/menu2-4_off.gif\" border=\"0\" width=\"140\" width=\"140\" height=\"16\" name=\"menu2-4\" alt=\"City initiatives\"></a></td></tr><tr><td width=\"140\" height=\"16\"><a href=\""+base+"/business_publications/index.htm\" onMouseOver=\"mOver('menu2','menu2-5','Publications & reports'); return true\" onMouseOut=\"mOut('menu2','menu2-5');hide=true; timeOut('menu2',200); return true\"><img src=\"images/menu2-5_off.gif\" border=\"0\" width=\"140\" width=\"140\" height=\"16\" name=\"menu2-5\" alt=\"Publications and reports\"></a></td></tr><tr><td width=\"140\" height=\"16\"><a href=\""+base+"/tenders/index.htm\" onMouseOver=\"mOver('menu2','menu2-6','Tenders'); return true\" onMouseOut=\"mOut('menu2','menu2-6');hide=true; timeOut('menu2',200); return true\"><img src=\"images/menu2-6_off.gif\" border=\"0\" width=\"140\" width=\"140\" height=\"16\" name=\"menu2-6\" alt=\"Tenders\"></a></td></tr><tr><td width=\"140\" height=\"16\"><a href=\""+base+"/business_resources/index.htm\" onMouseOver=\"mOver('menu2','menu2-7','Resources for businesses'); return true\" onMouseOut=\"mOut('menu2','menu2-7');hide=true; timeOut('menu2',200); return true\"><img src=\"images/menu2-7_off.gif\" border=\"0\" width=\"140\" width=\"140\" height=\"16\" name=\"menu2-7\" alt=\"Resources for businesses\"></a></td></tr><tr><td width=\"140\" height=\"16\"><a href=\""+base+"/services/index.htm\" onMouseOver=\"mOver('menu2','menu2-8','Services'); return true\" onMouseOut=\"mOut('menu2','menu2-8');hide=true; timeOut('menu2',200); return true\"><img src=\"images/menu2-8_off.gif\" border=\"0\" width=\"140\" width=\"140\" height=\"16\" name=\"menu2-8\" alt=\"Services\"></a></td></tr></table>";

var str3="<table border =\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"140\" height=\"64\"><tr><td width=\"140\" height=\"16\"><a href=\""+base+"/about_toronto/index.htm\" onMouseOver=\"mOver('menu3','menu3-1','About Toronto'); return true\" onMouseOut=\"mOut('menu3','menu3-1');hide=true; timeOut('menu3',200); return true\"><img src=\"images/menu3-1_off.gif\" border=\"0\" width=\"140\" width=\"140\" height=\"16\" name=\"menu3-1\" alt=\"About Toronto\"></a></td></tr><tr><td width=\"140\" height=\"16\"><a href=\""+base+"/attractions/index.htm\" onMouseOver=\"mOver('menu3','menu3-2','Attractions'); return true\" onMouseOut=\"mOut('menu3','menu3-2');hide=true; timeOut('menu3',200); return true\"><img src=\"images/menu3-2_off.gif\" border=\"0\" width=\"140\" width=\"140\" height=\"16\" name=\"menu3-2\" alt=\"Attractions\"></a></td></tr><tr><td width=\"140\" height=\"16\"><a href=\""+base+"/getting_around/index.htm\" onMouseOver=\"mOver('menu3','menu3-3','Getting around'); return true\" onMouseOut=\"mOut('menu3','menu3-3');hide=true; timeOut('menu3',200); return true\"><img src=\"images/menu3-3_off.gif\" border=\"0\" width=\"140\" width=\"140\" height=\"16\" name=\"menu3-3\" alt=\"Getting around\"></a></td></tr><tr><td width=\"140\" height=\"16\"><a href=\""+base+"/services/index.htm\" onMouseOver=\"mOver('menu3','menu3-4','Services'); return true\" onMouseOut=\"mOut('menu3','menu3-4');hide=true; timeOut('menu3',200); return true\"><img src=\"images/menu3-4_off.gif\" border=\"0\" width=\"140\" width=\"140\" height=\"16\" name=\"menu3-4\" alt=\"Services\"></a></td></tr></table>";

var str4="<table border =\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"140\" height=\"182\"><tr><td width=\"140\" height=\"16\"><a href=\""+base+"/city_council/index.htm\" onMouseOver=\"mOver('menu4','menu4-1','City Council'); return true\" onMouseOut=\"mOut('menu4','menu4-1');hide=true; timeOut('menu4',200); return true\"><img src=\"images/menu4-1_off.gif\" border=\"0\" width=\"140\" width=\"140\" height=\"16\" name=\"menu4-1\" alt=\"City Council\"></a></td></tr><tr><td width=\"140\" height=\"16\"><a href=\""+base+"/city_initiatives/index.htm\" onMouseOver=\"mOver('menu4','menu4-2','City initiatives'); return true\" onMouseOut=\"mOut('menu4','menu4-2');hide=true; timeOut('menu4',200); return true\"><img src=\"images/menu4-2_off.gif\" border=\"0\" width=\"140\" width=\"140\" height=\"16\" name=\"menu4-2\" alt=\"Council initiatives\"></a></td></tr><tr><td width=\"140\" height=\"16\"><a href=\""+base+"/departments/index.htm\" onMouseOver=\"mOver('menu4','menu4-3','Departments'); return true\" onMouseOut=\"mOut('menu4','menu4-3');hide=true; timeOut('menu4',200); return true\"><img src=\"images/menu4-3_off.gif\" border=\"0\" width=\"140\" width=\"140\" height=\"16\" name=\"menu4-3\" alt=\"Departments\"></a></td></tr><tr><td width=\"140\" height=\"16\"><a href=\""+base+"/committees/index.htm\" onMouseOver=\"mOver('menu4','menu4-4','Committees'); return true\" onMouseOut=\"mOut('menu4','menu4-4');hide=true; timeOut('menu4',200); return true\"><img src=\"images/menu4-4_off.gif\" border=\"0\" width=\"140\" width=\"140\" height=\"16\" name=\"menu4-4\" alt=\"Committees\"></a></td></tr><tr><td width=\"140\" height=\"16\"><a href=\""+base+"/abc/index.htm\" onMouseOver=\"mOver('menu4','menu4-5','Agencies, boards & commissions'); return true\" onMouseOut=\"mOut('menu4','menu4-5');hide=true; timeOut('menu4',200); return true\"><img src=\"images/menu4-5_off.gif\" border=\"0\" width=\"140\" height=\"27\" name=\"menu4-5\" alt=\"Agencies, boards and commissions\"></a></td></tr><tr><td width=\"140\" height=\"16\"><a href=\""+base+"/task_force/index.htm\" onMouseOver=\"mOver('menu4','menu4-6','Task forces'); return true\" onMouseOut=\"mOut('menu4','menu4-6');hide=true; timeOut('menu4',200); return true\"><img src=\"images/menu4-6_off.gif\" border=\"0\" width=\"140\" width=\"140\" height=\"16\" name=\"menu4-6\" alt=\"Task forces\"></a></td></tr><tr><td width=\"140\" height=\"16\"><a href=\""+base+"/your_city/index.htm\" onMouseOver=\"mOver('menu4','menu4-7','Your city'); return true\" onMouseOut=\"mOut('menu4','menu4-7');hide=true; timeOut('menu4',200); return true\"><img src=\"images/menu4-7_off.gif\" border=\"0\" width=\"140\" width=\"140\" height=\"16\" name=\"menu4-7\" alt=\"Your city\"></a></td></tr><tr><td width=\"140\" height=\"16\"><a href=\""+base+"/city_wards/\" onMouseOver=\"mOver('menu4','menu4-8','Wards'); return true\" onMouseOut=\"mOut('menu4','menu4-8');hide=true; timeOut('menu4',200); return true\"><img src=\"images/menu4-8_off.gif\" border=\"0\" width=\"140\" width=\"140\" height=\"16\" name=\"menu4-8\" alt=\"Wards\"></a></td></tr><tr><td width=\"140\" height=\"16\"><a href=\""+base+"/city_publications/index.htm\" onMouseOver=\"mOver('menu4','menu4-9','Publications, forms & applications'); return true\" onMouseOut=\"mOut('menu4','menu4-9');hide=true; timeOut('menu4',200); return true\"><img src=\"images/menu4-9_off.gif\" width=\"140\" height=\"27\" border=\"0\" name=\"menu4-9\" alt=\"Publications, forms and applications\"></a></td></tr><tr><td width=\"140\" height=\"16\"><a href=\""+base+"/services/index.htm\" onMouseOver=\"mOver('menu4','menu4-10','Services'); return true\" onMouseOut=\"mOut('menu4','menu4-10');hide=true; timeOut('menu4',200); return true\"><img src=\"images/menu4-10_off.gif\" width=\"140\" width=\"140\" height=\"16\" border=\"0\" name=\"menu4-10\" alt=\"Services\"></a></td></tr></table>";
  
//Code shouldn't have to be edited beyond this point regardless of what changes need to be made to the drop-downs
//Functions only below
//used by sub-menus
function mOver(imgLayer,imgName,descr) {
	hide=false;
	if((ns4)) {document.layers[imgLayer].document[imgName].src=iu+imgName+mOverExt;}
	else {this.document[imgName].src=iu+imgName+mOverExt;}
	if (descr){window.status=descr;}
}

//used by sub-menus
function mOut(imgLayer,imgName) {
	if((ns4)) {document.layers[imgLayer].document[imgName].src=iu+imgName+mOutExt;}
	else {this.document[imgName].src=iu+imgName+mOutExt;}
	window.status='';
}

//used by menu to reveal selected sub-menus, and to hide non-selected sub-menus to prevent overlapping
function show(mnuLayer) {
	if (loaded==true) {
		if ((oldShow!=mnuLayer)&&(oldShow!='')) {
			newShow=mnuLayer;
			hideOld();
		}
		oldShow=mnuLayer;
		if ((ns4) ) document.layers[mnuLayer].visibility = "show"
		if ((ie4)) document.all[mnuLayer].style.visibility = "visible"
		if ((DOM))  document.getElementById(mnuLayer).style.visibility = "visible"
			
	}
}

//used by sub-menus to hide its layer if user moves off a selection but is provides delay
//to allow for user to move between selections (normal mOuts are too quick to switch off layer)
function timeOut(mnuLayer,delay) {
	if (loaded==true) {
		if ((ns4) || (ie4) || (DOM)) {
			hideLayer=mnuLayer;
			setTimeout ("delayHide()",delay);
		}
	}
}

//called by timeOut function...if user has not moused over a selection (hide=false) within
//the delay period by now, sub-menu layer will be hidden
function delayHide() {
	if (hide==true) {
		if ((ns4)) {document.layers[hideLayer].visibility = "hide"; }
		if ((ie4)) {document.all[hideLayer].style.visibility = "hidden"; }
		if ((DOM)) {document.getElementById(hideLayer).style.visibility = "hidden"; }
	}
}

//called by show function to hide sub-menus that user has moved away from...important call
//if they just mOver'ed prev menu but not prev sub-menu
function hideOld() {
	if ((ns4)) {document.layers[oldShow].visibility = "hide";}
	if ((ie4)) {document.all[oldShow].style.visibility = "hidden";}
	if ((DOM)) {document.getElementById(oldShow).style.visibility = "hidden"; }
	oldShow=newShow;
}

// Resize fix courtesy of WebMonkey - good stuff at www.webmonkey.com
function WM_netscapeCssFix() {
  if (document.WM.WM_netscapeCssFix.initWindowWidth != window.innerWidth ||
document.WM.WM_netscapeCssFix.initWindowHeight != window.innerHeight) {
    document.location = document.location;
  }
}

function WM_netscapeCssFixCheckIn() {
  if ((navigator.appName == 'Netscape') && (parseInt(navigator.appVersion) == 4)) {
    if (typeof document.WM == 'undefined'){
      document.WM = new Object;
    }
    if (typeof document.WM.WM_scaleFont == 'undefined') {
      document.WM.WM_netscapeCssFix = new Object;
      document.WM.WM_netscapeCssFix.initWindowWidth = window.innerWidth;
      document.WM.WM_netscapeCssFix.initWindowHeight = window.innerHeight;
    }
    window.onresize = WM_netscapeCssFix;
  }
}

WM_netscapeCssFixCheckIn();

//end
