function mmLoadMenus() {
  if (window.mm_menu_0426122326_0) return;
                  window.mm_menu_0426122326_0 = new Menu("root",139,16,"Verdana, Arial, Helvetica, sans-serif",10,"#FFFFFF","#000000","#A0324B","#FCF3E4","left","middle",3,0,100,-5,7,true,true,true,0,true,true);
  mm_menu_0426122326_0.addMenuItem("Treatment&nbsp;Planning&nbsp;","location='TreatmentPlanning.aspx'");
  mm_menu_0426122326_0.addMenuItem("Holiday&nbsp;Planning","location='HolidayPlanning.aspx'");
  mm_menu_0426122326_0.addMenuItem("In&nbsp;Malaysia","location='InMalaysia.aspx'");
  mm_menu_0426122326_0.addMenuItem("Post&nbsp;Treatment&nbsp;","location='PostTreatment.aspx'");
   mm_menu_0426122326_0.hideOnMouseOut=true;
   mm_menu_0426122326_0.bgColor='#666666';
   mm_menu_0426122326_0.menuBorder=1;
   mm_menu_0426122326_0.menuLiteBgColor='#666666';
   mm_menu_0426122326_0.menuBorderBgColor='#A0324B';
    window.mm_menu_0426122653_0 = new Menu("root",202,16,"Verdana, Arial, Helvetica, sans-serif",10,"#FFFFFF","#000000","#A0324B","#FCF3E4","left","middle",3,0,100,-5,7,true,true,true,0,true,true);
  mm_menu_0426122653_0.addMenuItem("About&nbsp;Malaysia&nbsp;Healthcare","location='AboutMalaysiaHealthcare.aspx'");
  mm_menu_0426122653_0.addMenuItem("Superlative&nbsp;Medicare","location='SuperlativeMedicare.aspx'");
  mm_menu_0426122653_0.addMenuItem("Cost&nbsp;Effectiveness","location='CostEffectiveness.aspx'");
 // mm_menu_0426122653_0.addMenuItem("Genuine&nbsp;And&nbsp;Affordable&nbsp;Care","location='GenuineAndAffordableCare.aspx'");
  mm_menu_0426122653_0.addMenuItem("Exciting&nbsp;Packages","location='ExcitingPackages.aspx'");
   mm_menu_0426122653_0.hideOnMouseOut=true;
   mm_menu_0426122653_0.bgColor='#666666';
   mm_menu_0426122653_0.menuBorder=1;
   mm_menu_0426122653_0.menuLiteBgColor='#666666';
   mm_menu_0426122653_0.menuBorderBgColor='#A0324B';
window.mm_menu_0426123034_0 = new Menu("root",143,16,"Verdana, Arial, Helvetica, sans-serif",10,"#FFFFFF","#000000","#A0324B","#FCF3E4","left","middle",3,0,100,-5,7,true,true,true,0,true,true);
  mm_menu_0426123034_0.addMenuItem("Malaysia&nbsp;Healthcare");
  mm_menu_0426123034_0.addMenuItem("User&nbsp;Manual");
  mm_menu_0426123034_0.addMenuItem("Our&nbsp;Process");
   mm_menu_0426123034_0.hideOnMouseOut=true;
   mm_menu_0426123034_0.bgColor='#666666';
   mm_menu_0426123034_0.menuBorder=1;
   mm_menu_0426123034_0.menuLiteBgColor='#666666';
   mm_menu_0426123034_0.menuBorderBgColor='#A0324B';

mm_menu_0426123034_0.writeMenus();
} // mmLoadMenus()

function SearchPortal(){
	var vElem = document.getElementById("txtSearch");
	if(vElem){
		if(vElem.value == ""){
		}else{
			top.location.href = 'SearchPortal.aspx?vSearchQuery=' + vElem.value;
		}
	}
}

function TreatmentDisplay(){
	var iSpecialityID = document.getElementById("cboFTSpecialityList");
	iSpecialityID = iSpecialityID.options[iSpecialityID.selectedIndex].value;
	var iTreatmentID = document.getElementById("cboFTTreatmentList");
	iTreatmentID = iTreatmentID.options[iTreatmentID.selectedIndex].value;
	if(iTreatmentID < 1){
		return;
	}
	var strURL = "DisplayTreatmentHospitalList.aspx?SpecialityID=" + iSpecialityID + "&TreatmentID=" + iTreatmentID;
	//var strSSURL = "SuccessStoryList.aspx?iSpecialityID=" + iSpecialityID + "&iTreatmentID=" + iTreatmentID;
	if(typeof(parent.frames["ifContent"]) == "undefined"){/*
		frmDefault.action = "defaultNext.aspx";
		frmDefault.target = "_top";
		frmDefault.txtContentURL.value = strURL;
		frmDefault.submit();*/
	}else{
		parent.frames["ifContent"].location.href = strURL;
		//parent.frames["ifSuccessStoryList"].location.href = strSSURL;
	}
}

