i=0;
vima="imageim1";
vimb="imageim2";

if (screen.width < 1280)
	{
	lexg="161px";
	lexd="759px";
	tabpt=["107px","167px","227px","287px","347px","407px","467px","527px","587px","647px"];
	imgg=6;
	}
	
else if (screen.width >= 1280)
	{
	lexg="227px";
	lexd="944px";
	tabpt=["190px","250px","310px","370px","430px","490px","550px","610px","670px","730px"];
	imgg=9;
	}
	
tabgauche=[0,0,0,0,0,0,0,0,0,0];
tabdroite=[0,0,0,0,0,0,0,0,0,0];

tabimage=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];

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

function change()
	{
	t=Math.round(Math.random()*1000);

	nb=49;
	a=1+Math.round(Math.random()*nb);			
	b=1+Math.round(Math.random()*nb);	
	
	tabpta=Math.round(Math.random()*imgg);
	tabptb=Math.round(Math.random()*imgg);

	ima="imageim"+a;
	imb="imageim"+b;

	if(t>333 || (t-1)%2==1)
		{
		document.getElementById(ima).style.left=lexg;
		document.getElementById(ima).style.top=tabpt[tabpta];
		document.getElementById(ima).style.display="block";
		vima=tabgauche[tabpta];
		tabgauche[tabpta]=ima;
		tabimage[i]=a;
		if(vima!=0){document.getElementById(vima).style.display="none";}
		}

	if(t<666 || (t-1)%2==0)
		{
		document.getElementById(imb).style.left=lexd;
		document.getElementById(imb).style.top=tabpt[tabptb];
		document.getElementById(imb).style.display="block";
		vimb=tabdroite[tabptb];
		tabdroite[tabptb]=imb;					
		tabimage[i]=b;
		if(vimb!=0){document.getElementById(vimb).style.display="none";}
		}	
	i++;
	if(i==20){i=0;}
	}
	
/**************************************************************************************************/

function lancement()
	{
	if (screen.width < 1280)
		{
		setActiveStyleSheet("1024");
		return false;
		}
	
	else if (screen.width >=1280)
		{
		setActiveStyleSheet("1280");
		return false;
		}
	}
	
/**************************************************************************************************/

function sousmenu(num)
	{
	document.getElementById("sous"+num).style.color="#a61617";
	document.getElementById("sous"+num).style.fontWeight="bold";
	}
	
/*************************************************COURS********************************************/	

function ouvrir()
	{
	window.open("http://cooletude.com/gunther/search/9/"+document.pickform.q.value);
	}

/************************************************CINEMAS*******************************************/

function valider_searchbox ()
	{
	  var choix = document.SEARCHBOX.choix.value;
	  choix = choix.replace(/ /g, "+");
	  var restriction = "";
	  for (var i = 0; i < document.SEARCHBOX.restriction.options.length; i++) {
		if (document.SEARCHBOX.restriction.options[i].selected) {
		  restriction = document.SEARCHBOX.restriction.options[i].value;
		}
	  }
	  if (restriction == "films") {
		window.location='http://fr.search.movies.yahoo.com/search/movies_fr?p='+choix+'+origintype:film'+'&s=rank,headline';
	  }
	  else if (restriction == "salles") {
		window.location='http://fr.search.movies.yahoo.com/search/movies_fr?p='+choix+'+origintype:sall'+'&s=rank,headline';
	  }
	  else if (restriction == "seances") {
		window.location='http://fr.search.movies.yahoo.com/search/movies_fr?p='+choix+'+origintype:sean'+'&s=rank,headline';
	  }
	  else if (restriction == "actu") {
		window.location='http://fr.search.movies.yahoo.com/search/movies_fr?p='+choix+'+origintype:news'+'&s=rank,headline';
	  }
	else {
		window.location='http://fr.search.movies.yahoo.com/search/movies_fr?p='+choix+'&s=rank,headline';
	  }
	  return false;
	}
	
/**********************************************LEFILM********************************************************/
function surfilm(ch)
	{
	document.getElementById("sous"+ch).style.color='#f6ae30';
	}

function plusurfilm(ch)
	{
	document.getElementById("sous"+ch).style.color='#c017b2';
	}
	
/********************************************TV*******************************************************************/
function progtv()
	{
	rez=screen.width;
	if(rez>1024){document.location.href="Programme-TV";}
	if(rez<1280){document.location.href="Programme-Tele";}
	}
	
/*****************************************goblink*******************************************************************/
go_visibility = new Array;

function goblink()
	{
	if(document.getElementById && document.all)
		{
		blink_tab = document.getElementsByTagName('blink');
		for(a=0;a<blink_tab.length;a++)
			{
			if(go_visibility[a] != "visible")
				go_visibility[a] = "visible";
			else
				go_visibility[a] = "hidden";
			blink_tab[a].style.visibility=go_visibility[a];
			}
		}
	setTimeout("goblink()", 500);
	}

window.onload = goblink;

lex=0;
i=0;