function hacerPaginaInicio(docu){
	docu.style.behavior='url(#default#homepage)';
	docu.setHomePage('http://www.werop.com');
	return true;
}

function anadirFavoritos(ventana){
	ventana.external.AddFavorite('http://www.werop.com','Werop - El portal de portales');	
}

function fecha(){
	var mydate;
    var year;
    var month;
    var day;
    var daym;
    var dayarray;
	mydate=new Date();
	year=mydate.getYear();
	if (year<1000) year+=1900;
	day=mydate.getDay();
	month=mydate.getMonth();
	daym=mydate.getDate();
	if (daym<10) daym='0'+daym;
	dayarray=new Array('domingo','lunes','martes','miercoles','jueves','viernes','sabado');
	var montharray=new Array("Enero","Febrero","Marzo","Abril","Mayo","Junio","Julio","Agosto","Septiembre","Octubre","Noviembre","Diciembre");
	document.write("<font color='#FFFFFF' size='-2'>"+dayarray[day]+", "+daym+" de "+montharray[month]+" de "+year+"</font>");
}

function eurocalc(){
	ventEuro = open("eurocalculadora.htm", "Eurocalculadora", "width=250,height=215,resizable=no,status=no,menubar=no,locationbar=no");
}

function ventana() {
	var widthw = 350;
	var heightw = 270;
	var estilo = "resizable=0,menubar=0,toolbar=0,location=0,personalbar=0"+",status=0,scrollbar=0,width="+widthw+",height="+heightw+",top="+(screen.height-heightw)/2+",left="+(screen.width-widthw)/2;
 	window.open("http://www.irc-hispano.org/demochat/webchat.html"+"?canal=Pon_Canal","WebChatIni",estilo);
}

function launchwin(winurl,winname,winfeatures){
	//This launches a new window and then
	//focuses it if window.focus() is supported.
	winurl="http://www.donarsangre.org";
	var javascript_version = 1.0;
	var newwin = window.open(winurl,winname,winfeatures);
	if(javascript_version > 1.0){
		//delay a bit here because IE4 encounters errors
		//when trying to focus a recently opened window
 		setTimeout('newwin.focus();',250);
	}
}

function ir(url){
	location.href=url;	
}

function irA(docu,url){	
	docu.method = 'post';
	docu.action = url;
	docu.submit();
}

function irAGet(docu,url){	
	docu.method = 'get';
	docu.action = url;
	docu.submit();
}

function entrada(docu){
	docu.boton.disabled=true;
	docu.submit();
}

function irAdjuntando(docu,url){	
	//docu.enctype="multipart/form-data";
	docu.action=url;
	docu.submit();
}

var dentro=true;
function cambiaEstilo(ob){
	selec = '';
	if(ob.className.indexOf('Selec') > 0) selec = 'Selec';
	if(dentro){ 
		ob.className='tablaMenuDentro'+selec;
		dentro=false;
	}else{
		ob.className='tablaMenuFuera'+selec;
		dentro=true;
	}
	selec = '';
}

var dentro=true;
function cambiaEstiloEmail(ob){
	if(dentro){ 
		ob.className='tablaMenuEmailDentro';
		dentro=false;
	}else{
		ob.className='tablaMenuEmailFuera';
		dentro=true;
	}
}

function copiarTexto(primero,idSegundo,idSegundo2){
	segundo = document.getElementById(idSegundo);
	tercero = document.getElementById(idSegundo2);
	segundo.innerText = primero.value;	
	tercero.innerText = primero.value;	
}

function compruebaRecomiendaIrA(docu,url){
    if(docu.remitente.value != ''){
        if(docu.destinatario.value != ''){
            irA(docu,url);
        }else{
            alert('El campo DESTINATARIO esta vacio.');
        }
    }else{
        alert('El campo TU NOMBRE esta vacio.');
    }
}

function irACorreo(docu,url){
    docu.enctype = 'application/x-www-form-urlencoded';
    docu.method = 'post';
	docu.action = url;
	document.getElementById("acti").name = 'action';
	docu.submit();
}

function buscar(event){
	if(event.keyCode == 13){
		irAGet(document.formulario,'http://www.google.es/search');	
	}
}

function nuevo(){
	nuevo = document.getElementById('fNuevo');
	sema = true;
	while(true){
		if(sema) nuevo.color = '#FF0000';
		else nuevo.color = '#FFCC66';
		sema = !sema;
		setTimeout("nada", 2000);
	}
}