//##################################################################################################################
//MAAK Technologies Group Website
//Developer: Jeff Gobatto, P. Eng.
//Date: 2009-02-27
//##################################################################################################################

//declare and instantiate baseurl variable for referencing which document is open
var baseurl='http://www.maakgroup.com/new/';
var currurl='';
var tmpurl='';


//MAAK Info Email Generation Function
function GenInfoEmail() {
document.write('<a class="regular" href="mailto:i'+'nfo'+'@'+'maak'+'group'+'.'+'com?subject=mail from MAAK website">this address</a>');
}
//Alnoor Email Generation Function
function GenAlnoorEmail() {
document.write('<a class="regular" href="mailto:a'+'allidina'+'@'+'maak'+'group'+'.'+'com?subject=mail from MAAK website">Alnoor Allidina</a>');
}

//Footer Generation Function
function GenFooter() {
document.write('<p align="center" style="font-size: 10px">');
document.write('Copyright © 2006 MAAK Technologies Group Incorporated<br>');
document.write('Contact <a href="mailto:j'+'gobatto'+'@'+'maak'+'group'+'.'+'com?subject=mail for MAAK webmaster">webmaster</a>');
document.write('</p>');
}

//Banner Generation Function
function GenBanner() {
//define 2 hidden textboxes to store top and secondary menu levels*/
document.write('<form id="frmBanner">');
document.write('<input type="hidden" id="txtMain" size="20">');
document.write('<input type="hidden" id="txtSub" size="20">');
document.write('</form>');
//draw images
document.write('  <a href="index.htm"><img align="left" border="0" src="images/banner.png" width="750" height="88"></a>');
//define textbox contents based on current document
tmpurl = document.location.href;
currurl = baseurl + tmpurl.substring(tmpurl.indexOf('/',8)+1);
switch (currurl) {
	case (baseurl): {
		frmBanner.txtMain.Value = '';
		frmBanner.txtSub.Value = '';
		break;
		}
	case (baseurl+'index.htm'): {
		frmBanner.txtMain.Value = '';
		frmBanner.txtSub.Value = '';
		break;
		}
	case (baseurl+'index1.htm'): {
		frmBanner.txtMain.Value = '';
		frmBanner.txtSub.Value = '';
		break;
		}
	case (baseurl+'index2.htm'): {
		frmBanner.txtMain.Value = '';
		frmBanner.txtSub.Value = '';
		break;
		}
	case (baseurl+'index3.htm'): {
		frmBanner.txtMain.Value = '';
		frmBanner.txtSub.Value = '';
		break;
		}
	case (baseurl+'index4.htm'): {
		frmBanner.txtMain.Value = '';
		frmBanner.txtSub.Value = '';
		break;
		}
	case (baseurl+'pgServices.htm'): {
		frmBanner.txtMain.Value = 'Svc';
		frmBanner.txtSub.Value = 'Svc';
		break;
		}
	case (baseurl+'pgServices_PlanEngMgmt.htm'): {
		frmBanner.txtMain.Value = 'Svc';
		frmBanner.txtSub.Value = 'SvcPEM';
		break;
		}
	case (baseurl+'pgServices_AutomationIntegration.htm'): {
		frmBanner.txtMain.Value = 'Svc';
		frmBanner.txtSub.Value = 'SvcAI';
		break;
		}
	case (baseurl+'pgServices_DataManagement.htm'): {
		frmBanner.txtMain.Value = 'Svc';
		frmBanner.txtSub.Value = 'SvcDM';
		break;
		}
	case (baseurl+'pgServices_TestingValidation.htm'): {
		frmBanner.txtMain.Value = 'Svc';
		frmBanner.txtSub.Value = 'SvcTV';
		break;
		}
	case (baseurl+'pgServices_Optimization.htm'): {
		frmBanner.txtMain.Value = 'Svc';
		frmBanner.txtSub.Value = 'SvcOpt';
		break;
		}
	case (baseurl+'pgServices_ControlSystems.htm'): {
		frmBanner.txtMain.Value = 'Svc';
		frmBanner.txtSub.Value = 'SvcCP';
		break;
		}
	case (baseurl+'pgMarkets.htm'): {
		frmBanner.txtMain.Value = 'Mkt';
		frmBanner.txtSub.Value = 'Mkt';
		break;
		}
	case (baseurl+'pgMarkets_Pharmaceutical.htm'): {
		frmBanner.txtMain.Value = 'Mkt';
		frmBanner.txtSub.Value = 'MktPhm';
		break;
		}
	case (baseurl+'pgMarkets_WaterWastewater.htm'): {
		frmBanner.txtMain.Value = 'Mkt';
		frmBanner.txtSub.Value = 'MktWW';
		break;
		}
	case (baseurl+'pgMarkets_Industrial.htm'): {
		frmBanner.txtMain.Value = 'Mkt';
		frmBanner.txtSub.Value = 'MktInd';
		break;
		}
	case (baseurl+'pgMarkets_Power.htm'): {
		frmBanner.txtMain.Value = 'Mkt';
		frmBanner.txtSub.Value = 'MktPwr';
		break;
		}
	case (baseurl+'pgProjects.htm'): {
		frmBanner.txtMain.Value = 'Prj';
		frmBanner.txtSub.Value = 'Prj';
		break;
		}
	case (baseurl+'pgProjects_Pharmaceutical.htm'): {
		frmBanner.txtMain.Value = 'Prj';
		frmBanner.txtSub.Value = 'PrjPhm';
		break;
		}
	case (baseurl+'pgProjects_WaterWastewater.htm'): {
		frmBanner.txtMain.Value = 'Prj';
		frmBanner.txtSub.Value = 'PrjWW';
		break;
		}
	case (baseurl+'pgProjects_Industrial.htm'): {
		frmBanner.txtMain.Value = 'Prj';
		frmBanner.txtSub.Value = 'PrjInd';
		break;
		}
	case (baseurl+'pgInformation.htm'): {
		frmBanner.txtMain.Value = 'Inf';
		frmBanner.txtSub.Value = 'Inf';
		break;
		}
	case (baseurl+'pgInformation_OfficeLoc.htm'): {
		frmBanner.txtMain.Value = 'Inf';
		frmBanner.txtSub.Value = 'InfOff';
		break;
		}
	case (baseurl+'pgInformation_PanelShopLoc.htm'): {
		frmBanner.txtMain.Value = 'Inf';
		frmBanner.txtSub.Value = 'InfPS';
		break;
		}
	case (baseurl+'pgInformation_ContactUs.htm'): {
		frmBanner.txtMain.Value = 'Inf';
		frmBanner.txtSub.Value = 'InfCon';
		break;
		}
	case (baseurl+'pgInformation_Careers.htm'): {
		frmBanner.txtMain.Value = 'Inf';
		frmBanner.txtSub.Value = 'InfCar';
		break;
		}
	}
}

