// JavaScript Document

function NewWindow(mypage,myname,w,h,scroll){
  var winl = (screen.width-w)/2;
  var wint = (screen.height-h)/2;
  var settings  ='height='+h+',';
      settings +='width='+w+',';
      settings +='top='+wint+',';
      settings +='left='+winl+',';
      settings +='scrollbars='+scroll+',';
      settings +='resizable=yes';
  win=window.open(mypage,myname,settings);
  if(parseInt(navigator.appVersion) >= 4){win.window.focus();}
}

function popupform(myform, windowname)
{
if (! window.focus)return true;
  var winl = (screen.width-450)/2;
  var wint = (screen.height-65)/2;
myform.target=windowname;
window.open('', windowname, 'height=120,width=480,top='+wint+',left='+winl+',scrollbars=no');
return true;
}

function NewWindow2(mypage,myname,w,h,scroll){
  var winl = (screen.width-w)/2;
  var wint = (screen.height-h)/2;
  var settings  ='height='+h+',';
      settings +='width='+w+',';
      settings +='top='+wint+',';
      settings +='left='+winl+',';
      settings +='scrollbars='+scroll+',';
      settings +='resizable=yes';
	  mypage +='?dia='+document.form1.dia.value;
	  mypage +='&mes='+document.form1.mes.value;
	  mypage +='&ano='+document.form1.ano.value; 
	   
  win=window.open(mypage,myname,settings);
  if(parseInt(navigator.appVersion) >= 4){win.window.focus();}
}


function noBlanks(fecha,hora){

if(fecha==''){window.alert("Selecciona una Fecha"); return false;}

if(hora==''){window.alert("Selecciona una Hora"); return false;}


} 

function horas()
{
	if(document.form1.idfecha.value == ''){ 
		window.alert("Debe elegir primero la fecha"); return false; 
	} else {
		  NewWindow2('Webselecthora.php','calss','800','800','yes');
	}
}
