 |
Arees |
function createView(element,idarea,bgcolor) {
espadre = element.contains(document.getElementById("viewtable"))
element.style.backgroundColor= bgcolor
if(!espadre)
{
destroyView()
table = document.createElement("TABLE")
//table.onmouseover = destroyView;
table.border = "0"
table.id = "viewtable"
tablebody = document.createElement("TBODY")
text = new Array(
"Agenda",
"Informació bàsica",
"Enllaços",
"Legislació",
"Bases de dades",
"Llistes i butlletins",
"Associacions",
"Altres documents" )
links = new Array(
"/arees/mostrararea.asp?idarea=" + idarea,
"/basica/default.asp?idarea=" + idarea,
"/links/default.asp?idarea="+ idarea,
"/legislacio/default.asp?idarea=" + idarea,
"/bbdd/default.asp?idarea=" + idarea,
"/llistes/default.asp?idarea=" + idarea,
"/associacions/default.asp?idarea=" + idarea,
"/altresdocs/default.asp?idarea=" + idarea )
for(var i=0; i < text.length; i++)
{
currentrow = document.createElement("TR")
currentcell = document.createElement("TD")
objlink = document.createElement("A");
objlink.setAttribute("href",links[i]);
objlink.appendChild(document.createTextNode(text[i]));
currentcell.appendChild(objlink)
currentrow.appendChild(currentcell)
tablebody.appendChild(currentrow)
}
table.appendChild(tablebody)
element.appendChild(table)
}
//return table
//objecturgent = document.getElementById("urgent");
//objecturgent.style.position = "relative";
//objecturgent.style.top= 100;
layer = getLayer("urgent");
if (layer)
{
runmikescroll();
}
}
function destroyView() {
//alert("destroying")
objecttodestroy = document.getElementById("viewtable")
if (objecttodestroy) {
objecttodestroy.parentNode.removeChild(objecttodestroy);
if (objecttodestroy.parentNode.style){
objecttodestroy.parentNode.style.backgroundColor = "";}
}
}
function getBody()
{
if(navigator.appName != "Netscape") {
resultelement = document.body
} else {
resultelement = document.getElementsByTagName("body").item(0)
}
return resultelement
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
objectselected = document.getElementById("0")
if(objectselected){
createView(objectselected,0,'');
}
|
|