var xOffset=6
var yOffset=5    

//var petit=true;
var petit=false;
var grand=false;

/*function reconstructionCSS()
{
	window.location.reload();
}*/

function EcrireCookie(nom, valeur)
{
	var argv=EcrireCookie.arguments;
	var argc=EcrireCookie.arguments.length;
	var expires=(argc > 2) ? argv[2] : null;
	var path=(argc > 3) ? argv[3] : null;
	var domain=(argc > 4) ? argv[4] : null;
	var secure=(argc > 5) ? argv[5] : false;
	document.cookie=nom+"="+escape(valeur)+
	((expires==null) ? "" : ("; expires="+expires.toGMTString()))+
	((path==null) ? "" : ("; path="+path))+
	((domain==null) ? "" : ("; domain="+domain))+
	((secure==true) ? "; secure" : "");
}

function getCookieVal(offset)
{
	var endstr=document.cookie.indexOf (";", offset);
	if (endstr==-1) endstr=document.cookie.length;
	return unescape(document.cookie.substring(offset, endstr));
}
function LireCookie(nom)
{
	var arg=nom+"=";
	var alen=arg.length;
	var clen=document.cookie.length;
	var i=0;
	while (i<clen)
	{
		var j=i+alen;
		if (document.cookie.substring(i, j)==arg) return getCookieVal(j);
		i=document.cookie.indexOf(" ",i)+1;
		if (i==0) break;
	}
	return null;
}


startList = function()
{
	if (document.all&&document.getElementById)
	{
		navRoot = document.getElementById("nav");
		for (i=0; i<navRoot.childNodes.length; i++)
		{
			node = navRoot.childNodes[i];
			if (node.nodeName=="LI")
			{
				node.onmouseover=function()
				{
					this.className+=" over";
				}
				node.onmouseout=function()
				{
					this.className=this.className.replace(" over", "");
				}
			}
		}
	}
	checkDimensions();
}
checkDimensions = function ()
{
	/*if(!window.innerWidth) window.innerWidth = document.documentElement && document.documentElement.clientWidth || document.body.clientWidth;
	if(!window.innerHeight) window.innerHeight = document.documentElement && document.documentElement.clientHeight || document.body.clientHeight;*/
	if ((navigator.appName == "Microsoft Internet Explorer") && (navigator.appVersion < "5.0"))
	{
	}
	else
	{
if(!window.innerWidth) window.innerWidth = document.documentElement && document.documentElement.clientWidth ||document.body.clientWidth;
if(!window.innerHeight) window.innerHeight = document.documentElement && document.documentElement.clientHeight || document.body.clientHeight;
	}
	
	
	
	//alert('Screen:'+window.innerWidth+' x '+window.innerHeight);
	var resolution = LireCookie("typeResolution");
	if (resolution == "NotSet")
	{
		if ( (window.innerWidth <= 950) || (window.innerHeight <= 550) )
		{
			setLow();
			return "Petites";
		}
		else if ( (window.innerWidth >= 1100) && (window.innerHeight >= 750) )
		{
			setHigh();
			return "Grandes";
		}
		else
		{
			setNormal();
			return "Normales";
		}
	}
}

setHigh = function() {
	//alert("Attention résolution haute sélectionnée");
	petit=false;
	grand=true;
	typeResolution="--> Haute";
	EcrireCookie("typeResolution",typeResolution);
	return typeResolution;
	
}
setNormal = function() {
	//alert("Attention résolution normale sélectionnée");
	petit=false;
	grand=false;
	typeResolution="--> Normale";
	EcrireCookie("typeResolution",typeResolution);
	return typeResolution;
}
setLow = function() {
	//alert("Attention résolution petite sélectionnée");
	petit=true;
	grand=false;
	typeResolution="--> Petite";
	EcrireCookie("typeResolution",typeResolution);
	return typeResolution;
}

var typeResolution = LireCookie("typeResolution");
var dimensions = checkDimensions(); //Hautes - Normales - Petites
window.onload=startList;


