	Array.prototype.cancel=function(index){var new_value=null;if (index < this.length){new_value = this[index];for (loop = index; loop < this.length - 1; loop++){this[loop] = this[loop+1];}this.length--;}return new_value;}

	IE4 = (document.all);
	NS4 = (document.layers);

	function oLayer(index){this.name = arrLayers[index][0];this.object = (IE4) ? document.all[this.name] : document.layers[this.name];this.left = arrLayers[index][1];this.top = arrLayers[index][2];this.width = arrLayers[index][3];this.height = arrLayers[index][4];this.clip = new oClip(index);this.text;this.update();}
	oLayer.prototype.setLeft = function(newLeft){this.left = newLeft;this.update();}
	oLayer.prototype.setTop = function(newTop){this.top = newTop;this.update();}
	oLayer.prototype.moveTo = function(newLeft,newTop){this.setLeft(newLeft);this.setTop(newTop);}
	oLayer.prototype.moveBy = function(offSetX,offSetY){if(offSetX){this.setLeft(this.left + offSetX);}if(offSetY){this.setTop(this.top + offSetY);}}
	oLayer.prototype.moveToElement = function(target){this.moveTo(target.left(),target.top());}
	oLayer.prototype.setClip = function(top,right,bottom,left){this.clip.top = (top) ? top : 0;this.clip.right = (right) ? right : 0;this.clip.bottom = (bottom) ? bottom : 0;this.clip.left = (left) ? left : 0;if(IE4){this.clip.sClip = "rect(" + this.clip.top + " " + this.clip.right + " " + this.clip.bottom + " " + this.clip.left + ")";}this.update();}
	oLayer.prototype.scrollTextUp = function(px){this.setTop(this.top - px);this.setClip((this.clip.top + px),this.clip.right,(this.clip.bottom + px),this.clip.left);}
	oLayer.prototype.scrollTextDown = function(px){if (this.clip.top > 0){this.setTop(this.top + px);this.setClip((this.clip.top - px),this.clip.right,(this.clip.bottom - px),this.clip.left);}}
	oLayer.prototype.scrollTextRight = function(px){this.setLeft(this.left - px);this.setClip(this.clip.top,(this.clip.right + px),this.clip.bottom,(this.clip.left + px));}
	oLayer.prototype.scrollTextLeft = function(px){if (this.clip.left > 0){this.setLeft(this.left + px);this.setClip(this.clip.top,(this.clip.right - px),this.clip.bottom,(this.clip.left - px));}}
	oLayer.prototype.textUpdate = function(text){this.text = text;this.update();}
	oLayer.prototype.update = function(){if(IE4){this.object.style.left = this.left;this.object.style.top = this.top;if(this.clip.sClip){this.object.style.clip = this.clip.sClip;}if(this.text){this.object.innerHTML = this.text;}}else if (NS4){this.object.x = this.left;this.object.y = this.top;this.object.clip.top = (this.clip.top) ? this.clip.top : null;this.object.clip.right = (this.clip.right) ? this.clip.right: null;this.object.clip.bottom = (this.clip.bottom) ? this.clip.bottom : null;this.object.clip.left = (this.clip.left) ? this.clip.left : null;if(this.text){this.object.document.write(this.text);this.object.document.close();}}}
	oLayer.prototype.show = function(){if(IE4){this.object.style.visibility = "visible";}else if(NS4){this.object.visibility = "show";}}
	oLayer.prototype.hide = function(){if(IE4){this.object.style.visibility = "hidden";}else if(NS4){this.object.visibility = "hide";}}

	function oClock(){this.arrMotions = new Array();this.id;}
	oClock.prototype.addMotion = function(expr,times){var newMotion = new Array(expr,times,0);this.arrMotions[this.arrMotions.length] = newMotion;if (this.arrMotions.length == 1){this.aniStart();}}
	oClock.prototype.aniStart = function(){var clockID = setInterval("clock.aniMotions()",40,"javascript");this.id = clockID;}
	oClock.prototype.aniMotions = function(){if (this.arrMotions.length != 0){for(var i = 0; i < this.arrMotions.length; i++){eval(this.arrMotions[i][0]);this.arrMotions[i][2]++;if(this.arrMotions[i][1] == this.arrMotions[i][2]){this.arrMotions.cancel(i);if(this.arrMotions.length == 0){clearInterval(this.id);}}}}}

	function oClip(index){this.top = arrLayers[index][5];this.right = arrLayers[index][6];this.bottom = arrLayers[index][7];this.left = arrLayers[index][8];this.sClip = "rect(" + arrLayers[index][5] + "px " + arrLayers[index][6] + "px " + arrLayers[index][7] + "px " + arrLayers[index][8] + ")";;}

	function oAncora(name){this.object = (IE4) ? document.all[name] : document.anchors[name];this.name = name;}
	oAncora.prototype.left = function(){if(NS4){return this.object.x;}else if(IE4){var currentObject = this.object;var coordX = 0;while(currentObject.tagName != "BODY"){coordX += currentObject.offsetLeft;var newObject = currentObject.offsetParent;currentObject = newObject;}return coordX;}}
	oAncora.prototype.top = function(){if(NS4){return this.object.y;}else if(IE4){var currentObject = this.object;var coordY = 0;while(currentObject.tagName != "BODY"){coordY += currentObject.offsetTop;var newObject = currentObject.offsetParent;currentObject = newObject;}return coordY;}}
	
	function oMenu(name,layer,tipo,begin,end){this.opzioni = new Array();this.name = name;this.layer = layer;this.tipo = tipo;this.begin = begin;this.end = end;this.generated = false;}
	oMenu.prototype.addOption = function(opzione){this.opzioni[this.opzioni.length] = opzione;}
	oMenu.prototype.setMenu = function(opz){this.layer.hide();var strMenu = "<table border='0' cellspacing='0' cellpadding='0'><tr><td>" + this.begin + "</td></tr>";for (var i = 0; i < this.opzioni.length; i++){if (this.opzioni[i].id == opz){this.opzioni[i].status = (this.opzioni[i].status == 0) ? (this.opzioni[i].status = 1) : (this.opzioni[i].status = 0);}else if (this.opzioni[i].id != opz && this.tipo == 0){this.opzioni[i].status = 0;}strMenu += "<tr><td><a href='";strMenu += (this.opzioni[i].opzioni != null) ? ("javascript:" + this.name + ".setMenu(" + this.opzioni[i].id + ")") : (this.opzioni[i].url);strMenu += "'><img src='images/menu/" + this.opzioni[i].image + "' width='" + this.opzioni[i].width + " height='" + this.opzioni[i].height + "' border='0'></a></td></tr>";if(this.opzioni[i].opzioni != null && this.opzioni[i].status != 0){for (var y = 0; y < this.opzioni[i].opzioni.length; y++){strMenu += "<tr><td><a href='" + this.opzioni[i].opzioni[y].url + "'><img src='images/menu/" + this.opzioni[i].opzioni[y].image + "' width='" + this.opzioni[i].opzioni[y].width + "' height='" + this.opzioni[i].opzioni[y].height + "' border='0'></a></td></tr>";}}else if(this.opzioni[i].opzioni != null && this.opzioni[i].status == 0 && this.generated != true){for (var y = 0; y < this.opzioni[i].opzioni.length; y++){preloadImages("images/menu/" + this.opzioni[i].opzioni[y].image);}}}strMenu += "<tr><td>" + this.end + "</td></tr></table>";this.layer.textUpdate(strMenu);this.layer.show();this.generated = true;}
	
	function oOpzione(id,image,url,width,height,arrOpzioni){this.opzioni = arrOpzioni;this.id = id;this.image = image;this.status = 0;this.url  = url;this.width = width;this.height = height;}

	function preloadImages(source){if(document.images){var aD = document.arrPreloaded;if(!aD){aD = new Array();}aD[aD.length] = new Image;aD[(aD.length - 1)].src = source;}}

