var espaceX=(screen.width-1024)/2;
var espaceY=(screen.height-768)/2;

//alert("largeur : "+espaceX+"\n\n"+"hauteur = "+espaceY);

document.writeln("<style type=\"text/css\">");

document.writeln("/*valeurs générales sur l'ensemble du site*/");
document.writeln("html, body {background-color:black;font-family: Arial, Helvetica, sans-serif;font-size: 12px;line-height: 18px;color: #333333;width:100%;height:100%;margin:auto;}");
document.writeln("a:hover{cursor:pointer;}");
document.writeln("a:active{cursor:pointer;}");
document.writeln("area{cursor:pointer;}");
document.writeln(".copyright{position:absolute;font-size:12px;color:white;bottom:15px;left:"+(52+parseInt(espaceX))+"px;z-index:11000;}");
document.writeln(".mailaccueil a{position:absolute;font-size:12px;color:white;bottom:15px;left:"+(812+parseInt(espaceX))+"px;z-index:11000;}");

document.writeln(".fondgris{bottom:0px;left:"+(0+parseInt(espaceX))+"px;position:absolute;border:0;}");
document.writeln(".vide{bottom:8px;left:"+(0+parseInt(espaceX))+"px;position:absolute;border:0;z-index:5000;}");
document.writeln(".souris{position:absolute;bottom:-188px;left:"+(15+parseInt(espaceX))+"px;width:1024px;height:720px;}");
document.writeln(".sourisfincostard{position:absolute;bottom:-181px;left:"+(13+parseInt(espaceX))+"px;width:1024px;height:720px;}");
document.writeln(".sourisfinmicro{position:absolute;bottom:-188px;left:"+(20+parseInt(espaceX))+"px;width:1024px;height:720px;}");

document.writeln("/*Yeuxde la souris*/");
document.writeln(".y1{position:absolute;bottom:220px;left:"+(454+parseInt(espaceX))+"px;visibility:visible;z-index:1000;border:none;width:31px;height:23px;background-image:url(../../images/yeux.gif);}");
document.writeln(".y2{position:absolute;bottom:220px;left:"+(482+parseInt(espaceX))+"px;visibility:visible;z-index:1000;border:none;width:31px;height:23px;background-image:url(../../images/yeux.gif);}");

document.writeln("/*Musique*/");
document.writeln("#jPlayer {width: 1px;height: 1px;background:black;}");
document.writeln(".volume{width:30px;height:30px;}");
document.writeln(".coupervolume{position:absolute;bottom:5px;left:"+(752+parseInt(espaceX))+"px;}");
document.writeln(".activervolume{position:absolute;bottom:5px;left:"+(752+parseInt(espaceX))+"px;}");

document.writeln("/*menu linéaire  du bas*/");
document.writeln(".menu{position:absolute;bottom:15px;left:"+(222+parseInt(espaceX))+"px;z-index:11000;color: #ffffff;}");
document.writeln(".menu  a{display: inline ;font-size:12px;font-weight:bold;padding:20px;}");
document.writeln(".menu  a:hover{color:orange;}");
document.writeln(".active{color:orange;}");

document.writeln("/*valeurs des images constituant le menu central*/");

