﻿// JavaScript Document
<!--
function ImmagineNoCache(lclStrPercorsoImg, lclIntWidth, lclIntHeight, lclIntBorder){
	//Creo un numero casuale
	var numRandom = Math.round(10000000*Math.random());
	strImgTag='<img src="'+lclStrPercorsoImg+'?'+numRandom+'" width="'+lclIntWidth+'" height="'+lclIntHeight+'" border="'+lclIntBorder+'" />';
	document.write(strImgTag);
}
//-->


function returnObjById(lclStrId) 
{ 
    if (document.getElementById) 
        var returnVar = document.getElementById(lclStrId); 
    else if (document.all) 
        var returnVar = document.all[lclStrId]; 
    else if (document.layers) 
        var returnVar = document.layers[lclStrId]; 
    return returnVar; 
}


function MostraPosta(lclStrDominio, lclStrUtente, lclStrTestoLink){
	if ((lclStrTestoLink.length == 0) || (lclStrTestoLink.indexOf('@')+1)) {
		document.write('<a href=' + '"mai' + 'lto:' + lclStrUtente + '@' + lclStrDominio + '">' + lclStrUtente + '@' + lclStrDominio + '<\/a>');
	} else  {
		document.write('<a href=' + '"mai' + 'lto:' + lclStrUtente + '@' + lclStrDominio + '">' + lclStrTestoLink + '<\/a>');
	}
}





function prendiElementoDaId(id_elemento) {
	// elemento da restituire
	var elemento;
	
	// se esiste il metodo getElementById
	// questo if sarà diverso da false, null o undefined
	// e sarà quindi considerato valido, come un true
	if(document.getElementById) {
		elemento = document.getElementById(id_elemento);
	}
	// altrimenti è necessario usare un vecchio sistema
	else {
		elemento = document.all[id_elemento];
	}
	// restituzione elemento
	return elemento;
}

