

function soumet(theurl,targetform)
{
	self.document.forms[targetform].method = "POST";
	self.document.forms[targetform].action = theurl;
	self.document.forms[targetform].submit();
}


function showwindow(theurl,nomfenetre,w_width,w_height, w_options)
{
	
     // alert (theurl);
     // pour le date picker les dimension sont ci-dessous
    //var w_width = 250;
    // var w_height = 250;


	 if(w_height>self.screen.height)
	 {
	   var w_height=self.screen.height;
	 }
	 
	 if(w_width>self.screen.width)
	 {
	   var w_width=self.screen.width;
	 }
	 
	 
	 if ((self.screen.height-w_height)/2 <1)
	 {
	    var w_positionh = 1;
	 }
	 else
	 {
	 	var w_positionh =(self.screen.height-w_height)/2;
	 }
	 if ((self.screen.width-w_width)/2 <1)
	 {
	    var w_positionw = 1;
	 }
	 else
	 {
	 	var w_positionw =(self.screen.width-w_width)/2;
	 }	 

	 var w_option = "height="+w_height+",width="+w_width+w_options;

	 newwindow = window.open(theurl,nomfenetre, w_option);
	 newwindow.moveTo(w_positionw, w_positionh);
	 newwindow.focus()
}


function init() { 

  if(document.getElementById && document.createTextNode) { 
    var menu = document.getElementById('menu'); 
    var anchors = menu.getElementsByTagName('a'); 
    for(var i=0, length=anchors.length;i<length;i++) { 
      anchors[i].onmouseover= function() { 
        var spot = -1; 
        this.setAttribute('spot', spot); 
        this.style.backgroundPosition= '15px 0px'; 
      } 
      anchors[i].onmouseout= function() { 
        var spot = 15; 
        this.setAttribute('spot', spot); 
      } 
    } 
    animate(); 
  } 
} 

function animate() { 
  var menu = document.getElementById('menu'); 
  var anchors = menu.getElementsByTagName('a'); 
  for(var i=0, length=anchors.length;i<length;i++) { 
    var spot = anchors[i].getAttribute('spot'); 
    if (spot>0) { 
      spot = spot - 2; 
      if(spot<0) spot = 0; 
      anchors[i].style.backgroundPosition= spot+'px 0px'; 
      anchors[i].setAttribute('spot', spot); 
    } 
  } 

  setTimeout(animate, 4); 
} 
function messagealert (contenumessage)
{
    alert(contenumessage);
}

function resolution()
{
    document.location="index.php?resol=1&width="+screen.width+"&height="+screen.height;
}


function moveimage ()
{

        for(var i=200;i>0 ;i=i-50) {
			var hautimage = i;
			var gaucheimage = i;
			document.write('<img src="atelier_1_2.jpg" width="300" height="300" style="position:absolute;top:'+i+'px;left:'+(i-50)+'px">');
			
        }
}


function mailme(text) { 
		   var myname="monique.pans";    // CHANGE this to your actual username 
		   var myhost="hotmail.com"; // CHANGE this to the name of your mail server 
		   var myaddy=myname+"@"+myhost; 
		   document.write("<a style='font-style:italic;font-family:Monotype Corsiva;font-size : 20pt;'>"+text+"<a style='font-style:italic;font-family:Monotype Corsiva;font-size : 20pt;' href=\"mailto:"+myaddy+"\">"+myaddy+"</a>"); 
} 

function phoneme(text) { 
		   var myname="0477";    // CHANGE this to your actual username 
		   var myhost="58.77.78"; // CHANGE this to the name of your mail server 
		   var myaddy=myname+" "+myhost; 
		   document.write("<a style='font-style:italic;font-family:Monotype Corsiva;font-size : 20pt;'>"+text + myaddy+"</a>"); 
} 

function moveimagedecor ()
{

        for(var i=100;i>0 ;i=i-20) {
			var hautimage = i;
			var gaucheimage = i;
			document.write('<img src="./photos/collision.jpg" width="100" height="300" style="position:absolute;top:'+(i)+'px;left:'+(i-20)+'px">');
			
        }
}