function CSScriptInit() {
if(typeof(skipPage) != "undefined") { if(skipPage) return; }
idxArray = new Array;
for(var i=0;i<CSInit.length;i++)
	idxArray[i] = i;
CSAction2(CSInit, idxArray);}
CSAg = window.navigator.userAgent; CSBVers = parseInt(CSAg.charAt(CSAg.indexOf("/")+1),10);
function IsIE() { return CSAg.indexOf("MSIE") > 0;}
function CSIEStyl(s) { return document.all.tags("div")[s].style; }
function CSNSStyl(s) { return CSFindElement(s,0); }
function CSFindElement(n,ly) { if (CSBVers < 4) return document[n];
	var curDoc = ly ? ly.document : document; var elem = curDoc[n];
	if (!elem) { for (var i=0;i<curDoc.layers.length;i++) {
		elem = CSFindElement(n,curDoc.layers[i]); if (elem) return elem; }}
	return elem;
}

function CSClickReturn () {
	var bAgent = window.navigator.userAgent;
	var bAppName = window.navigator.appName;
	if ((bAppName.indexOf("Explorer") >= 0) && (bAgent.indexOf("Mozilla/3") >= 0) && (bAgent.indexOf("Mac") >= 0))
		return true; // dont follow link
	else return false; // dont follow link
}