function GoToPage(vURL){
	top.location.href = vURL;
}

function GetValue(vQuery, vRegExp){
	var strURL = document.location.href;
	strURL = unescape(strURL);
	var iQIndex = strURL.indexOf(vQuery);
	if(iQIndex > -1){
		var iAmpIndex = strURL.indexOf("&", iQIndex);
		if(iAmpIndex > -1){
			strURL = strURL.substr(iQIndex, iAmpIndex - iQIndex);
			strURL = strURL.substr(vQuery.length+1);
		}else{
			strURL = strURL.substr(iQIndex+vQuery.length+1);
		}
		return strURL;
	}
	return "";
}

function getObj(name){
	if (document.getElementById){
		this.obj = document.getElementById(name);
		this.style = document.getElementById(name).style;
	}else if (document.all){
		this.obj = document.all[name];
		this.style = document.all[name].style;
	}else if (document.layers){
		this.obj = getObjNN4(document,name);
		this.style = this.obj;
	}
}

function getObjNN4(obj,name)
{
	var x = obj.layers;
	var foundLayer;
	for (var i=0;i<x.length;i++){
		if (x[i].id == name)
			foundLayer = x[i];
		else if (x[i].layers.length)
			var tmp = getObjNN4(x[i],name);
		if (tmp) foundLayer = tmp;
	}
	return foundLayer;
}

function GetNextContent(vContentURL){
	var vURL = top.location.href;
	if(vURL.indexOf("defaultNext.aspx") > -1){
		parent.frames['ifContent'].location.href = vContentURL;
	}else{
		top.location.href = "defaultNext.aspx?vIC=" + vContentURL;
	}
}
/*
function SearchPortal(vContentURL){
	var vElement = document.getElementById("txtSearch");
	if(vElement.value == ""){
	}else{
		GetNextContent(vContentURL+"?vSearchQuery="+vElement.value);
	}
}*/
function GetENewsLetter(vContentURL){
	var vElement = document.getElementById("txtENewsLetter");
	GetNextContent(vContentURL+"?vENewsLetter="+vElement.value);
}
function GetSS(vSSURL){
	parent.frames['ifSuccessStoryList'].location.href = vSSURL;
}

function GetContent(vContentURL){
	var vIFrame = document.getElementById("ifContent");
	vIFrame.src = vContentURL;
}
function SetPageToF(vFP, vPageURL){
	var vIFrame = document.getElementById(vFP);
	vIFrame.src = vPageURL;
}
function GetQueryStrValues(){
	var vContentURL = GetValue("vIC", /vIC/g);
	if(vContentURL != ""){
		GetContent(vContentURL);
	}
	var vIFrame;
	vContentURL = GetValue("vITS", /vITS/g);
	if(vContentURL != ""){
		SetPageToF("ifTreatmentSelector", vContentURL);
	}else{
		vIFrame = document.getElementById("ifTreatmentSelector");
		vIFrame.src = "TreatmentSelector.aspx";
	}
/*	vContentURL = GetValue("vISS", /vISS/g);
	if(vContentURL != ""){
		SetPageToF("ifSuccessStoryList", vContentURL);
	}else{
		vIFrame = document.getElementById("ifSuccessStoryList");
		vIFrame.src = "SuccessStoryList.aspx";
	}*/
}

function GoToTreatment(){
	if(document.frmDefault.cboFTSpeciality.options.length < 1 || document.frmDefault.cboFTTreatment.options.length < 1){
		return;
	}
	var iSpecID = document.frmDefault.cboFTSpeciality.options[document.frmDefault.cboFTSpeciality.selectedIndex].value;
	var iTreatID = document.frmDefault.cboFTTreatment.options[document.frmDefault.cboFTTreatment.selectedIndex].value;
	top.location.href = "TreatmentAndTourPackages/SelectTreatment.aspx?iSpecialityID=" + iSpecID + "&iTreatmentID=" + iTreatID;
}

function MM_openBrWindow(theURL,winName,features) { //v2.0
	window.open(theURL,winName,features);
}

