/**********************************************************************************************************************/
/*									             */
/*			          Funciones de AQUILANDIA.com			             */
/*									             */
/**********************************************************************************************************************/


function linkexterno_window(url,ij)
{
var vent = window.open(url);

vent.focus();
}


/*********************************************************/
 


	function linkDiccionario (tabla, termino) {
	//	alert(tabla+"&+termino);
		var ventana = window.open("diccionario.asp?Pv_Tabla="+tabla+"&Pv_Termino="+termino,"Dic","scrollbars=1,channelmode=0,resizable=0,fullscreen=0,location=0,directories=0,menubar=0,toolbar=0,statusbar=0,width=338,height=195,screenX=0,screenY=0");
		ventana.focus();
//		var vent = window.open("diccionario.asp?Pv_Tabla=Glosario&Pv_Termino=ambiente","Dic","scrollbars=0,channelmode=0,resizable=0,fullscreen=0,location=1,directories=0,menubar=0,toolbar=0,statusbar=0,width=360,height=195,screenX=0,screenY=0");
	}	

function linkinterno_directo(idframe)
 {
 window.location.href="contenido.asp?Pv_IDFrame="+idframe;
 }
 
 
 

function buscar(palabra,pagina)
{
	palabra = palabra.replace("%20","D");
	window.location.href = "default.asp?Pv_BusquedaSimple=1&flagBusca=1&Pv_PalabraBusca="+palabra+"&Pv_Pagina="+pagina;
}


function buscadorAvanzado()
	{
		window.location.href = "default.asp?Pv_Landia=25&Pv_Sublandia=0&Pv_IDTipo=0&Pv_Contenido=0&Pv_BuscadorAvanzado=1";
	}
function resolucion(){

var screen_width = null;
var screen_height = null;
screen_width = screen.width;
screen_height = screen.height;

if (screen_width && screen_height) 
  if (screen_width <= 800)
    return("800");
   else if (screen_width <= 1024)
    return("1024");
  else
 	 return("1152");


}


function calculax(ventanax){                                      

var venx;	
	venx = screen.width;
	venx = (venx/2) - (ventanax/2);

 return(venx);

}

function calculay(ventanay){
var veny;
	veny = screen.height;
	veny = (veny/2) -(ventanay/2);
	 return(veny);
}


/****************************************************************************/

function linkmailto(cont,tip)
{
	if (tip==0)	   // mailto:
		window.location = "mailto:"+cont;
	else
	     if (tip==1){
		if (cont == "23abril"){
			xx = 794;
			yy = 600;
			var ventform = window.open("Formularios/F_23abril.asp","","scrollbars=1,channelmode=0,resizable=0,fullscreen=0,location=0,directories=0,menubar=0,toolbar=0,statusbar=0,width=794,height=600");			
			}
		var coorx = calculax(xx);
		var coory = calculay(yy);
		ventform.moveTo(coorx,coory);
		ventform.focus();	
		}
}

/*********************************************/





function ir_a(enla,codigotipoaccion){

	if (codigotipoaccion) // si codigotipoaccion contiene algo..
	  tipoaccion = codigotipoaccion;
	else
	  tipoaccion = "312";
	  
  	var ven = window.open("registros.asp?Pv_Tipo="+tipoaccion+"&Pv_Enlace="+enla);
//	var vent = window.open("registros.asp?Pv_Tipo="+tipoaccion+"&Pv_Enlace="+enla);

	ven.focus();
}


/******************************************************/

function abremail(){

	var ventmail = window.open('http://www.aquilandia.com/mail/default.htm',"Ventanaemail","scrollbars=0,channelmode=0,resizable=0,fullscreen=0,location=0,directories=0,menubar=0,toolbar=0,statusbar=0,width=325,height=123,screenX=coorx,screenY=coory");
	ventmail.focus();

}		

/******************************************************/

function linkinterno_somos(lan,sl,t,cont,xx,yy)
 {
 lan=parseInt(lan.substring(1,sl.length));
 sl=parseInt(sl.substring(2,sl.length));


	var aux = window.open("somos.asp?Pv_Landia="+lan+"&Pv_Sublandia="+sl+"&Pv_IDTipo="+t+"&Pv_Contenido="+cont,"Somos","scrollbars=1,channelmode=0,resizable=0,fullscreen=0,location=0,directories=0,menubar=0,toolbar=0,statusbar=0,width="+xx+",height="+yy+",screenX=coorx,screenY=coory");

 }
 
 /***********************************************************************/