if (typeResolution=="--> Haute")
{
	grand=true;
}
else if (typeResolution=="--> Petite")
{
	petit=true;
}
else
{

	//alert('Check Resol detectée');
	if  (dimensions=="Hautes")
	{
		grand=true;
		typeResolution="--> Haute";
		alert('Grande Resol detectée');
	}
	else if (dimensions=="Petites")
	{
		petit=true;
		typeResolution="--> Petite";
		alert('Petite Resol detectée');
	}
	else
	{	
		typeResolution="--> Normale";
	}
}
/*if  (dimensions=="Hautes")
{
	grand=true;
	typeResolution="--> Haute";
	//alert('Grande Resol detectée');
}
else if (dimensions=="Petites")
{
	petit=true;
	typeResolution="--> Petite";
	//alert('Petite Resol detectée');
}
else
{			
	if (typeResolution=="--> Haute")
	{
		grand=true;
	}
	else if (typeResolution=="--> Petite")
	{
		petit=true;
	}
	else
	{
		typeResolution="--> Normale";
	}
}*/

//alert("Type de resolution '"+typeResolution+"'");
//var imgUrl="../v2008/";
var imgUrl="../composants_communs/";
var mode="";
var police=11;
var hauteurItemMenu=37;
var h1=30;
var h2=28;
var h3=26;
var h4=20;
var h5=13;

var margeTexte=7;

var logoHeight=68;

var positionYMenu=logoHeight+15;

var positionBckMenu=positionYMenu-11;

var largMenu=150;
var hautMenu=464+positionYMenu;

var minHeightSpace=200;

var heightTitreHdg=147;
var heightOrchestreHdg=360;

var orchestreTop=positionYMenu;
var orchestreBot=orchestreTop+hauteurItemMenu;
var ecoleTop=orchestreBot+6;
var ecoleBot=ecoleTop+hauteurItemMenu;
var ensemblesTop=ecoleBot+6;
var ensemblesBot=ensemblesTop+hauteurItemMenu;
var concertsTop=ensemblesBot+7;
var concertsBot=concertsTop+hauteurItemMenu;
var repertoireTop=concertsBot+11;
var repertoireBot=repertoireTop+hauteurItemMenu;
var presseTop=repertoireBot+7;
var	presseBot=presseTop+hauteurItemMenu;
var photosTop=presseBot+7;
var photosBot=photosTop+hauteurItemMenu;
var livre_orTop=photosBot+8;
var livre_orBot=livre_orTop+hauteurItemMenu;
var liensTop=livre_orBot+8;
var liensBot=liensTop+hauteurItemMenu;
var contactTop=liensBot+7;
var contactBot=contactTop+hauteurItemMenu;


var margesFlash=50;
var fontSizeFlashLink=14;

var largeurVCard=275;


if (petit)
{
	mode="_petit";
	police=9;
	hauteurItemMenu=30;
	h1=25;
	h2=23;
	h3=21;
	h4=18;
	h5=12;
	margeTexte=5;
	
	logoHeight=56;
	
	minHeightSpace=175;
	
	positionYMenu=logoHeight+15;

	positionBckMenu=positionYMenu-10;
	
	
	heightTitreHdg=122;
	heightOrchestreHdg=300;
	
	largMenu=125;
	hautMenu=387+positionYMenu;
	
	orchestreTop=positionYMenu;
	orchestreBot=orchestreTop+hauteurItemMenu;
	ecoleTop=orchestreBot+6;
	ecoleBot=ecoleTop+hauteurItemMenu;
	ensemblesTop=ecoleBot+6;
	ensemblesBot=ensemblesTop+hauteurItemMenu;
	concertsTop=ensemblesBot+7;
	concertsBot=concertsTop+hauteurItemMenu;
	repertoireTop=concertsBot+9;
	repertoireBot=repertoireTop+hauteurItemMenu;
	presseTop=repertoireBot+8;
	presseBot=presseTop+hauteurItemMenu;
	photosTop=presseBot+6;
	photosBot=photosTop+hauteurItemMenu;
	livre_orTop=photosBot+7;
	livre_orBot=livre_orTop+hauteurItemMenu;
	liensTop=livre_orBot+6;
	liensBot=liensTop+hauteurItemMenu;
	contactTop=liensBot+8;
	contactBot=contactTop+hauteurItemMenu;
	margesFlash=20;
	fontSizeFlashLink=12;
	largeurVCard=200;
}

