function mtdSideMenu(){
	var html = "";
	var blnAppointment = (mstrHighlightItem == "APPOINTMENT" ? "true" : "false");
	var blnHealthTalk = (mstrHighlightItem == "HEALTHTALK" ? "true" : "false");
    var blnServices = (mstrHighlightItem == "SERVICES" ? "true" : "false");
    
	
	html += "<table cellpadding='0' cellspacing='0' border='0'>";

	// APPOINTMENT
	html += "<tr>";
	html += "<td id=\"APPOINTMENT\" name=\"APPOINTMENT\" onmouseover='mtdOnMenuItemMouseEnterSide(event, this, null, true, " + blnAppointment + ")' onmouseout='mtdOnMenuItemMouseExitSide(event, this, null, true, " + blnAppointment + ")'>";
	html += "<a href=\"appointment_" + mstrLang + ".html\" ><img src='../images/side_appointment_" + (blnAppointment == "true" ? "o_" + mstrLang : mstrLang) + ".gif' border=0></img></a>";
	html += "</td>";
	html += "</tr>";	
	// Spacer 01
	html += "<tr>";
	html += "<td>";
	html += "<img src='../images/spacer.gif' height=19 width-19></img>";
	html += "</td>";
	html += "</tr>";
    // Our Services
	html += "<tr>";
	html += "<td id=\"SERVICES\" name=\"SERVICES\" onmouseover='mtdOnMenuItemMouseEnterSide(event, this,  null, true, " + blnServices + ")' onmouseout='mtdOnMenuItemMouseExitSide(event, this, \"SERVICES_SUB_MENU\", true, " + blnServices + ")'>";
	html += "<a href=\"medical_consultations_" + mstrLang + ".html\"><img src='../images/side_service_" + (blnServices == "true" ? "o_" + mstrLang : mstrLang) + ".gif' border=0></img></a>";
	html += "</td>";
	html += "</tr>";
    // Spacer 02
	html += "<tr>";
	html += "<td>";
	html += "<img src='../images/spacer.gif' height=19 width-19></img>";
	html += "</td>";
	html += "</tr>";
    // About CadioMed
	html += "<tr>";
	html += "<td id=\"HEALTHTALK\" name=\"HEALTHTALK\" onmouseover='mtdOnMenuItemMouseEnterSide(event, this,  null, true, " + blnHealthTalk + ")' onmouseout='mtdOnMenuItemMouseExitSide(event, this, \"ABOUT_SUB_MENU\", true, " + blnHealthTalk + ")'>";
	html += "<a href=\"../health_talk/health_talk_" + mstrLang + ".html\" ><img src='../images/side_talk_" + (blnHealthTalk == "true" ? "o_" + mstrLang : mstrLang) + ".gif' border=0></img></a>";
	html += "</td>";
	html += "</tr>";
	html += "</table>";
	
		document.write(html);
}

mtdSideMenu();

function mtdOnMenuItemMouseEnterSide(e, aobjElement, astrSubMenu, ablnIsRoot, ablnIsHighlight){
	var img = aobjElement.getElementsByTagName("IMG")[0].src;
	img = img.substring(0, img.indexOf("_", img.indexOf("_")+1)) + "_o" + img.substring(img.indexOf("_", img.indexOf("_")+1), img.length);
	if (!ablnIsHighlight){
		aobjElement.getElementsByTagName("IMG")[0].src = img;
	}

	if (astrSubMenu == null || astrSubMenu == "") return;

	var objSubMenu = document.getElementById(astrSubMenu);
	if (objSubMenu == null) return;
	objSubMenu.style.visibility = "visible";
	objSubMenu.style.display = "inline";
}

function mtdOnMenuItemMouseExitSide(e, aobjElement, astrSubMenu, ablnIsRoot, ablnIsHighlight){
	var img = aobjElement.getElementsByTagName("IMG")[0].src;
	img = img.replace(/_o/g, '');
	if (!ablnIsHighlight){
		aobjElement.getElementsByTagName("IMG")[0].src = img;
	}

	var objSubMenu = null;
	if (astrSubMenu != null && astrSubMenu != ""){
		objSubMenu = document.getElementById(astrSubMenu);
	}

	var mouseX, mouseY, subMenuLeft, subMenuTop;
	if (e.pageX || e.pageY){
		mouseX = e.pageX - e.relatedTarget.offsetLeft;
		mouseY = e.pageY - e.relatedTarget.offsetTop;
	}else{
		mouseX = e.x;
		mouseY = e.y;
	}

	if (objSubMenu != null){
		if (e.toElement){
			if (!mtdContainElement(objSubMenu, e.toElement, e.toElement.tagName)){
				objSubMenu.style.visibility = "hidden";
				objSubMenu.style.display = "none";
			}
		}else{
			if (!mtdContainElement(objSubMenu, e.relatedTarget, e.relatedTarget.tagName)){
				objSubMenu.style.visibility = "hidden";
				objSubMenu.style.display = "none";
			}
		}
	}
}