function linkinterno_frame(lan,sl,t,c)
 {
 window.location.href="default.asp?Pv_Landia="+lan+"&Pv_Sublandia="+sl+"&Pv_IDTipo="+t+"&Pv_Contenido="+c;
 }

/**********************************/

function linkinterno_minilandiamapa(lan,sl,t,c)
 {
 lan=parseInt(lan.substring(1,sl.length));
 sl=parseInt(sl.substring(2,sl.length));

   url = "http://www.aquilandia.com/landias/s1/ss"+sl+"/default.htm"
   url = "registros.asp?Pv_Tipo=MinilandiaMapa&Pv_Enlace=" + url

   if (sl == 7)
	var miniland = window.open(url,"Minilandia"+sl,"scrollbars=1,channelmode=0,resizable=0,fullscreen=0,location=0,directories=0,menubar=0,toolbar=0,statusbar=0,width=780,height=580,screenX=coorx,screenY=coory");
   else
	var miniland = window.open(url,"Minilandia"+sl,"scrollbars=1,channelmode=0,resizable=0,fullscreen=0,location=0,directories=0,menubar=0,toolbar=0,statusbar=0,width=458,height=480,screenX=coorx,screenY=coory");

 }



/***********************************************************************/
function linkinterno_somos(lan,sl,t,cont,xx,yy)
 {
 lan=parseInt(lan.substring(1,sl.length));
 sl=parseInt(sl.substring(2,sl.length));


	var aux = window.open("somos.asp?Pv_Landia="+lan+"&Pv_Sublandia="+sl+"&Pv_IDTipo="+t+"&Pv_Contenido="+cont,"Somos","scrollbars=1,channelmode=0,resizable=0,fullscreen=0,location=0,directories=0,menubar=0,toolbar=0,statusbar=0,width="+xx+",height="+yy+",screenX=coorx,screenY=coory");

 }

/************************************************************************/
 
function LinkExternoParametrizado(portal,Lan,Sublan,IDTip,IDCont,Home,Pagina,Categoria,SubCategoria,Letra,Tabla,SubCatEnlace,Inicial,Top,Formulario,Restringido,Continente,Pais,Comunidad,Ciudad)
{
 if (portal == "trueques") {
 	strEnlace = "http://www.truequeslandia.com/df.asp"
	strEnlace = strEnlace + "?Pv_Landia=" + Lan;
	strEnlace = strEnlace + "&Pv_Categoria="  + Categoria;
	strEnlace = strEnlace + "&Pv_OfertaDemanda=" + IDTip;
	strEnlace = strEnlace + "&Pv_Restringido=" + Restringido;
	if (Sublan != "")
		strEnlace = strEnlace + "&Pv_IDentificador=" + Sublan;
	if (Pagina != "")
		strEnlace = strEnlace + "&Pv_Pagina=" + Pagina;
	if (IDCont != "")
		strEnlace = strEnlace + "&Pv_Numero=" + IDCont;
	if (Home != "")
		strEnlace = strEnlace + "&Pv_Orden=" + Home;
    }
 else
   if (portal == "10") {
	 	strEnlace = "http://www.10landia.com/topten/index.asp"
		strEnlace = strEnlace + "?Pv_Categoria="  + Categoria;
		strEnlace = strEnlace + "&Pv_SubCategoria=" + SubCategoria;
		strEnlace = strEnlace + "&Pv_NomDesc=" + IDTip; }
   else{	
	     strEnlace = ""
	     strEnlace = "http://www."+portal+"landia.com/df.asp"

		strEnlace = strEnlace + "?Pv_Landia=" + Lan;
		strEnlace = strEnlace + "&Pv_Sublandia=" + Sublan;
		strEnlace = strEnlace + "&Pv_IDTipo=" + IDTip;
		strEnlace = strEnlace + "&Pv_Contenido=" + IDCont;
		if (Home != "")
			strEnlace = strEnlace + "&Pv_Home=" + Home;
		if (Letra != "")
			strEnlace = strEnlace + "&Pv_Letra=" + Letra;
		if (Tabla != "")
			strEnlace = strEnlace + "&Pv_Tabla=" + Tabla;
		if (SubCatEnlace != "")
			strEnlace = strEnlace + "&Pv_SubCatEnlace=" + SubCatEnlace;
		if (Pagina != "")
			strEnlace = strEnlace + "&Pv_Pagina=" + Pagina;
		if (Categoria != "")
			strEnlace = strEnlace + "&Pv_Categoria=" + Categoria;
		if (SubCategoria != "")
			strEnlace = strEnlace + "&Pv_SubCategoria=" + SubCategoria;
		if (Inicial != "")
			strEnlace = strEnlace + "&Pv_Inicial=" + Inicial;
		if (Top != "")
			strEnlace = strEnlace + "&Pv_Top=" + Top;
		if (Formulario != "")
			strEnlace = strEnlace + "&Pv_Formulario=" + Formulario;
		if (Continente != "")
			strEnlace = strEnlace + "&Pv_Continente=" + Continente;
		if (Pais != "")
			strEnlace = strEnlace + "&Pv_Pais=" + Pais;
		if (Comunidad != "")
			strEnlace = strEnlace + "&Pv_Comunidad=" + Comunidad;
		if (Ciudad != "")
			strEnlace = strEnlace + "&Pv_Ciudad=" + Ciudad;
  }
	var vent = window.open("registros.asp?Pv_Tipo=2&Pv_Enlace="+strEnlace);
	vent.focus();
}

