//Specify affected tags. Add or remove from list:
var tgs = new Array('div');
//Specify spectrum of different font sizes:
//var szs = new Array( 'xx-small','x-small','small','medium','large','x-large','xx-large' );
var szs = new Array( '80%','100%','120%','140%','160%' );
var startSz = 1;
function ts( trgt,inc ) {
	if (!document.getElementById) return;
	var d = document,cEl = null,sz = startSz,i,j,cTags;
	sz += inc;
	if( sz > 4){sz = 4;}
	if(sz < 0) sz = 0;
	startSz = sz;
	if ( !( cEl = d.getElementById( trgt ) ) ) cEl = d.getElementsByTagName( trgt )[ 0 ];
	cEl.style.fontSize = szs[ sz ];
	for ( i = 0 ; i < tgs.length ; i++ ) {
		cTags = cEl.getElementsByTagName( tgs[ i ] );
		for ( j = 0 ; j < cTags.length ; j++ ) cTags[ j ].style.fontSize = szs[ sz ];
	}
}

function PutClicks(id) {
  if (id > 0) {
    window.location = "transact-adspon.php?action=PutClicks&u=" + id;
  } 
}


function ContaCaratteri()
{
    document.Compose.conta.value = document.Compose.signature.value.length;
    var massimo = 255;
    if (document.Compose.signature.value.length > massimo)
    {
        document.Compose.signature.value = document.Compose.signature.value.substr(0, massimo);
        document.Compose.conta.value = massimo;
        alert("Massimo " + massimo + " caratteri!");
    }
}
function ContaCaratterikey()
{
    document.Compose.conta.value = document.Compose.description.value.length;
    var massimo = 255;
    if (document.Compose.description.value.length > massimo)
    {
        document.Compose.description.value = document.Compose.description.value.substr(0, massimo);
        document.Compose.conta.value = massimo;
        alert("Massimo " + massimo + " caratteri!");
    }
}
function ContaCaratterisint()
{
    document.Compose.conta.value = document.Compose.sinteticdesc.value.length;
    var massimo = 255;
    if (document.Compose.sinteticdesc.value.length > massimo)
    {
        document.Compose.sinteticdesc.value = document.Compose.sinteticdesc.value.substr(0, massimo);
        document.Compose.conta.value = massimo;
        alert("Massimo " + massimo + " caratteri!");
    }
}
function ContaCaratterisint2()
{
    document.Compose.conta.value = document.Compose.sinteticdesc.value.length;
    var massimo = 200;
    if (document.Compose.sinteticdesc.value.length > massimo)
    {
        document.Compose.sinteticdesc.value = document.Compose.sinteticdesc.value.substr(0, massimo);
        document.Compose.conta.value = massimo;
        alert("Massimo " + massimo + " caratteri!");
    }
}
function ContaCaratteri1()
{
    document.Compose.conta1.value = document.Compose.description.value.length;
    var massimo = 255;
    if (document.Compose.description.value.length > massimo)
    {
        document.Compose.description.value = document.Compose.description.value.substr(0, massimo);
        document.Compose.conta1.value = massimo;
        alert("Massimo " + massimo + " caratteri!");
    }
}

function ContaCaratteriAbstract()
{
    document.Compose.contaabstract.value = document.Compose.abstract.value.length;
    var massimo = 500;
    if (document.Compose.abstract.value.length > massimo)
    {
        document.Compose.abstract.value = document.Compose.abstract.value.substr(0, massimo);
        document.Compose.contaabstract.value = massimo;
        alert("Massimo " + massimo + " caratteri!");
    }
}
function ContaCaratteriAnnu()
{
    document.Compose.contaa.value = document.Compose.sinteticdesc.value.length;
    var massimo = 200;
    if (document.Compose.sinteticdesc.value.length > massimo)
    {
        document.Compose.sinteticdesc.value = document.Compose.sinteticdesc.value.substr(0, massimo);
        document.Compose.contaa.value = massimo;
        alert("Massimo " + massimo + " caratteri!");
    }
}
function ContaCaratteribody()
{
    document.Message.conta3.value = document.Message.body.value.length;
    var massimo = 255;
    if (document.Message.body.value.length > massimo)
    {
        document.Message.body.value = document.Message.body.value.substr(0, massimo);
        document.Message.conta3.value = massimo;
        alert("Massimo " + massimo + " caratteri!");
    }
}
