// Phil's Browsercheck
// Based on Browsercheck - Copyright (C) 1999 Dan Steinman
// Distributed under the terms of the GNU Library General Public License
// Available at http://www.dansteinman.com/dynduo/

function myBrowserCheck() {
	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.ns5 = (this.b=="ns" && this.v==5)
	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)
	this.mac = (navigator.appVersion.indexOf('Mac') !=-1)? true:false
	this.pc = (this.mac)? false:true
	this.iemac = (this.mac && this.ie)
	this.iepc = (this.pc && this.ie)
	this.nsmac = (this.ns && this.mac)
	this.nspc = (this.ns && this.pc)
}
// automatically create the "is" object
is = new myBrowserCheck();

function explication(message) {
	window.status=message;
	return true;
}
function idlemessage(text) {
	window.defaultStatus=text;
	return true;
}
function handleError(txt, URL, line) {
// for some unknown reason, NS4 doesn't like frameset to be closed...
	if (txt != "illegal URL method 'bye.html'") {
		var reportURL = "http://perso.wanadoo.fr/phil/465ert786mlw91/form/ww3_form_bug.html";
		var bugText = "Anomalie%20JavaScript%20:%0D%0DPb%20:%20" + txt + "%0D%0DFichier%20:%20" + URL + "%0D%0DLigne%20:%20" + line;
		reportURL += "?jsbugmsg=" + bugText;
		alert("WebWoste - Un petit probleme JavaScript : \nMerci de signaler cette anomalie\n" + bugText + "\n-Phil");
		if (self.parent.frames.length != 0)
			{self.content.location = reportURL;
		} else {
			self.location = reportURL;
			}
	}
return true;
}

// Requires that your css files are named content_iemac.css, content_iepc.css, ...
// will be extended later to bottom also...
// Jan 2000 - doesn't work, is not called

function selectCSS(where) { 
if ((where == 'margin') || (where == 'content')) {
	var cssName = "";
	cssName += where;
	cssName += "_";
	if (is.iepc) {cssName += "iepc";}
	else if (is.iemac) {cssName += "iemac";}
	else if (is.nsmac) {cssName += "nsmac";}
	else if (is.nspc) {cssName += "nspc";}
	cssName += ".css";
}
   var t = "";
	t += "'<LINK REL=\"stylesheet\" TYPE=\"text/css\" HREF=\"css/";
	t += cssName + "\">')";
   return t;
}


window.onerror = top.handleError; //was en ligne 40 avant

