//version 1.2
//Script for Cookson CLAL
//info@abc.fr



function getBrowserVersion()
{
	var browser = getBrowserName();
	var version = 0;
	var s = 0;
	var e = 0;
	var appVer  = navigator.appVersion;
	if (browser == "Netscape")
	{
		s = appVer.indexOf(" ",0);
		version = eval(appVer.substring(0,s));
		if (version >= 5) version++;
	}
	if (browser == "Explorer")
	{
		appVer  = navigator.userAgent;
		s = appVer.indexOf("MSIE ",0) + 5;
		e = appVer.indexOf(";",s);
		version = eval(appVer.substring(s,e));
	}
	if (browser == "Dreampassport")
	{
		s = appVer.indexOf("/",0)+1;
		e = appVer.indexOf(")",s);
		version = eval(appVer.substring(s,e));
	}
	return version;
}


function getBrowserName()
{
    var aName  = navigator.appName.toUpperCase();
    var uName  = navigator.userAgent.toUpperCase();
	if (uName.indexOf("DREAMPASSPORT") >= 0)	return "Dreampassport";
	else if (uName.indexOf("SAFARI") >= 0)	return "Safari";
	else if (aName.indexOf("ICA") >= 0)	return "iCab";
	else if (uName.indexOf("GECKO") >= 0)	return "Mozilla";
	else if (uName.indexOf("OPERA") >= 0)	return "Opera";
	else if (aName.indexOf("NETSCAPE") >= 0)	return "Netscape";
	else if (aName.indexOf("MICROSOFT") >= 0)	return "Explorer";
	else return "Unknown";
}


function makeStyleSheet()
{
var style = 0;
var styletype = 0;
var theAgent = navigator.userAgent;
browserName = navigator.appName;

if (theAgent.indexOf("Win") >= 0) styletype = ('winType')
if (theAgent.indexOf("Mac") >= 0) styletype = ('macType')
if (getBrowserVersion() >= 5 && getBrowserName() =="Explorer") styletype = ('ie5Type')
if (getBrowserVersion() <= 5 && getBrowserName() =="Netscape") styletype = ('NN4Type')
if (getBrowserVersion() >= 6 && getBrowserName() =="Netscape") styletype = ('geckoType')
if (getBrowserName() =="Safari" || getBrowserName() =="Opera") styletype = ('geckoType')
if (getBrowserName() =="Mozilla" || getBrowserName() =="iCab") styletype = ('geckoType')

if (styletype == "geckoType" || getBrowserVersion() == "Unknown") style = ('<STYLE TYPE="text/css"><!--BODY {font-family:Verdana;} SPAN, li, .contents {font-size:9pt; line-height:15.75pt; font-family:Verdana; text-align:justify;} .MENU1 {font-size:7pt; font-family:Verdana;} .L1 {font-size:7pt; line-height:12pt; font-family:Verdana;} .L2 {font-size:8pt; line-height:12pt; font-family:Verdana;} .L3 {font-size:10pt; line-height:14pt;} .L4 {font-size:11pt; line-height:15.75pt;} .L5 {font-size:12pt; line-height:15.75pt;} .L6 {font-size:14pt; line-height:15.75pt;} .copyright {font-size:8pt; font-family:Verdana;} .titre1 {font-size:30pt; font-family:Verdana;} .titre2 {font-size:18pt; font-family:Verdana; color:#0CB143; font-weight:800;}--></STYLE>');

if (styletype == "winType" || styletype == "ie5Type") style = ('<STYLE TYPE="text/css"><!--BODY {font-family:Verdana;} SPAN, li, .contents {font-size:9pt; line-height:16pt; font-family:Verdana; text-align:justify;} .MENU1 {font-size:7pt; font-family:Verdana;} .L1 {font-size:7pt; line-height:12pt; font-family:Verdana;} .L2 {font-size:8pt; line-height:12pt; font-family:Verdana;} .L3 {font-size:10pt; line-height:14pt;} .L4 {font-size:11pt; line-height:16pt;} .L5 {font-size:12pt; line-height:16pt;} .L6 {font-size:14pt; line-height:16pt;} .copyright {font-size:8pt; font-family:Verdana;} .titre1 {font-size:30pt; font-family:Verdana;} .titre2 {font-size:18pt; font-family:Verdana; color:#0CB143; font-weight:800;}--></STYLE>');

if (styletype == "macType" || styletype == "NN4Type") style = ('<STYLE TYPE="text/css"><!--BODY {font-family:Verdana;} SPAN, li, .contents {line-height:21pt; font-family:Verdana; text-align:justify;} .MENU1 {font-size:9pt; font-family:Verdana;} .L1 {font-size:9pt; line-height:16pt;} .L2 {font-size:10pt; line-height:17pt; font-family:Verdana;} .L3 {font-size:12pt; line-height:19pt;} .L4 {font-size:14pt;line-height:21pt;} .L5 {font-size:16pt;line-height:21pt;} .L6 {font-size:18pt;line-height:21pt;} .copyright {font-size:10pt; font-family:Verdana;} .titre1 {font-size:36pt; font-family:Verdana;} .titre2 {font-size:24pt; font-family:Verdana; color:#0CB143; font-weight:800;}--></STYLE>');

return style;
}



function OpenPhoto(fileN) {
window.open(fileN,'mado',"toolbar=0,location=0,directories=0,scrollbars=yes,status=0,menubar=0,width=740,height=600,scrollbars=auto,resizable=yes,alwaysRaised");
}

function OpenWin(picN,Fwin,picSize) {
	var info = ',"toolbar=0,menubar=0,location=0,directories=0,status=1,' + picSize + ',scrollbars=yes,resizable=yes,alwaysRaised"';
	window.open(picN,Fwin,info);
}
