// vire les frames
if (window != top) top.location.href = location.href;

function BrowserCheck()
{
	var b = navigator.appName
	if (b=="Netscape") this.b = "ns"
	else if (b=="Microsoft Internet Explorer") this.b = "ie"
	else this.b = b
	this.v = parseInt(navigator.appVersion)
	this.ns = (this.b=="ns" && this.v>=4)
	this.ns4 = (this.b=="ns" && this.v==4)
	this.ns6 = (this.b=="ns" && this.v>4)
	this.ie = (this.b=="ie" && this.v>=4)
	this.ie4 = (navigator.userAgent.indexOf('MSIE 4')>0)
	this.ie5 = (navigator.userAgent.indexOf('MSIE 5')>0)
	if (this.ie5) this.v = 5
	this.min = (this.ns||this.ie)
}
// automatically create the "is" object
is = new BrowserCheck();
ie = (is.ie) ? 1 : 0;
ie4 = (is.ie4) ? 1 : 0;
ie5 = (is.ie5) ? 1 : 0;
ns = (is.ns) ? 1 : 0;
ns4 = (is.ns4) ? 1 : 0;
ns6 = (is.ns6) ? 1 : 0;
//alert ("Tu es un NS?" + ns + "\nTu es un IE?" + ie + "\n\nTu es ie4?"+ ie4 + "\nTu es ie5?"+ ie5 + "\ntu es ns4?" + ns4 + "\ntu es ns6?" + ns6);

var color0='white';
var color1='#608B9B';
var color2='#FF3300';
var largeur=130;

function write_menu(id,text,url)
{
    document.write("<div width='100%'\n");
	document.write("onMouseover=\"this.style.backgroundColor='#608B9B'; "+id+".style.color='white';\"\n");
    document.write("onMouseout=\"this.style.backgroundColor='transparent'; "+id+".style.color='#608B9B';\"\n");
	document.write("onClick=\"document.location='"+url+"'\">\n");
    document.write("<ilayer width=\"100%\" onclick=\"document.location='"+url+"'\">\n<layer width=\"100%\"\n");
    if (ns4)
    {	
    	document.write("onMouseover=\""+id+".visibility='show'\"\n");
    	document.write("onMouseout=\""+id+".visibility='hidden'\"");
		document.write("onclick=\"document.location='"+url+"'\"\n");
    }
    document.write(">&nbsp;&nbsp;&nbsp;&nbsp;<A HREF="+url+" id=\""+id+"\">");
	document.write(text+"</a>\n</layer>\n</ilayer>\n");
    if (ns4)
    {	
    	document.write("<ilayer width=\"100%\" id=\""+id+"\"\n");
		document.write("onload=\"this.visibility='hidden'\" bgcolor='#608B9B'>\n");
    	document.write("&nbsp;&nbsp;&nbsp;&nbsp;<A HREF=\""+url+"\"><font color=\"white\">");
		document.write(text + "</font></a></ilayer>\n");
    }
    document.write("</div>\n");
}

// ajoute aux favoris
function addFav()
{
    if(ie5)
    {
    	window.external.addFavorite("http://www.wap-dou-wap.com", "Wap-dou-wap.com - Le site du disque de collection");
    }
    else
    {
    	alert("Cette fonction n'est active que dans Internet Explorer v5.0 ...\n Tapez CTRL + D pour ajouter Wap-dou-wap.com dans vos favoris !");
    }
}

// met en home page
function addHome()
{
	//window.document.style.behavior='url(#default#homepage)';
	this.setHomePage('http://www.wap-dou-wap.com');
}
