function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}
// Javascript Document
/*******************************************************/
/*******************************************************/
 document.onkeydown = function()
 {
	if(window.event && window.event.keyCode == 18) //desactiva teclas alt
	 window.event.keyCode = 505; 
	if(window.event && window.event.keyCode == 116) //desactiva teclas F5
	 window.event.keyCode = 505; 
	if(window.event && window.event.keyCode == 505)
	 return false;
 }
/*******************************************************/
function CopyRight()
{
	document.write("<a style='text-decoration:none;font:bold 11px;color:#0168E7' href='http://www.itpay.eu' target='_blank'><b>Copyright © 2006 ITPAY</b></a>");	
}
/*******************************************************/
function flash(file,width,height)
{
	document.write('<object classid=clsid:D27CDB6E-AE6D-11cf-96B8-444553540000 codebase=http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0 width='+width+' height='+height+'>');
	document.write('<param name=movie value="'+file+'"/>');
	document.write('<param name=quality value=high />');
	document.write('<embed src="'+file+'" quality=high pluginspage=http://www.macromedia.com/go/getflashplayer type=application/x-shockwave-flash width='+width+' height='+height+'></embed>');
	document.write('</object>'); 	
}
/*******************************************************/
function FechaTitulo()
{
	<!-- This script and many more are available free online at -->
	<!-- The Javascript Source!! http://javascript.internet.com -->
	
	<!-- Begin
	var nombre_dia=new Array(7);
	nombre_dia[0]="Sunday";
	nombre_dia[1]="Monday";
	nombre_dia[2]="Tuesday";
	nombre_dia[3]="Wednesday";
	nombre_dia[4]="Thursday";
	nombre_dia[5]="Friday";
	nombre_dia[6]="Saturday";	

	var months=new Array(12);
	months[0]="January";
	months[1]="February";
	months[2]="March";
	months[3]="April";
	months[4]="May";
	months[5]="June";
	months[6]="July";
	months[7]="August";
	months[8]="September";
	months[9]="October";
	months[10]="November";
	months[11]="December";

	var time=new Date();
	var lmonth=months[time.getMonth()];	
	var year=time.getYear();
	if (year < 2000)    // Y2K Fix, Isaac Powell
	year = year + 1900; // http://onyx.idbsu.edu/~ipowell
	document.write("<span style='font:bold 10px;color:#FF8888'>"+nombre_dia[time.getDay()]+", "+time.getDate()+" "+lmonth+" "+year+"</span>");
	// End -->
}
/*******************************************************/
function IsEmail(email)
{
	if(email=='')
		return false;
	else if (!(email.indexOf(' ')==-1  && email.indexOf('@')>0 && email.indexOf('.')>0 && email.indexOf('@')+1 < email.length))
		 return false;		
	else
		 return true;		
}
/*******************************************************/
function IsDate(oTxt)
{ 
	var bOk = true; 
	if (oTxt != "")
	{ 
	 bOk = bOk && (valAno(oTxt)); 
	 bOk = bOk && (valMes(oTxt)); 
	 bOk = bOk && (valDia(oTxt)); 
	 bOk = bOk && (valSep(oTxt)); 
	 if (!bOk) 
		return false; 
	 else 
		return true; 
	} 
	else
		return false; 
} 
/*******************************************************/
function esDigito(sChr)
{ 
	var sCod = sChr.charCodeAt(0); 
	return ((sCod > 47) && (sCod < 58)); 
} 
/*******************************************************/
function valSep(oTxt)
{ 
	var bOk = false; 
	var sep1 = oTxt.charAt(4); 
	var sep2 = oTxt.charAt(7); 
	bOk = bOk || ((sep1 == "-") && (sep2 == "-")); 
	bOk = bOk || ((sep1 == "/") && (sep2 == "/")); 
	return bOk; 
} 
/*******************************************************/
function finMes(oTxt)
{ 
	var nMes = parseInt(oTxt.substr(3, 2), 10); 
	var nAno = parseInt(oTxt.substr(6), 10); 
	var nRes = 0; 
	switch (nMes)
	{ 
	 case 1: nRes = 31; break; 
	 case 2: nRes = 28; break; 
	 case 3: nRes = 31; break; 
	 case 4: nRes = 30; break; 
	 case 5: nRes = 31; break; 
	 case 6: nRes = 30; break; 
	 case 7: nRes = 31; break; 
	 case 8: nRes = 31; break; 
	 case 9: nRes = 30; break; 
	 case 10: nRes = 31; break; 
	 case 11: nRes = 30; break; 
	 case 12: nRes = 31; break; 
	} 
	return nRes + (((nMes == 2) && (nAno % 4) == 0)? 1: 0); 
} 
/*******************************************************/
function valDia(oTxt)
{ 
	var bOk = false; 
	var nDia = parseInt(oTxt.substr(8, 2), 10); 
	bOk = bOk || ((nDia >= 1) && (nDia <= finMes(oTxt))); 
	return bOk; 
} 
/*******************************************************/
function valMes(oTxt)
{ 
	var bOk = false; 
	var nMes = parseInt(oTxt.substr(5, 2), 10); 
	bOk = bOk || ((nMes >= 1) && (nMes <= 12)); 
	return bOk; 
} 
/*******************************************************/
function valAno(oTxt)
{ 
	var bOk = true; 
	var nAno = oTxt.substr(0,4); 
		
	bOk = bOk && ((nAno.length == 2) || (nAno.length == 4)); 
	if (bOk)
	{ 
	 for (var i = 0; i < nAno.length; i++){ 
		bOk = bOk && esDigito(nAno.charAt(i)); 
	 } 
	} 
	return bOk; 
 } 