function ShowDentalCostCalculator(theURL,theURL1,theURL2,theURL3,theURL4){
	MM_openBrWindow(theURL+theURL1+theURL2+theURL3+theURL4,'','width=650,height=140');
}

function SubmitForm(){
	frmDefault.submit();
}

function ShowPackageDetails(){
	var iHospitalID = document.frmDefault.cboSPHospitals.options[document.frmDefault.cboSPHospitals.selectedIndex].value;
	var iPackageID = document.frmDefault.cboSPPackages.options[document.frmDefault.cboSPPackages.selectedIndex].value;
	MM_openBrWindow("PackageDetails.aspx?iHospitalID=" + iHospitalID + "&iPackageID=" + iPackageID + "",'','scrollbars=yes,width=830,height=600');
}

var requiredMajorVersion = 7;
var requiredMinorVersion = 0;
var requiredRevision = 0;
var jsVersion = 1.0;

var isIE  = (navigator.appVersion.indexOf("MSIE") != -1) ? true : false;
var isWin = (navigator.appVersion.toLowerCase().indexOf("win") != -1) ? true : false;
var isOpera = (navigator.userAgent.indexOf("Opera") != -1) ? true : false;
jsVersion = 1.1;
function JSGetSwfVer(i){
	if (navigator.plugins != null && navigator.plugins.length > 0) {
		if (navigator.plugins["Shockwave Flash 2.0"] || navigator.plugins["Shockwave Flash"]) {
			var swVer2 = navigator.plugins["Shockwave Flash 2.0"] ? " 2.0" : "";
      		var flashDescription = navigator.plugins["Shockwave Flash" + swVer2].description;
			descArray = flashDescription.split(" ");
			tempArrayMajor = descArray[2].split(".");
			versionMajor = tempArrayMajor[0];
			versionMinor = tempArrayMajor[1];
			if ( descArray[3] != "" ) {
				tempArrayMinor = descArray[3].split("r");
			} else {
				tempArrayMinor = descArray[4].split("r");
			}
      		versionRevision = tempArrayMinor[1] > 0 ? tempArrayMinor[1] : 0;
            flashVer = versionMajor + "." + versionMinor + "." + versionRevision;
      	} else {
			flashVer = -1;
		}
	}
	else if (navigator.userAgent.toLowerCase().indexOf("webtv/2.6") != -1) flashVer = 4;
	else if (navigator.userAgent.toLowerCase().indexOf("webtv/2.5") != -1) flashVer = 3;
	else if (navigator.userAgent.toLowerCase().indexOf("webtv") != -1) flashVer = 2;
	else {
		
		flashVer = -1;
	}
	return flashVer;
}
function VBGetSwfVer(i){
	flashVersion = -1;
	try{
		var flash = new ActiveXObject("ShockwaveFlash.ShockwaveFlash." + i);
		flashVersion = i;
	}
	catch(e){
	}
	return flashVersion;
}
function DetectFlashVer(reqMajorVer, reqMinorVer, reqRevision) 
{
 	reqVer = parseFloat(reqMajorVer + "." + reqRevision);
	for (i=25;i>0;i--) {	
		if (isIE && isWin && !isOpera) {
			versionStr = VBGetSwfVer(i);
		} else {
			versionStr = JSGetSwfVer(i);		
		}/**/
		if (versionStr == -1 ) { 
			return false;
		} else if (versionStr != 0) {
			if(isIE && isWin && !isOpera) {
				tempArray         = versionStr.split(" ");
				tempString        = tempArray[1];
				versionArray      = tempString .split(",");				
			} else {
				versionArray      = versionStr.split(".");
			}
			versionMajor      = versionArray[0];
			versionMinor      = versionArray[1];
			versionRevision   = versionArray[2];
			
			versionString     = versionMajor + "." + versionRevision;
			versionNum        = parseFloat(versionString);
			if ( (versionMajor > reqMajorVer) && (versionNum >= reqVer) ) {
				return true;
			} else {
				return ((versionNum >= reqVer && versionMinor >= reqMinorVer) ? true : false );	
			}
		}
	}	
	return (reqVer ? false : 0.0);
}
// 