if (grand)
{
	mode="_grand";
	
	police=12;
	hauteurItemMenu=50;
	h1=40;
	h2=32;
	h3=30;
	h4=20;
	h5=14;
	margeTexte=50;

	logoHeight=90;
	
	minHeightSpace=250;
	
	positionYMenu=logoHeight+15;

	positionBckMenu=positionYMenu-13;
	
	heightTitreHdg=196;
	heightOrchestreHdg=480;
	
	
	largMenu=200;
	
	hautMenu=619+positionYMenu;
	
	orchestreTop=positionYMenu;
	orchestreBot=orchestreTop+hauteurItemMenu;
	ecoleTop=orchestreBot+7;
	ecoleBot=ecoleTop+hauteurItemMenu;
	ensemblesTop=ecoleBot+9;
	ensemblesBot=ensemblesTop+hauteurItemMenu;
	concertsTop=ensemblesBot+8;
	concertsBot=concertsTop+hauteurItemMenu;
	repertoireTop=concertsBot+14;
	repertoireBot=repertoireTop+hauteurItemMenu;	
	presseTop=repertoireBot+10;
	presseBot=presseTop+hauteurItemMenu;
	photosTop=presseBot+10;
	photosBot=photosTop+hauteurItemMenu;
	livre_orTop=photosBot+9;
	livre_orBot=livre_orTop+hauteurItemMenu;
	liensTop=livre_orBot+9;
	liensBot=liensTop+hauteurItemMenu;
	contactTop=liensBot+9;
	contactBot=contactTop+hauteurItemMenu;
	margesFlash=60;
	fontSizeFlashLink=14;
	largeurVCard=300;
}
//var rules = document.styleSheets[0].rules||document.styleSheets[0].cssRules;

/*******************************************/
//PARTIE EN COURS DE DEVELOPPEMENT

var style="<style type=\"text/css\">\n" +
".nospace {width:100%;margin: 0px;font-family: Verdana;font-size: "+police+"pt;font-style:italic;background-image:url(\""+imgUrl+"images/fond_transparent"+mode+".jpg\");background-repeat: no-repeat;background-position: center;background-attachment:fixed;}\n" +
".nospace-accueil {width:100%;margin: 0px;font-family: Verdana;font-size: "+police+"px;font-style:italic;}\n" +
".central {position:relative;top:0px;width:auto;margin:0px;margin-left:"+largMenu+"px;margin-right:"+largMenu+"px;}\n" +
//"div.wrapContainer{position:relative;float:left;left:"+largMenu+"px;margin-left:"+largMenu+"px;margin-right:"+largMenu+"px;}\n" +
//"div.wrapContainer{with:95%;}\n" +
".menus {position:absolute;height:100%;width:"+largMenu+"px;top:0px;left:0px;background-image: url(\""+imgUrl+"images/fond_gauche"+mode+".jpg\");background-repeat: repeat-y;}\n" +
	
/*Partie pour le menu de changement de résolution*/
"#menuResol {font-size: "+(police-1)+"pt;padding-top: 0px; margin-top: 0px;text-align: center;color:#0000AA;}\n" +
"#menuResol ul {list-style: none;list-style-type: none;background-color:#FFFF80;text-align: center;;\n" +
"	filter:alpha(opacity=80);   /* Internet Explorer 6     */\n" +
"    -moz-opacity:0.80;           /* Mozilla 1.6 et infér.   */\n" +
"    opacity: 0.80;               /* CSS3 et Mozilla récents */}\n" +
"#menuResol li {font-weight:bold;float: left; position: relative; width: auto;text-align: center; right:15px;}\n" +
"#menuResol li ul {display: none; position: absolute; top: 1em; left: 0px;list-style-type: none;text-align: center;}\n" +
"#menuResol li > ul {top: auto; left: auto;list-style-type: none; text-align: center;}\n" +
"#menuResol li:hover ul, li.over ul{ display: block; list-style-type: none}\n" +

