﻿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('firefox')) browser = "Firefox"
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;
}


var isIE  = (navigator.appVersion.indexOf("MSIE") != -1) ? true : false;
var isWin = (navigator.appVersion.toLowerCase().indexOf("win") != -1) ? true : false;
var isOpera = (navigator.userAgent.indexOf("Opera") != -1) ? true : false;

function popupform(myform, windowname,height,width) {
    if (! window.focus)return true;
    if (!height) height = 120;
    if (!width) width = 400;
    leftVal = (screen.width - width) / 2;
    topVal = (screen.height - height) / 2;
    window.open('', windowname, 'height='+height+',width='+width+',left='+leftVal+',top='+topVal+',scrollbars=no');
    myform.target=windowname;
    return true;
}

function hl(img) {
    img.src = img.src.substr(0, img.src.length-4)+' over.jpg';
}

function uhl(img) {
    img.src = img.src.substr(0, img.src.length-11)+'.jpg';
}