A="";
B="";
C="";

function indx(a,b,c) // inicio de las funciones
{ precarg(1);
  locationpage(b);
  prince(c);

  if(a==1)resolucion();
  
  if(a==2){preimagesbott();}// cuando es el ciberpanel
  
  }
  					
function locationpage(s){A=s;}

function thisd(e){C=e;}

function prince(z){B=z;}

function visuamenU(){}

function ejecutar(){return A;}

function queen(){return B;}
				
function bridge() 
{ 
	
	if(document.getElementById('Men2')){document.getElementById('Men2').style.visibility = 'visible';}
	getInfo("1");
	if(document.Men2){document.Men2.visibility = 'visible';}
	
	if(document.all.Men2){document.all.Men2.style.visibility = 'visible';}
	
	
}
  
function resolucion()
{ // pregunto por la resolucion availWidth y availHeight
if ( screen.availHeight > 738 )
		 {	 
			 if (document.getElementById) 
			 { 	 
			 
  			  AN= (screen.availHeight - 738 + 14) ;
			  
			  AN=(AN-20)/52;
			  FER=AN.toString();
			  FER=FER.substring(0, FER.indexOf('.'));
			  AN=52*FER;

			  a= 437+ AN;
			  b=  417 + AN ;

			  
			  document.getElementById('Iframe').style.height = a.toString()+'px';
			  document.getElementById('tabla').style.height = b.toString()+'px';
			  document.getElementById('conten').style.top = '8px';
			 }
			else {
			if (document.layers) { 
			document.Iframe.height = a.toString()+'px';
			document.tabla.height = b.toString()+'px';
			document.conten.top = '8px';
			}
			else { 
			document.all.Iframe.style.height = a.toString()+'px';
			document.all.tabla.style.height = b.toString()+'px';
			document.all.conten.style.top = '8px';
			    }
		    }
		 
			 
			 
		 }		 
}

function getInfo(n) {
	
if(document.getElementById("menu"))	
	{
		if(n!="1"){document.getElementById("menu").Datos(n);}
		else{document.getElementById("menu").vitrinear();
		    		}
	}

}

function incrustar(z)
{ //incrusto swf con version validada nueve y valida para morzilla
 if(z=="Men2"){
	  var so = new SWFObject("../mecont.swf", "menu", "190", "400", "8", "#ffffff");
	  so.write(z);
	  verify();
	 }
 
 else {
	  var so = new SWFObject("mecont.swf", "menu", "190", "400", "8", "#ffffff");
	  so.write(z);
	  verify();
	 }

}

/*
function incrustar3(z)
{ //incrusto swf con version validada nueve y valida para morzilla
 var so = new SWFObject("http://www.cibervitrina.com/mecont.swf", "menu", "190", "400", "8", "#ffffff");
 so.write(z);
}*/
	
function incrustar2(capa, ruta, id, w, h)
{ //incrusto swf con version validada nueve y valida para morzilla
 var sos = new SWFObject(ruta, id, w, h, "8", "#ffffff");
 sos.write(capa);
//verify();
}

function verify()
{
   if(document.getElementById("menu")){}
   
   else {	centrica();
       } 
	  	
}