".notes {position:absolute;height:100%;width:"+largMenu+"px;top:0px;right:15px;margin-right:-15px;background-image: url(\""+imgUrl+"images/fond_droite"+mode+".jpg\");background-repeat: repeat-y;text-align:center;}\n" +
//"h1 {font-family:harmonie, Inkpen2 Script,Script MT Bold, Bradley Hand ITC, verdana, arial, sans-serif;font-weight: bold;font-size:"+h1+"px;color:#FF8040;clear: both;}\n" +
"h1 {font-family:harmonie, Inkpen2 Script,Script MT Bold, Bradley Hand ITC, verdana, arial, sans-serif;font-weight: bold;font-size:"+h1+"px;color:#FF8040;clear: both;}\n" +
"h2 {font-family:harmonie, Inkpen2 Script,Script MT Bold, Bradley Hand ITC, verdana, arial, sans-serif;font-weight: bold;font-size:"+h2+"px;color:#FF8040;clear: both;}\n" +
"h3 {font-family:harmonie, Inkpen2 Script,Script MT Bold, Bradley Hand ITC, verdana, arial, sans-serif;font-weight: bold;font-size:"+h3+"px;color:#FF8040;clear: both;}\n" +
"h4 {font-family:harmonie, Inkpen2 Script,Script MT Bold, Bradley Hand ITC, verdana, arial, sans-serif;font-weight: bold;font-size:"+h4+"px;color:#FF8040;clear: both;}\n" +
".programme {font-family:harmonie, Inkpen2 Script,Script MT Bold, Bradley Hand ITC, verdana, arial, sans-serif;font-weight: bold;font-size:"+h5+"px;color:#FF8040;}\n" +
"#contenu {font-size: "+police+"pt;margin-left:0px;	margin: 0px;margin-right:0px;margin-top: 20px;text-align: justify;color: #0050A0;}\n" +
".texte {font-size: "+police+"pt;text-align:justify;margin-left: "+margeTexte+"px;margin-right: auto;clear: both;}\n" +
".textegras {font-size: "+police+"pt;font-weight:bold;text-align:justify;margin-left: "+margeTexte+"px;margin-right: auto;}\n" +
".focusMenuClass{position:absolute;border:1px solid #000066;background-color:#000066;filter:alpha(opacity=25);-moz-opacity:0.25;opacity: 0.25;width:"+largMenu+"px;height:"+hauteurItemMenu+"px;left:0px;top:-1000px;}\n" +
".selectedMenuClass{position:absolute;border:1px solid #FFFFFF;background-color:#FFFFFF;filter:alpha(opacity=50);-moz-opacity:0.5;opacity: 0.5;width:"+largMenu+"px;height:"+hauteurItemMenu+"px;left:0px;top:-1000px;}\n" +
".menuImage{width:"+largMenu+"px;height:"+hautMenu+"px;background-image:url(\""+imgUrl+"images/friseMenu_super_idee"+mode+".png\");background-position:0px "+positionBckMenu+"px;background-repeat:no-repeat;}\n" +
".logoHeader {position: absolute;left: 0px;background-image:url(\""+imgUrl+"images/logo"+mode+".jpg\");width:"+largMenu+"px;height:"+logoHeight+"px;}\n" +
".flash{font-size:"+fontSizeFlashLink+"px;text-align:justify;font-weight:bold;background-color:#FFFF80;padding-bottom:5px;padding-top:5px;padding-left:"+margesFlash+"px;\n" +
"	filter:alpha(opacity=65);   /* Internet Explorer 6     */\n" +
"    -moz-opacity:0.65;           /* Mozilla 1.6 et infér.   */\n" +
"    opacity: 0.65;               /* CSS3 et Mozilla récents */}\n" +
".flashlink{font-size:"+fontSizeFlashLink+"px;font-weight:bold;background-color:#FFFF80;\n" +
"	filter:alpha(opacity=65);   /* Internet Explorer 6     */\n" +
"    -moz-opacity:0.65;           /* Mozilla 1.6 et infér.   */\n" +
"    opacity: 0.65;               /* CSS3 et Mozilla récents */}\n" +
".vcard{background-color:#DDDDDD;\n" +//border:1px solid #AAAAAA;
"	filter:alpha(opacity=70);   /* Internet Explorer 6     */\n" +
"    -moz-opacity:0.70;           /* Mozilla 1.6 et infér.   */\n" +
"    opacity: 0.70;               /* CSS3 et Mozilla récents */\n" +
"	padding: 5px 5px 5px 5px;font-family: Trebuchet MS;text-align: center;font-size: "+police+"pt;color:#0050A0;width:"+largeurVCard+"px;position:relative;}\n" +
".vcardName{font-size: "+(police+1)+"pt; font-weight: bold;color:#0020A0;}\n" +
".vcardAdress{font-size: "+police+"pt;}\n" +
".vcardPhone{font-weight: bold;}\n" +
".artpresseDate{font-size:1.1em;width:100%;color:#173F5F;font-weight:normal;padding:0 0 0 10px;margin:0;}\n" +
".artpresseDate:hover {color:#7F161A;cursor:hand;}\n" +
".artpresseTitre{font-size:"+(police+1)+"pt;width:100%;color:#173F5F;font-weight:normal;padding:0 0 0 10px;margin:0;}\n" +
".artpresseTexte{padding-left:10px;padding-right:10px;font-size:"+police+"pt;line-height: 1.1}\n" +
".artpresseTexte:first-letter{font-size:300%;font-style: italic;float: left;text-transform:uppercase;/*font-weight:bold;*/margin-right:5px}\n" +
//".div-min-height {position:relative;height:"+minHeightSpace+"px;width:0px;float:left}\n" +
".div-min-height-bottom {position:relative;height:"+minHeightSpace+"px;clear:left}\n" +
".accueilflashlink{font-size:"+(police-3)+"pt;font-weight:bold;text-decoration: none;\n" +
"	filter:alpha(opacity=65);   /* Internet Explorer 6     */\n" +
"    -moz-opacity:0.65;           /* Mozilla 1.6 et infér.   */\n" +
"    opacity: 0.65;               /* CSS3 et Mozilla récents */}\n" +
".flashlink{font-size:"+(police+2)+"pt;font-weight:bold;background-color:#FFFF80;text-decoration: none;\n" +
"	filter:alpha(opacity=65);   /* Internet Explorer 6     */\n" +
"    -moz-opacity:0.65;           /* Mozilla 1.6 et infér.   */\n" +
"    opacity: 0.65;               /* CSS3 et Mozilla récents */}\n" +
//".msglivreor{border:1px solid #AAAAAA;background-color:#DDDDDD;\n" +
".msglivreor{background-color:#DDDDDD;\n" +
"	filter:alpha(opacity=70);   /* Internet Explorer 6     */\n" +
"    -moz-opacity:0.70;           /* Mozilla 1.6 et infér.   */\n" +
"    opacity: 0.70;               /* CSS3 et Mozilla récents */\n" +
"	padding: 10px 10px 10px 10px;font-family: Trebuchet MS;text-align: justify;font-size: "+police+"pt;color:#0050A0;width:95%;position:relative;margin-left:10px;}\n" +
".msglivreorName{font-size: "+(police+1)+"pt;font-weight:normal;color:#0020A0;}\n" +
".msglivreorAdress{font-size: "+(police+1)+"pt;}\n" +
//".formlivreor{border:2px solid #FFB591;background-color:#FFDDCC;\n" +
".formlivreor{background-color:#FFDDCC;\n" +
"	filter:alpha(opacity=70);   /* Internet Explorer 6     */\n" +
"    -moz-opacity:0.70;           /* Mozilla 1.6 et infér.   */\n" +
"    opacity: 0.70;               /* CSS3 et Mozilla récents */\n" +
"	padding: 10px 10px 10px 10px;font-family: Trebuchet MS;text-align: justify;font-size: "+police+"pt;color:#0050A0;position:relative;margin-left:10px;}\n" +
"/*classe pour le style liste de concerts*/\n" +
".liconcert {font-size: "+(police)+"pt;font-weight:bold;text-align:left;padding-bottom:10px;list-style-type:none;\n" +
"	background-image:url(\""+imgUrl+"images/concerts.gif\");background-repeat:no-repeat;width:90%;margin-left:10px;padding-left:60px;padding-top:10px;\n" +
"	background-repeat:no-repeat;background-color:#ffd1ba;color:#002050;\n" +
"	filter:alpha(opacity=45);   /* Internet Explorer 6     */\n" +
"    -moz-opacity:0.45;           /* Mozilla 1.6 et infér.   */\n" +
"    opacity: 0.45;               /* CSS3 et Mozilla récents */}\n" +
".lirepconcert {font-size: "+(police-1)+"pt;font-weight:normal;text-align:left;padding-bottom:10px;list-style-type:circle;\n" +
"	padding-left:10px;margin-left:40px;padding-top:0px;background-repeat:no-repeat;background-color:#ffd1ba;color:#002050;}\n" +
".lirep {font-size: "+(police)+"pt;font-weight:bold;text-align:left;padding-bottom:15px;list-style-type:none;\n" +
"	background-image:url(\""+imgUrl+"images/partition.png\");background-repeat:no-repeat;width:85%;margin-left:20px;padding-left:60px;\n" +
"	padding-top:10px;background-repeat:no-repeat;background-color:#f6f6f6;color:#002050;\n" +
"	filter:alpha(opacity=70);   /* Internet Explorer 6     */\n" +
"    -moz-opacity:0.70;           /* Mozilla 1.6 et infér.   */\n" +
"    opacity: 0.70;               /* CSS3 et Mozilla récents */}\n" +
".lilinks{font-size: "+police+"pt;clear: both;height:auto;width:auto;position:relative}\n" +
".ullinks{font-size: "+police+"pt;clear: both;height:auto;position:relative;width:auto;list-style-type: disc;padding-left:15px}\n" +
"#menuprive{font-size: "+police+"pt;font-weight:bold;text-align:left;padding-top:"+positionBckMenu+"px;}\n" +
".accueilTitreHdg {height:"+heightTitreHdg+"px;background-image:url(\""+imgUrl+"images/titreHarmonie"+mode+".jpg\");background-repeat:no-repeat;background-position: center;}\n" +
".acceuilOrchestreHdg {height:"+heightOrchestreHdg+"px;background-image:url(\""+imgUrl+"images/accueil"+mode+".png\");background-repeat:no-repeat;background-position: center;}\n" +
".formulaires {width: 95%;height: "+h3+"px;border: 3px solid #cccccc;padding: 5px;font-family: Tahoma, sans-serif;background-image: url(bg.gif);background-position: bottom right;background-repeat: no-repeat;background-color:#eeeeee;color:#cccccc;font-size: "+police+"pt}\n" +
"textarea.formulaires {height: 120px;}\n" +
/*STYLE MENU*/
".qmmc .qmdivider{display:block;font-size:1px;border-width:0px;border-style:solid;position:relative;z-index:1;}\n" +
".qmmc .qmdividery{float:left;width:0px;}\n" +
".qmmc .qmtitle{display:block;cursor:default;white-space:nowrap;position:relative;z-index:1;}\n" +
".qmclear {font-size:1px;height:0px;width:0px;clear:left;line-height:0px;display:block;float:none !important;}\n" +
".qmmc {position:relative;zoom:1;z-index:10;}\n" +
".qmmc a, .qmmc li {float:left;display:block;white-space:nowrap;position:relative;z-index:1;}\n" +
".qmmc div a, .qmmc ul a, .qmmc ul li {float:none;}\n" +
".qmsh div a {float:left;}\n" +
".qmmc div{visibility:hidden;position:absolute;}\n" +
".qmmc .qmcbox{cursor:default;display:inline-block;position:relative;z-index:1;}\n" +
".qmmc .qmcbox a{display:inline;}\n" +
".qmmc .qmcbox div{float:none;position:static;visibility:inherit;left:auto;}\n" +
".qmmc li {z-index:auto;}\n" +
".qmmc ul {left:-10000px;position:absolute;z-index:10;}\n" +
".qmmc, .qmmc ul {list-style:none;padding:0px;margin:0px;}\n" +
".qmmc li a {float:none;}\n" +
".qmmc li:hover>ul{left:auto;}\n" +
"#qm0 ul {top:100%;}\n" +
"#qm0 ul li:hover>ul{top:0px;left:100%;}\n" +
/*!!!!!!!!!!! QuickMenu Styles [Please Modify!] !!!!!!!!!!!*/
/* QuickMenu 0 */
/*"""""""" (MAIN) Container""""""""*/	
"#qm0 {width:auto;width:100%;background-color:transparent;}\n" +
/*"""""""" (MAIN) Items""""""""*/
//"#qm0 a {/*padding:6px 40px 6px 8px;*/padding:6px 8px 6px 8px;margin:0px -1px 0px 0px;/*background-color:#BED0B6;*/background-color:#FFFF80;color:#000000;font-family:Arial;font-size:"+(police+1)+"px;text-decoration:none;text-align:left;border-width:1px;border-style:solid;border-color:#698A59;\n" +
"#qm0 a {/*padding:6px 40px 6px 8px;*/padding:6px 8px 6px 8px;margin:0px -1px 0px 0px;/*background-color:#BED0B6;*/background-color:#FFFF80;color:#FF8040;font-weight: bold;font-family:Inkpen2 Script,Script MT Bold, Bradley Hand ITC, verdana, arial, sans-serif;font-size:"+(police+1)+"px;text-decoration:none;text-align:left;border-width:1px;border-style:solid;border-color:#698A59;\n" +
"	filter:alpha(opacity=65);	/* Internet Explorer 6     */\n" +
"	-moz-opacity:0.65;			/* Mozilla 1.6 et infér.   */\n" +
"	opacity: 0.65;				/* CSS3 et Mozilla récents */}\n" +
/*"""""""" (MAIN) Hover State""""""""*/	
"#qm0 a:hover {text-decoration:underline;}\n" +
/*"""""""" (MAIN) Hover State - (duplicated for pure CSS)""""""""*/	
"#qm0 li:hover>a	{text-decoration:underline;}\n" +
/*"""""""" (MAIN) Active State""""""""*/	
"body #qm0 .qmactive, body #qm0 .qmactive:hover {background-color:#ECF1E9;text-decoration:underline;}\n" +
/*"""""""" (SUB) Container""""""""*/	
"#qm0 div, #qm0 ul {padding:5px;margin:-1px 0px 0px 0px;/*background-color:#ECF1E9;*/background-color:#FFFF80;border-width:1px;border-style:solid;border-color:#698A59;\n" +
"	filter:alpha(opacity=65);	/* Internet Explorer 6     */\n" +
"	-moz-opacity:0.65;			/* Mozilla 1.6 et infér.   */\n" +
"	opacity: 0.65;				/* CSS3 et Mozilla récents */}\n" +
/*"""""""" (SUB) Items""""""""*/	
"#qm0 div a, #qm0 ul a {padding:2px 40px 2px 5px;background-color:transparent;color:#444444;border-width:0px;border-style:none;border-color:#000000;}\n" +
/*"""""""" (SUB) Hover State""""""""*/	
"#qm0 div a:hover {color:#698A59;text-decoration:underline;}\n" +
/*"""""""" (SUB) Hover State - (duplicated for pure CSS)""""""""*/	
"#qm0 ul li:hover>a {color:#698A59;text-decoration:underline;}\n" +
/*"""""""" (SUB) Active State""""""""*/
"body #qm0 div .qmactive, body #qm0 div .qmactive:hover {background-color:transparent;color:#698A59;}\n" +
/*"""""""" Individual Titles""""""""*/	
"#qm0 .qmtitle {cursor:default;padding:3px 0px 3px 4px;color:#444444;font-family:arial;font-size:11px;font-weight:bold;}\n" +
/*"""""""" Individual Horizontal Dividers""""""""*/	
"#qm0 .qmdividerx {border-top-width:1px;margin:4px 0px 4px 0px;border-color:#BFBFBF;}\n" +
/*"""""""" Individual Vertical Dividers""""""""*/	
"#qm0 .qmdividery {border-left-width:1px;height:15px;margin:4px 2px 0px 2px;border-color:#BFBFBF;}\n" +
/*"""""""" Custom Rule""""""""*/	
"ul#qm0 ul li:hover > a.qmparent {background-image:url(qmimages/cssalt1_arrow_right_hover.gif);}\n" +
/*"""""""" Custom Rule""""""""*/	
"ul#qm0 ul .qmparent {background-image:url(qmimages/cssalt1_arrow_right.gif);}\n" +
/*"""""""" Custom Rule""""""""*/	
"ul#qm0 li:hover > a.qmparent {background-image:url(qmimages/cssalt1_arrow_down_hover.gif);text-decoration:underline;}\n" +
/*"""""""" Custom Rule""""""""*/	
"ul#qm0 .qmparent {background-image:url(qmimages/cssalt1_arrow_down.gif);background-repeat:no-repeat;background-position:97% 50%;}\n" +