document.writeln("/*Caractéristiques à chaque*/");
document.writeln(".tarifsimg {height:50px;width:50px;border:none;position:absolute;bottom:280px;left:"+(319+parseInt(espaceX))+"px;}");
document.writeln(".tarifsouvert {height:60px;width:140px;border:none;position:absolute;bottom:285px;left:"+(227+parseInt(espaceX))+"px;}");
document.writeln(".tarifstypo {height:39px;width:135px;border:none;position:absolute;bottom:304px;left:"+(229+parseInt(espaceX))+"px;}");
document.writeln(".contactimg {height:50px;width:50px;border:none;position:absolute;bottom:195px;left:"+(220+parseInt(espaceX))+"px;z-index:2000;}");
document.writeln(".productionvideoimg {height:50px;width:50px;border:none;position:absolute;bottom:130px;left:"+(720+parseInt(espaceX))+"px;}");
document.writeln(".productionvideoouvert {height:75px;width:125px;border:none;position:absolute;bottom:135px;left:"+(712+parseInt(espaceX))+"px;z-index:2000;}");
document.writeln(".productionvideotypo {height:170px;width:138px;border:none;position:absolute;bottom:124px;left:"+(712+parseInt(espaceX))+"px;z-index:2000;}");
document.writeln(".productionaudioimg {height:50px;width:50px;border:none;position:absolute;bottom:108px;left:"+(247+parseInt(espaceX))+"px;}");
document.writeln(".productionaudioouvert {height:79px;width:125px;border:none;position:absolute;bottom:112px;left:"+(247+parseInt(espaceX))+"px;}");
document.writeln(".productionaudiotypo {height:145px;width:230px;border:none;position:absolute;bottom:48px;left:"+(139+parseInt(espaceX))+"px;}");
document.writeln(".liensimg {height:50px;width:50px;border:none;position:absolute;bottom:45px;left:"+(407+parseInt(espaceX))+"px;}");
document.writeln(".liensouvert {height:50px;width:100px;border:none;position:absolute;bottom:40px;left:"+(412+parseInt(espaceX))+"px;}");
document.writeln(".lienstypo{height:100px;width:145px;border:none;position:absolute;bottom:20px;left:"+(367+parseInt(espaceX))+"px;}");
document.writeln(".activiteimg {height:50px;width:50px;border:none;position:absolute;bottom:157px;left:"+(593+parseInt(espaceX))+"px;z-index:2000;}");
document.writeln(".ecrancontact {height:130px;width:134px;border:none;position:absolute;bottom:143px;left:"+(132+parseInt(espaceX))+"px;}");
document.writeln(".contacttypo {border:none;position:absolute;bottom:130px;left:"+(122+parseInt(espaceX))+"px;z-index:2000;}");
document.writeln(".contactouvert {border:none;position:absolute;bottom:129px;left:"+(124+parseInt(espaceX))+"px;z-index:2000;width:143px;height:132px;}");
document.writeln(".activitetypo {border:none;position:absolute;bottom:104px;left:"+(565+parseInt(espaceX))+"px;z-index:2000;}");
document.writeln(".activiteouvert {border:none;position:absolute;bottom:150px;left:"+(587+parseInt(espaceX))+"px;z-index:2000;width:110px;height:92px;}");
document.writeln(".micro{position:absolute;width:50px;height:85px;left:"+(587+parseInt(espaceX))+"px;bottom:116px;z-index:100;}");
document.writeln(".grigri{position:absolute;left:"+(743+parseInt(espaceX))+"px;bottom:159px;z-index:100;}");
document.writeln("/*pages*/");

document.writeln("/*valeurs communes à toutes les pages*/");
document.writeln(".page {background-color:#FFFFFF;filter : alpha(opacity=80);-moz-opacity : 0.8;opacity : 0.8; -moz-border-radius: 30px;-webkit-border-radius: 30px;border-radius: 30px;padding-left:10px;padding-right:10px;padding-top:10px;padding-bottom:10px;border:1px solid #c0c0c0;position:absolute;z-index:11000;}");
document.writeln(".page h1{text-align:center;}");
document.writeln(".page h3 {font-family: Arial, Helvetica, sans-serif;font-size: 12px;line-height: 14px;color: #333333;font-weight:bold}");
document.writeln(".boutonfermer{position:absolute;top: 5px;right:15px;cursor:pointer;z-index:11000;}");

document.writeln("/*Caractéristiques de chaque page*/");

