function abreVentana(l_URL,l_name,l_specs) {
 window.open(l_URL,l_name,l_specs)
}

function mensa(men) { //sirve para debugear
 alert(men)
}

function uno(src,color_entrada,stat) {  //colizq.php
 //alert(color_entrada)
 window.status= stat
 src.style.color=color_entrada
	src.style.cursor = "hand" 
} 

function dos(src,color_default,stat) {  //colizq.php
 window.status= stat
 src.style.color=color_default
	src.style.cursor = "default" 
}

function Anunciate(l_Pais, l_Lang, l_NombreVentana) { //colizq.php
	registro.email.value = ''
	registro.submit()
}

//function EnviaMailServicio(idLang, idServicio) { //fichas.php
//	window.open('envioMailServicio.php?idServicio='+ idServicio + '&idLang=' + idLang, 'EnvioMail', 'resizable,width=430,height=600,left=100,top=100')
//}

//----------------OJO NO FUNCIONA: REVISAR-----------------------------------------------------------
function Favoritos(p_link, p_Name) { // index.php y fichas.php
 var instruccion = "window.external.AddFavorite(" + p_Link + ", " + p_Name + ");"
 alert(instruccion)
 Eval("window.external.AddFavorite(" + p_Link + ", " + p_Name + ");")
}
function PaginaInicio(src,p_link) { // index.php y fichas.php
 src.style.behavior='url(#default#homepage)';
 //src.this.setHomePage(p_link);
}
//----------------OJO NO FUNCIONA: REVISAR-----------------------------------------------------------


//in document.element with id=lId inserts table with a link to Alt
function BanerImageMissing(lId,lLink,lAlt,lWidth,lHeight) {    //indexHeader.php
	var s="<table border='1' width='"+ lWidth +"' height='"+ lHeight +"'>";
	s+=" <tr valign='middle'><td align='center' ";
	s+=" onclick='abreVentana(\"visitabaner.php?idServicio="+lId+"&pag="+lLink+"\", \"publi\", \"location=no,resizable\");'";
 s+=">"+ lAlt;
	s+=" </td></tr>";
	s+="</table>";
	//document.getElementById(lId).innerHTML=s
}

//in document.element with id=lId inserts table with a link to Alt
function LinkImageMissing(lId,lLink,lAlt,lWidth,lHeight) {    //indexHeader.php
	var s="<table border='1' width='"+ lWidth +"' height='"+ lHeight +"'>";
	s+=" <tr valign='middle'><td align='center' ";
	s+=" onclick='abreVentana(\"visitaLink.php?idWeb="+lId+"&pag="+lLink+"\", \"publi\", \"location=no,resizable\");'";
 s+=">"+ lAlt;
	s+=" </td></tr>";
	s+="</table>";
	//document.getElementById(lId).innerHTML=s
}

function checksize() {
  if (document.images[0].complete) {
    window.resizeTo(document.images[0].width+10,document.images[0].height+30);
    window.focus();
    }
  else {
   setTimeout('checksize()',250) 
   }
 }

//var color_texto = '<%=getSettingKey("textcolor")%>'
//var color_fondo = '<%=getSettingKey("backgroundcolor")%>'
//inter(color_texto, color_fondo)


//Otras funciones

// Tratamiento de tamaņo de ventana
//window.moveTo(300,0);
//if (document.all) {
//top.window.resizeTo(screen.availWidth,screen.availHeight);
//}
//else if (document.layers||document.getElementById) {
//if (top.window.outerHeight<screen.availHeight||top.window.outerWidth<screen.availWidth){
//top.window.outerHeight = screen.availHeight;
//top.window.outerWidth = screen.availWidth;
//}
//}
// Bloqueo de teclas
//function teclas() { 
//alert(" Las teclas no funcionan "); 
//} 
//document.onkeydown=teclas; 

// Si ventana pierde foco, vuelve a abrirse si pones ventanas encima se pone naranja en barra de tareas
// En tag body poner: onBlur="DaFoco()" 
//var TieneFoco = true
//function DaFoco() {
//	if (TieneFoco == true)
//		setTimeout("self.focus()",10000)
//}

