// JavaScript Document
var bookmarkurl="http://www.datagroupsrl.it";
var bookmarktitle="DataGroup Srl - Consulenze Informatiche";
var msgForImage="Immagine non è scaricabile: All right are reserved!";

// Content for news
v_titolo01=' Comunicato';
v_testo01 =' Comunicato del 27/7/2009 - Modalità di pagamento del contributo di vigilanza dovuto dagli intermediari assicurativi e riassicurativi e dai periti assicurativi';
v_titolo02=' Comunicato';
v_testo02 =' Comunicato stampa del 24/7/2009 - ISVAP, Banca di Italia e Consob, modalità di rappresentazione in bilancio dei Tremonti bonds ';
v_titolo03=' Comunicato';
v_testo03 =' Comunicato stampa del 23/7/2009 - AGF, abusiva in Italia';
v_titolo04=' Comunicato';
v_testo04 =' Comunicato stampa del 6/8/2009 - Vendita irregolare di polizze r.c. auto: individuate cinque imprese ';
v_titolo05=' Regolamento N. 27 del 14 ottobre 2008';
v_testo05 =' REGOLAMENTO CONCERNENTE LA TENUTA DEI REGISTRI ASSICURATIVI DI CUI ARTICOLO 101 DEL DECRETO LEGISLATIVO 7 SETTEMBRE 2005, N. 209...';

//Contents for menu 1
var menu1=new Array()
menu1[0]='<a href="#" onclick=goToFrame("clientiPage_Allianz.html")>Allianz</a>';
menu1[1]='<a href="#" onclick=goToFrame("clientiPage_Cardif.html")>Cardif</a>';
menu1[2]='<a href="#" onclick=goToFrame("clientiPage_Ergo.html")>Ergo</a>';
menu1[3]='<a href="#" onclick=goToFrame("clientiPage_Ergo.html")>GenialLoyd</a>';
menu1[4]='<a href="#" onclick=goToFrame("clientiPage_Ergo.html")>Fulcron</a>';
menu1[5]='<a href="#" onclick=goToFrame("clientiPage_PosteItaliane.html")>Poste Italiane</a>';

//Contents for menu 2
var menu2=new Array()
menu2[0]='<a href="#" onclick=goToFrame("soluzioniPage_StrumentiPreventivazione.html")>Preventivatore</a>';
menu2[1]='<a href="#" onclick=goToFrame("soluzioniPage_PortaleAccordi.html")>Portale Accordi</a>';

// GO TO ---------------------------------------------------------------------
function goToFrame(url)
	{
	document.getElementById('myMainFrame').src=url;
	}
	
// BOOKMARK ------------------------------------------------------------------	
function addbookmark()
	{
	if (document.all)
	window.external.AddFavorite(bookmarkurl, bookmarktitle);
	}

// MENU LAYOUT ---------------------------------------------------------------
var menuwidth='70px' //default menu width
var menubgcolor='#EAE8E8'  //menu bgcolor
var disappeardelay=250  //menu disappear speed onMouseout (in miliseconds)
var hidemenu_onclick="yes" //hide menu when user clicks within menu?

var ie4=document.all
var ns6=document.getElementById&&!document.all

if (ie4||ns6)
	document.write('<div id="dropmenudiv" style="visibility:hidden;width:'+menuwidth+';background-color:'+menubgcolor+'" onMouseover="clearhidemenu()" onMouseout="dynamichide(event)"></div>')

function getposOffset(what, offsettype)
	{
	var totaloffset=(offsettype=="left")? what.offsetLeft : what.offsetTop;
	var parentEl=what.offsetParent;
	while (parentEl!=null)
		{
		totaloffset=(offsettype=="left")? totaloffset+parentEl.offsetLeft : totaloffset+parentEl.offsetTop;
		parentEl=parentEl.offsetParent;
		}
	return totaloffset;
	}

function showhide(obj, e, visible, hidden, menuwidth)
	{
	if (ie4||ns6)
	dropmenuobj.style.left=dropmenuobj.style.top=-500
	if (menuwidth!="")
		{
		dropmenuobj.widthobj=dropmenuobj.style
		dropmenuobj.widthobj.width=menuwidth
		}
	if (e.type=="click" && obj.visibility==hidden || e.type=="mouseover")
		obj.visibility=visible
	else if (e.type=="click")
		obj.visibility=hidden
}

