// JavaScript Document

function eseguiOnLoad(pagina)
{
}

// -------- funzioni di utilità di utilità generale ---------------------//
function apriWin(pagina,larg,altez)
{
	nw=window.open(pagina,'AA_self','toolbar=no,location=no,directories=no,status=yes,menubar=no,scrollbars=yes,resizable=yes,copyhistory=no,dependent=no,screenX=0,screenY=0,width='+ larg +',height='+ altez +',top=0,left=0');
	nw.focus();
}

function apriWin2(pagina,larg,altez, opt)
{
	if (opt=='') {opt='status=yes,menubar=no,scrollbars=yes,resizable=yes';};
	opt='location=no,directories=no,copyhistory=no,dependent=no,screenX=0,screenY=0,width='+ larg +',height='+ altez +',top=0,left=0,' + opt;
	nw=window.open(pagina,'AA_self',opt);
	nw.focus();
}

// ------------------------------------------------------------------- 
// MoneyFormat (value) 
//   Pass a value to be converted to money format - 2 decimal places. 
//   Returns the formatted value 
// ------------------------------------------------------------------- 
function MoneyFormat(amount) { 
 var val = parseFloat(amount); 
 if (isNaN(val)) { return "0,00"; } 
 
 val += ""; 
 // Next two lines remove anything beyond 2 decimal places 
 if (val.indexOf(',') == -1) { return val+",00"; } 
 else { val = val.substring(0,val.indexOf(',')+3); } 
 val = (val == Math.floor(val)) ? val + ',00' : ((val*10 == Math.floor(val*10)) ? val + '0' : val); 
 return val; 
 } 

function ReplaceTags(xStr){
	var regExp = /<\/?[^>]+>/gi;
	xStr = xStr.replace(regExp,"");
    return xStr;
}
