function subm()
{

alert("Usare il tasto ( -- CAMBIO --> ) ");
if (event.keycode==13)
return false;

}



function inizia(){
//setInterval('LayerBanner1()',350000);

}

function apri(form,car,nome)
   

   {
   
   if (!nome)
      nome = 'aa' 
   form.target = nome;
   bb = window.open ('', nome, car);
   bb.focus();
   }

     function vai(){

var ta1=document.forms['QForm'].converti.value;
var valore1=document.QForm.valuta1.options[document.QForm.valuta1.selectedIndex].value; 
var valore2=document.QForm.valuta2.options[document.QForm.valuta2.selectedIndex].value; 

//ta=ta1.replace(/[\"]/g,"#")
if (ta1=="")
{
alert("Inserisci un valore da convertire");
return false;
}
 
   var test=ta1+"-~-"+valore1+"_"+valore2;
//document.QForm.risultato.value=test;

      document.QForm.risultato.value="---------------------    CALCOLO CAMBIO    --------------------";

//   jsrsExecute('calcolo-cambio.asp', myCallback, 'testcambio', test);
jsrsExecute('calcolo-cambio.php', myCallback, 'testcambio', Array(ta1,valore1,valore2));

 
}
   
function myCallback( returnstring ){
 
calcolo=returnstring;

var ta1=document.forms['QForm'].converti.value;
var valore1=document.QForm.valuta1.options[document.QForm.valuta1.selectedIndex].text; 
var valore2=document.QForm.valuta2.options[document.QForm.valuta2.selectedIndex].text;
if (valore2.indexOf('-') != -1) {
//alert(valore2);
var valore3 = valore2.split('-');
var risult="("+valore1+") "+ta1+" = "+calcolo+" ("+valore3[1]+" - "+valore3[0]+")";
}
 else {
var risult=valore1+" ("+ta1+") = ("+calcolo+")"+valore2;
}

   document.QForm.risultato.value=risult;
      
    } 

function LayerBanner1(){
var nIndex2 = now.getTime()+'aa';
if (document.getElementById){
LayerBanner('Loading...')
jsrsExecute( '../../admentor/scriptinject2-g.asp', LayerBanner, 'makebanner', nIndex2);}
}

function LayerBanner(risultato)
   {
xlayerbannerx="container";
testobanner=risultato;
   if (document.layers)
      with (document.layers['container'].document) {
         open();
         write(testobanner);
         close(); }
   else if (document.getElementById)
     document.getElementById('container').innerHTML= testobanner;
      else xlayerbannerx.innerHTML= testobanner
   }