function iecompattest()
	{
	return (document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body
	}

function clearbrowseredge(obj, whichedge)
	{
	var edgeoffset=0
	if (whichedge=="rightedge")
		{
		var windowedge=ie4 && !window.opera? iecompattest().scrollLeft+iecompattest().clientWidth-15 : window.pageXOffset+window.innerWidth-15
		dropmenuobj.contentmeasure=dropmenuobj.offsetWidth
		if (windowedge-dropmenuobj.x < dropmenuobj.contentmeasure)
			edgeoffset=dropmenuobj.contentmeasure-obj.offsetWidth
		}
	else
		{
		var topedge=ie4 && !window.opera? iecompattest().scrollTop : window.pageYOffset
		var windowedge=ie4 && !window.opera? iecompattest().scrollTop+iecompattest().clientHeight-15 : window.pageYOffset+window.innerHeight-18
		dropmenuobj.contentmeasure=dropmenuobj.offsetHeight
		if (windowedge-dropmenuobj.y < dropmenuobj.contentmeasure){ //move up?
			edgeoffset=dropmenuobj.contentmeasure+obj.offsetHeight
		if ((dropmenuobj.y-topedge)<dropmenuobj.contentmeasure) //up no good either?
			edgeoffset=dropmenuobj.y+obj.offsetHeight-topedge
		}
	}
	return edgeoffset
}

function populatemenu(what)
	{
	if (ie4||ns6)
	dropmenuobj.innerHTML=what.join("")
}

function dropdownmenu(obj, e, menucontents, menuwidth)
	{
	if (window.event) 
		event.cancelBubble=true
	else if (e.stopPropagation) e.stopPropagation()
		clearhidemenu()
		dropmenuobj=document.getElementById? document.getElementById("dropmenudiv") : dropmenudiv
		populatemenu(menucontents)

	if (ie4||ns6)
		{
		showhide(dropmenuobj.style, e, "visible", "hidden", menuwidth)
		dropmenuobj.x=getposOffset(obj, "left")
		dropmenuobj.y=getposOffset(obj, "top")
		dropmenuobj.style.left=(dropmenuobj.x-clearbrowseredge(obj, "rightedge") - 20)+"px"
		dropmenuobj.style.top=(dropmenuobj.y-clearbrowseredge(obj, "bottomedge")+obj.offsetHeight + 9) +"px"
	}
	return clickreturnvalue()
	}

function clickreturnvalue(url)
	{
	if (url)
		goToFrame(url);
	if (ie4||ns6) 
	return false
	else return true
	}

function contains_ns6(a, b) 
	{
	while (b.parentNode)
	if ((b = b.parentNode) == a)
		return true;
		return false;
	}

function dynamichide(e)
	{
	if (ie4&&!dropmenuobj.contains(e.toElement))
		delayhidemenu()
	else if (ns6&&e.currentTarget!= e.relatedTarget&& !contains_ns6(e.currentTarget, e.relatedTarget))
		delayhidemenu()
	}

function hidemenu(e)
	{
	if (typeof dropmenuobj!="undefined")
		{
		if (ie4||ns6)
		dropmenuobj.style.visibility="hidden"
		}
	}

function delayhidemenu()
	{
	if (ie4||ns6)
		delayhide=setTimeout("hidemenu()",disappeardelay)
	}

function clearhidemenu()
	{
	if (typeof delayhide!="undefined")
		{
		clearTimeout(delayhide)
		}
	if (hidemenu_onclick=="yes")
		{
		document.onclick=hidemenu
		}
	}
		
// DISABLE SAVE AS (FOR IMAGE) --------------------------------------------------------------------------------------------		
function right(e) 
	{
	if (navigator.appName == 'Netscape' && e.which == 3) 
		{
		alert(msgForImage);
		return false;
		}
	if (navigator.appName == 'Microsoft Internet Explorer' && event.button==2) 
		{
		alert(msgForImage);
		return false;
		}
	else 
		return true;
	}

function trap() 
	{
	if(document.images)
		{
		for(i=0;i<document.images.length;i++)
			{
			document.images[i].onmousedown = right;
			document.images[i].onmouseup = right;
			}
		}
  }
