function toggleDisplay(elem) {  
	var objVisible = document.getElementById(elem);
	var estVisible = objVisible.style.display;	
	if (estVisible == "none") {
		objVisible.style.display = "block";
	
	} else {
		objVisible.style.display = "none";
	}
} 


function newWin(link,w,h,s,r) {
  if (h >= 640){
	  if (screen.width <= 800) {
		
		w = 375;
		s = 'yes';
		alert("Su resolución es pequeña\nSe modifica el tamaño de la foto para que Ud. pueda verla.");
		}
	}
var winFeatures = 'width=' + w + ',height=' + h + ',scrollbars=' + s + ',resizable=' + r;
var bookWindow = window.open(link, "", winFeatures);
}


function fotos() {
  if (document.images["fotos"].height >= 640){
	  if (screen.width <= 800) {
		document.images["fotos"].height = 500;
		}

	}
}
function lalala(){
	
	document.forms.galeria.submit();
}


function Pulsar(e,campo){
switch(e.keyCode){
case 32: //Aqui deberas poner el numero que corresponda a la barra espaciadora
alert("No puede dejar espacios en blanco");
return false;

break;
}
}



<!--
var nav4 = window.Event ? true : false;
function acceptNum(evt){ 
// NOTE: Backspace = 8, Enter = 13, '0' = 48, '9' = 57 
var key = nav4 ? evt.which : evt.keyCode; 
return (key <= 13 || (key >= 48 && key <= 57));
}
//-->

/*<!--

// Detect if the browser is IE or not.
// If it is not IE, we assume that the browser is NS.
var IE = document.all?true:false;

// If NS -- that is, !IE -- then set up for mouse capture
if (!IE) document.captureEvents(Event.MOUSEMOVE);

// Set-up to use getMouseXY function onMouseMove
document.onmousemove = getMouse;

// Temporary variables to hold mouse x-y pos.s
var tempX = 0;
var tempY = 0;

// Main function to retrieve mouse x-y pos.s

function getMouse(e) {
  if (IE) { // grab the x-y pos.s if browser is IE
    tempX = event.clientX + document.body.scrollLeft;
    tempY = event.clientY + document.body.scrollTop;
  } else {  // grab the x-y pos.s if browser is NS
    tempX = e.pageX;
	//alert("hola"+tempX);
  }  
  // catch possible negative values in NS4
  if (tempX < 0){tempX = 0}
  if (tempY < 0){tempY = 0}  
  // show the position values in the form named Show
  // in the text fields named MouseX and MouseY
  
  
  
	var objmove = document.getElementById(elem);
	//alert("hola"+objmove);
	objmove.style.left = tempX;
	objmove.style.top = tempY;
	objVisible.style.display = "block";
  return true
}
//-->
*/

var mouse_X; 
var mouse_Y; 

function mover(elem){ 
 var naam = navigator.appName; 

 if (naam == 'Microsoft Internet Explorer') { 
  document.getElementById(elem).style.left = (mouse_X)+'px'; 
  document.getElementById(elem).style.top  = mouse_Y; 
 } 

 else { 
  document.getElementById(elem).style.left = (mouse_X)+'px'; 
  document.getElementById(elem).style.top  = (mouse_Y + 0)+'px'; 
 } 

  
} 

var ie = document.all?true:false; 
if (!ie) document.captureEvents(Event.MOUSEMOVE) 
document.onmousemove = getMouseXY; 

function getMouseXY(e) { 
if (ie) { // grab the x-y pos.s if browser is IE 
mouse_X = event.clientX + document.body.scrollLeft; 
mouse_Y = event.clientY + document.body.scrollTop; 
} 

else { // grab the x-y pos.s if browser is NS 
mouse_X = e.pageX; 
mouse_Y = e.pageY; 

} 
if (mouse_X < 0){mouse_X = 0;} 
if (mouse_Y < 0){mouse_Y = 0;} 
}
function confirmar_3(url, nom, objeto){

con=confirm("¿Seguro que desea borrar?\n--> "+nom+"\nEstá acción no puede deshacerse!"); 
	if (con) {
 		top.location.href=url;

	}else{
	 	return;  
	}
}



