ahora = new Date();
dia = ahora.getDate();
mes = ahora.getMonth()+1;
anho = ahora.getFullYear();
hora = ahora.getHours();
minuto = ahora.getMinutes();
if(dia<10){dia="0"+dia}
if(mes<10){mes="0"+mes}
if(hora<10){hora="0"+hora}
if(minuto<10){minuto="0"+minuto}
fecha=dia+'/'+mes+'/'+anho+' '+hora+':'+minuto;

function hora_cam() {
  	ho_cj = new Date();
  	dia_cj = ho_cj.getDate();
	mes_cj = ho_cj.getMonth()+1;
	anho_cj = ho_cj.getFullYear();
	hora_cj = ho_cj.getHours();
	minuto_cj = ho_cj.getMinutes();
	segundo_cj = ho_cj.getSeconds();
	
	if(dia_cj<10){dia_cj="0"+dia_cj}
	if(mes_cj<10){mes_cj="0"+mes_cj}
	if(hora_cj<10){hora_cj="0"+hora_cj}
	if(minuto_cj<10){minuto_cj="0"+minuto_cj}
	if(segundo_cj<10){segundo_cj="0"+segundo_cj}
	
	hora_cliente=dia_cj+'/'+mes_cj+'/'+anho_cj+' '+hora_cj+':'+minuto_cj+":"+segundo_cj;
	
  	document.getElementById('hora_cl').innerHTML=hora_cliente;
}

function cambiamail (buzon) {
	var res = "";
	for (var n = 0; n < buzon.length; n++)
	res += String.fromCharCode(buzon.charCodeAt(n));
	if (res.indexOf('@') < 0)
	res = res + '@' + 'vermiip.es';
	location = "mail" + "to:" + res;
}

function copy_cjip(meintext){ 
	if (window.clipboardData){ 
   		window.clipboardData.setData("Text", meintext); 
   	}else if (window.netscape){ 
   		netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect'); 
   		var clip = Components.classes['@mozilla.org/widget/clipboard;1'] 
       	.createInstance(Components.interfaces.nsIClipboard); 
   		if (!clip) return; 
   		var trans = Components.classes['@mozilla.org/widget/transferable;1'] 
       	.createInstance(Components.interfaces.nsITransferable); 
   		if (!trans) return; 
   		trans.addDataFlavor('text/unicode'); 
   		var str = new Object(); 
   		var len = new Object(); 

   		var str = Components.classes["@mozilla.org/supports-string;1"] 
       	.createInstance(Components.interfaces.nsISupportsString); 

   		var copytext=meintext; 

   		str.data=copytext; 

   		trans.setTransferData("text/unicode",str,copytext.length*2); 

   		var clipid=Components.interfaces.nsIClipboard; 

   		if (!clip) return false; 

   		clip.setData(trans,null,clipid.kGlobalClipboard); 
   	} 
   	
	alert("La siguiente información ha sido copiada al portapapeles:\n\n" + meintext); 
   	return false; 
} 