document.writeln("/*Page Entrée*/");
document.writeln(".entree {background-color:black;filter : alpha(opacity=100);-moz-opacity : 1;opacity : 1; -moz-border-radius: 0px;-webkit-border-radius:0px;border-radius: 0px;padding-left:"+(20+parseInt(espaceX))+"px;padding-right:20px;padding-top:20px;padding-bottom:20px;border:0px;position:absolute;z-index:12000;bottom:-83px;left:-18px;color:white;text-align:center;font-weight:bold;}");
document.writeln(".intro{background-color:black;filter : alpha(opacity=100);-moz-opacity : 1;opacity : 1; -moz-border-radius: 0px;-webkit-border-radius: 0px;border-radius: 0px;border:0px;position:absolute;z-index:12000;bottom:-60px;left:"+(-128+parseInt(espaceX))+"px;color:white;text-align:center;font-weight:bold;width:1262px;height:668px;}");
document.writeln("/*Page Activité*/");
document.writeln(".pageactivite{width:320px;height:510px;bottom:40px;right:2px;padding-left:10px;padding-right:10px;padding-top:10px;padding-bottom:10px;}");
document.writeln(".pageactivite a:hover{text-decoration:underline;}");
document.writeln("/*Page Contact*/");
document.writeln(".pagecontact{position:absolute;width:260px;height:268px;bottom:50px;left:2px;padding-left:15px;padding-right:15px;padding-top:10px;padding-bottom:15px;}");
document.writeln(".pagecontact a{text-decoration:none;color: #333333;}");
document.writeln("/*Page Production video*/");
document.writeln(".productionvideo {padding-left:10px;padding-right:10px;padding-top:10px;padding-bottom:10px;border:1px solid #c0c0c0;position:absolute;z-index:11000;width:320px;height:580px;bottom:10px;right:2px;}");
document.writeln(".production h1{position:absolute;top:0px;left:20px;text-align:center;color:#333333;}");
document.writeln(".production h3{color:#333333;}");
document.writeln(".production a:hover{text-decoration:underline;}");
document.writeln(".boutonfermerprod{position:absolute;top: 0px;right:15px;cursor:pointer;color:#333333;}");
document.writeln(".imagevideo{width:60px;height:60px;border:0px;padding:5px;}");
document.writeln(".menuvideo{text-align:center;width:320px;height:80px;position:absolute;top:483px;left:10px;overflow: auto;white-space:nowrap;overflow-y: hidden;}");
document.writeln(".lecteurvideo{width:320px;height:260px;}");
document.writeln(".lecteurvideodiv{position:absolute;top:40px;left:10px;width:320px;height:260px;border:1px solid #c0c0c0;background-color:#CCCCCC;filter : alpha(opacity=40000);-moz-opacity : 100;opacity : 100; }");
document.writeln(".detailvideo{background-color:#CCCCCC;filter : alpha(opacity=100);-moz-opacity : 1;opacity : 1; padding-left:5px;padding-right:5px;padding-top:5px;padding-bottom:5px;border:1px solid #c0c0c0;position:absolute;z-index:2000;width:310px;height:170px;left:10px;top:310px;color:black;font-weight:bold;}");
document.writeln("/*Page Production audio*/");
document.writeln(".productionaudio {padding-left:10px;padding-right:10px;padding-top:10px;padding-bottom:10px;border:1px solid #c0c0c0;position:absolute;z-index:11000;width:320px;height:550px;bottom:10px;left:2px;}");
document.writeln(".productionaudio h1{position:absolute;top:0px;left:50px;text-align:center;color:#333333;}");
document.writeln(".contenuaudio{text-align:left;width:325px;height:500px;position:absolute;top:50px;overflow:auto;}");
document.writeln(".detailmusique{margin-bottom:25px; margin-left:5px; margin-right:10px; padding-left:5px; padding-right:5px;width:280px;color:black;font-weight:bold;border:1px solid #c0c0c0;background-color:#CCCCCC;float: left;}");
document.writeln(".ecoutable{height: 100px;width:100px;border:none;}");
document.writeln(".imageplay{height:50px;width:50px;border:none;background-image:url(../../images/play.png);}");
document.writeln(".imagestop{height:50px;width:50px;border:none;background-image:url(../../images/stop.png);}");

