function showme(id, id2 )
{
	document.getElementById(id).style.display='block';
	if (id2) {
		document.getElementById(id2).style.display='block';
	}
	
}
function hideme(id, id2)
{
	document.getElementById(id).style.display='none';
	if (id2) {
		document.getElementById(id2).style.display='none';
	}
}



/*fonction cherher*/
function clearField(thisfield, defaulttext) {
if (thisfield.value == defaulttext) {
thisfield.value = "";
}
}

function resetField(thisfield, defaulttext) {
if (thisfield.value == "") {
thisfield.value = defaulttext;
}
}

/*fonction sugest*/
function dell_sugest() {


	document.getElementById('return_sugest').style.display = "none";
	//document.getElementById('return_sugest').innerHTML = '';

}

//Chargement des images

            xajax.loadingFunction = 
                function(){
				xajax.$('loadingMessage').style.display='block';
				xajax.$('big_pic').style.display='none';
				
				
				};
            function hideLoadingMessage()
            {
                xajax.$('loadingMessage').style.display = 'none';
				 xajax.$('big_pic').style.display = 'block';
            }
            xajax.doneLoadingFunction = hideLoadingMessage;



//Afficher sous galerie
function Show_sous_gal() {
		var l = $('montre_gal');
		//var fx = new Fx.Style(l, 'height', {duration: 100,transition: Fx.Transitions.Quad.easeOut});

		if(l.style.display == 'none')  {
	
				l.style.display = 'block';
				$('show_lien').toggleClass('SG_show');
				$('show_lien').toggleClass('SG_hidden');
				
				
		}
		else {
				l.style.display = 'none';
				$('show_lien').toggleClass('SG_hidden');
				$('show_lien').toggleClass('SG_show');
	
		}
}			


//Montre avertissement
function S_visite() {

	$('S_cadre').remove()
//$('S_sensible').remove()

	var box = $('S_sensible');
	var fx = box.effects({duration: 1000, transition: Fx.Transitions.Quart.easeOut});
	fx.start({'opacity': 0 } )









}



function Insert_Message_1(id) {

new Element('div').setProperty('id', 'S_sensible').injectInside(document.body);

new Element('div').setProperty('id', 'S_cadre').injectInside(document.body);
new Element('div').setProperty('id', 'S_titre').injectInside('S_cadre');
new Element('div').setProperty('id', 'S_message').injectInside('S_cadre');

$('S_titre').setHTML('Attention, galerie sensible')




	var box = $('S_sensible');
	var fx = box.effects({duration: 2000, transition: Fx.Transitions.Quart.easeOut});
	fx.start({'opacity': 0.9} )





if (id==1) {
	var cat="catégories";
	var cat2="galeries";
}
else {
	var cat="galerie";
	var cat2="photos";
}



$('S_message').setHTML('<p>Cette '+cat+' est considéré comme <strong>sensible</strong>, aux yeux des plus jeunes Internaute ou aux personnes sensible, c\'est pourquoi <strong>Photos-Mania.fr</strong>, vous met en garde sur les '+cat2+' suivantes</p><p>Si vous désirez visitez cette '+cat2+', vous devez avoir plus de <strong>16 ans</strong>, et cliquer sur \"<strong>ENTRER</strong>\", ou bien vous devez quiter cette page en cliquant sur \"<strong>SORTIR</strong>\"</p><br /><div align=\"center\"><a href=\"#\" onclick=\"S_visite()\">Entrer</a> <a href=\"photos-somimage.html\">Sortir</a></div><br /><div align=\"right\"><i>L\'équipe de Photos-Mania.fr</i></div> ')
}









	function documentClick(e)
	{
		if (navigator.userAgent.indexOf('MSIE') >= 0)
		{
			// Internet Explorer used an non standard way to get the object that raised an event
			tagName = event.srcElement.id;
		}
		else
		{
			// Standard way to get the object that raised an event
			tagName = e.target.id;
		}
		
		// If the object that raised the click is not the drop down button (type 2) nor the list of choices, then the choice list should disappear
		if (tagName != 'search_gal')
		{
			document.getElementById('return_sugest').style.display= 'none';
		}
	}