/****/

/*function linkinterno_window(lan,sl,t,c)
{
lan=parseInt(lan.substring(1,sl.length));
 sl=parseInt(sl.substring(2,sl.length));

  if (lan == 1)
	{	
		var miniland = window.open("s1/ss"+sl+"/default.htm","Minilandia","scrollbars=1,channelmode=0,resizable=0,fullscreen=0,location=0,directories=0,menubar=0,toolbar=0,statusbar=0,width=780,height=584,screenX=coorx,screenY=coory");
		var coorx = calculax(780);
		var coory = calculay(584);
		miniland.moveTo(coorx,coory);
	}	
  else
	{
	 	window.location.href="default.asp?Pv_Landia="+lan+"&Pv_Sublandia="+sl+"&Pv_IDTipo="+t+"&Pv_Contenido="+c;	
	}
}
*/
function linkInterno_Window(lan,sl)
{
	var ventbascula = window.open(lan,"Saludlandia","scrollbars=0,channelmode=0,resizable=0,fullscreen=0,location=0,directories=0,menubar=0,toolbar=0,statusbar=0,width=700,height=500,screenX=coorx,screenY=coory");
	ventbascula.focus();

	//var vent = window.open(lan);
	/*default.asp?Pv_Landia="+lan+"&Pv_Sublandia="+sl+"&Pv_IDTipo="+t+"&Pv_Contenido="+c;	
*/
}

/*******************************/

function linkhome()
{
	window.location.href="default.htm";
}

/********************************/

function abretiempo()
 {

  var xx=779;
  var yy=770;

  var coorx = calculax(xx);
  var coory = calculay(yy);

  var tiempo = window.open("registros.asp?Pv_Tipo=3&Pv_Enlace=http://www.aquilandia.com/landias/default_tiempo.htm","Tiempo","scrollbars=0,channelmode=0,resizable=1,fullscreen=0,location=0,directories=0,menubar=0,toolbar=0,statusbar=0,width="+xx+",height="+yy+",screenX=0,screenY=0");   
  tiempo.moveTo(coorx,coory);	
  tiempo.focus();

}

/*************************************/

function mapaweb(idportalprimero)
{
	window.location.href="default.asp?Pv_Landia=21&Pv_IDPortalPrimero="+idportalprimero;
}


/***********************************/

function iraltop(cat,subc,nomdesc){

	var xx;
	var yy;
			

	var venta = window.open("http://www.10landia.com/topten/index.asp?Pv_Categoria="+cat+"&Pv_Subcategoria="+subc+"&Pv_NomDesc="+nomdesc,"Top","scrollbars=1channelmode=0,resizable=0,fullscreen=0,location=0,directories=0,menubar=0,toolbar=0,statusbar=0,width=655,height=495,screenX=0,screenY=450");

	var coorx = calculax(655);
	var coory = calculay(495);
	
	venta.focus();				
}
function abrebascula()
			{
				var ventbascula = window.open('bascula/default.htm',"VentanaBascula","scrollbars=0,channelmode=0,resizable=0,fullscreen=0,location=0,directories=0,menubar=0,toolbar=0,statusbar=0,width=343,height=255,screenX=coorx,screenY=coory");
				ventbascula.focus();
			}