function CSButtonReturn () {
	var bAgent = window.navigator.userAgent;
	var bAppName = window.navigator.appName;
	if ((bAppName.indexOf("Explorer") >= 0) && (bAgent.indexOf("Mozilla/3") >= 0) && (bAgent.indexOf("Mac") >= 0))
		return false; // follow link
	else return true; // follow link
}
function CSIShow(n,i) {
	if (document.images) {
		if (CSIm[n]) {
			var img = (!IsIE()) ? CSFindElement(n,0) : document[n];
			if (img && typeof(CSIm[n][i].src) != "undefined") {img.src = CSIm[n][i].src;}
			if(i != 0)
				self.status = CSIm[n][3];
			else
				self.status = " ";
			return true;
		}
	}
	return false;
}
function CSILoad(action) {
	im = action[1];
	if (document.images) {
		CSIm[im] = new Object();
		for (var i=2;i<5;i++) {
			if (action[i] != '') { CSIm[im][i-2] = new Image(); CSIm[im][i-2].src = action[i]; }
			else CSIm[im][i-2] = 0;
		}
		CSIm[im][3] = action[5];
	}
}
CSStopExecution = false;
function CSAction(array) {
	return CSAction2(CSAct, array);
}
function CSAction2(fct, array) {
	var result;
	for (var i=0;i<array.length;i++) {
		if(CSStopExecution) return false;
		var actArray = fct[array[i]];
		if (actArray == null) return false;
		var tempArray = new Array;
		for(var j=1;j<actArray.length;j++) {
			if((actArray[j] != null) && (typeof(actArray[j]) == "object") && (actArray[j].length == 2)) {
				if(actArray[j][0] == "VAR") {
					tempArray[j] = CSStateArray[actArray[j][1]];
				}
				else {
					if(actArray[j][0] == "ACT") {
						tempArray[j] = CSAction(new Array(new String(actArray[j][1])));
					}
				else
					tempArray[j] = actArray[j];
				}
			}
			else
				tempArray[j] = actArray[j];
		}			
		result = actArray[0](tempArray);
	}
	return result;
}
function mout(evt) {
    if (bloc) return;
    this.isopen = 0; // was 0
    overs[this.menu].isopen = 0;
    menus[this.menu].isopen = 1;
    posa[this.menu].isopen = 0;
    redraw();
}
function mout2(evt) {
   this.isopen = 0; // was 0
   overs[this.menu].isopen=0;
   menus[this.menu].isopen = 1;
   redraw();
}
function mover(evt) {
   if (overs[this.menu].isopen) return;
   var quq=this.menu;
   for (var i=0; i < menus.length; i++) menus[i].isopen = 1;
   for (var i=0; i < overs.length; i++) overs[i].isopen = 0;
   this.isopen = 0;
   overs[quq].isopen = 1;
   redraw();
}
function verifica(evt) {
redraw();
if (bloc) return;
   for (var i=0; i < menus.length; i++) menus[i].isopen = 1;
   for (var i=0; i < overs.length; i++) overs[i].isopen = 0;
   redraw();
}
function libera(evt) {
 if (isNav4)  {
       var x1 = this.left;
       var x2 = x1 + this.clip.width;
       var y1 = this.top;
       var y2 = y1 + this.clip.height;
       var cX = evt.pageX;
       var cY = evt.pageY;
       if (evt.target.clip) {
       cX = cX - x1;
       cY = cY - y1;
}
       if ((cX >= x1) && (cX < x2) && (cY >= y1) && (cY < y2)) return;
}
       if (isIE4)  {
       var x1 = this.offsetLeft;
       var x2 = x1 + this.offsetWidth;
       var y1 = this.offsetTop;
       var y2 = y1 + this.offsetHeight;
       var cX = event.clientX + document.body.scrollLeft;
       var cY = event.clientY + document.body.scrollTop;
       if ((cX >= x1) && (cX < x2) && (cY >= (y1+3)) && (cY < y2)) return;
}
   bloc=false;
   for (var i=0; i < menus.length; i++) menus[i].isopen = 1;
   for (var i=0; i < overs.length; i++) overs[i].isopen = 0;
   redraw();
}
function blocca(evt) {
bloc=true;
  var quq=this.menu;
   for (var i=0; i < menus.length; i++) menus[i].isopen = 1;
   for (var i=0; i < overs.length; i++) overs[i].isopen = 0;
   this.isopen = 0;
   overs[quq].isopen = 1;
   redraw();
}
function redraw() {
   for (var i=0; i < overs.length; i++) {
   if (overs[i].isopen) eval("posa[i]." + styleObj + "visibility = \"visible\"");
   else eval("posa[i]." + styleObj + "visibility = \"hidden\"");
   if (overs[i].isopen) eval("overs[i]." + styleObj + "visibility = \"visible\"");
   else eval("overs[i]." + styleObj + "visibility = \"hidden\"");
}
   for (var i=0; i < menus.length; i++) {
   if (menus[i].isopen){ eval("menus[i]." + styleObj + "visibility = \"visible\"");
}
   else eval("menus[i]." + styleObj + "visibility = \"hidden\"");
}
}
function init() {
   var allDivs, ll, ss, ml
   menus = new Array();
   overs = new Array();
   posa = new Array();
   gene = new Array();
   if (isNav4) { allDivs = document.layers; }
   if (isNav6) {
    //var kar = document.getElementById('volos');
    var collection = document.getElementsByTagName('div');
    allDivs=collection;
}
   if (isIE4)  { allDivs = document.all.tags("DIV"); }
   for (var i=0; i < allDivs.length; i++) {
   if ((isNav4) &&(!isNav6)) {allDivs[i].captureEvents(Event.MOUSEOVER|Event.MOUSEOUT);}
   ss = allDivs[i].id;
   ss = ss.substring(1,2);
   ll = parseInt(ss);
   if (ll == 1) {
      	 ml = menus.length
         menus[ml] = allDivs[i];
         menus[ml].level = 11;
         menus[ml].menu = ml;
         menus[ml].isopen = 1;
         menus[ml].onmouseover = mover;
      }
      if (ll == 2) {
         ml = overs.length
         overs[ml] = allDivs[i];
         overs[ml].level =11;
         overs[ml].menu = ml;
         overs[ml].isopen = 0;
         overs[ml].onmouseout = verifica;
      }
      if (ll == 3) {
         ml = posa.length
         posa[ml] = allDivs[i];
         posa[ml].level =11;
         posa[ml].menu = ml;
         posa[ml].isopen = 0;
         posa[ml].onmouseout = libera;
         posa[ml].onmouseover = blocca;
      }
   }
   redraw();
}