document.writeln("/*Page Tarifs*/");
document.writeln(".pagetarifs{width:255px;height:400px;bottom:30px;left:2px;display:inline;}");
document.writeln("/*tableaux de la page tarifs*/");
document.writeln(".prix{border:0px solid;}");
document.writeln(".prix table { border-collapse:collapse; width:250px; }");
document.writeln(".prix th { border:1px solid black; width:20%; }");
document.writeln(".colonne{ border:1px solid black; width:25%;}");
document.writeln(".prix caption { font-weight:bold; }");
 
document.writeln(" /*Page Liens*/");
document.writeln(".pageliens{width:250px;height:400px;bottom:60px;right:2px;padding-left:15px;padding-right:15px;padding-top:10px;padding-bottom:15px;}");
document.writeln(".pageliens a{text-decoration:underline;font-weight:bold;color: #333333;}");

 document.writeln("/*Page devis*/");
 document.writeln(".pagedevis{width:280px;height:380px;top:2px;right:2px;background-color:#c0c0c0;filter : alpha(opacity=100);-moz-opacity : 1;opacity : 1; text-align:center;}");
document.writeln("a.liendevis{font-weight:bold;position:absolute;right:20px;bottom:20px;font-size: 14px;color:orange;}");
document.writeln("a.liendevis:hover{text-decoration:underline;}");
document.writeln("#testpng{position:absolute;width:60px;height:60px;top:50px;left:50px;}");
document.writeln("#testgif{position:absolute;width:60px;height:60px;top:50px;left:50px;}");
document.writeln("</style>");


// MiTcH - Julien Michot - www.fractals.fr.fm
//variables à changer
var top=220;
var left=454+espaceX;
//le faire aussi dans les divs


var largeur=20;
var hauteur=15;
var posis1=new Array(top-hauteur/2,left+largeur/2);
var posis2=new Array(top-hauteur/2,left+4+largeur+largeur/2);
var posisY1=new Array(top-hauteur/2,left+largeur/2);;
var posisY2=new Array(top-hauteur/2,left+4+largeur+largeur/2);
var SX=454+espaceX;
var SY=454+espaceX;
var maxdpH=7,maxdpL=7;
var rayon=7,norme;
function moveyeux(event)
{
 
  SX=event.clientX;
  SY=event.clientY;


  norme=Math.sqrt((SY-posis1[0])*(SY-posis1[0])+(SX-posis1[1])*(SX-posis1[1]));
  if((SY<=(posis1[0]+maxdpH)&&SY>=(posis1[0]-maxdpH))&&(SX<=(posis1[1]+maxdpL)&&SX>=(posis1[1]-maxdpL)))
  {
        posisY1[0]=SY;
        posisY1[1]=SX;
  
  }else{

        posisY1[0]=Math.round(posis1[0]-(SY-posis1[0])*rayon/norme);
        posisY1[1]=Math.round(posis1[1]+(SX-posis1[1])*rayon/norme);

  }
  
  norme=Math.sqrt((SY-posis2[0])*(SY-posis2[0])+(SX-posis2[1])*(SX-posis2[1]));
  if((SY<=(posis2[0]+maxdpH)&&SY>=(posis2[0]-maxdpH))&&(SX<=(posis2[1]+maxdpL)&&SX>=(posis2[1]-maxdpL)))
  {
        posisY2[0]=SY;
        posisY2[1]=SX;
  
  }else{

        posisY2[0]=Math.round(posis2[0]-(SY-posis2[0])*rayon/norme);
        posisY2[1]=Math.round(posis2[1]+(SX-posis2[1])*rayon/norme);  }


  //mettre les nouvelles valeurs
  document.getElementById("y1").style.bottom=(posisY1[0]+hauteur/2)+'px';
  document.getElementById("y1").style.left=(posisY1[1]-largeur/2)+'px';
  document.getElementById("y2").style.bottom=(posisY2[0]+hauteur/2)+'px';
  document.getElementById("y2").style.left=(posisY2[1]-largeur/2)+'px';
  
}
