//////////////////////////////////////////////////////////////////////
//                                                                  //
//   OD_GENERAL.JS: Javascript general functions                    //
//                                                                  //
//   funtions:  openpopup: opens a pop up window                    //
//                                                                  //
//////////////////////////////////////////////////////////////////////

// opens a popup window
function openpopup(theURL,scroll,alto,ancho)
{
// Parameters description
//   theURL: destination URL
//   scroll: 1 - scroll visible, 0 - no scroll
//   alto: height in pixels
//   ancho: width in pixels

  var ventana
  if (scroll==1)
  {
    ventana = window.open(theURL,"M","scrollbars=yes,menubar,resizable=yes,left=173px,top=70px,width="+ancho+",height="+alto);
	ventana.focus();
  }
  else
  {
    ventana = window.open(theURL,"M","scrollbars=yes,resizable=yes,left=173px,top=70px,width="+ancho+",height="+alto);
	ventana.focus();
  }
}

function openregform(theURL,ancho,alto)
{
    var ventana
    ventana = window.open(theURL,"MMF","scrollbars=yes,resizable=yes,left=150px,top=60px,width="+ancho+",height="+alto);
	ventana.focus();
}

function openrf()
{
    var ventana
    ventana = window.open("par-regform.htm","MMF","scrollbars=yes,resizable=yes,status=yes,left=150px,top=60px,width=700,height=540");
	ventana.focus();
}
//////////////////////////////////////////////////////////////////////
//                                                                  //
//   HIDEMAIL.JS: Javascript general functions                      //
//                                                                  //
//   funtions:  execute_mt: emule email sending                     //
//              write_add: generate the link in the webpage         //
//                                                                  //
//////////////////////////////////////////////////////////////////////

function execute_mt(recip,dom)
{
  var destino = "mail"+"to:"+recip+"@"+dom;
  document.location = destino;
}

function write_add(txtclass, txtlink, recip, dom)
{
  if (txtclass=='') {
     document.write('<a href="javascript:execute_mt(\''+recip+'\', \''+dom+'\')">'); }
  else           {
     document.write('<a href="javascript:execute_mt(\''+recip+'\', \''+dom+'\')" class="'+txtclass+'">'); }
  document.write(txtlink);
  document.write('</a>');
}
