function addTag() {
if (getElementById.tagNuovo.value != "") {
getElementById.tags.value = getElementById.tags.value + "," + getElementById.tagNuovo.value;
}
}
function hideItem(id)
{
document.getElementById(id).style.visibility = "hidden";
document.getElementById(id).style.display = "none";
}
function showItem(id)
{
document.getElementById(id).style.visibility = "";
document.getElementById(id).style.display = "";
}
function getVal(target_id)
{ return document.getElementById(target_id).value; }
function setVal(target_id, val)
{ document.getElementById(target_id).value = val; }
function getById(id)
{ return document.getElementById(id); }
function enableButton(target)
{ document.getElementById(target).disabled = false; }
function disableButton(target)
{ document.getElementById(target).disabled = true; }
function precache(photoName)
{
var newphoto = new Image();
newphoto.src = photoName;
return newphoto;
}
function loadingGIF(target)
{
var contentHTML = "
";
contentHTML += "
";
contentHTML += "";
contentHTML += " |
";
target.innerHTML = contentHTML;
}
function setOpacity(div, alpha)
{
var myDiv = document.getElementById(div);
myDiv.style.mozOpacity = alpha / 100;
myDiv.style.filter = "progid:DXImageTransform.Microsoft.Alpha(opacity=" + alpha + ")";
myDiv.style.opacity = alpha / 100;
}
function popup(urlname)
{
var stile = "top=0,left=0,fullscreen=yes,status=no,menubar=no";
stile += ",toolbar=no,scrollbar=yes,resize=yes";
window.open(urlname, "", stile);
}
function isArray()
{
if (typeof arguments[0] == 'object')
{
var criterion = arguments[0].constructor.toString().match(/array/i);
return (criterion != null);
}
return false;
}
function inArray(array, item)
{
if (isArray(array))
for (i = 0; i < array.length; i++)
if (array[i] == item) return true;
return false;
}
function decodeUrlVars(str)
{
var stringa = new String(str);
var vars = stringa.split("&");
var result = new Array();
for (i = 0; i < vars.length; i++)
{
var tmp = new String(vars[i]);
tmp = tmp.split("=");
result[tmp[0]] = tmp[1];
}
return result;
}
function removeById(id, target)
{
var elm = document.getElementById(id);
document.body.removeChild(elm);
try
{
document.getElementById(target).focus();
tinyMCE.get(target).focus();
} catch (e1)
{
try { tinyMCE.get(target).focus(); }
catch (e2) {}
}
}
function lightpopup(message, target)
{
var marginTop = (ie) ? document.documentElement.scrollTop : window.pageYOffset;
var box = document.createElement("div");
box.id = "box_" + parseInt(Math.random() * 100);
box.style.position = "absolute";
box.style.top = "0px";
box.style.left = "0px";
box.style.width = "100%";
box.style.height = "100%";
box.target = target;
var wall = document.createElement("div");
wall.id = "wall_" + parseInt(Math.random() * 100);
wall.style.position = "absolute";
wall.style.top = "0px";
wall.style.left = "0px";
wall.style.width = "100%";
wall.style.height = document.body.clientHeight + "px";
wall.style.backgroundColor = "white";
var pop = document.createElement("div");
pop.id = "popup_" + parseInt(Math.random() * 100);
pop.style.position = "absolute";
pop.style.top = parseInt(marginTop + 10) + "px";
pop.style.left = "10px";
pop.style.backgroundColor = "white";
pop.style.borderColor = "green";
pop.style.borderWidth = "1px";
pop.style.borderStyle = "solid";
pop.style.padding = "10px 10px 10px 10px";
var contentHTML = message;
contentHTML += '';
pop.innerHTML = contentHTML;
box.appendChild(wall);
box.appendChild(pop);
document.body.appendChild(box);
setOpacity(wall.id, 70);
setOpacity(pop.id, 80);
}
function check(id, pattern)
{
var check = new String(document.getElementById(id).value);
if (!check.match(pattern))
{
document.getElementById(id).style.borderColor = "#FF0000";
document.getElementById(id).focus();
return false;
}
else
{
document.getElementById(id).style.borderColor = "gray";
return true;
}
}
var ie = 0;
if (navigator.appName.indexOf("Internet Explorer") != -1) ie = 1;
try { LLI.callBack("otherfunctions_lib"); }
catch (e) {}