function changeLng(xLng) 
{ 
document.cst_formdati.hdnLanguage.value=xLng;
document.cst_formdati.action="http://www.cstfi.it/default.asp";
document.cst_formdati.method="post";
document.cst_formdati.submit();
}
function loginBcm() 
{ 
var xW;
xW=OpenLogin("https://nt-01.securesites.it/cstfi/cstfi.it/bcmlogin.asp","bcmlogin",490,288);
//xW=OpenLogin("bcmlogin.asp","bcmlogin",490,288);
}
function logoutBcm() 
{ 
var xW;
xW=OpenPopUpSBar("bcmlogout.asp","bcmlogout",490,288);
}

function OpenLogin(url,name,width,height)
{
	width=(width*1)+50;
	height=(height*1)+50;
	var left=(screen.width-width)/2;
	var top=(screen.height-height)/2;
	var w=window.open(url,name,"toolbar=no,status=yes,location=no,directories=0,menuBar=no,scrollbars=no,resizable=no,width="+width+",height="+height+",left="+left+",top="+top);
	return w;
}
function OpenPopUp(url,name,width,height)
{
	width=(width*1)+50;
	height=(height*1)+50;
	var left=(screen.width-width)/2;
	var top=(screen.height-height)/2;
	var w=window.open(url,name,"toolbar=0,location=0,directories=0,menuBar=0,scrollbars=1,resizable=0,width="+width+",height="+height+",left="+left+",top="+top);
	return w;
}

function OpenPopUpSBar(url,name,width,height)
{
	width=(width*1)+50;
	height=(height*1)+50;
	var left=(screen.width-width)/2;
	var top=(screen.height-height)/2;
	var w=window.open(url,name,"toolbar=0,status=0,location=0,directories=0,menuBar=0,scrollbars=1,resizable=0,width="+width+",height="+height+",left="+left+",top="+top);
	return w;
}

function ViewImg(url,width,height)
{
	width=(width*1)+50;
	height=(height*1)+50;
	var left=(screen.width-width)/2;
	var top=(screen.height-height)/2;
	var w=window.open(url,"img","toolbar=0,location=0,directories=0,menuBar=0,scrollbars=1,resizable=0,width="+width+",height="+height+",left="+left+",top="+top);
	return true;
}



function SetImg(name,src)
{
	document.images[name].src=src;
}

function SetTdBgColor(td, bgcolor)
{
    if (typeof(td.style) == 'undefined') return false;
    td.bgColor=bgcolor;
    return true;
}

function ViewImgs(id,type)
{
	var url="viewimgs.php?id_announcement="+id+"&type="+type;
	OpenPopUp(url,"img",500,400);
}

function apriRichiestaInfo()
{
var xW;
xW=OpenPopUp('richiesta.asp','richiesta',300,310);
return xW;
}

function apriPagina(popup,pagina,nomeFinestra,w,h)
{
var xW;
if (popup=="s")
	{
	xW=OpenPopUp(pagina,nomeFinestra,w,h) // 610,450);
	}
else
	{
	window.navigate(pagina);
	}
return xW;
}

function apriDocumento(quale)
{
document.info.method="post";
document.info.action="goto_page.asp?xpage=" + quale;
document.info.submit();
return (true);
}