
//Disease Fact Sheet Email Popup
function popEmailThisPage(teaserText, pageTitle, factSheetURL){
	emailURL = "/global/lsd_pop_emailThis_form.asp";
	emailURL = emailURL + "?teaserText=" + teaserText;
	emailURL = emailURL + "&pageTitle=" + pageTitle;
	emailURL = emailURL + "&factSheetURL=" + factSheetURL;
	emailPop = window.open(emailURL,'emailPop','personal=no,toolbar=no,menubar=no,scrollbars=yes,location=no,status=no,resizable=no,directories=no,width=424,height=440,screenX=120,screenY=220,left=120,top=220');
}

//Disease Fact Sheet Printer Friendly
function popPrinterFriendly(strFileName){
	printerURL = "/healthcare/about/" + strFileName + "_printer.asp";
	printerPop = window.open(printerURL,'printerPop','personal=no,toolbar=yes,menubar=yes,scrollbars=yes,location=no,status=no,resizable=no,directories=no,width=610,height=600,screenX=120,screenY=220,left=120,top=220');
}

//Disease Fact Sheet Thumbnail images popup
function popDiseaseImage(strImageName){
	imageURL = "/global/lsd_pop_diseaseImage.asp?imageName=" + strImageName;
	imagePop = window.open(imageURL,'imagePop','personal=no,toolbar=no,menubar=no,scrollbars=yes,location=no,status=no,resizable=no,directories=no,width=340,height=350,screenX=120,screenY=220,left=120,top=220');
}

//Disease dropdowns automatic redirect
function linkJump(source)
{
	window.location = source.options[source.selectedIndex].value;
}	

//Generic: load parent window from popup
function loadOpener(url) {
      if (opener != null) {
            opener.location.href = url;
      } else {
            window.location.href = url;
      }
}

//Flash Functions 
function FlashInstalled() {
	result = false;
	
	if (navigator.plugins && navigator.plugins.length) {
		if (navigator.plugins["Shockwave Flash"]) {
			result = true; 
		}
	}
	if (navigator.mimeTypes && navigator.mimeTypes.length) {
		if (navigator.mimeTypes["application/x-shockwave-flash"] && navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin) {
			result = true;	
		}
	}
	
	if (document.all && (navigator.appVersion.indexOf("Mac")==-1)) {
		// IE Windows only -- check for ActiveX control, have to hide code in eval from Netscape (doesn't like try)
		eval ('try {var xObj = new ActiveXObject("ShockwaveFlash.ShockwaveFlash");if (xObj)	result = true; xObj = null;	} catch (e)	{}');
	}
	
	return result;

}

function writeImageOrFlashTag(hasUserVisitedHomePg) {
//Passes 'hasUserVisitedHomePg' to determine whether user has been on the Hompage already
//This is at the session level only (for each browser session)
	if (FlashInstalled() == true) {
		document.writeln('<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" WIDTH="590" HEIGHT="182" id="homeFlash" ALIGN=""><PARAM NAME=movie VALUE="/images/home/flash_hm.swf?hasUserVisitedHomePg=' + hasUserVisitedHomePg + '"><PARAM NAME=quality VALUE=high><PARAM NAME=bgcolor VALUE=#FFFFFF><EMBED src="/images/home/flash_hm.swf?hasUserVisitedHomePg=' + hasUserVisitedHomePg + '" quality=high bgcolor=#FFFFFF  WIDTH="590" HEIGHT="182" NAME="homeFlash" ALIGN="" TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/go/getflashplayer"></EMBED></OBJECT>');
	} else {
		popFlashWarning();	
		document.writeln('<img src="/images/home/img_flash_sub.jpg" alt="" width="590" height="182" border="0" /><br />');		
	}
}


function popFlashWarning(){
	warningPop = window.open('/global/lsd_pop_flashwarning.asp','adbreak','personal=no,toolbar=no,menubar=no,scrollbars=no,location=no,status=no,resizable=no,directories=no,width=400,height=200,screenX=120,screenY=220,left=120,top=220');
}



