function showHeader(base)
{
	banrot();
  	document.writeln("<table border='0' cellpadding='0' cellspacing='0' width='760'><tr><td class='invisible'>");
}

function showPageHeader(base, title, subtitle)
{
  	document.writeln("<table border='0' cellpadding='1' cellspacing='0' width='760' bgcolor='#4682b4' align='center'><tr><td class='invisible'>");
	document.writeln("<table border='0' cellpadding='0' cellspacing='1' width='760' bgcolor='#D1D7DC'>");
	
	document.writeln("<tr><td class='invisible' colspan='3'>");
	banrot();
	document.writeln("</td></tr>");
	
	document.writeln("<tr>");
	document.writeln("<td width='140'><img src='" + base + "/Photos/logo_seat.gif' border='0'></td>");
	document.writeln("<td width='530'>");
	document.writeln("<div align='center' class='title'>" + title + "</div>");
	document.writeln("<div align='center' class='subtitle'>" + subtitle + "</div>");
	document.writeln("</td>");
	document.writeln("<td width='100'><div align='right'><img src='" + base + "/Photos/logo_seat.gif' border='0'></div></td>");
	document.writeln("</tr>");
	
	document.writeln("<tr height='30'>");
	document.writeln("<td class='titlemenu' height='30' colspan='3'>");
	document.writeln("| <a href='" + base + "/index.php'>Home</a> ");
	document.writeln("| <a href='" + base + "/forum/index.php'>Forums</a> ");
	document.writeln("| <a href='" + base + "/tuning/bodykits/index.html'>Tuning</a> ");
	document.writeln("| <a href='" + base + "/dossier/'>Dossier</a> ");
	document.writeln("| <a href='" + base + "/astuce/'>Astuces</a> ");
	document.writeln("| <a href='" + base + "/atelier/'>Atelier</a> ");
	document.writeln("| <a href='" + base + "/galerie/index.html'>Galerie</a> ");
	document.writeln("| <a href='" + base + "/goodies/'>Videos</a> ");
	document.writeln("| <a href='" + base + "/liens/'>Liens</a> ");
	document.writeln("| <a href='" + base + "/zonemembre/'>Zone membre</a> ");
	document.writeln("| <a href='" + base + "/tuning/cuprakits'>Kit Cupra R et FR</a> ");
	document.writeln("| <a href='" + base + "/shop/'>Le shop</a> ");
	document.writeln("| <a href='" + base + "/flyer.html'>Flyer</a> ");
	document.writeln("|</td></tr>");
	
	document.writeln("<tr><td colspan='3'>");
}

function showPageFooter(base)
{
	document.writeln("<div align='center'>");
	document.writeln("<a href='#top'><img src='" + base + "/Photos/fleche_top.gif' border='0'></a>");
	document.writeln("</div>");
    
	document.writeln("<table border='0' cellpadding='0' cellspacing='0' width='760'>");
	document.writeln("<tr>");
	document.writeln("<td class='footer' valign='bottom'><a href='http://www.leon-concept.com/contact.php'>Contact</a> Copyright leon-concept.com 2003 | Version 3.00 | Site non officiel de la marque SEAT |</td>");
	document.writeln("</tr>");
	document.writeln("</table>");
	
	document.writeln("</td></tr></table>");
	document.writeln("</td></tr></table>");
}

function popupImg(img, width, height)
{
	w=open("","image","width="+width+",height="+height+",toolbar=no,scrollbars=yes,resizable=yes");
	w.document.write("<HTML><HEAD><TITLE>"+img+"</TITLE></HEAD>");
	w.document.write("<BODY leftMargin=0 topMargin=0 marginwidth=0 marginheight=0>");
	w.document.write("<IMG src='"+img+"' border=0>");
	w.document.write("</BODY></HTML>");
	w.document.close();
}

function Popuppostit()
{
	window.open("postit.html","postit","width=250, height=600, toolbars=no, scrollbars=yes");
}

