var w=((screen.width)/2)-245;
var h=((screen.height-16)/2)-20;
var ventana;		
	
var agt		= navigator.userAgent.toLowerCase();
var versInt	= parseInt(navigator.appVersion);
var is_ie	= ((agt.indexOf("msie") != -1) && (agt.indexOf("opera") == -1));
var is_ie3	= (is_ie && (versInt < 4));
var is_ie4	= (is_ie && (versInt == 4) && (agt.indexOf("msie 4")!=-1) );
var is_aol	= (agt.indexOf("aol") != -1);
var is_aol3	= (is_aol && is_ie3);
var is_aol4	= (is_aol && is_ie4);
var is_aol5	= (agt.indexOf("aol 5") != -1);
var is_aol6	= (agt.indexOf("aol 6") != -1);
var is_comp	= (agt.indexOf("compuserve") != -1);
var is_comp2000	= (agt.indexOf("cs") != -1);	 
var is_compie	= (is_comp && is_ie);
function fecha()
{
	var F, S="";
	var Dia = new Array("Domingo", "Lunes", "Martes", "Miércoles", "Jueves", "Viernes", "Sábado");
	var Mes = new Array("Enero", "Febrero", "Marzo", "Abril", "Mayo", "Junio", "Julio", "Agosto", "Septiembre", "Octubre", "Noviembre", "Diciembre");
	
	F= new Date();
	S += Dia[F.getDay()] + ", ";
	S += F.getDate() + " de ";
	S += Mes[F.getMonth()] + " de ";
	S += F.getFullYear();
	document.write(S);
}
function ventanaFlotante(pagina,ancho,alto){
ventanaInfo=eval("window.open('" + pagina + "','VentanaInfo','toolbar=no,location=no,directories=no,status=no,menubar=no,resizable=no,screenX=" + w +",screenY=" + h +",scrollbars=yes,width=" + ancho + ",height=" + alto + "','false')")
}
function ventanaF(pagina,ancho,alto){
ventanaInfo=eval("window.open('" + pagina + "','VentanaInfo','toolbar=no,location=no,directories=no,status=no,menubar=no,resizable=no,screenX=" + w +",screenY=" + h +",scrollbars=no,width=" + ancho + ",height=" + alto + "','false')")
}
function uno(src,color_entrada) 
{ 
    src.bgColor=color_entrada;
    src.style.cursor="hand"; 
} 
function dos(src,color_default) 
{ 
    src.bgColor=color_default;
    src.style.cursor="default"; 
}
function entraEmail(){
	s = document.webmail.id.value + '@copoma.es';
	document.webmail.userid.value = s;
	document.webmail.submit();
	window.close();
}

function chequearform(formulario)
{
if (formulario.nom.value == "" || formulario.tele.value == "" || formulario.mail.value == "")
 {
  alert ("Los campos Nombre, Teléfono y E-mail deben rellenarse.");
  return false;
 }
return true;
}

function valida_pass(formulario)
{
	if ((formulario.ncla.value!=formulario.rcla.value) || (formulario.ncla.value=="")) 
	{
		alert("No se permite claves en blanco o las claves no coinciden");
		formulario.ncla.value="";
		formulario.rcla.value="";
		formulario.ncla.focus();
		return false;
	}
	else
	{
		alert("Cambio Exitoso !!");
		return true;
	}
}
function cerrar()
{
	this.window.close();
}