<!--
	// gestion des textes dans les "input text"
	function clearinput(txt,ctrl)
	{
		if(ctrl.value==txt) ctrl.value = "";
	}
	function restoreinput(ctrl)
	{
			if(ctrl.value=="") ctrl.form.reset();
	}


	// gestion des bookmarks

	function addBookmark(title,url) {
	  if (window.sidebar)
	  {
	  	// firefox et netscape...
	    window.sidebar.addPanel(title, url,"");
	  }
	  else if( document.all )
	  {
	  	// ie et autres...
	    window.external.AddFavorite( url, title);
	  }
	  else
	  {
	    return false;
	  }
	}

	function ajouter_aux_favoris()
	{
		addBookmark('MagicRécré.com','<%=host_name%>');
	}


	function style_souligne(i,oui_non)
	{
		i.style.textDecoration = oui_non ? "underline" : "none";
	}


	function enregistre_clic(campagne,emplacement)
	{
		clic_img = new Image();
		clic_img.src = "http://www.magicmaman.com/clic.asp?emplacement=" + escape(emplacement) + "&campagne=" + escape(campagne);
		return;
	}


	var modification_timer_adlayerhider = 0;	// utilisé pour avoir une "rallonge" de X secondes
	function adlayerhider()
	{
		if(modification_timer_adlayerhider>0)
		{
			modification_timer_adlayerhider = 0;
			setTimeout('adlayerhider()',modification_timer_adlayerhider*1000);
		}
		else
		{
			var monid = document.getElementById('flashtransparent');
			if(monid) monid.style.display = 'none';
		}
	}
	setTimeout('adlayerhider()',15000);


	function envoyer_la_page_a_un_ami()
	{
		var wlh = window.location.href;
		ouvrir_popup_centree( "send",400,400,"<%=host_name%>envoyerpage.asp?url="+escape(wlh) );
	}

	function ouvrir_popup_centree()
	{
		var nom = arguments[0];
		var larg = arguments[1];
		var haut = arguments[2];
		var url = "";
		if(arguments.length==4) url = arguments[3];

		var wh = window.open(url,nom,'width='+ larg +',height='+ haut +',location=0,resize=1,scrollbars=auto');
		var x = screen.width;
		var y = screen.height;
		wh.moveTo( (x-larg)/2,(y-haut)/2 );
		wh.focus();
		return(wh);
	}


	function zelflink(uld, cib)
	{
		var l = uld.split("|").join("/").split("@").join(".");
		if(l.charAt(0)=='#') l = l.substring(1,l.length);
		if(cib == "target=_blank" || cib == "_blank")
		   window.open(l);
		else
		{
		   if(cib==undefined || cib=="") window.location.href=l;
		   else
		   {
		    cib = cib.toLowerCase();
		    if(cib.indexOf("target=")>=0) cib = cib.split("target=").join("target=");
		    if(cib.indexOf('"')>=0) cib = cib.split('"').join('');
		   	window.open(l,cib);
		   }
		}
	}

	function mkl(texte, url, classe, cible, titre_ou_onclick)
	{
		document.write("<"+"a ");
		if(classe!="" && classe!=undefined ) document.write(" class=\""+ classe +"\" ");
		if(titre_ou_onclick!="" && titre_ou_onclick!=undefined ) document.write(" "+ titre_ou_onclick + " ");
		document.write(" href=\"javascript:zelflink('#"+ url +"','" + (cible==undefined ? "" : cible) + "');\">"+ texte +"<"+"/"+"a"+">");
	}


	// http://www.magic-recre.com/envoyerpage.asp?url=http%3A%2F%2Fwww%2Emagic%2Drecre%2Ecom%2Fquiz%2Cles%2Druses%2Dde%2Drenard%2Cquiz1389%2C21168%2C1
	function mkl_rwt(texte, url, classe, cible, titre_ou_onclick)
	{
		var tag = 'a';
		var chevron = '<';

		var vraie_url = "javascript:zelflink('";
		vraie_url += url.split("/").join("|").split(".").join("@");
		vraie_url += "','";
		if(cible!=undefined) vraie_url += cible;
		vraie_url += "')";

		document.write(chevron + tag +' ');
		if(classe!="" && classe!=undefined ) document.write(" class=\""+ classe +"\" ");
		if(titre_ou_onclick!="" && titre_ou_onclick!=undefined ) document.write(" "+ titre_ou_onclick + " ");
		document.write( ' href="' );
		document.write( url );
		document.write( '"' );
		document.write( '>'+ texte + chevron +'/'+ tag +'>' );
	}


	function xt_clic(typecl,page,url,nvlle)
	{
		hsh = new Date();
		hsd = document;
		hsr = hsd.referrer.replace(/[<>]/g, '');
		xt_img = new Image();
		hsi = 'http://logp.xiti.com/hit.xiti?s=15568';
		hsi += '&p='+page+'&clic='+typecl+'&hl=' + hsh.getHours() + 'x' + hsh.getMinutes() + 'x' + hsh.getSeconds();
		if(parseFloat(navigator.appVersion)>=4)
		{
			Xiti_s=screen;
			hsi += '&r=' + Xiti_s.width + 'x' + Xiti_s.height + 'x' + Xiti_s.pixelDepth + 'x' + Xiti_s.colorDepth;
		}
		hsi += '&ref=' + hsr.replace(/&/g, '$');
		xt_img.src = hsi;
		if (url != null)
			{
				if( nvlle=='' || nvlle==null ) hsd.location = url;
				else
					{
					xfen = window.open(url,'xfen','');
					xfen.focus();
					}
			}
		else
		return;
	}