function vacio(cadena)   
  {                                    // DECLARACION DE CONSTANTES   
    var blanco = " \n\t" + String.fromCharCode(13); // blancos   
                                       // DECLARACION DE VARIABLES   
    var i;                             // indice en cadena   
    var es_vacio;                      // cadena es vacio o no   
    for(i = 0, es_vacio = true; (i < cadena.length) && es_vacio; i++) // INICIO   
      es_vacio = blanco.indexOf(cadena.charAt(i)) != - 1;   
    return(es_vacio);   
  } 


  
  
  
  
  
  
  
  
  
function validar3(){
ok=true;
que = "";
if(vacio(document.form.nomb.value)) {que = que +  "El campo nombre no puede estar vacio \n";ok=false}
if(vacio(document.form.apellido.value)) {que = que +  "El campo apellido no puede estar vacio \n";ok=false}
if (document.form.dia.value==""){que = que +  "Día no puede ser nulo \n";ok=false}
if (document.form.mes.value==""){que = que +  "Mes no puede ser nulo \n";ok=false}
if (document.form.ano.value==""){que = que +  "Año no puede ser nulo \n";ok=false}

if (vacio(document.form.nick.value)) {que = que +  "El campo nick no puede estar vacio \n";ok=false}
if (vacio(document.form.mail.value)) {que = que +  "El campo e-mail no puede estar vacio \n";ok=false}
if (document.form.pass.value != document.form.repass.value){que = que +  "No respondiste la pregunta \n";ok=false}
if (ok==false){
alert("Es necesario completar todos los campos requeridos:\n"+que);
return false;
}
return true;
}

function val(){
ok=true;
if (vacio(document.forms.noti.mensaje.value)){ok=false}
if (ok==false){
	alert("No Puede ser un mensaje en blanco.");
	return false;
}else{
	document.forms.noti.submit();
	toggleDisplay('enviar');toggleDisplay('enviando');
}
}

function Registro(){
if (vacio(document.forms.registro.nomb.value))
  { alert("Por favor ingrese su Nombre"); document.forms.registro.nomb.focus();  return false;
}
if (vacio(document.forms.registro.apellido.value))
  { alert("Por favor ingrese su Apellido"); document.forms.registro.apellido.focus();  return false;
}
if (document.forms.registro.dia.value == "")
  { alert("Por favor ingrese el día de nacimiento"); document.forms.registro.dia.focus();  return false;
}
if (document.forms.registro.mes.value == "")
  { alert("Por favor ingrese el mes de nacimiento"); document.forms.registro.mes.focus(); return false;
}
if (document.forms.registro.ano.value == "")
  { alert("Por favor ingrese el año de nacimiento"); document.forms.registro.ano.focus();  return false;
}
if (vacio(document.forms.registro.nick.value))
  { alert("Por favor ingrese su Nick"); document.forms.registro.nick.focus();  return false;
}
if (document.forms.registro.nick.value.length < "4")
  { alert("El nick no puede tener menos de 4 caracteres"); document.forms.registro.focus();  return false; 
}
if (vacio(document.forms.registro.pass.value))
  { alert("Por favor ingrese su password"); document.forms.registro.pass.focus();  return false; 
}
if (document.forms.registro.pass.value.length <= "4")
  { alert("La contraseña no puede tener menos de 5 caracteres"); document.forms.registro.focus();  return false; 
}
if (!(document.forms.registro.pass.value == document.forms.registro.repass.value))
  { alert("Repitio mal la contraseña"); document.forms.registro.repass.focus();  return false; 
}
if (vacio(document.forms.registro.mail.value))
  { alert("Por favor ingrese su email"); document.forms.registro.mail.focus();  return false; 
}  
if (document.forms.registro.mail.value == "1@1.com")
  { alert("Esa no es una direccion valida de correo"); document.forms.registro.mail.focus();  return false; 
}
if (!(document.forms.registro.mail.value == document.forms.registro.remail.value))
  { alert("Repitio mal el mail"); document.forms.registro.repass.focus();  return false; 
}
if (document.forms.registro.mail.value == "1@1.com.ar")
  { alert("Esa no es una direccion valida de correo"); document.forms.registro.mail.focus();  return false; 
}
if (document.forms.registro.mail.value == "1@1.co")
  { alert("Esa no es una direccion valida de correo"); document.forms.registro.mail.focus();  return false; 
}
{
	var x = document.forms.registro.mail.value;
	var filter  = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/;
	if (filter.test(x)) document.forms.registro.submit();
	else alert('Esa no es una direccion valida de correo'); document.forms.registro.mail.focus();  return false; 
}
   document.forms.registro.submit();
}