function precarg(val) { 		// de acuerdo con el explorador asigno propiedades a las capas

	if (document.getElementById)
	{ // si doc completo entonces oculto capa absoluta y muestro las demas, y llamo acces Est
		if(val == 1)acces();
		
		/*
		if(document.getElementById('Est'))document.getElementById('Est').style.visibility = 'default';
		if(document.getElementById('actdat'))document.getElementById('actdat').style.visibility = 'default';
		if(document.getElementById('publs3'))document.getElementById('publs3').style.visibility = 'default';
		if(document.getElementById('pubesS2'))document.getElementById('pubesS2').style.visibility = 'default';
		*/
		
		if(document.getElementById('MenUS'))document.getElementById('sl1').style.visibility = 'visible';
		if(document.getElementById('conten'))document.getElementById('conten').style.visibility = 'visible';
		if(document.getElementById('conten2'))document.getElementById('conten2').style.visibility = 'visible';
		if(document.getElementById('Men'))document.getElementById('Men').style.visibility = 'visible';
		if(document.getElementById('fech'))document.getElementById('fech').style.visibility = 'visible';
		if(document.getElementById('precarga'))document.getElementById('precarga').style.visibility = 'hidden';
		if(document.getElementById('precarga2'))document.getElementById('precarga2').style.visibility = 'hidden';
		}
		else {
		if (document.layers) { 
		if(val == 1)acces();
		if(document.MenUS)document.sl1.visibility = 'visible';
		if(document.conten)document.conten.visibility = 'visible';
		if(document.conten2)document.conten2.visibility = 'visible';
		if(document.Men)document.Men.visibility = 'visible';
		if(document.fech)document.fech.visibility = 'visible';
		if(document.precarga)document.precarga.visibility = 'hidden';
		if(document.precarga2)document.precarga2.visibility = 'hidden';
		}
		else { 
		if(val == 1)acces();
		if(document.all.MenUS)document.all.sl1.style.visibility = 'visible';
		if(document.all.conten)document.all.conten.style.visibility = 'visible';
		if(document.all.conten2)document.all.conten2.style.visibility = 'visible';
		if(document.all.Men)document.all.Men.style.visibility = 'visible';
		if(document.all.fech)document.all.fech.style.visibility = 'visible';
		if(ocument.all.precarga)document.all.precarga.style.visibility = 'hidden';
		if(ocument.all.precarga2)document.all.precarga2.style.visibility = 'hidden';
		 }
	 }
}
function acces(){
	// accedo al tag body y le asigno la nueva clase kam
 var body = document.getElementsByTagName("body")[0];
 var class_name = "kam";
 var bot = document.getElementById("bot-accesible");
 var ya_tiene = new RegExp('\b'+class_name+'\b').test(body.className);
	body.className += " "+class_name;
}
function muestraInfo(){
var popupPosition = {left: parseInt(window.screen.availWidth / 3), top: parseInt(window.screen.availHeight / 3)};		
			
var a= screen.height/2-200;
var b= screen.width/2-150; // 300  400
var c="toolbar =0, status =0, directories =0, width =350, height =480, popup, resizable = no, top ="+a+", left ="+b;
	window.open('http://www.cibervitrina.com/info.html','Portatil', 'location=0,status=0,scrollbars=0,width=300,height=400,top=' + a + ',left=' + b ).focus();
//window.open('http://www.cibervitrina.com/info.html','info', c ).focus(); //"info" ,
}


function muestraInfo(ob){
var popupPosition = {left: parseInt(window.screen.availWidth / 3), top: parseInt(window.screen.availHeight / 3)};		
 if(ob==1){ dest="call/formasdepago.html"; var wi= 550; he=350;}	
 	else { dest="info.html"; var wi= 350; he=480;}
 	
	var a= screen.height/2-200;
	var b= screen.width/2-(wi/2);
	var c="toolbar =0, status =0, directories =0, width =700, height =400, popup, resizable = no, top ="+a+", left ="+b;
		window.open('http://www.cibervitrina.com/'+dest,'Portatil', 'location=0,status=0,scrollbars=0,width='+wi+',height='+he+',top=' + a + ',left=' + b ).focus();
	//window.open('http://www.cibervitrina.com/info.html','info', c ).focus(); //"info" ,
	
}





function centrica()
{
	
			if (document.getElementById) { 
			document.getElementById('aux').style.visibility = 'visible';
										 }
			else {
					if (document.layers) { 
					document.aux.visibility = 'visible';
										 }
					else { 
					document.all.aux.style.visibility = 'visible';
			 		     }
		  	     }
}

function cerrar()
{
				if (document.getElementById) { 
			document.getElementById('Men2').style.visibility = 'hidden';
			}
			else {
			if (document.layers) { 
			document.Men2.visibility = 'hidden';
			}
			else { 
			document.all.Men2.style.visibility = 'hidden';
			    }
		    }

}