function f_clientWidth() {
	return f_filterResults (
		screen.width ? screen.width : 0,
		document.documentElement ? document.documentElement.clientWidth : 0,
		document.body ? document.body.clientWidth : 0
		
	);}
function f_clientHeight() {
	return f_filterResults (
		window.innerHeight ? window.innerHeight : 0,
		document.documentElement ? document.documentElement.clientHeight : 0,
		document.body ? document.body.clientHeight : 0
	);}
function f_scrollLeft() {
	return f_filterResults (
		window.pageXOffset ? window.pageXOffset : 0,
		document.documentElement ? document.documentElement.scrollLeft : 0,
		document.body ? document.body.scrollLeft : 0
	);}
function f_scrollTop() {
	return f_filterResults (
		window.pageYOffset ? window.pageYOffset : 0,
		document.documentElement ? document.documentElement.scrollTop : 0,
		document.body ? document.body.scrollTop : 0
	);}
function f_filterResults(n_win, n_docel, n_body) {
	var n_result = n_win ? n_win : 0;
	if (n_docel && (!n_result || (n_result > n_docel)))
		n_result = n_docel;
	return n_body && (!n_result || (n_result > n_body)) ? n_body : n_result;
	}

var width=f_clientWidth();
var height=f_clientHeight();

choose_style(width, height);


function call(){
	weekday();
	date();
	startTime();}
function choose_style(width, height){
	if (width <= 800){
		var expdate = new Date ();
		expdate.setTime(expdate.getTime() + 1000*60);
		document.cookie="browser=799; expires="+ expdate + "path=/";
		document.write('<link href="styles/600x800.css" rel="stylesheet" type="text/css" />');
	} else {
		var expdate = new Date ();
		expdate.setTime(expdate.getTime() + 1000*60);
		document.cookie="browser=1024; expires="+ expdate + "path=/";
		document.write('<link href="styles/1024x746.css" rel="stylesheet" type="text/css" />');
	}}

function getImgSize(size){
var scr_width=f_clientWidth();
var imgwidth=substr(size, 7, -14);
var imgheight=substr(size, 20, -1);
document.write(imgwidth);
	if(scr_width<=800){
		document.getElementById('title_img').width=(imgwidth/3)*2;
		document.getElementById('title_img').height=(imgheight/3)*2;
	} else {
		document.getElementById('title_img').width=n_width;
		document.getElementById('title_img').height=n_height;
	}
}
function flyerSwap(src){
	swap="<img src="+src+" width='' height='' alt='img' />";
	document.write(swap);	
}

function weekday(){
var d=new Date();
var weekday=new Array(7);
weekday[0]="Dimanche";weekday[1]="Lundi";weekday[2]="Mardi";weekday[3]="Mercredi";weekday[4]="Jeudi";weekday[5]="Vendredi";weekday[6]="Samedi";
document.getElementById('day').innerHTML= weekday[d.getDay()]+" ";}
function date(){
var a=new Date();
var d=a.getDate();
var m=a.getMonth();
m++;
var y=a.getFullYear();
var month=new Array(12);
month[1]="janv";month[2]="fevr";month[3]="mars";month[4]="avril";month[5]="may";month[6]="juin";month[7]="juil";month[8]="aout";month[9]="sept";month[10]="oct";month[11]="nov";month[12]="dec";
document.getElementById('date').innerHTML= d+" "+month[m]+" "+y;}

function startTime(){
var today=new Date();
var h=today.getHours();
var m=today.getMinutes();
var s=today.getSeconds();
// add a zero in front of numbers<10
m=checkTime(m);
s=checkTime(s);
document.getElementById('time').innerHTML=h+":"+m;
t=setTimeout('startTime()',500);}

function checkTime(i){
if (i<10)
  {
  i="0" + i;
  }
return i;}

function checkform(form){
  // see http://www.thesitewizard.com/archive/validation.shtml
  // for an explanation of this script and how to use it on your
  // own website

  // ** START **
  if (form.email.value == ""){
    	alert( "Remplir un address email, svp." );
    	form.email.focus();
		form.email.style.background="red";
		form.email.style.color="white";
    	return false ;
  }
  if (form.email.value.indexOf('@')!=-1 && form.email.value.indexOf('.')!=-1 ){
	   return true ;
	  
  }
  // ** END **
 alert( "L'address email n'est pas valable." );
    	form.email.focus();
		form.email.style.background="yellow";
		form.email.style.color="red";
    	return false ;}
		

<!-- start JS detection
/*FlashMode = 0;
if (navigator.plugins && navigator.plugins.length > 0)
{
	if (navigator.plugins["Shockwave Flash"])
	{
		var plugin_version = 0;
		var words = navigator.plugins["Shockwave Flash"].description.split(" ");

		for (var i = 0; i < words.length; ++i)
		{
			if (isNaN(parseInt(words[i])))
			continue;
			plugin_version = words[i];
		}
		if (plugin_version >= 6)
		{
			var plugin = navigator.plugins["Shockwave Flash"];
			var numTypes = plugin.length;
			for (j = 0; j < numTypes; j++)
			{
				mimetype = plugin[j];
				if (mimetype)
				{
					if (mimetype.enabledPlugin && (mimetype.suffixes.indexOf("swf") != -1))
						FlashMode = 1;
					// Mac wierdness
					if (navigator.mimeTypes["application/x-shockwave-flash"] == null)
						FlashMode = 0;
				}
			}
		}
	}
}
do_dw_var = FlashMode;
browser_flash_version = plugin_version;*/
// end JS detection -->
