var os = new Array(3);
os[0] = /Mac/;
os[1] = /Win/;
os[2] = /Linux/;

var brows = new Array(5);
brows[0] = /Firefox/;
brows[1] = /MSIE/;
brows[2] = /Netscape/;
brows[3] = /Opera/;
var browsertype = navigator.userAgent;

for (i=0; i < 2; i++) {
if (os[i].test(''+browsertype+'') == true) {
for (g=0; g < 3; g++) {
if (brows[g].test(''+browsertype+'') == true) {
if ((i==0)&&(g==0)) {
// Mac + Firefox
document.write("Welcome Macintosh user browsing with Firefox");
}
if ((i==0)&&(g==1)) {
// Mac + MSIE
document.write("Welcome Macintosh user browsing with Internet Explorer");
}
if ((i==0)&&(g==2)) {
// Mac + Netscape
document.write("Welcome Macintosh user browsing with Netscape");
}
if ((i==0)&&(g==3)) {
// Mac + Opera
document.write("Welcome Macintosh user browsing with Opera");
}
if ((i==1)&&(g==0)) {
// Windows + Firefox
document.write("Welcome Windows user browsing with Firefox");
}
if ((i==1)&&(g==1)) {
// Windows + MSIE
document.write("Welcome Windows user browsing with Internet Explorer");
}
if ((i==1)&&(g==2)) {
// Windows + Netscape
document.write("Welcome Windows user browsing with Netscape");
}
if ((i==1)&&(g==3)) {
// Windows + Opera
document.write("Welcome Windows user browsing with Opera");
}
}
}
}
}
document.write("<p>&nbsp;</p>Please note the links above are there to demonstrate cross platform JavaScript-CSS centered DHTML web site design. Check the functions by resizing this window and watch the elements align correctly. <b>All links go to the home page.</b>");
