// JavaScript Document
function FocusText(BoxName)
{
if (BoxName.value == BoxName.defaultValue)
{
BoxName.value = '';
}
}
function BlurText(BoxName)
{
if (BoxName.value == '')
{
BoxName.value = BoxName.defaultValue;
}
}
function panier(doc) {
var docwidth = 400, docheight = 200, docleft = 0, doctop = 0;
if (window.win && window.win.open && !window.win.closed){
			win.close();
	win = window.open('doc', 'panier', 'toolbars=no,scrollbars=no,location=no,statusbars=no,menubars=no,resize=no,width=' + docwidth + ',height=' + docheight + ',left=' + docleft + ',top=' + doctop);
}
	else
	{
	win = window.open('doc', 'panier', 'toolbars=no,scrollbars=no,location=no,statusbars=no,menubars=no,resize=no,width=' + docwidth + ',height=' + docheight + ',left=' + docleft + ',top=' + doctop);
	}
}
function envoi_motdepasse() {
var docwidth = 320, docheight = 150, docleft = 0, doctop = 0;
if (window.win && window.win.open && !window.win.closed){
			win.close();
	win = window.open('envoi_password.php', 'password', 'toolbars=no,scrollbars=no,location=no,statusbars=no,menubars=no,resize=no,width=' + docwidth + ',height=' + docheight + ',left=' + docleft + ',top=' + doctop);
}
	else
	{
	win = window.open('envoi_password.php', 'password', 'toolbars=no,scrollbars=no,location=no,statusbars=no,menubars=no,resize=no,width=' + docwidth + ',height=' + docheight + ',left=' + docleft + ',top=' + doctop);
	}
}
function popupcgv() {
var docwidth = 630, docheight = 400, docleft = 0, doctop = 0;
if (window.win && window.win.open && !window.win.closed){
			win.close();
	win = window.open('cgv.htm', 'cgv', 'toolbars=no,scrollbars=yes,location=no,statusbars=no,menubars=no,resize=yes,width=' + docwidth + ',height=' + docheight + ',left=' + docleft + ',top=' + doctop);
}
	else
	{
	win = window.open('cgv.htm', 'cgv', 'toolbars=no,scrollbars=yes,location=no,statusbars=no,menubars=no,resize=yes,width=' + docwidth + ',height=' + docheight + ',left=' + docleft + ',top=' + doctop);
	}
}

function abonnement() {
var docwidth = 400, docheight = 200, docleft = 0, doctop = 0;
if (window.win && window.win.open && !window.win.closed){
			win.close();
	win = window.open('abonnement.php', 'abonnement', 'toolbars=no,scrollbars=no,location=no,statusbars=no,menubars=no,resize=no,width=' + docwidth + ',height=' + docheight + ',left=' + docleft + ',top=' + doctop);
}
	else
	{
	win = window.open('abonnement.php', 'abonnement', 'toolbars=no,scrollbars=no,location=no,statusbars=no,menubars=no,resize=no,width=' + docwidth + ',height=' + docheight + ',left=' + docleft + ',top=' + doctop);
	}
}

function popupagrandirphoto(fichier) {
var docwidth = 300, docheight = 300, docleft = 0, doctop = 0;
if (window.win && window.win.open && !window.win.closed){
			win.close();
	win = window.open(fichier, 'abonnement', 'toolbars=no,scrollbars=no,location=no,statusbars=no,menubars=no,resize=no,width=' + docwidth + ',height=' + docheight + ',left=' + docleft + ',top=' + doctop);
}
	else
	{
	win = window.open(fichier, 'abonnement', 'toolbars=no,scrollbars=no,location=no,statusbars=no,menubars=no,resize=no,width=' + docwidth + ',height=' + docheight + ',left=' + docleft + ',top=' + doctop);
	}
}

function showcri(segid,e)	{
	var doc = document.getElementById ? document.getElementById(segid).style : document.all? document.all[segid].style: null;

	if (doc.display == 'none') {
		var posx = 0;
		var posy = 20;
		if (!e) var e = window.event;
		if (e.pageX) { 
			posx = e.pageX;
			// posy = e.pageY
		}
		else if (e.clientX) {
			posx = e.clientX + document.body.scrollLeft;
			// posy = e.clientY + document.body.scrollTop;
		}
		with (doc) {
			display='';
			top = parseInt(posy) - 5
			left = parseInt(posx) - 20
		}
		window.setTimeout("showcri('" + segid + "',window.event)",5000)
	}
	else doc.display = 'none'
}

function chgEtat(objImage,id,nom) {	
	var imageMoins = false;
	var doc = document.getElementById? document.getElementById('cri'+id) : document.all? document.all['cri'+id]: null;
	if(doc.length != void(0)) {
		for (var i=0;i<doc.length;i++)	{
			if(doc[i].style.display == 'none') {
				doc[i].style.display = '';
				imageMoins = true;
				}
			else doc[i].style.display = 'none';
			}
		}
	else {
		if(doc.style.display == 'none') {
			doc.style.display = '';
			imageMoins = true;
			}
		else doc.style.display = 'none';
		}
	if(imageMoins) objImage.src = '/images/tab/desc' + nom + '.gif';
	else objImage.src = '/images/tab/fl' + nom + '.gif';
	}
	
function getElementbyClass(classname){
	ccollect=new Array()
	var inc=0
	var alltags=document.all? document.all : document.getElementsByTagName("*")
	for (i=0; i<alltags.length; i++){
		if (alltags[i].className==classname)
			ccollect[inc++]=alltags[i]
	}
}
		
function contractcontent(omit){
	var inc=0
	while (ccollect[inc]){
		if (ccollect[inc].id!=omit)
			ccollect[inc].style.display="none"
		inc++
	}
}
		
function expandcontent(cid){
	if (typeof ccollect!="undefined")
		document.getElementById(cid).style.display=(document.getElementById(cid).style.display!="block")? "block" : "none"

}