function popupPage(page, width)
{
	window.open("carte.php","width="+width+", height=600, toolbars=no, scrollbars=yes");
}
function banrot()
{
	var nb_banniere = 6;//Nombre de bannière en rotation
	var now = new Date()
	var sec = now.getSeconds()
	var ad = sec % nb_banniere;
	ad +=1;
	
	if (ad==1)
	{
		banner="http://www.leon-concept.com/Photos/leon-concept_ban1.jpg";//URL DE LA BANNIERE
		width="760";//LARGEUR DE LA BANNIERE
		height="100";//HAUTEUR DE LA BANNIERE
	}
	if (ad==2)
	{
		banner="http://www.leon-concept.com/Photos/new_logo_site2.jpg";
		width="760";
		height="100";
	}
	if (ad==3)
	{
		banner="http://www.leon-concept.com/Photos/leon-concept_ban2.gif";
		width="760";
		height="100";
	}
	if (ad==4)
	{
		banner="http://www.leon-concept.com/Photos/leon-concept_ban3.gif";
		width="760";
		height="100";
	}
	if (ad==5)
	{
		banner="http://www.leon-concept.com/Photos/leon-concept_ban4.gif";
		width="760";
		height="100";
	}
	if (ad==6)
	{
		banner="http://www.leon-concept.com/Photos/leonconcept1-img780x100.jpg";
		width="760";
		height="100";
	}

	document.write("<div align='center'>");
	document.write("<a href='http://www.leon-concept.com/'>");
	document.write("<img src='" + banner + "' width=" + width + " height=" + height + ">");
	document.write("</a>");
	document.write("<br><img alt='' border='0' height='10'><br>");
	document.write("</div>");
}

function OuvrePopup()
{
	// Vérifie que le cookie "pop1fois" n'est pas présent
	if (GetCookie("pop1fois")==null)
	{
		// Paramétrez ici le mode d'affichage du popup
		window.open("popmaj.html","pop1fois","width=330, height=240, toolbars=no, scrollbars=no");
		
		// Enregistre le cookie pour une durée de 24 heures
		var pathname=location.pathname;
		var myDomain=pathname.substring(0,pathname.lastIndexOf('/')) +'/';
		var date_exp = new Date();
		date_exp.setTime(date_exp.getTime()+(24*3600*1000)); // 24 heures
		SetCookie("pop1fois","ok",date_exp,myDomain);
	}
}

function SetCookie (name, value)
{
	var argv=SetCookie.arguments;
	var argc=SetCookie.arguments.length;
	var expires=(argc > 2) ? argv[2] : null;
	var path=(argc > 3) ? argv[3] : null;
	var domain=(argc > 4) ? argv[4] : null;
	var secure=(argc > 5) ? argv[5] : false;
	document.cookie=name+"="+escape(value)+
		((expires==null) ? "" : ("; expires="+expires.toGMTString()))+
		((path==null) ? "" : ("; path="+path))+
		((domain==null) ? "" : ("; domain="+domain))+
		((secure==true) ? "; secure" : "");
}

function getCookieVal(offset)
{
	var endstr=document.cookie.indexOf (";", offset);
	if (endstr==-1)
		endstr=document.cookie.length;
	return unescape(document.cookie.substring(offset, endstr));
}

function GetCookie (name)
{
	var arg=name+"=";
	var alen=arg.length;
	var clen=document.cookie.length;
	var i=0;
	while (i<clen)
	{
		var j=i+alen;
		if (document.cookie.substring(i, j)==arg)
			return getCookieVal (j);
		i=document.cookie.indexOf(" ",i)+1;
		if (i==0) break;
	}
	return null;
}

function AjoutFavo()
{
	if ((navigator.appName.indexOf("Microsoft",0)>=0) && (parseInt(navigator.appVersion)>=4))
	{
			window.external.AddFavorite("http://www.leon-concept.com","Leon concept.com" );
	}
	else
	{
			alert("Cette fonction n'est proposée que par Internet Explorer 4+")
	}
}

