
var TableStart = "";
var RowStart = "";
var RowEnd = "";
var TableEnd = "";

var LeftAnimalHousingTextMenu	= 149;
var LeftAnimalSurgeryTextMenu	= 149;
var LeftEfficacyTextMenu		= 149;
var LeftDMPKTextMenu			= 149;
var LeftToxicologyTextMenu		= 149;
var LeftSafetyTextMenu			= 149;
var LeftPharmacyTextMenu		= 149;
var LeftTargetValidationTextMenu		= 149;

var TopAnimalHousingTextMenu	= 234;
var TopAnimalSurgeryTextMenu	= 207;
var TopEfficacyTextMenu			= 232;
var TopDMPKTextMenu				= 217;
var TopToxicologyTextMenu		= 307;
var TopSafetyTextMenu			= 320;
var TopPharmacyTextMenu			= 215;
var TopTargetValidationTextMenu			= 409;

var LeftCardiovascularTextMenu	= 395;
var LeftRespirationTextMenu		= 395;
var LeftPainTextMenu			= 395;
var LeftCNSTextMenu				= 395;
var LeftElectroTextMenu			= 395;

var TopCardiovascularTextMenu	= 206;
var TopRespirationTextMenu		= 220;
var TopPainTextMenu				= 192;
var TopCNSTextMenu				= 218;
var TopElectroTextMenu			= 265;

var LeftAnimalHousingGraphicsMenu	= 250;
var LeftAnimalSurgeryGraphicsMenu	= 450;
var LeftEfficacyGraphicsMenu		= 603;
var LeftDMPKGraphicsMenu			= 550;
var LeftToxicologyGraphicsMenu		= 425;
var LeftSafetyGraphicsMenu			= 225;
var LeftPharmacyGraphicsMenu		= 425;
var LeftTargetValidationGraphicsMenu		= 300;

var TopAnimalHousingGraphicsMenu	= 235;
var TopAnimalSurgeryGraphicsMenu	= 200;
var TopEfficacyGraphicsMenu			= 225;
var TopDMPKGraphicsMenu				= 122;
var TopToxicologyGraphicsMenu		= 295;
var TopSafetyGraphicsMenu			= 245;
var TopPharmacyGraphicsMenu			= 150;
var TopTargetValidationGraphicsMenu			= 350;

var LeftCardiovascularGraphicsMenu	= 320;
var LeftRespirationGraphicsMenu		= 322;
var LeftPainGraphicsMenu			= 342;
var LeftCNSGraphicsMenu				= 287;
var LeftElectroGraphicsMenu			= 238;

var TopCardiovascularGraphicsMenu	= 200;
var TopRespirationGraphicsMenu		= 214;
var TopPainGraphicsMenu				= 187;
var TopCNSGraphicsMenu				= 213;
var TopElectroGraphicsMenu			= 266;


function GetTemplates(Eye, ImageSrc) {
	
	if(ImageSrc == "") ImageSrc = "SecondLevelMenuBullet.gif";

	TableStart = '<table border="0" cellspacing="1" cellpadding="0" align="left">';
	RowStart = "<tr><td class=SecondLevelMenu background=\"Images/SecondLevelMenuBG.gif\"><table cellpadding=\"0\" cellspacing=\"0\" border=\"0\" width=\"100%\"><tr><td height=\"25\" valign=\"top\" background=\"Images/SecondLevelMenuBG.gif\" width=\"5\"><img src=\"Images/" + ImageSrc + "\"></td><td class=SecondLevelMenu nowrap background=\"Images/SecondLevelMenuBG.gif\">&nbsp;<a class=SecondLevelMenu href=\"javascript:ShowProduct('";
	RowEnd = '</a></td><td width="10" background="Images/SecondLevelMenuBG.gif"><div id="SecondLevelMouseover' + Eye + '"><img src="Images/Trans.gif" width="10" height="10"></td></tr></table></td></tr>';
	TableEnd = '</table>';
}