/*******************************************************/
function solo_numeros()
{
	var key=window.event.keyCode;//codigo de tecla.
	//alert(key);
	if (key!=46 && (key < 48 || key > 57))//si no es numero		
	window.event.keyCode=0;//anula la entrada de texto.
}
/*******************************************************/
function solo_text()
{
	var key=window.event.keyCode;//codigo de tecla.	
	if(!(key < 48 || key > 57))
	window.event.keyCode=0;//anula la entrada de texto.
}
/*******************************************************/
function oNumero(numero)
{
	//Propiedades 
	this.valor = numero || 0
	this.dec = -1;
	//Métodos 
	this.formato = numFormat;
	this.ponValor = ponValor;
	//Definición de los métodos 
	function ponValor(cad)
	{
		if (cad =='-' || cad=='+') return
		if (cad.length ==0) return
		if (cad.indexOf('.') >=0)
				this.valor = parseFloat(cad);
		else 
				this.valor = parseInt(cad);
	} 
	function numFormat(dec, miles)
	{
		var num = this.valor, signo=3, expr;
		var cad = ""+this.valor;
		var ceros = "", pos, pdec, i;
		for (i=0; i < dec; i++)
		ceros += '0';
		pos = cad.indexOf('.')
		if (pos < 0)
				cad = cad+"."+ceros;
		else
		{
			pdec = cad.length - pos -1;
			if (pdec <= dec)
			{
				for (i=0; i< (dec-pdec); i++)
						cad += '0';
			}
			else
			{
				num = num*Math.pow(10, dec);
				num = Math.round(num);
				num = num/Math.pow(10, dec);
				cad = new String(num);
			}
	  }
		pos = cad.indexOf('.')
		if (pos < 0) pos = cad.lentgh
		if (cad.substr(0,1)=='-' || cad.substr(0,1) == '+') 
					 signo = 4;
		if (miles && pos > signo)
		do
		{
			expr = /([+-]?\d)(\d{3}[\.\,]\d*)/
			cad.match(expr)
			cad=cad.replace(expr, RegExp.$1+''+RegExp.$2)
		}
		while (cad.indexOf('') > signo)
				if (dec<0) cad = cad.replace(/\./,'')
						return cad;
		}
}//Fin del objeto oNumero:
/*******************************************************/
function num_aleatorio(inferior,superior)
{ 
	numPosibilidades = superior - inferior 
	aleat = Math.random() * numPosibilidades 
	aleat = Math.round(aleat) 
	return parseInt(inferior) + aleat 
} 
/*******************************************************/
function fecha_hora_actual()
{
	<!-- 
	var fecha;
	hoy = new Date();
	mes=hoy.getMonth()+1;
	dia=hoy.getDate();
	hora=hoy.getHours();
	minu=hoy.getMinutes();
	sec=hoy.getSeconds();
	
	if(mes<10) mes='0'+ mes; 
	if(dia<10) dia='0'+ dia;
	if(hora<10) hora='0'+ hora;
	if(minu<10) minu='0'+ minu;
	if(sec<10) sec='0'+ sec;
	fecha=hoy.getYear()+"-"+mes+"-"+dia+" "+hora+":"+minu+":"+sec;
	//document.write(fecha);		// -->	
	return fecha;	
}
/*******************************************************/
function print_fecha_hora_actual()
{
	<!-- 
	var fecha;
	hoy = new Date();
	mes=hoy.getMonth()+1;
	dia=hoy.getDate();
	hora=hoy.getHours();
	minu=hoy.getMinutes();
	sec=hoy.getSeconds();
	
	if(mes<10) mes='0'+ mes; 
	if(dia<10) dia='0'+ dia;
	if(hora<10) hora='0'+ hora;
	if(minu<10) minu='0'+ minu;
	if(sec<10) sec='0'+ sec;
	fecha=hoy.getYear()+"-"+mes+"-"+dia+" "+hora+":"+minu+":"+sec;
	document.write(fecha);		// -->
}
/*******************************************************/
function Fecha()
{
	<!-- 
	var fecha;
	hoy = new Date();
	mes=hoy.getMonth()+1;
	dia=hoy.getDate();	
	if(mes<10) mes='0'+ mes; 
	if(dia<10) dia='0'+ dia;
	fecha=hoy.getYear()+"-"+mes+"-"+dia;
	return fecha;	
}
/*******************************************************/
function Hora()
{		
	
	hoy = new Date();
	hora=hoy.getHours();
	minu=hoy.getMinutes();
	sec=hoy.getSeconds();	
	
	if(hora<10) hora='0'+ hora;
	if(minu<10) minu='0'+ minu;
	if(sec<10) sec='0'+ sec;
	//alert("hora");
	hora=hora+":"+minu+":"+sec;
	return hora;	
}
/*******************************************************/
function Fecha_Hora()
{
	<!-- 
	var fecha;
	hoy = new Date();
	mes=hoy.getMonth()+1;
	dia=hoy.getDate();
	hora=hoy.getHours();
	minu=hoy.getMinutes();
	sec=hoy.getSeconds();
	
	if(mes<10) mes='0'+ mes; 
	if(dia<10) dia='0'+ dia;
	if(hora<10) hora='0'+ hora;
	if(minu<10) minu='0'+ minu;
	if(sec<10) sec='0'+ sec;
	fecha=hoy.getYear()+"-"+mes+"-"+dia+" "+hora+":"+minu+":"+sec;
	return fecha;	
}