

var d = 0;
var id = 0;
var all = 0;
var layer = 0;


if (document.getElementById) {id = 1; d = 1;}
else {
if (document.all) {all = 1; d = 1;}
else {
browserVersion = parseInt(navigator.appVersion);
if ((navigator.appName.indexOf('Netscape') != -1) && (browserVersion == 4)) {layer = 1; d = 1;}
}}

function HeaderDisplay() {

	document.write('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" width="468" height="60" id="pp_banner" align="middle">');
	document.write('<param name="allowScriptAccess" value="sameDomain" />');
	document.write('<param name="movie" value="flash/pp_banner.swf" />');
	document.write('<param name="quality" value="high" />');
	document.write('<param name="bgcolor" value="#ffffff" />');
	document.write('<param name="wmode" value="transparent" />');
	document.write('<embed src="flash/pp_banner.swf" quality="high" bgcolor="#ffffff" width="668" height="60" name="pp_banner" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />');
	document.write('</object>');
}

function HeaderXMASDisplay() {

	document.write('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" width="468" height="60" id="pp_banner" align="middle">');
	document.write('<param name="allowScriptAccess" value="sameDomain" />');
	document.write('<param name="movie" value="flash/pp_banner_xmas2.swf" />');
	document.write('<param name="quality" value="high" />');
	document.write('<param name="bgcolor" value="#ffffff" />');
	document.write('<param name="wmode" value="transparent" />');
	document.write('<embed src="flash/pp_banner_xmas2.swf" quality="high" bgcolor="#ffffff" width="668" height="60" name="pp_banner" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />');
	document.write('</object>');
}


function hidepopup(){
	document.getElementById('grandeimage').style.display ="none";
	document.getElementById('cache').style.display ="none";
}

function showpopup(){
	document.getElementById('grandeimage').style.display ="block";
	document.getElementById('cache').style.display ="block";
}

function FormSubmit(formaction){
	disableForm(document.form1);
	document.form1.form_action.value=formaction;
	document.form1.submit();
}



function dom(objectID,withStyle) {
	if (withStyle == 1) {
		if (id) { return (document.getElementById(objectID).style) ; }
		else {
			if (all) { return (document.all[objectID].style); }
		else {
			if (layer) { return (document.layers[objectID]); }
		};}
	}
	else {
		if (id) { return (document.getElementById(objectID)) ; }
		else {
			if (all) { return (document.all[objectID]); }
		else {
			if (layer) { return (document.layers[objectID]); }
		};}
	}
}


function toggleVisibility(objectID, imageID) {
	vis = dom(objectID,1);	state = vis.visibility;
	//img = dom(imageID,1);
	if (state == 'hidden' || state == 'hide' )
	{
		vis.visibility = 'visible';
		document.getElementById("image_plus").src = "images/minus.gif";
	}
	else {
	if (state == 'visible' || state=='show')
	{
		vis.visibility = 'hidden';
		document.getElementById("image_plus").src = "images/plus.gif";
	}
	else
	{
		vis.visibility = 'visible';
		document.getElementById("image_plus").src = "images/minus.gif";
	}
	}
}

// empecher un formulaire d'etre soumis plusieurs fois
function disableForm(theform) {
	if (document.all || document.getElementById) {
		for (i = 0; i < theform.length; i++) {
			var tempobj = theform.elements[i];
			if (tempobj.type.toLowerCase() == "submit" || tempobj.type.toLowerCase() == "reset")
			tempobj.disabled = true;
		}
		return true;
	}
	else {
	alert("T'as 2 mains gauches ou quoi? pas besoin de cliquer 1000 fois pour soumettre ton commentaire :)");
	return false;
   }
}

function OpenCartePostale(theURL)
{
	w=window.open(theURL,"Fenetre","toolbar=no,menubar=no,location=no,scrollbars=no,resizable=yes,width=1200,height=815");
	MSIE=(navigator.appVersion.indexOf("MSIE")!=-1);
	VERS=parseInt(navigator.appVersion);
	if ((!MSIE) || (VERS >=5))
	w.focus();
}

function OpenW(theURL)
{
	w=window.open(theURL,"la_jolie_nouvelle_fenetre","toolbar=yes,menubar=yes,location=yes,scrollbars=yes,resizable=yes,width=1200,height=815");
	MSIE=(navigator.appVersion.indexOf("MSIE")!=-1);
	VERS=parseInt(navigator.appVersion);
	if ((!MSIE) || (VERS >=5))
	w.focus();
}