function ShowFirstLevel(OneMenu, TextOrGraphics) {

	HideFirstLevel();
	HideSecondLevel();

	var Eye="";
	var ProductURL = "";

	GetTemplates(Eye, "");

	var RequiredLayer = document.getElementById(OneMenu);
	var InnerHTML = '';
	InnerHTML = TableStart;


	if(OneMenu == "AnimalHousing") {
		document.getElementById("FirstLevelMouseover").style.top = -192;
		InnerHTML += RowStart + "EbecoIndividuallyVentilatedCagingSystems.php');\">Ebeco Individually Ventilated Caging Systems" + RowEnd;
	}

	if(OneMenu == "AnimalSurgery") {
		document.getElementById("FirstLevelMouseover").style.top = -167;
		InnerHTML += RowStart + "HarvardAnimalSurgeryEquipment.php');\">Harvard Animal Surgery Equipment" + RowEnd;
		InnerHTML += RowStart + "HarvardAnimalVentilators.php');\">Harvard Animal Ventilators" + RowEnd;
		InnerHTML += RowStart + "HarvardAnesthesiaSystems.php');\">Harvard Anesthesia Systems" + RowEnd;
		InnerHTML += RowStart + "HarvardAnimalHandlingProducts.php');\">Harvard Animal Handling Products" + RowEnd;
		InnerHTML += RowStart + "HarvardInstechDeliveryandSamplingProducts.php');\">Harvard / Instech Delivery and Sampling Products" + RowEnd;
	}

	if(OneMenu == "Efficacy") {
		document.getElementById("FirstLevelMouseover").style.top = -142;
		GetTemplates("1", "Cardiovascular.gif");
		InnerHTML += RowStart + "Products.php#Cardiovascular')\" onmouseover=\"javascript:ShowSecondLevel('Cardiovascular', '" + TextOrGraphics + "');\">Cardiovascular and Haemodynamic" + RowEnd;
		GetTemplates("2", "Respiration.gif");
		InnerHTML += RowStart + "Products.php#Respiration')\" onmouseover=\"javascript:ShowSecondLevel('Respiration', '" + TextOrGraphics + "');\">Respiration Studies" + RowEnd;
		GetTemplates("3", "PainInflammation.gif");
		InnerHTML += RowStart + "Products.php#Pain')\" onmouseover=\"javascript:ShowSecondLevel('Pain', '" + TextOrGraphics + "');\">Pain and Inflammation Studies" + RowEnd;
		GetTemplates("4", "CNSBehavioural.gif");
		InnerHTML += RowStart + "Products.php#CNS')\" onmouseover=\"javascript:ShowSecondLevel('CNS', '" + TextOrGraphics + "');\">CNS and Behavioural Studies" + RowEnd;
		GetTemplates("5", "Electrophysiology.gif");
		InnerHTML += RowStart + "Products.php#Electro')\" onmouseover=\"javascript:ShowSecondLevel('Electro', '" + TextOrGraphics + "');\">Electrophysiology and Cell Biology" + RowEnd;
	}

	if(OneMenu == "DMPK") {
		document.getElementById("FirstLevelMouseover").style.top = -117;
		InnerHTML += RowStart + "InstechAutomatedBloodSamplerSystem.php');\">Instech Automated Blood Sampling Systems" + RowEnd;
		InnerHTML += RowStart + "CMAMicrodialysisSystems.php');\">CMA Microdialysis Systems" + RowEnd;
		InnerHTML += RowStart + "HarvardSyringePumps.php');\">Harvard Infusion Systems" + RowEnd;
		InnerHTML += RowStart + "HarvardAnimalHandlingProducts.php');\">Harvard Metabolic Cages" + RowEnd;
		InnerHTML += RowStart + "NitricOxideMeasurementSystems.php');\">Harvard Food and Liquid Consumption Systems" + RowEnd;
		InnerHTML += RowStart + "#');\">Harvard Multiple Animal Liquid Feeding System ...Coming Soon!" + RowEnd;
		InnerHTML += RowStart + "#');\">Harvard Activity Wheel and Cage ...Coming Soon!" + RowEnd;
		InnerHTML += RowStart + "#');\">Equilibrium Dialysers ...Coming Soon!" + RowEnd;
	}

	if(OneMenu == "Toxicology") {
		document.getElementById("FirstLevelMouseover").style.top = -92;
		InnerHTML += RowStart + "CoulbournTruScanPhotoBeamActivityMonitoringSystem.php');\">Coulbourn Photobeam Locomotor Activity System" + RowEnd;
		InnerHTML += RowStart + "IITCNonInvasiveBloodPressureSystems.php');\">IITC Non-Invasive BP Systems" + RowEnd;
		InnerHTML += RowStart + "#');\">Grip Strength Meter ... Coming soon!" + RowEnd;
	}

	if(OneMenu == "Safety") {
		document.getElementById("FirstLevelMouseover").style.top = -66;
		InnerHTML += RowStart + "SophionAutomatedPatchClampSystems.php');\">Sophion Automated Patch Clamp Systems" + RowEnd;
		InnerHTML += RowStart + "MCSMultiElectrodeArraySystems.php');\">Multichannel Systems MEA Systems for Q<sub>t</sub> interval screening " + RowEnd;
		InnerHTML += RowStart + "HugoSachsRespiratoryStudiesSystems.php');\">Hugo Sachs Respiratory Safety Systems" + RowEnd;
		InnerHTML += RowStart + "IWorxDataAcquisitionSystems.php');\">ECG Data Acquisition Systems" + RowEnd;
	}

	if(OneMenu == "Pharmacy") {
		document.getElementById("FirstLevelMouseover").style.top = -41;
		InnerHTML += RowStart + "IWorxDataAcquisitionSystems.php');\">Iworx Data Acquisition Systems" + RowEnd;
		InnerHTML += RowStart + "CoulbournTruScanPhotoBeamActivityMonitoringSystem.php');\">Coulbourn Photobeam Locomotor Activity System" + RowEnd;
		InnerHTML += RowStart + "IITCNonInvasiveBloodPressureSystems.php');\">IITC Non-Invasive BP Systems" + RowEnd;
		InnerHTML += RowStart + "#');\">Grip Strength Meter ... Coming soon!" + RowEnd;
		InnerHTML += RowStart + "IITCPawEdemaMeterPlethysmometer.php');\">IITC Paw Edema Meter (Plethysmometer)" + RowEnd;
		InnerHTML += RowStart + "IITCElectronicVonFreyMeter.php');\">IITC Electro Von Frey Meter" + RowEnd;
		InnerHTML += RowStart + "IITCHotPlateAnalgesiaMeter.php');\">IITC Hot Plate Analgesia Meter" + RowEnd;
		InnerHTML += RowStart + "IITCHotColdPlateAnalgesiaMeter.php');\">IITC Hot / Cold Plate Analgesia Meter" + RowEnd;
		InnerHTML += RowStart + "IITCTailFlickAnalgesiaMeter.php');\">IITC Tail Flick Analgesia Meter" + RowEnd;
		InnerHTML += RowStart + "IITCPlantarAnalgesiaMeterHargreavesMethod.php');\">IITC Plantar Analgesia Meter" + RowEnd;
		InnerHTML += RowStart + "IITCIncapacitanceMeter.php');\">IITC Incapacitance Meter" + RowEnd;
		InnerHTML += RowStart + "IITCRandallSellitoMeter.php');\">IITC Randall Selitto Meter" + RowEnd;
		InnerHTML += RowStart + "IITCRotarod.php');\">IITC Rotarods" + RowEnd;
		InnerHTML += RowStart + "IITCAnimalTreadmill.php');\">IITC Treadmills" + RowEnd;
	}
	if(OneMenu == "TargetValidation") {
		document.getElementById("FirstLevelMouseover").style.top = -17;
		InnerHTML += RowStart + "COPAS.php');\">COPAS" + RowEnd;
	}

	document.getElementById("FirstLevelMouseover").innerHTML = '<img src="Images/ActiveMenu.gif" width="10" height="10" border="0">';
	InnerHTML += TableEnd;

	eval("RequiredLayer.style.left = Left" + OneMenu + TextOrGraphics);
	eval("RequiredLayer.style.top = Top" + OneMenu + TextOrGraphics);
	RequiredLayer.innerHTML = InnerHTML;
}