function respuesta(){
if (document.forms.noti.mensaje.value == "")
  { alert("Por favor ingrese un mensaje"); document.forms.noti.mensaje.focus(); return; }
  document.forms.noti.submit();
}



function Validar(){
if (vacio(document.forms.noti.titulo.value))
  { alert("Por favor ingrese un titulo"); document.forms.noti.titulo.focus(); return false; }
if (vacio(document.forms.noti.mensaje.value))
  { alert("Por favor ingrese un mensaje"); document.forms.noti.mensaje.focus(); return false; }

  document.forms.noti.submit();
  toggleDisplay('enviar');toggleDisplay('enviando');
}

function Validar2(){
if (document.forms.registro.usuario.value.length < 5)
  { alert("El usuario no puede tener menos de 5 caracteres"); document.forms.registro.usuario.focus(); return; }
if (document.forms.registro.usuario.value.length > 9)
  { alert("El usuario no puede tener mas de 10 caracteres"); document.forms.registro.usuario.focus(); return; }
if (vacio(document.forms.registro.password.value))

  { alert("Por favor ingrese un password"); document.forms.registro.password.focus(); return; }
  document.forms.registro.submit();
}
function Validar3(){
if (vacio(document.forms.noti.titulo.value))
  { alert("Por favor ingrese un titulo"); document.forms.noti.titulo.focus(); return; }
if (vacio(document.forms.noti.mensaje.value))
  { alert("Por favor ingrese un mensaje"); document.forms.noti.mensaje.focus(); return; }
  document.forms.noti.submit();

}

function check_busqueda_cantidad(url){
if (document.getElementById('busqueda').value.length < 1)
  { alert("No podes buscar algo de menos de 4 caracteres"); document.forms.buscar.busqueda.focus(); return false; }
  
  top.location.href=url;
}



function insertar_una_cita(theform,id){
	document.forms.noti.mensaje.value += "[cita="+id+"]\n";
	return;

}
	//var x = document.forms.noti.mensaje.value;

	//var filter  = /^\[cita=/;
	//if (filter.test(x)){
		//alert("No puedes hacer 2 citas");
	//}else{
		//}
		
/*window.onload=function(){
	alert("hola");
}
window.onunload=function(){
	alert("chau");
}*/

retardo = "";
/*function toggleMenu(id) {
	menu = document.getElementById(id);
	menu2 = document.getElementById('menuPalermo');
	menu.style.display = "block";
	menu2.onmouseout = toggleDivOff;
	menu2.onmouseover = toggleDivOn;
}*/
var id2 = "";
var id3 = "";
function toggleDivOn(id) {
	muestra(id);
	clearTimeout(this["retardo"+id]);
}
function toggleDivOff(id) {
	this["retardo"+id] = setTimeout("oculta('"+id+"')",500);

}


function muestra(id){
	if(id2 == ""){id2 = id};
	obj3 = id2+"_A";
	obj4 = id+"_A";
	if(id != id2){
		
		document.getElementById(id2).style.display = "none";
		document.getElementById(obj3).style.background = "";
	}
	document.getElementById(obj4).style.background = "#EB008B";
	document.getElementById(id).style.display = "block";
	id2 = id;

}
function oculta(id){
	document.getElementById(id).style.display = "none";
	obj4 = id+"_A";
	document.getElementById(obj4).style.background = "";
}








/*function toggleMenu(id) {
	muestra();
	menu2 = document.getElementById('menuPalermo');
	
	menu2.onmouseout = toggleDivOff;
	menu2.onmouseover = toggleDivOn;
}
function toggleDivOn() {

	muestra();
	clearTimeout(retardo);

}

function toggleDivOff() {
	//oculta();
	retardo = setTimeout(oculta,500);
}

function muestra(){
	document.getElementById('Palermo').style.display = "block";

}
function oculta(){
	document.getElementById('Palermo').style.display = "none";
}*/




function ventanaNueva(documento,donde){	
	window.open(documento,donde);
}

function participar(url){
 		top.location.href=url;
}