function boutique_nohref(gnrid,emp,lien1,img1,lien2,nom_lien2,lien3,nom_lien3,lien4,nom_lien4,lien5)
{

var js_a_onclick = '<A onclick="enregistre_clic('+gnrid+','+emp+')" target="_blank" ';
if(""+gnrid=="0" && ""+emp=="0") js_a_onclick = '<A target="_blank" ';
var js_image = js_a_onclick+ 'href="'+lien1+'"><IMG style="background:url('+img1+') no-repeat;margin-right:1px;padding-right:1px;" src="http://www.magicmaman.com/reloaded/50x50.gif" border=0 align="left"></A>';
var js_titre = js_a_onclick+ 'href="'+lien2+'" class="ccal1_boutique">'+nom_lien2+'</A>';
var js_prix = js_a_onclick+ 'href="'+lien4+'" class="ccal3_boutique">'+nom_lien4+'</A>';
var js_caddy = '<A target="_blank" class="zl2_boutique" href="'+lien5+'"><img src="http://www.magicmaman.com/shim.gif" border=0 class="puce_shopping"></A>';
var js_texte = js_a_onclick+ 'href="'+lien3+'" class="ccal2_boutique">'+nom_lien3+'</A>';

var js = 	'<table style="width:140px; height:85px; padding:0; margin:0; border:0;">'+

			'<tr>'+
			'<td colspan="2" style="text-align:left;vertical-align:top;white-space:nowrap;">'+js_titre+'</td>'+
			'</tr>'+

			'<tr>'+
			'<td colspan="2" style="text-align:left;vertical-align:top;"><span>'+js_image+' '+js_prix+'<br/>&nbsp;</span>'+
			'<span>'+js_texte+'</span></td>'+
			'</tr>'+

			'</table>';
/*
			'<tr>'+
			'<td style="width: 50px; height: 50px;">'+js_image+'</td>'+
			'<td style="text-align:left;vertical-align:top; height: 25px;">'+js_prix+'</td>'+
			'</tr>'+

			'<tr>'+
			'<td colspan="2"  style="text-align:left;vertical-align:top;">'+js_texte+'</td>'+
			'</tr>'+
*/

document.write(js);

}


function boutique_nohref1024(gnrid,emp,lien1,img1,lien2,nom_lien2,lien3,nom_lien3,lien4,nom_lien4,lien5)
{
boutique_nohref(gnrid,emp,lien1,img1,lien2,nom_lien2,lien3,nom_lien3,lien4,nom_lien4,lien5);
}

function mkl2(texte, url, classe, cible, onclick)
{
	document.write("<"+"A ");
	if(classe!="") document.write(" class=\""+ classe +"\" ");
	if(cible!="" && cible!=undefined ) document.write(" target=\""+ cible +"\" ");
	if(onclick!="") document.write(" onclick=\""+ onclick +"\" ");
	document.write(" href=\""+ url +"\">"+ texte +"<"+"/"+"A"+">");
}

//-->