function HideFirstLevel() {

	document.getElementById("AnimalHousing").innerHTML = "";
	document.getElementById("AnimalSurgery").innerHTML = "";
	document.getElementById("Efficacy").innerHTML = "";
	document.getElementById("DMPK").innerHTML = "";
	document.getElementById("Toxicology").innerHTML = "";
	document.getElementById("Safety").innerHTML = "";
	document.getElementById("Pharmacy").innerHTML = "";
	document.getElementById("TargetValidation").innerHTML = "";

	document.getElementById("FirstLevelMouseover").innerHTML = '<img src="Images/Trans.gif" width="10" height="10" border="0">';
}

function HideSecondLevel() {
	document.getElementById("Cardiovascular").innerHTML = "";
	document.getElementById("Respiration").innerHTML = "";
	document.getElementById("Pain").innerHTML = "";
	document.getElementById("CNS").innerHTML = "";
	document.getElementById("Electro").innerHTML = "";

	for(i=1; i<100; i++) {
		if(document.getElementById("SecondLevelMouseover"+i) != null) {
			document.getElementById("SecondLevelMouseover"+i).innerHTML = '<img src="Images/Trans.gif" width="10" height="10" border="0">';
		}
	}
}

function Hide() {
	HideFirstLevel();
	HideSecondLevel();
}