/*END STYLE MENU*/

"</style>\n";
document.write(style);

/********************************************/



var w3c=document.getElementById && !document.all;
var ie=document.all;

if (ie||w3c) {
  var leFocus
}

function ietruebody(){  // retourne le bon corps...
  return (document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body
}

function ReloadPage()
{
	//alert('Reload de la page');
	typeResolution="NotSet";
	EcrireCookie("typeResolution",typeResolution);
	window.location.href = window.location.href;
}

function rediriger(e)
{

	var curX = (w3c) ? e.pageX : event.x + ietruebody().scrollLeft;
    var curY = (w3c) ? e.pageY : event.y + ietruebody().scrollTop;
	
	if (w3c||ie)
		lemenu = document.all ? document.all["menuImageId"] : document.getElementById ? document.getElementById("menuImageId") : ""

	if (curX>=0 && curX<=largMenu)
	{
		if (curY>=0 && curY<logoHeight)
		{
			//window.open('index.php','_self');
			window.open('http://harmonie-grenoble.fr','_self');
		}
		if (curY>=orchestreTop && curY<orchestreBot && lemenu.id=="menuImageId")
		{
			window.open('orchestre.php','_self');
		}
		else if (curY>=ecoleTop && curY<ecoleBot && lemenu.id=="menuImageId")
		{
			window.open('ecole.php','_self');
		}
		else if (curY>=ensemblesTop && curY<ensemblesBot && lemenu.id=="menuImageId")
		{
			window.open('ensembles.php','_self');
		}
		else if (curY>=concertsTop && curY<concertsBot && lemenu.id=="menuImageId")
		{
			window.open('concerts.php','_self');
		}
		else if (curY>=repertoireTop && curY<repertoireBot && lemenu.id=="menuImageId")
		{
			window.open('repertoire.php','_self');
		}
		else if (curY>=presseTop && curY<presseBot && lemenu.id=="menuImageId")
		{
			window.open('presse.php','_self');
		}
		else if (curY>=photosTop && curY<photosBot && lemenu.id=="menuImageId")
		{
			window.open('medias.php','_self');
		}
		else if (curY>=livre_orTop && curY<livre_orBot && lemenu.id=="menuImageId")
		{
			window.open('livre_or.php','_self');
		}
		else if (curY>=liensTop && curY<liensBot && lemenu.id=="menuImageId")
		{
			window.open('liens.php','_self');
		}
		else if (curY>=contactTop && curY<contactBot && lemenu.id=="menuImageId")
		{
			window.open('contact.php','_self');
		}
	}
}

function deplacer(e)
{
	if (w3c||ie)
		leFocus = document.all ? document.all["focusMenu"] : document.getElementById ? document.getElementById("focusMenu") : ""
	
	if (typeof(leFocus)!="undefined"){
		if (leFocus!=null){
			if (w3c||ie)
				lemenu = document.all ? document.all["menuImageId"] : document.getElementById ? document.getElementById("menuImageId") : ""
			
			var curX = (w3c) ? e.pageX : event.x + ietruebody().scrollLeft;
			var curY = (w3c) ? e.pageY : event.y + ietruebody().scrollTop;
			
			if (curX>=0 && curX<=largMenu && lemenu.id=="menuImageId")
			{
				if (curY>=10 && curY<logoHeight)
				{
					leFocus.style.top= "10px";
				}
				if (curY>=orchestreTop && curY<orchestreBot)
				{
					leFocus.style.top= orchestreTop+"px";
				}
				else if (curY>=ecoleTop && curY<ecoleBot)
				{
					leFocus.style.top= ecoleTop+"px";
				}
				else if (curY>=ensemblesTop && curY<ensemblesBot)
				{
					leFocus.style.top= ensemblesTop+"px";
				} 
				else if (curY>=concertsTop && curY<concertsBot)
				{
					leFocus.style.top= concertsTop+"px";
				}
				else if (curY>=repertoireTop && curY<repertoireBot)
				{
					leFocus.style.top= repertoireTop+"px";
				}
				else if (curY>=presseTop && curY<presseBot)
				{
					leFocus.style.top= presseTop+"px";
				}
				else if (curY>=photosTop && curY<photosBot)
				{
					leFocus.style.top= photosTop+"px";
				}
				else if (curY>=livre_orTop && curY<livre_orBot)
				{
					leFocus.style.top= livre_orTop+"px";
				}
				else if (curY>=liensTop && curY<liensBot)
				{
					leFocus.style.top= liensTop+"px";
				}
				else if (curY>=contactTop && curY<contactBot)
				{
					leFocus.style.top= contactTop+"px";
				}
				else
				{
					leFocus.style.top= "-1000px";
				}
			}
			else
			{
				leFocus.style.top= "-1000px";
			}
		}
	}
}


document.onmousemove = deplacer; // des que la souris bouge, on appelle la fonction move pour mettre a jour la position de la bulle.
document.onclick = rediriger;
//document.body.onresize = ReloadPage; 

