function maximize() {
if (top.location != location) top.location.href = location.href;
 self.moveTo(0,0);
 self.resizeTo(screen.availWidth,screen.availHeight);
}

function parent() {
if(top==self){setTimeout("location='http://ortomedica.com'",2000)}
}

function autotime() {
setTimeout("location='http://ortomedica.com'",5000)
}

function setfoto(identidad,image) {
photo = "document.form." + identidad + '.src ="gra/' + image + '.jpg"';
eval(photo);
}

function Validar(form) { 

if (form.email.value.indexOf('@', 0) == -1 || form.email.value.indexOf('.', 0) == -1 || form.email.value.indexOf(' ') != -1)
  { alert("Direccion de e-mail invalida verifiquela"); form.email.focus(); return; }
  
if (form.Nombre.value == "")
  { alert("Por favor ingrese su nombre"); form.Nombre.focus(); return; }
  
if (form.Telefono.value == "")
  { alert("Por favor ingrese su numero Telefonico"); form.Telefono.focus(); return; }
  
if (form.Mensaje.value == "")
  { alert("Por favor ingrese sus Comentarios"); form.Mensaje.focus(); return; }

  form.submit();
}

function fecha() {
var mydate=new Date();
var year=mydate.getYear();
if (year < 1000) { year+=1900; }
var day=mydate.getDay();
var month=mydate.getMonth()+1;
if (month<10) month="0"+month;
var daym=mydate.getDate();
if (daym<10) { daym="0"+daym; }
document.write("<small>"+daym+"/"+month+"/"+year+"</small>")
}

function setpopup(mypage,myname,w,h) {
 var win=null;
  {
   myleft=(screen.width)?(screen.width-w)/2:100; 
   mytop=(screen.height)?(screen.height-h)/2:100;
  }
   settings="width=" + w + ",height=" + h + ",top=" + mytop + ",left=" + myleft + ",scrollbars=no,location=no,directories=no,status=no,menubar=no,toolbar=no,resizable=yes"; 
 win=window.open(mypage,myname,settings);
win.focus();
}

function MostrarFecha( fecha ) {
   var nombres_dias = new Array("Domingo", "Lunes", "Martes", "Miercoles", "Jueves", "Viernes", "Sabado")
   var nombres_meses = new Array("Enero", "Febrero", "Marzo", "Abril", "Mayo", "Junio", "Julio", "Agosto", "Septiembre", "Octubre", "Noviembre", "Diciembre")
   var dia_mes = fecha.getDate()	//dia del mes
   var dia_semana = fecha.getDay()	//dia de la semana
   var mes = fecha.getMonth() + 1
   var anio = fecha.getFullYear()	//aņo de 4 digitos
   //escribe en pagina
   document.write(nombres_dias[dia_semana] + ", " + dia_mes + " de " + nombres_meses[mes - 1] + " de " + anio)
}

function UltimaActualizacion() {
  var fecha = new Date( document.lastModified )
  MostrarFecha( fecha )
  document.write("</b>")
}