function ShowSecondLevel(OneMenu, TextOrGraphics) {

//	alert(document.getElementById("Efficacy").innerHTML);

	var Eye = "";
	var ProductURL = "";

	GetTemplates(Eye, "");

	HideSecondLevel();

	var RequiredLayer = document.getElementById(OneMenu);
	var InnerHTML = '';
	InnerHTML = TableStart;

	if(OneMenu == "Cardiovascular") {
		Eye="1";
		InnerHTML += RowStart + "IITCNonInvasiveBloodPressureSystems.php');\">IITC Non-Invasive BP Systems" + RowEnd;
		InnerHTML += RowStart + "HugoSachsIsolatedOrganPerfusionSystems.php');\">Hugo Sachs Isolated Heart Perfusion Systems" + RowEnd;
		InnerHTML += RowStart + "IWorxDataAcquisitionSystems.php');\">BP/ECG Data Acquisition Systems" + RowEnd;
		InnerHTML += RowStart + "MoorLaserDoppler.php');\">Moor Laser Doppler Blood Flow Instruments" + RowEnd;
		InnerHTML += RowStart + "SCISENSE.php');\">SCISENSE" + RowEnd;
	}

	if(OneMenu == "Respiration") {
		Eye="2";
		InnerHTML += RowStart + "HugoSachsRespiratoryStudiesSystems.php');\">Hugo Sachs Respiratory Study Systems" + RowEnd;
		InnerHTML += RowStart + "HugoSachsIsolatedOrganPerfusionSystems.php');\">Hugo Sachs Isolated Lung Perfusion Systems" + RowEnd;
		InnerHTML += RowStart + "HarvardAnimalVentilators.php');\">Harvard Animal Ventilators" + RowEnd;
		InnerHTML += RowStart + "HarvardAnesthesiaSystems.php');\">Harvard Animal Anesthesia Systems" + RowEnd;
	}

	if(OneMenu == "Pain") {
		Eye="3";
		InnerHTML += RowStart + "IITCPawEdemaMeterPlethysmometer.php');\">IITC Paw Edema Meter (Plethysmometer)" + RowEnd;
		InnerHTML += RowStart + "IITCElectronicVonFreyMeter.php');\">IITC Electro Von Frey Meter" + RowEnd;
		InnerHTML += RowStart + "IITCHotPlateAnalgesiaMeter.php');\">IITC Hot Plate Analgesia Meter" + RowEnd;
		InnerHTML += RowStart + "IITCHotColdPlateAnalgesiaMeter.php');\">IITC Hot / Cold Plate Analgesia Meter" + RowEnd;
		InnerHTML += RowStart + "IITCTailFlickAnalgesiaMeter.php');\">IITC Tail Flick Analgesia Meter" + RowEnd;
		InnerHTML += RowStart + "IITCPlantarAnalgesiaMeterHargreavesMethod.php');\">IITC Plantar Analgesia Meter" + RowEnd;
		InnerHTML += RowStart + "IITCIncapacitanceMeter.php');\">IITC Incapacitance Meter" + RowEnd;
		InnerHTML += RowStart + "IITCRandallSellitoMeter.php');\">IITC Randall Selitto Meter" + RowEnd;
	}

	if(OneMenu == "CNS") {
		Eye="4";
		InnerHTML += RowStart + "CoulbournHabitestSystem.php');\">Coulbourn Behavioural Systems" + RowEnd;
		InnerHTML += RowStart + "IITCRotarod.php');\">IITC Rotarods" + RowEnd;
		InnerHTML += RowStart + "IITCAnimalTreadmill.php');\">IITC Treadmills" + RowEnd;
		InnerHTML += RowStart + "CoulbournTruScanPhotoBeamActivityMonitoringSystem.php');\">Coulbourn Photobeam Locomotor Activity System" + RowEnd;
		InnerHTML += RowStart + "CoulbournLimelightVideoTrackingSystem.php');\">Coulbourn / Actimetrics Video Tracking System" + RowEnd;
		InnerHTML += RowStart + "CoulbournWaterMazeSoftware.php');\">Coulbourn / Actimetrics Water Maze" + RowEnd;
		InnerHTML += RowStart + "NeuroscienceEquipmentandAccessories.php');\">Harvard Neuroscience Equipment and Accessories" + RowEnd;
		InnerHTML += RowStart + "#');\">Grip Strength Meter ... Coming soon!" + RowEnd;
	}

	if(OneMenu == "Electro") {
		Eye="5";
		InnerHTML += RowStart + "SophionAutomatedPatchClampSystems.php');\">Sophion Automated Patch Clamp Systems" + RowEnd;
		InnerHTML += RowStart + "MCSMultiElectrodeArraySystems.php');\">Multichannel Systems MEA Systems for Q<sub>t</sub> interval screening" + RowEnd;
		InnerHTML += RowStart + "WarnerPlanarLipidBilayerWorkStation.php');\">Warner Bilayer Workstation" + RowEnd;
		InnerHTML += RowStart + "WarnerElectrophysiologyTools.php');\">Warner Electrophysiology Amplifiers and Accessories" + RowEnd;
		InnerHTML += RowStart + "NitricOxideMeasurementSystems.php');\">Warner Nitric Oxide Measurement Systems" + RowEnd;
		InnerHTML += RowStart + "WarnerInstrumentsCellBiologyEquipment.php');\">Warner Cell Biology Equipment and Accessories" + RowEnd;
	}
	document.getElementById("SecondLevelMouseover"+Eye).innerHTML = '<img src="Images/ActiveMenu.gif" width="10" height="10" border="0">';
	InnerHTML += TableEnd;

	eval("RequiredLayer.style.left = Left" + OneMenu + TextOrGraphics);
	eval("RequiredLayer.style.top = Top" + OneMenu + TextOrGraphics);
	RequiredLayer.innerHTML = InnerHTML;
}

function ShowProduct(URL) {
	var Dot = /\.php/ig;
	var URLBare = URL.replace(Dot, "");
	eval(URLBare + " = open('LifeScience/Products/" + URL + "', '" + URLBare + "', 'width=600,height=400,scrollbars=1,toolbar=0,resizable=1');");
	eval(URLBare + ".focus();");
}
