function openDetail (nomPage, nomWin, valWidth, valHeight, xPos, yPos, valScroll) {
	if (browser == "Safari") valHeight += 24;
	myOpenWin = window.open(nomPage,nomWin,'width=' + valWidth + ', height=' + valHeight + ', left=' + xPos + ', top=' + yPos + ',resizable=no,toolbar=no,location=no,status=no,personalbar=no, scrollbars=' + valScroll);
	myOpenWin.moveTo(xPos, yPos);
	myOpenWin.resizeTo(valWidth, valHeight);
	myOpenWin.focus();
	}

function openWin (nomPage, nomWin, valWidth, valHeight,valScroll) {
	if (browser == "Safari") valHeight += 24;
//	alert(browser);
//	alert(valHeight);
	var indefini;
	if (myOpenWin != indefini) {
		if (!myOpenWin.closed) {
			myOpenWin.close();
		}
	}
	createWin(nomPage, nomWin, valWidth, valHeight, valScroll);
	myOpenWin.resizeTo(valWidth, valHeight);
	//myOpenWin.location.href = nomPage;
	myOpenWin.focus();
	}
	
function createEmptyWin (nomWin, valWidth, valHeight,valScroll) {
	myOpenWin = window.open('',nomWin,'width=' + valWidth + ', height=' + valHeight + ',resizable=no,toolbar=no,location=no,status=no,personalbar=no, scrollbars=' + valScroll);
	}
	
function createWin (nomPage, nomWin, valWidth, valHeight,valScroll) {
	myOpenWin = window.open(nomPage, nomWin,'width=' + valWidth + ', height=' + valHeight + ',resizable=no,toolbar=no,location=no,status=no,personalbar=no, scrollbars=' + valScroll);
	}

function winClose() {
	opener=self;
	self.close();
}


var detect = navigator.userAgent.toLowerCase();
var OS,browser,version,total,thestring;

if (checkIt('konqueror'))
{
        browser = "Konqueror";
        OS = "Linux";
}
else if (checkIt('safari')) browser = "Safari"
else if (checkIt('omniweb')) browser = "OmniWeb"
else if (checkIt('opera')) browser = "Opera"
else if (checkIt('webtv')) browser = "WebTV";
else if (checkIt('icab')) browser = "iCab"
else if (checkIt('msie')) browser = "Internet Explorer"
else if (!checkIt('compatible'))
{
        browser = "Netscape Navigator"
        version = detect.charAt(8);
}
else browser = "An unknown browser";

if (!version) version = detect.charAt(place + thestring.length);

if (!OS)
{
        if (checkIt('linux')) OS = "Linux";
        else if (checkIt('x11')) OS = "Unix";
        else if (checkIt('mac')) OS = "Mac"
        else if (checkIt('win')) OS = "Windows"
        else OS = "an unknown operating system";
}

function checkIt(string)
{
        place = detect.indexOf(string) + 1;
        thestring = string;
        return place;
}
