//For FlashMenu
var mylink = {
		inicio : { url: "inicio.html"},
		contenido : { url: "sitios.html"},
		comisiones : { url: "comisiones.html"},
		pagos : { url: "pagos.html"},
		herramientas : { url: "herramientas.html"},
		nuestrared : { url: "nuestrared.html"},
		faq : { url: "preguntas.html"},
		actualidates : { url: "actualidades.html"},
		estadisticas : { url: "estadisticas.html"},
		foro : { url: "foro.html"},		
		afiliarse : { url: "afiliarse.html"},		
		contactos : { url: "contacto.html"}
	     };
	     
	     
function _g(param_name)
{
	qstring = window.location.search.substring(1);
	allparams = qstring.split('&');
	for (j=allparams.length-1; j>=0; j--)
	{
		couple = allparams[j];
		couple = couple.split('=');
		if (couple[0] == param_name) return couple[1];
	}
	return false;
}	     
	     
	     
function view(s)
{
	//alert (s);	
	var temp_url = mylink[s].url;
	if(!temp_url.match(/id=/)){
		var id = _g('id');
		if(id){
			temp_url += '?id='+id;
			mylink[s].url = temp_url;
		}
	}
	document.location.href = mylink[s].url;
}

//AddBookmark
function addBookmark(title,url) {
	if(window.sidebar) {
		window.sidebar.addPanel(title, url, "");
	} else if(document.all) {
		window.external.AddFavorite(url, title);
	} else {
		return true;
	}
}
//faqShow 
function onoff(calque) {
	for (i=1;i<20;i++) {
		var temp = "q"+i;
		if (temp != calque)
		{document.getElementById("q"+i).style.display="none";} }
	if (document.getElementById(calque).style.display=="none")
		{document.getElementById(calque).style.display=""; }
	else 
		{document.getElementById(calque).style.display="none"; }
	return false;
}
function showHide(val) {
	for (i=1;i<29;i++) {
		var temp = "s"+i;
		if (temp != val)
		{document.getElementById("s"+i).style.display="none";} }
	if (document.getElementById(val).style.display=="none")
		{document.getElementById(val).style.display=""; }
	else 
		{document.getElementById(val).style.display="none"; }
	return false;
}
//popup formulario de inscripcion
var mp;
function pop(url,lg) {
	if (id_kit) { url +='?idkit='+id_kit; }
	else if (id_webmaster) { url +='?parrain='+id_webmaster; }
	else { url +='?parrain='; }
	var left = (screen.width/2)-240; // On retire la moitié de 'width'
	var top = (screen.height/2)-185; // On retire la moitié de 'height'
	mp = window.open(url+'&lg='+lg,'mp','statutbar=no, width=480, height=370, left='+left+', top='+top+', menubar=no, resize=yes, scrollbars=yes');
	if (mp && mp.focus) mp.focus();
}