

x = screen.width
y = screen.height

function Popup() {
   html = '<html> <head> <title>Le Télégramme</title></head><body onBlur="top.close()" bottommargin=0 leftmargin=0 marginheight=0 marginwidth=0 rightmargin=0 topmargin=0 bgcolor="#d2b577"> <center>  <table cellpadding="0" cellspacing="0" width="400"><tr><td style="border: 1px solid #602501" align="center"><font style="color: #602501;font-family: Arial;font-size:20px;"><b>La chasse ô trésors</b></font></td></tr></table></center><br />  <font style="color: #602501;font-family: Arial;font-size:12px;">  Un indice se trouve sur notre site Internet ... Il est signalé par ce visuel :<br /> <br />  <center><img src="http://www.vieillescharrues.asso.fr/festival/chasse/images/visuel_chasse.gif"></center><br /><br /> Pour le trouver, consultez l\'actualité de la ville d\'abordage des pirates... <br /><br />  <center><a href=javascript:self.close();>Fermer</a></center></body></html>';
   popupHTML =    window.open('','_blank','toolbar=0, location=0, directories=0, menuBar=0, scrollbars=0, resizable=1, width=400, height=300');
   popupHTML.document.open();
   popupHTML.document.write(html);
   popupHTML.document.close();
   //gauche = (x-popupHTML.document.popupTB.width)/2;
   //haut = (y-popupHTML.document.popupTB.height)/2;
   //popupHTML.moveTo(gauche,haut);
};




function swap_player(frm,taille)
	{
	p_small = new Array("flvplayer_ss_plein_ecran","width='240'","height='208'");
	p_large = new Array("flvplayer_grande_ss_plein_ecran","width='500'","height='420'");
	v_player=frm.player.value;
	if(taille=='S')
		{
		re0=new RegExp(p_large[0],'g');
		re1=new RegExp(p_large[1],'g');
		re2=new RegExp(p_large[2],'g');
		v_player = v_player.replace(re0,p_small[0]);
		v_player = v_player.replace(re1,p_small[1]);
		v_player = v_player.replace(re2,p_small[2]);
		}
	if(taille=='L')
		{
		re0=new RegExp(p_small[0],'g');
		re1=new RegExp(p_small[1],'g');
		re2=new RegExp(p_small[2],'g');
		v_player = v_player.replace(re0,p_large[0]);
		v_player = v_player.replace(re1,p_large[1]);
		v_player = v_player.replace(re2,p_large[2]);
		}	
	frm.player.value=v_player;
	}

	


	function visibilite(thingId)
	{
		var targetElement;
		targetElement = document.getElementById(thingId) ;
		if (targetElement.style.display == "none" )
		{
		targetElement.style.display = "" ;
		} else {
		targetElement.style.display = "none" ;
		}
	}

function date()
{       
	var now = new Date();

	var day = now.getDay();
	var date = now.getDate();
	var month = now.getMonth() +1;
	var year = now.getYear();
	var jour = "";
	var mois = "";

	if (year < 1900)
		year = year + 1900;

	if (day == 0)
		jour = "Dimanche";
	if (day == 1)
		jour = "Lundi";
	if (day == 2)
		jour = "Mardi";
	if (day == 3)
		jour = "Mercredi";
	if (day == 4)
		jour = "Jeudi";
	if (day == 5)
		jour = "Vendredi";
	if (day == 6)
		jour = "Samedi";

	if (month == 1)
		mois = "janvier";
	if (month == 2)
		mois = "f&eacute;vrier";
	if (month == 3)
		mois = "mars";
	if (month == 4)
		mois = "avril";
	if (month == 5)
		mois = "mai";
	if (month == 6)
		mois = "juin";
	if (month == 7)
		mois = "juillet";
	if (month == 8)
		mois = "ao&ucirc;t";
	if (month == 9)
		mois = "septembre";
	if (month == 10)
		mois = "octobre";
	if (month == 11)
		mois = "novembre";
	if (month == 12)
		mois = "d&eacute;cembre";



	return( jour + "  " + date + " " + mois   + " " + year );
}










function openwin(ow) {
url = '/maquette/pop.htm?' + ow;
fen = window.open(url,"fenetre","width=350,height=350,scrollbars=0,toolbar=0,menubar=0,location=0,resizable=yes,status=0");
}









function MM_jumpMenu(targ,selObj,restore){ //v3.0
  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
}










function getByID(id)
{
	if (document.all)
	{
		return document.all(id) ;
	}
	if(document.getElementById)
	{
		return document.getElementById(id) ;
	}
	alert(id+' not found') ;
}

function hide(id)
{
	var o = getByID(id) ;
	if (o)
	{
		if (document.all)
		{
			o.display = "none" ;
		}
		if(document.getElementById)
		{
			o.style.display = "none" ;
		}
	}
}

function show(id)
{
	var o = getByID(id) ;
	if (o)
	{
		if (document.all)
		{
			o.display = "visible" ;
		}
		if(document.getElementById)
		{
			o.style.display = "block" ;
		}
	}
}




function afftest()
{
document.write('');
}









function popname(url,nom,toolb,loca,dir,sta,munub,scroll,resize,width,height,x,y)
{
open(url,nom,'toolbar='+toolb+',location='+loca+',directories='+dir+',status='+sta+',menubar='+munub+',scrollbars='+scroll+',resizable='+resize+',width='+width+',height='+height+',left=x,top=y').focus();
}





function pagedem()
{
var name = navigator.appName;
var useragent = navigator.userAgent;
//alert(useragent);

if ( useragent.indexOf("MSIE") != -1) {
        var evenemento = "this.style.behavior='url(#default#homepage)';this.setHomePage('http://www.letelegramme.com');return false;";
        document.write('<div class="MENU-TOP"><span class="MENU-TXT">&nbsp;</span></div>');
        document.write('<div class="MENUP-TOP"><a class="MENU-TXT" href="#" onClick='+evenemento+'>Démarrer avec LeTélégramme.com</a></div>');
        }
}

