/*
Funcion que abre la ventana de administración de contenidos
*/

function admin(url)
{
		var ancho, alto, left, top;
		w=screen.width-screen.width*0.15;
		h=screen.height-screen.height*0.2;
		left=((screen.width/2)-(w/2));
		top=((screen.height/2) - (h/2));
		v=open('' ,'extranet','scrollbars=yes,width=' + w +',height=' + h + ',top='+ top + ',left='+ left);
		
		var user;
		var pass;
		user=document.getElementById('User').value;
		pass=document.getElementById('Pass').value;
   		v.document.location ="hostingactivo/index.php?User=" + user +"&Pass="+ pass;
}



/*
Estas dos funciones las emplea session.php para consultar
los datos relevantes del cliente
*/

function checkPlugin(plgIn, ctr) 
{ 
  var ok=false; 
  with (navigator) 
  if (appName.indexOf('Microsoft')==-1 || (plugins && plugins.length)) 
  {
    ok=(plugins && plugins[plgIn]);
  } 
  else 
	if (appVersion.indexOf('3.1')==-1) 
	{ //not Netscape or Win3.1
		if (plgIn.indexOf("Flash")!=-1 && window.MM_flash!=null) 
			ok=window.MM_flash;
		else 
			if (plgIn.indexOf("Director")!=-1 && window.MM_dir!=null)
				ok=window.MM_dir;
	}
	
	obj=document.getElementById(ctr) 
	if (ok==true)
	{
	    obj.value=1;
	    //alert('PlugIn de '+ plgIn +' : ' + obj.value);
	}
	else
	{
		obj.value=0;
	   //alert('PlugIn de '+ plgIn + ' : ' + obj.value);
	}

}


function UserInfo()
{

 o=document.getElementById('MotorNavegador');
 o.value=navigator.userAgent;
 o=document.getElementById('NavegadorCliente');
 o.value=navigator.appName;
 o=document.getElementById('VersionNavegador');
 o.value=navigator.appVersion;
 o=document.getElementById('LenguajeSistema');
 o.value=navigator.browserLanguage;
 o=document.getElementById('MimeTypes');
 o.value=navigator.mimeTypes.toString();
 o=document.getElementById('PlugIns');
 o.value=navigator.plugins.toString();
 o=document.getElementById('Plataforma');
 o.value=navigator.platform;
 o=document.getElementById('Cookies');
 o.value=navigator.cookieEnabled;
 o=document.getElementById('CPU');
 o.value=navigator.cpuClass;
 o=document.getElementById('JavaHabilitado');
 o.value=navigator.javaEnabled();
 o=document.getElementById('Ancho');
 o.value=screen.width;
 o=document.getElementById('Alto');
 o.value=screen.height;
 checkPlugin('Shockwave Flash','Flash');
 checkPlugin('Shockwave for Director','Director');
}



