
//****************************************************************************************
	//Name:	        blnAcrobatEnabled
	//Description:	Checks for the plugin in (Netscape) or 
	//			the Acrobat Control in IE
	//	
	//Developer:	Javier Gonzalez and Samara Gattel
//****************************************************************************************

////////////////////////////////
//Catch any err from browser ...
function stopErrors() {
return true;
}
window.onerror = stopErrors;
////////////////////////////////

function blnAcrobatEnabled() {

// If the Browser name is MSIE on a Mac and is a valid version 
//Check		
if ((navigator.appName.indexOf("Microsoft Internet Explorer") != -1 ) && (navigator.userAgent.indexOf("Mac") != -1))
{
if (blnValidBrowser)				
{
return true;
}
else
{
return false;
}	
}
		
// If the Browser name is MSIE (not on a Mac) then use VBScript
if ((navigator.appName.indexOf("Microsoft Internet Explorer") != -1 ) && (navigator.userAgent.indexOf("Mac") == -1))
{				
document.write('<SCR');
document.write('IPT LANGUAGE=VBScript> \n');
document.write('on error resume next \n');
document.write('Dim HaveAcrobat, HaveAcrobat5 \n');
document.write('HaveAcrobat = not IsNull(CreateObject("PDF.PdfCtrl.1"))\n');
document.write('HaveAcrobat5 = not IsNull(CreateObject("PDF.PdfCtrl.5"))\n');
document.write('if (HaveAcrobat) or (HaveAcrobat5) then \n');
document.write('HaveAcrobat = true \n');
document.write('else \n');
document.write('HaveAcrobat = false \n');
document.write('end if \n');
document.write('</SCR');
document.write('IPT> \n');
return HaveAcrobat;
//return false;
}						
else
{
// If the Browser name is Netscape then call detectPlugin...
if ((navigator.appName.indexOf("Netscape") != -1) || navigator.userAgent.indexOf("Mac") != -1 )
{
if (detectAcrobat()== true)
{
return true;
}
else
{
return false;
}	
}
}	
}			
	
//****************************************************************************************

	//Name:		DetectAcrobat
	//Description:	Searches for the existence of the Acrobat Reader plugin passed in if the 
	//browser is Netscape
	//				
	//Input:		PluginType
	//
	//Developer:	Javier Gonzalez and Samara Gattel

//****************************************************************************************	
		
function detectAcrobat()
{
//	var FoundAcrobat = navigator.mimeTypes && navigator.mimeTypes["application/pdf"] 
		
//	if (FoundAcrobat)
//		{
//		return true;
//		}
//	else
//		{
//		return false;
//		}
//	}
	
var usePlugIn = 0;
var myPlugin;
var myMimeType;
		
if(navigator.appName.indexOf("Netscape")!=-1)
{			
for(var i=0;i<navigator.plugins.length;i++)
{
plugin = navigator.plugins[i];
for(var j=0;j<plugin.length;j++)
{
myMimeType = plugin[j];
if(myMimeType.type=="application/pdf")
{
usePlugIn = 1;			 				
}
			 				
}
}
			
if(usePlugIn == 1) 
{
return true;
}
else
{
return false;
}
}
}		
			
document.write("<Font Face=verdana Size=-1>If you see a checkmark below, your computer has Acrobat Reader installed.</Font>") 

if (blnAcrobatEnabled() == true)
{
document.write("&nbsp;<b><Font Face=verdana Size=-1>Acrobat Reader Is Enabled:&nbsp;</Font></b><img src=images/BulletCheck.gif width=17px height=13px>")
//document.write("If you do not have the FREE Adobe Acrobat Reader program you can <a href=\"http://www.adobe.com/products/acrobat/readstep2.html\" target=\"_blank\" class=\"M1\">download it here</a>.")
}
else
{
document.write("<table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\"><tr>")
document.write("<td width=\"21%\" height=\"39\"><img src=\"images/get_adobe_reader.gif\" width=\"88\" height=\"31\"></td>")
document.write("<td width=\"83%\" class=\"M1\">If you do not have the FREE Adobe Acrobat Reader program you can <a href=\"http://www.adobe.com/products/acrobat/readstep2.html\" target=\"_blank\" class=\"M1\">download it here</a>.</td></tr></table>")
}	