function DetectFlash(vMovieURL, vMovieID, vHeight, vWidth, bFSCommand){
	var hasRightVersion = DetectFlashVer(requiredMajorVersion, requiredMinorVersion, requiredRevision);
	if(hasRightVersion) {
		var oeTags;
		if(bFSCommand){
			oeTags = '<OBJECT id="' + vMovieID + '" codeBase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0"'
			+ '	height="' + vHeight + '" width="' + vWidth + '" align="middle" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"'
			+ '		VIEWASTEXT>'
			+ '	<PARAM NAME="_cx" VALUE="19394">'
			+ '	<PARAM NAME="_cy" VALUE="6006">'
			+ '	<PARAM NAME="FlashVars" VALUE="">'
			+ '	<PARAM NAME="Movie" VALUE="' + vMovieURL + '">'
			+ '	<PARAM NAME="Src" VALUE="' + vMovieURL + '">'
			+ '	<PARAM NAME="WMode" VALUE="Window">'
			+ '	<PARAM NAME="Play" VALUE="-1">'
			+ '	<PARAM NAME="Loop" VALUE="0">'
			+ '	<PARAM NAME="Quality" VALUE="High">'
			+ '	<PARAM NAME="SAlign" VALUE="">'
			+ '	<PARAM NAME="Menu" VALUE="0">'
			+ '	<PARAM NAME="Base" VALUE="">'
			+ '	<PARAM NAME="AllowScriptAccess" VALUE="sameDomain">'
			+ '	<PARAM NAME="Scale" VALUE="ShowAll">'
			+ '	<PARAM NAME="DeviceFont" VALUE="0">'
			+ '	<PARAM NAME="EmbedMovie" VALUE="0">'
			+ '	<PARAM NAME="BGColor" VALUE="FFFFFF">'
			+ '	<PARAM NAME="SWRemote" VALUE="">'
			+ '	<PARAM NAME="MovieData" VALUE="">'
			+ '	<PARAM NAME="SeamlessTabbing" VALUE="1">'
			+ '	<PARAM NAME="Profile" VALUE="0">'
			+ '	<PARAM NAME="ProfileAddress" VALUE="">'
			+ '	<PARAM NAME="ProfilePort" VALUE="0">'
			+ '	<embed src="' + vMovieURL + '" loop="false" menu="false" quality="high" bgcolor="#ffffff" width="' + vWidth + '"'
			+ '		height="' + vHeight + '" swLiveConnect="true" id="' + vMovieID + '" name="' + vMovieID + '" align="middle" allowScriptAccess="sameDomain"'
			+ '		type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />'
			+ '</OBJECT>'
		}else{
			oeTags = '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"'
			+ 'width="' + vWidth + '" height="' + vHeight + '"'
			+ 'codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab">'
			+ '<param name="movie" value="' + vMovieURL + '" /><param name="loop" value="false" /><param name="menu" value="false" /><param name="quality" value="high" /><param name="bgcolor" value="#ffffff" />'
			+ '<embed src="' + vMovieURL + '" loop="false" menu="false" quality="high" bgcolor="#ffffff" '
			+ 'width="' + vWidth + '" height="' + vHeight + '" name="Main2" align="middle"'
			+ 'play="true"'
			+ 'loop="false"'
			+ 'quality="high"'
			+ 'allowScriptAccess="sameDomain"'
			+ 'type="application/x-shockwave-flash"'
			+ 'pluginspage="http://www.macromedia.com/go/getflashplayer">'
			+ '<\/embed>'
			+ '<\/object>';
		}
		document.write(oeTags);
	} else {
		var alternateContent = 'Alternate HTML content should be placed here.'
  		+ 'This content requires the Macromedia Flash Player.'
   		+ '<a href=http://www.macromedia.com/go/getflash/>Get Flash</a>';
		document.write(alternateContent);
	}
}

var isInternetExplorer = navigator.appName.indexOf("Microsoft") != -1;
function Main2_DoFSCommand(command, args) {
	var Main2Obj = isInternetExplorer ? document.all.Main2 : document.Main2;
	if(command == "GoToURL"){
		GetNextContent(args);
	}
}
if (navigator.appName && navigator.appName.indexOf("Microsoft") != -1 && navigator.userAgent.indexOf("Windows") != -1 && navigator.userAgent.indexOf("Windows 3.1") == -1) {
	document.write('<script language=\"VBScript\"\>\n');
	document.write('On Error Resume Next\n');
	document.write('Sub Main2_FSCommand(ByVal command, ByVal args)\n');
	document.write('	Call Main2_DoFSCommand(command, args)\n');
	document.write('End Sub\n');
	document.write('</script\>\n');
}

function ManageSubmit(vElem, vBtnElem){
	try{
		vBtnElem = document.getElementById(vBtnElem);
		if(vBtnElem){
			vBtnElem.disabled = vElem.checked;
		}
	}catch(e){;}
}
