//Copyright 2006 Adobe Systems, Inc. All rights reserved.
//
//This is the base class for implementing an Active Content extension -- a piece of code that knows how to rewrite OBJECT tags so that they comply to the Eolas patent without making the browser display the "Press OK to continue loading the content of this page" message box.
//
// When the user hovers the mouse over an ActiveX control in Internet Explorer 6 updated with (April 2006) Cumulative Security Update (912812) or Internet Explorer 7, the following message is displayed:
// “Press Spacebar or Enter to activate and use this control.”
// The user can now click the mouse anywhere inside the ActiveX control area, or press the Spacebar or Enter key to activate the control.
// The standard.js file has been introduced to retain the earlier behavior where the control remains interactive from the first click to the last.




function mostrarDemo(url) {
	window.open( url, 'ventana1' , 'width=660,height=450,scrollbars=0,location=0,toolbar=0')
}



var h;
var alturaDiv;
var divPpal;
var auxInt;
function mostrarOcultarSlow(id,desde,altura) {
        divPpal = document.getElementById(id);
		
		alturaDiv=altura;
		divDesde=document.getElementById(desde);
//		 if(divPpal.style.display == ""){	
		//alert(divPpal.style.height + divPpal.style.display);	
        if((divPpal.style.height == '') || (divPpal.style.height=='0px')){	
                expandir(id);				
				divDesde.className="divLinkExpandido";				
		}
        else {	
				
				//contraer(id);
				divPpal.style.height=0+'px'; 
				divPpal.style.display="none";
				divDesde.className="divLinkContraido";
		}				
		
}

var h=0;
var auxInterval;
function expandir(ide) {
   h=4;
  obj=document.getElementById(ide);
  obj.style.display='block'
  for (i=0; i<alturaDiv; i++)
  capa=ide;
  auxInterval=setInterval('agranda(capa)',10);
}
function agranda(obj) {
  obj=document.getElementById(obj);
  h=h+4;
  if (h>alturaDiv) { 
  		clearInterval(auxInterval);
		// hago el siguiente if porque tiene subDiv en su interior y deberan ajustar de forma automatica a su contenido o Para la preguntas frecuentes.
		if ((divPpal.id=='divDatosPersonales') || (divPpal.id=='divCuentaCorrientePacientes') || (divPpal.id=='divGrupoFuncionamiento') || (divPpal.id=='divGrupoInformacionGeneral')|| (divPpal.id=='divGrupoCompraDesdeUruguay')|| (divPpal.id=='divGrupoCompraDesdeElExterior')) {
			divPpal.style.height='auto';
		}
  }
  else {
	  obj.style.height = h+'px';
  }
}





//PRUEBAS

function mostrarOcultar(id,desde) {
        divID = document.getElementById(id);
		divDesde=document.getElementById(desde);
        if(divID.style.display == ""){
                divID.style.display = "none";
				divDesde.className="divLinkContraido";}
        else{
                divID.style.display = "";
				divDesde.className="divLinkExpandido";}
}
function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}
function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

