function showlayer(elementid){ document.getElementById(elementid).style.display=""; //looks for the style and display settings of object whose name matches //the value you passed to the function and unhides it. } function isAlien(a) { return isObject(a) && typeof a.constructor != 'function'; } function isArray(a) { return isObject(a) && a.constructor == Array; } function isBoolean(a) { return typeof a == 'boolean'; } function isEmpty(o) { var i, v; if (isObject(o)) { for (i in o) { v = o[i]; if (isUndefined(v) && isFunction(v)) { return false; } } } return true; } function isFunction(a) { return typeof a == 'function'; } function isNull(a) { return typeof a == 'object' && !a; } function isNumber(a) { return typeof a == 'number' && isFinite(a); } function isObject(a) { return (a && typeof a == 'object') || isFunction(a); } function isString(a) { return typeof a == 'string'; } function isUndefined(a) { return typeof a == 'undefined'; } function handle_altro(option_list) { var tos = null; if (isArray(option_list.value)) { tos = option_list.value.join(); } else { tos = option_list.value; } if (tos.match("_altro_")) { name = prompt(option_list.name, ""); if (name != null) { option_list.value = name; var altro = document.getElementById(option_list.name + "altro"); altro.value = name; altro.innerHTML = "Altro... (" + name + ")"; // altro.text = "Altro... (" + name + ")"; } } else { if (tos.match("_all_")) { expand_list(option_list.name); } else { if (option_list.name != "zkeys[]") { var altro = document.getElementById(option_list.name + "altro"); if (altro != null) { altro.innerHTML = "Altro..."; altro.value = "_altro_"; } } } } } function handle_altro2(option_list) { alert ("ciao!"); var altro = document.getElementById(option_list.name + "altro"); var tos = null; if (isArray(option_list.value)) { tos = option_list.value.join(); } else { tos = option_list.value; } alert(tos); if (tos.match("_altro_")) { name = prompt(option_list.name, ""); if (name != null) { option_list.value = name; altro.value = name; altro.innerHTML = "Altro... (" + name + ")"; } } else { if (tos.match("_all_")) { // expand_list(option_list.name); // other_list = document.getElementById(option_list.id.substr(0,strpos(option_list.id, "_")) + "_all"); // if (other_list) { // option_list.style.visibility = "hidden"; // other_list.style.visibility = "visible"; // } } else { if (option_list.name != "zkeys[]") { altro.innerHTML = "Altro..."; altro.value = "_altro_"; } } } // option_list.style.visibility = 'hidden'; } function getRss(category) { if (category.value == "cerca") { name = prompt('Parola da cercare:', ""); if (name != null) { newoption = document.createElement('OPTION'); newoption.innerHTML = name; newoption.value = name; newoption.selected = true; while(category.tagName != 'SELECT') { category = category.parentNode; } category.appendChild(newoption); } } if (category.value == "dove") { dove = prompt('Indica un luogo (cittą, paese ecc., cancel per rimuovere):', ""); if (dove == null) { dove = ""; } child = document.getElementById("dove"); child.innerHTML = "Dove = " + dove; child.value = "Dove = " + dove; } while(category.tagName != 'FORM') { category = category.parentNode; } category.submit(); // while(category != null && category.tagName != 'FRAMESET') { // category = category.parent; // } } var clickedNews = undefined; var clickedNewsId = undefined; var clickedParent = undefined; var clickedNewsText = ""; function toggleDescription2(elementid) { if(clickedNews){ clickedNews.innerHTML = clickedNewsText; } clickedNews = document.getElementById(elementid); clickedNewsText = clickedNews.innerHTML; var fullNews = document.getElementById('h' + elementid); clickedNews.innerHTML = fullNews.value; } function toggleDescription(elementid) { if(clickedNews) { clickedNews.innerHTML = clickedNewsText; } clickedNews = document.getElementById(elementid); clickedNewsText = clickedNews.innerHTML; var fullNews = document.getElementById('h' + elementid); clickedNews.innerHTML = fullNews.innerHTML; } function strpos(str, ch) { for (var i = 0; i < str.length; i++) if (str.substring(i, i+ch.length) == ch) return i; return -1; } function chainUnchain(element) { if (strpos(element.src,"zchain.jpg") > -1) { alert("apro"); element.src="zchain_open.jpg" } else { element.src="zchain.jpg" } }