//Treebar Generation Function
function GenTreeBar() {
document.write('<table class="treebar" id="treebar"><tr><td>');
//define treebar contents based on current document
tmpurl = document.location.href;
currurl = baseurl + tmpurl.substring(tmpurl.indexOf('/',8)+1);
switch (currurl) {
	case (baseurl+'index.htm'): {
		document.write('<b><a class="treebar" href="index.htm">Home</a></b>');
		break;
		}
	case (baseurl+'pgSiteMap.htm'): {
		document.write('<b><a class="treebar" href="index.htm">Home</a></b> > <b><a class="treebar" href="pgSiteMap.htm">SiteMap</a></b>');
		break;
		}
	case (baseurl+'pgServices.htm'): {
		document.write('<b><a class="treebar" href="index.htm">Home</a></b> > <b><a class="treebar" href="pgServices.htm">Services</a></b>');
		break;
		}
	case (baseurl+'pgServices_PlanEngMgmt.htm'): {
		document.write('<b><a class="treebar" href="index.htm">Home</a></b> > <b><a class="treebar" href="pgServices.htm">Services</a></b> > <b><a class="treebar" href="pgServices_PlanEngMgmt.htm">Planning, Enginnering & Management</a></b>');
		break;
		}
	case (baseurl+'pgServices_AutomationIntegration.htm'): {
		document.write('<b><a class="treebar" href="index.htm">Home</a></b> > <b><a class="treebar" href="pgServices.htm">Services</a></b> > <b><a class="treebar" href="pgServices_AutomationIntegration.htm">Automation System Design and Integration</a></b>');
		break;
		}
	case (baseurl+'pgServices_DataManagement.htm'): {
		document.write('<b><a class="treebar" href="index.htm">Home</a></b> > <b><a class="treebar" href="pgServices.htm">Services</a></b> > <b><a class="treebar" href="pgServices_DataManagement.htm">Data Management</a></b>');
		break;
		}
	case (baseurl+'pgServices_TestingValidation.htm'): {
		document.write('<b><a class="treebar" href="index.htm">Home</a></b> > <b><a class="treebar" href="pgServices.htm">Services</a></b> > <b><a class="treebar" href="pgServices_TestingValidation.htm">Testing & Validation</a></b>');
		break;
		}
	case (baseurl+'pgServices_Optimization.htm'): {
		document.write('<b><a class="treebar" href="index.htm">Home</a></b> > <b><a class="treebar" href="pgServices.htm">Services</a></b> > <b><a class="treebar" href="pgServices_Optimization.htm">Optimization</a></b>');
		break;
		}
	case (baseurl+'pgServices_ControlSystems.htm'): {
		document.write('<b><a class="treebar" href="index.htm">Home</a></b> > <b><a class="treebar" href="pgServices.htm">Services</a></b> > <b><a class="treebar" href="pgServices_ControlSystems.htm">Control Systems</a></b>');
		break;
		}
	case (baseurl+'pgMarkets.htm'): {
		document.write('<b><a class="treebar" href="index.htm">Home</a></b> > <b><a class="treebar" href="pgMarkets.htm">Markets</a></b>');
		break;
		}
	case (baseurl+'pgMarkets_Pharmaceutical.htm'): {
		document.write('<b><a class="treebar" href="index.htm">Home</a></b> > <b><a class="treebar" href="pgMarkets.htm">Markets</a></b> > <b><a class="treebar" href="pgMarkets_Pharmaceutical.htm">Pharmaceutical</a></b>');
		break;
		}
	case (baseurl+'pgMarkets_WaterWastewater.htm'): {
		document.write('<b><a class="treebar" href="index.htm">Home</a></b> > <b><a class="treebar" href="pgMarkets.htm">Markets</a></b> > <b><a class="treebar" href="pgMarkets_WaterWastewater.htm">Water/Wastewater</a></b>');
		break;
		}
	case (baseurl+'pgMarkets_Industrial.htm'): {
		document.write('<b><a class="treebar" href="index.htm">Home</a></b> > <b><a class="treebar" href="pgMarkets.htm">Markets</a></b> > <b><a class="treebar" href="pgMarkets_Industrial.htm">Industrial</a></b>');
		break;
		}
	case (baseurl+'pgMarkets_Power.htm'): {
		document.write('<b><a class="treebar" href="index.htm">Home</a></b> > <b><a class="treebar" href="pgMarkets.htm">Markets</a></b> > <b><a class="treebar" href="pgMarkets_Power.htm">Power</a></b>');
		break;
		}
	case (baseurl+'pgProjects.htm'): {
		document.write('<b><a class="treebar" href="index.htm">Home</a></b> > <b><a class="treebar" href="pgProjects.htm">Projects</a></b>');
		break;
		}
	case (baseurl+'pgProjects_Pharmaceutical.htm'): {
		document.write('<b><a class="treebar" href="index.htm">Home</a></b> > <b><a class="treebar" href="pgProjects.htm">Projects</a></b> > <b><a class="treebar" href="pgProjects_Pharmaceutical.htm">Pharmaceutical</a></b>');
		break;
		}
	case (baseurl+'pgProjects_Phm_Autoclave.htm'): {
		document.write('<b><a class="treebar" href="index.htm">Home</a></b> > <b><a class="treebar" href="pgProjects.htm">Projects</a></b> > <b><a class="treebar" href="pgProjects_Pharmaceutical.htm">Pharmaceutical</a></b> > <b><a class="treebar" href="pgProjects_Phm_Autoclave.htm">Sterilizing Autoclave Controller Retrofit</a></b>');
		break;
		}
	case (baseurl+'pgProjects_Phm_BioScaleUp.htm'): {
		document.write('<b><a class="treebar" href="index.htm">Home</a></b> > <b><a class="treebar" href="pgProjects.htm">Projects</a></b> > <b><a class="treebar" href="pgProjects_Pharmaceutical.htm">Pharmaceutical</a></b> > <b><a class="treebar" href="pgProjects_Phm_BioScaleUp.htm">Commercial Scale-Up Facility</a></b>');
		break;
		}
	case (baseurl+'pgProjects_Phm_WFI.htm'): {
		document.write('<b><a class="treebar" href="index.htm">Home</a></b> > <b><a class="treebar" href="pgProjects.htm">Projects</a></b> > <b><a class="treebar" href="pgProjects_Pharmaceutical.htm">Pharmaceutical</a></b> > <b><a class="treebar" href="pgProjects_Phm_WFI.htm">WFI Storage and Distribution Control Systems</a></b>');
		break;
		}
	case (baseurl+'pgProjects_Phm_PolioSuite.htm'): {
		document.write('<b><a class="treebar" href="index.htm">Home</a></b> > <b><a class="treebar" href="pgProjects.htm">Projects</a></b> > <b><a class="treebar" href="pgProjects_Pharmaceutical.htm">Pharmaceutical</a></b> > <b><a class="treebar" href="pgProjects_Phm_PolioSuite.htm">Suite Control System for Polio Production Facility</a></b>');
		break;
		}
	case (baseurl+'pgProjects_Phm_VirusSuite.htm'): {
		document.write('<b><a class="treebar" href="index.htm">Home</a></b> > <b><a class="treebar" href="pgProjects.htm">Projects</a></b> > <b><a class="treebar" href="pgProjects_Pharmaceutical.htm">Pharmaceutical</a></b> > <b><a class="treebar" href="pgProjects_Phm_VirusSuite.htm">Virus Production Facility</a></b>');
		break;
		}
	case (baseurl+'pgProjects_Phm_HVAC.htm'): {
		document.write('<b><a class="treebar" href="index.htm">Home</a></b> > <b><a class="treebar" href="pgProjects.htm">Projects</a></b> > <b><a class="treebar" href="pgProjects_Pharmaceutical.htm">Pharmaceutical</a></b> > <b><a class="treebar" href="pgProjects_Phm_HVAC.htm">HVAC Control System</a></b>');
		break;
		}
	case (baseurl+'pgProjects_WaterWastewater.htm'): {
		document.write('<b><a class="treebar" href="index.htm">Home</a></b> > <b><a class="treebar" href="pgProjects.htm">Projects</a></b> > <b><a class="treebar" href="pgProjects_WaterWastewater.htm">Water/Wastewater</a></b>');
		break;
		}
	case (baseurl+'pgProjects_WW_PCS.htm'): {
		document.write('<b><a class="treebar" href="index.htm">Home</a></b> > <b><a class="treebar" href="pgProjects.htm">Projects</a></b> > <b><a class="treebar" href="pgProjects_WaterWastewater.htm">Water/Wastewater</a></b> > <b><a class="treebar" href="pgProjects_WW_PCS.htm">City of Toronto Process Control System (PCS)</a></b>');
		break;
		}
	case (baseurl+'pgProjects_WW_Optimizer.htm'): {
		document.write('<b><a class="treebar" href="index.htm">Home</a></b> > <b><a class="treebar" href="pgProjects.htm">Projects</a></b> > <b><a class="treebar" href="pgProjects_WaterWastewater.htm">Water/Wastewater</a></b> > <b><a class="treebar" href="pgProjects_WW_Optimizer.htm">Transmission Operations Optimizer Study</a></b>');
		break;
		}
	case (baseurl+'pgProjects_WW_RAC.htm'): {
		document.write('<b><a class="treebar" href="index.htm">Home</a></b> > <b><a class="treebar" href="pgProjects.htm">Projects</a></b> > <b><a class="treebar" href="pgProjects_WaterWastewater.htm">Water/Wastewater</a></b> > <b><a class="treebar" href="pgProjects_WW_RAC.htm">Remote Access Control (RAC)</a></b>');
		break;
		}
	case (baseurl+'pgProjects_WW_OrilliaWFP.htm'): {
		document.write('<b><a class="treebar" href="index.htm">Home</a></b> > <b><a class="treebar" href="pgProjects.htm">Projects</a></b> > <b><a class="treebar" href="pgProjects_WaterWastewater.htm">Water/Wastewater</a></b> > <b><a class="treebar" href="pgProjects_WW_OrilliaWFP.htm">Orillia Water Filtration Plant (WFP) Upgrade</a></b>');
		break;
		}
	case (baseurl+'pgProjects_WW_CasinoRamaSTP.htm'): {
		document.write('<b><a class="treebar" href="index.htm">Home</a></b> > <b><a class="treebar" href="pgProjects.htm">Projects</a></b> > <b><a class="treebar" href="pgProjects_WaterWastewater.htm">Water/Wastewater</a></b> > <b><a class="treebar" href="pgProjects_WW_CasinoRamaSTP.htm">Casino Rama Sewage Treatment Plant (STP)</a></b>');
		break;
		}
	case (baseurl+'pgProjects_WW_CasinoRamaWTP.htm'): {
		document.write('<b><a class="treebar" href="index.htm">Home</a></b> > <b><a class="treebar" href="pgProjects.htm">Projects</a></b> > <b><a class="treebar" href="pgProjects_WaterWastewater.htm">Water/Wastewater</a></b> > <b><a class="treebar" href="pgProjects_WW_CasinoRamaWTP.htm">Casino Rama Water Treatment Plant (WTP)</a></b>');
		break;
		}
	case (baseurl+'pgProjects_WW_YorkNorthWW.htm'): {
		document.write('<b><a class="treebar" href="index.htm">Home</a></b> > <b><a class="treebar" href="pgProjects.htm">Projects</a></b> > <b><a class="treebar" href="pgProjects_WaterWastewater.htm">Water/Wastewater</a></b> > <b><a class="treebar" href="pgProjects_WW_YorkNorthWW.htm">Region of York North Wastewater SCADA</a></b>');
		break;
		}
	case (baseurl+'pgProjects_WW_WASA.htm'): {
		document.write('<b><a class="treebar" href="index.htm">Home</a></b> > <b><a class="treebar" href="pgProjects.htm">Projects</a></b> > <b><a class="treebar" href="pgProjects_WaterWastewater.htm">Water/Wastewater</a></b> > <b><a class="treebar" href="pgProjects_WW_WASA.htm">Trinidad and Tobago Operation Control Centres</a></b>');
		break;
		}
	case (baseurl+'pgProjects_WW_CourlandWTP.htm'): {
		document.write('<b><a class="treebar" href="index.htm">Home</a></b> > <b><a class="treebar" href="pgProjects.htm">Projects</a></b> > <b><a class="treebar" href="pgProjects_WaterWastewater.htm">Water/Wastewater</a></b> > <b><a class="treebar" href="pgProjects_WW_CourlandWTP.htm">Courland Water Treatment Plant (WTP)</a></b>');
		break;
		}
	case (baseurl+'pgProjects_WW_HW6B.htm'): {
		document.write('<b><a class="treebar" href="index.htm">Home</a></b> > <b><a class="treebar" href="pgProjects.htm">Projects</a></b> > <b><a class="treebar" href="pgProjects_WaterWastewater.htm">Water/Wastewater</a></b> > <b><a class="treebar" href="pgProjects_WW_HW6B.htm">Hamilton-Wentworth 6B Pumping Station</a></b>');
		break;
		}
	case (baseurl+'pgProjects_WW_WPCP.htm'): {
		document.write('<b><a class="treebar" href="index.htm">Home</a></b> > <b><a class="treebar" href="pgProjects.htm">Projects</a></b> > <b><a class="treebar" href="pgProjects_WaterWastewater.htm">Water/Wastewater</a></b> > <b><a class="treebar" href="pgProjects_WW_WPCP.htm">Lake Simcoe Water Pollution Control Plant (WPCP)</a></b>');
		break;
		}
	case (baseurl+'pgProjects_WW_ConlinRdPS.htm'): {
		document.write('<b><a class="treebar" href="index.htm">Home</a></b> > <b><a class="treebar" href="pgProjects.htm">Projects</a></b> > <b><a class="treebar" href="pgProjects_WaterWastewater.htm">Water/Wastewater</a></b> > <b><a class="treebar" href="pgProjects_WW_ConlinRdPS.htm">Conlin Road Pumping Station</a></b>');
		break;
		}
	case (baseurl+'pgProjects_Industrial.htm'): {
		document.write('<b><a class="treebar" href="index.htm">Home</a></b> > <b><a class="treebar" href="pgProjects.htm">Projects</a></b> > <b><a class="treebar" href="pgProjects_Industrial.htm">Industrial</a></b>');
		break;
		}
	case (baseurl+'pgProjects_Ind_FoamBoss.htm'): {
		document.write('<b><a class="treebar" href="index.htm">Home</a></b> > <b><a class="treebar" href="pgProjects.htm">Projects</a></b> > <b><a class="treebar" href="pgProjects_Industrial.htm">Industrial</a></b> > <b><a class="treebar" href="pgProjects_Ind_FoamBoss.htm">Vehicle Fire Fighting Control System</a></b>');
		break;
		}
	case (baseurl+'pgProjects_Ind_Reclaimers.htm'): {
		document.write('<b><a class="treebar" href="index.htm">Home</a></b> > <b><a class="treebar" href="pgProjects.htm">Projects</a></b> > <b><a class="treebar" href="pgProjects_Industrial.htm">Industrial</a></b> > <b><a class="treebar" href="pgProjects_Ind_Reclaimers.htm">Stacker/Reclaimer Control Systems</a></b>');
		break;
		}
	case (baseurl+'pgProjects_Ind_PaintFacility.htm'): {
		document.write('<b><a class="treebar" href="index.htm">Home</a></b> > <b><a class="treebar" href="pgProjects.htm">Projects</a></b> > <b><a class="treebar" href="pgProjects_Industrial.htm">Industrial</a></b> > <b><a class="treebar" href="pgProjects_Ind_PaintFacility.htm">Paint Facility Control System Support</a></b>');
		break;
		}
	case (baseurl+'pgProjects_Ind_ChemPlantIS.htm'): {
		document.write('<b><a class="treebar" href="index.htm">Home</a></b> > <b><a class="treebar" href="pgProjects.htm">Projects</a></b> > <b><a class="treebar" href="pgProjects_Industrial.htm">Industrial</a></b> > <b><a class="treebar" href="pgProjects_Ind_ChemPlantIS.htm">Chemical Plant SCADA/Information System</a></b>');
		break;
		}
	case (baseurl+'pgInformation.htm'): {
		document.write('<b><a class="treebar" href="index.htm">Home</a></b> > <b><a class="treebar" href="pgInformation.htm">Information</a></b>');
		break;
		}
	case (baseurl+'pgInformation_OfficeLoc.htm'): {
		document.write('<b><a class="treebar" href="index.htm">Home</a></b> > <b><a class="treebar" href="pgInformation.htm">Information</a></b> > <b><a class="treebar" href="pgInformation_OfficeLoc.htm">Office Location</a></b>');
		break;
		}
	case (baseurl+'pgInformation_PanelShopLoc.htm'): {
		document.write('<b><a class="treebar" href="index.htm">Home</a></b> > <b><a class="treebar" href="pgInformation.htm">Information</a></b> > <b><a class="treebar" href="pgInformation_PanelShopLoc.htm">Panel Shop Location</a></b>');
		break;
		}
	case (baseurl+'pgInformation_ContactUs.htm'): {
		document.write('<b><a class="treebar" href="index.htm">Home</a></b> > <b><a class="treebar" href="pgInformation.htm">Information</a></b> > <b><a class="treebar" href="pgInformation_ContactUs.htm">Contact Us</a></b>');
		break;
		}
	case (baseurl+'pgInformation_Careers.htm'): {
		document.write('<b><a class="treebar" href="index.htm">Home</a></b> > <b><a class="treebar" href="pgInformation.htm">Information</a></b> > <b><a class="treebar" href="pgInformation_Careers.htm">Careers</a></b>');
		break;
		}
	default: {
		document.write('<b><a class="treebar" href="index.htm">Home</a></b>');
		break;
		}
	}
document.write('</td></tr></table>');
}