etpv_url='http://www.e-tpv.com/e-tpv/html/etpvpagosf.php'
//etpv_url='http://www.e-tpv.com/e-tpv/html/etpvpagosf.php'
username='ZhenIT';

txt_titulo='DONAR';
txt_importe='Importe';
txt_comentario='Comentario';
txt_email='e-mail';
img_boton='http://www.e-tpv.com/e-tpv/html/img/x-click-but21.gif';
colorfondo='#eee';
colortexto='#000';
ancho='auto';
margen='5px';
importe='';
comentario='';
email='';
className='';
idioma='es';
referencia = "Donación";

function etpvjs_validar(){
  document.getElementById('etpv_importe').value = Math.round(document.getElementById('importe').value.replace(',','.')*100);
	if(typeof document.getElementById('etpv_email') != "undefined")
		document.getElementById('etpv_concept').value +='<br/>'+document.getElementById('etpv_email').value;
	return true;
}

function etpvjs_drawform(){
	strfrm = '<div style="margin: '+margen+';color:'+colortexto+'; background-color:'+colorfondo+'; width: '+ancho+';">';
	strfrm+= '<p align="center"><strong>'+txt_titulo+'</strong></p>';
	strfrm+= '         <form id="etpvfrm" name="etpvfrm" onsubmit="return etpvjs_validar()" action='+etpv_url+'>';
	strfrm+= '           <input value="'+idioma+'" name="Idioma" type="hidden">';
	if(importe==''){
		strfrm+= '           <p><label for="importe">'+txt_importe+':';
		strfrm+= '           <input id="importe" style="width: 80px; text-align: right;" name="importe" size="20">     €</label>';
	}else{
	 	strfrm+= '           <input type="hidden" id="importe" name="importe" value='+importe+'>';
	}
	if(comentario==''){
	 	strfrm+= ' 	 <p><label for="etpv_concept">'+txt_comentario+':';
	 	strfrm+= ' 	 <input id="etpv_concept" style="width: 80px;" name="etpv_concept" size="20"></label></p>';
	}else{
		strfrm+= ' 	 <input id="etpv_concept" name="etpv_concept" typ="hidden">';
	}
	if(email==''){
	 	strfrm+= ' 	 <p><label for="etpv_email">'+txt_email+':';
	 	strfrm+= ' 	 <input id="etpv_email" style="width: 80px;" name="etpv_email"></label></p>';
	}
	 strfrm+= '           <input id="etpv_order_ref" value="'+referencia+'" name="etpv_order_ref" type="hidden">';
	 strfrm+= '           <input value="'+username+'" name="etpv_username" type="hidden">';
	 strfrm+= '           <input id="etpv_importe" name="etpv_importe" type="hidden">';
	 strfrm+= '           </p>';
	 strfrm+= '           <p align="center"><input type="image" src="'+img_boton+'" border="0"></p>';
	 strfrm+= '        </form></div>';
	 document.write(strfrm);
}