function PopupActivos()
{ 
	var win = window.open("ventana.htm","PopUpActivos","top=0,left=0,height=1,width=1,toolbar=no,resizable=0,scrollbars=1")
//	window.focus();
	try
	{
		var obj = win.name;
		win.close();
		return true;
	}
	catch(e){ 
	return false;
	}
}
function JavaActivo()
{
	return navigator.javaEnabled();
}

function FlashInstalado()
{
	if(navigator.mimeTypes.length)
	{
		var plugin = (navigator.mimeTypes && navigator.mimeTypes["application/x-shockwave-flash"] ? navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin : 0);
		if (plugin && parseInt(plugin.description.substring(plugin.description.indexOf(".")-1)) >= 6) 
			return true;
		else 
			return false;
	}
	else {
		if (FlashInstaladoIE())
		{return true;}
		else
		{return false;}
	}
}

function ShockwaveInstalado(comprobar)
{
	if (comprobar == 1)
	{
		if(navigator.mimeTypes.length)
		{
		var plugin = (navigator.mimeTypes && navigator.mimeTypes["application/x-director"] ? navigator.mimeTypes["application/x-director"].enabledPlugin : 0);
			if (plugin && parseInt(plugin.description.substring(plugin.description.indexOf(".")-1)) >= 7) 
				return true;
			else 
				return false;
		}
		else
			if (ShockwaveInstaladoIE())
				return true;
			else 
				return false;
	}
	else
	{
		return true;
	}
}

function Navegador(opcion)
{
	var detect = navigator.userAgent.toLowerCase();
	var OS,browser,version,total,thestring;
	
	if (checkIt('konqueror'))
	{
		browser = "Konqueror";
		OS = "Linux";
	}
	else if (checkIt('safari')) browser = "Safari"
	else if (checkIt('omniweb')) browser = "OmniWeb"
	else if (checkIt('opera')) browser = "Opera"
	else if (checkIt('webtv')) browser = "WebTV";
	else if (checkIt('icab')) browser = "iCab"
	else if (checkIt('msie')) browser = "Internet Explorer"
	else if (!checkIt('compatible'))
	{
		browser = "Netscape Navigator"
		version = detect.charAt(8);
	}
	else browser = "An unknown browser";
	
	if (!version) version = detect.charAt(place + thestring.length);
	
	if (!OS)
	{
		if (checkIt('linux')) OS = "Linux";
		else if (checkIt('x11')) OS = "Unix";
		else if (checkIt('mac')) OS = "Mac"
		else if (checkIt('win')) OS = "Windows"
		else OS = "an unknown operating system";
	}
	
	function checkIt(string)
	{
		place = detect.indexOf(string) + 1;
		thestring = string;
		return place;
	}
	
	if (opcion=="so")
	{
		if (OS=="Windows")
			return true;
		else
			return false;	
	}
	else
	{
		if ((browser=="Internet Explorer") && (version>="5"))
			return true;
		else
			return false;	
	}
}

function AcrobatActivo()
{ 
	var acrobat=new Object();
	acrobat.installed=false;
	acrobat.version='0.0';
	
	if (navigator.plugins && navigator.plugins.length)
	{
	for (x=0; x<10; x++)
	
		{
			if (navigator.plugins[x].description.indexOf('Adobe Acrobat') != -1)
			{
				acrobat.version=parseFloat(navigator.plugins[x].description.split('Version ')[1]);
				if (acrobat.version.toString().length == 1) acrobat.version+='.0';
				acrobat.installed=true;
				return true;
				break;
			}
		}
	}
	else if (window.ActiveXObject)
	{
	for (x=2; x<10; x++)
	{
	try
	{
	oAcro=eval("new ActiveXObject('PDF.PdfCtrl."+x+"');");
	if (oAcro)
	{
	acrobat.installed=true;
	acrobat.version=x+'.0';
	return true;
	}
	}
	catch(e) {}
	}
	
	try
	{
	oAcro4=new ActiveXObject('PDF.PdfCtrl.1');
	if (oAcro4)
	{
	acrobat.installed=true;
	acrobat.version='4.0';
	return true;
	}
	}
	catch(e) {}
	
	try
	{
	oAcro7=new ActiveXObject('AcroPDF.PDF.1');
	if (oAcro7)
	{
	acrobat.installed=true;
	acrobat.version='7.0';
	return true;
	}
	}
	catch(e) {}
	}
}

function Requisitos()
{
	return PopupActivos()  && FlashInstalado() && ShockwaveInstalado('1') && AcrobatActivo(); 
}
