
// LIMITED Browser and Platform Detection

var agt=navigator.userAgent.toLowerCase();

var is_nav  = ((agt.indexOf('mozilla')!=-1) && (agt.indexOf('spoofer')==-1) 
                && (agt.indexOf('compatible') == -1) && (agt.indexOf('opera')==-1) 
                && (agt.indexOf('webtv')==-1));
var is_mac = (agt.indexOf("mac")!= -1);



//My script to set the base font number
if (is_nav && is_mac) //should be (is_nav && is_mac)
	{
	document.write("<link rel='stylesheet' href='scripts/mac.css'>");
	}
else
	{
	document.write("<link rel='stylesheet' href='scripts/win.css'>");
	}

	
IE = navigator.appName=="Microsoft Internet Explorer";
NS = navigator.appName=="Netscape";
bVer = parseInt(navigator.appVersion);

var newWin=null;

function popup1(loc, name, width, height) {
        var _params = "width="+width+",height="+height+",toolbar=no,location=no,status=no,menubar=no,scrollbars=yes,resizable=no";

        // CENTER ON BROWSERS WHICH SUPPORT JSCRIPT 1.2
        if (bVer >= 4) {
                 _left = ( (screen.width-width) >>1 );
                 _top = ( (screen.height-height) >>1 );
        } else {
                 _left = ( (800-width) >>1 );
                 _top = ( (600-height) >>1 );
        }

        if (IE) _params += ",top=" + _top + ",left=" + _left;
        else if (NS) _params += ",screenX=" + _left + ",screenY=" + _top;

        newWin = window.open(loc, name, _params);
        if ( newWin!=null && !(IE && bVer<5) )
                newWin.focus(); // MSIE4 DOESN'T FOCUS WINDOWS
}


IE = navigator.appName=="Microsoft Internet Explorer";
NS = navigator.appName=="Netscape";
bVer = parseInt(navigator.appVersion);

var newWin=null;

function popup2(loc, name, width, height) {
        var _params = "width="+width+",height="+height+",toolbar=no,location=no,status=no,menubar=yes,scrollbars=yes,resizable=yes";

        // CENTER ON BROWSERS WHICH SUPPORT JSCRIPT 1.2
        if (bVer >= 4) {
                 _left = 10;
                 _top = 10;
        } else {
                 _left = 10;
                 _top = 10;
        }

        if (IE) _params += ",top=" + _top + ",left=" + _left;
        else if (NS) _params += ",screenX=" + _left + ",screenY=" + _top;

        newWin = window.open(loc, name, _params);
        if ( newWin!=null && !(IE && bVer<5) )
                newWin.focus(); // MSIE4 DOESN'T FOCUS WINDOWS
}


var imgarray = new Array; var iptr = 0;
function PreLoadImg(isrc){
	imgarray[iptr] = new Image;
	imgarray[iptr].src = isrc;
	tr = iptr; iptr++; return tr;
}

function InitDoc(){
	x = PreLoadImg("images/nav_locations_off.gif");
	x = PreLoadImg("images/nav_locations_on.gif");
	x = PreLoadImg("images/nav_about_melissa_off.gif");
	x = PreLoadImg("images/nav_about_melissa_on.gif");
	x = PreLoadImg("images/nav_about_off.gif");
	x = PreLoadImg("images/nav_about_on.gif");
	x = PreLoadImg("images/nav_contact_off.gif");
	x = PreLoadImg("images/nav_contact_on.gif");
	x = PreLoadImg("images/nav_design_off.gif");
	x = PreLoadImg("images/nav_design_on.gif");
	x = PreLoadImg("images/nav_home_off.gif");
	x = PreLoadImg("images/nav_home_on.gif");
	x = PreLoadImg("images/nav_success_off.gif");
	x = PreLoadImg("images/nav_success_on.gif");
	
}


