
//<![CDATA


function closeSub(menu) {
 
 for (var i=0; i<menu.childNodes.length; i++)
  if (menu.childNodes[i].nodeName.toLowerCase()=="li") {
	  
   li = menu.childNodes[i];
   li.onmouseover = li.onactivate = li.onfocus = function() { if (this.subMenu) this.subMenu.className = this.subMenu.className.replace(/subMenu-off/g,"subMenu-on");

   };
  
   li.onmouseout = li.ondeactivate = function() { if (this.subMenu) closeSub(this.subMenu) };
   for (j=0; j<li.childNodes.length; j++)
    if (li.childNodes[j].nodeName.toLowerCase()=="ul" || li.childNodes[j].nodeName.toLowerCase()=="ol") closeSub(li.subMenu = li.childNodes[j]);
  }
 menu.className = menu.className.replace(/\s?subMenu-on/g,"")+" subMenu-off";
 
}

function ciao(e){
	
	if (sub) closeSub(sub);
	
	}
	

var menuClassName="menuPrincipale";

function shot(str,w,h){    
	
	var option;
	var href;
	
	option="scrollbars=yes, resizable=yes, status=no, location=no, toolbar=no";
			
	href=location.href.substr(0,location.href.lastIndexOf("index.php"));
		
	str=href+str;
	
	if (w && w>0) option+=",width="+w;
	if (h && h>0) option+=",height="+h;
	
	window.open(str,'',option);

}

window.onload=function(){


/**** GOOGLE MAPS ****/

	
	if (document.getElementById("mappa")){
		
		if (GBrowserIsCompatible()) {
			
			var map = new GMap2(document.getElementById("mappa"));
			map.setCenter(new GLatLng(44.653593, 10.897879), 16);
			map.addControl(new GLargeMapControl());
			map.addControl(new GMapTypeControl());
	        map.setMapType(G_HYBRID_MAP);
			
			var point2 = new GLatLng(44.653163, 10.897379);
			var marker2 = new GMarker(point2);
		
			GEvent.addListener(marker2, "click", function() {
				marker2.openInfoWindowHtml("<p><b>Assistec s.r.l.</b><br />via De Gavasseti n. 312<br />41100 Modena</p>");
			});
			map.addOverlay(marker2);
		}

		 
		 window.onunload=function(){
			GUnload();
		 }
		 
	}
	

/**** FINE ****/



	var arVersion = navigator.appVersion.split("MSIE");
	var version = parseFloat(arVersion[1]);
	
	if (version < 7)  {
		
		pngfix();
	}

	for (var i=0; i<document.links.length; i++)
   	if (document.links[i].rel=="external") {
      	document.links[i].target="_blank";
      } 

	
/****** SOTTOMENU ******/
if(tags_ = document.getElementsByTagName('ul'))
  for(i=0; i<tags_.length; i++) 
   if (tags_[i].className==menuClassName) closeSub(tags_[i]);
 if(tags_ = document.getElementsByTagName('ol'))
  for(i=0; i<tags_.length; i++) 
   if (tags_[i].className==menuClassName) closeSub(tags_[i]);

	document.getElementById("menu").style.visibility="visible";

/****** FINE SOTTOMENU ******/

	inserisciSWF();

	if (typeof(do_init)=='function'){
		
		do_init();
		
	}
	
}

function inserisciSWF(){
	
 if (typeof(insertFlash)!='undefined'){
  for (swf in insertFlash){
   var flash = document.getElementById(swf);
   if (flash){
    flash.innerHTML=insertFlash[swf];
   }
  }
 } 
}

function nascondiMostraFlash(visualizza){
 if (insertFlash){
  for (swf in insertFlash){  
   var flash = document.getElementById(swf);
	if (flash){
	   flash.style.visibility=visualizza;
	}
  }
 } 
}


//]]>