var nav4 = window.Event ? true : false;





function alerta(evt){

// NOTE: Backspace = 8, Enter = 13, '0' = 48, '9' = 57
var key = nav4 ? evt.which : evt.keyCode;
return (key <= 13 || (key >= 48 && key <= 57));

}







 function fondo() {

var e
var i
for(i=0;i<document.getElementById("DropDownList1").length;i++)
{

e=document.getElementById("DropDownList1").options[i].value
if(e.substr(0,1)=="-" && e!="- TODAS -")
{
document.getElementById("DropDownList1").options[i].style.backgroundColor = 'beige'
}

}

}







 function fondo2() {

var e
var i
for(i=0;i<document.getElementById("DropDownList2").length;i++)
{

e=document.getElementById("DropDownList2").options[i].value
if(e.substr(0,1)=="-" && e!="- TODAS -")
{
document.getElementById("DropDownList2").options[i].style.backgroundColor = 'beige'
}

}

}









function mostrar(imagen){
//alert(document.location.hostname + document.location.pathname)
//alert(document.host)
//alert(document.port)
//alert(document.pathname)
//alert(document.hash)
//alert(document.search)
//alert(imagen.src)
//alert(document.location.hostname+"/nofoto.gif")

if(imagen.src!="http://" + document.location.hostname + "/nofoto.gif" && imagen.src!="http://" + document.location.hostname + "/nofoto2.gif")
{
var height=fo.flotante.height
//alert(height)
var ima=imagen.src
var im=ima.substr(0,ima.indexOf("&w=")) + "&w=350"
fo.flotante.src=im

var height=fo.flotante.height
//alert(document.images["flotante"].height)
var curleft = curtop = 0;

if (imagen.offsetParent) {
	curleft = imagen.offsetLeft
		curtop = imagen.offsetTop
		while (imagen = imagen.offsetParent) {
			curleft += imagen.offsetLeft
			curtop += imagen.offsetTop
		}
	}

//fo.flotante.style.left=curleft + 200
fo.flotante.style.left=265

//alert(document.body.scrollTop)
var scrolltop=document.body.scrollTop
var innerheight=window.innerHeight

//alert(scrolltop)
//alert(innerheight)

if ((curtop + height )- scrolltop > innerheight)
{
fo.flotante.style.top=curtop - (curtop + height -  innerheight) + scrolltop
//alert("forzado")
}
else
{
fo.flotante.style.top=curtop
//alert("normal")
}
fo.flotante.style.visibility="visible"
//fo.flotante.style.top=(screen.height/2)-(fo.flotante.height/2)+window.pageYOffset

//alert(height)
}


}








function ocultar(){
//fo.flotante.src=""
fo.flotante.style.visibility="hidden"
}






function encender(t) {
    t.style.textDecoration = "underline";
    }







function apagar(t) {
   t.style.textDecoration = "none";
    }








function mensajes(){

  if (document.getElementById("TextBox12").value!="")
  {
  alert(document.getElementById("TextBox12").value);
  document.getElementById("TextBox12").value=""
  }
 

}