function BrowserCheck() {
var b = navigator.appName;
if (b == "Netscape") this.b = "NS";
else if (b == "Microsoft Internet Explorer") this.b = "IE";
else this.b = b;
this.v = parseInt(navigator.appVersion);
this.NS = (this.b == "NS" && this.v>=4);
this.NS4 = (this.b == "NS" && this.v == 4);
this.NS5 = (this.b == "NS" && this.v == 5);
this.IE = (this.b == "IE" && this.v>=4);
this.IE4 = (navigator.userAgent.indexOf('MSIE 4')>0);
this.IE5 = (navigator.userAgent.indexOf('MSIE 5')>0);
if (this.IE5 || this.NS5) this.VER5 = true;
if (this.IE4 || this.NS4) this.VER4 = true;
this.OLD = (! this.VER5 && ! this.VER4) ? true : false;
this.min = (this.NS||this.IE);
}
is = new BrowserCheck();
alertBox = (is.VER5) ? document.getElementById("alertLayer").style
: (is.NS) ? document.layers["alertLayer"]
: document.all["alertLayer"].style;

function hideAlert(){
alertBox.visibility = "hidden";}


function makeAlert(aTitle,aMessage,aTitleEvent,aPicture,aPresenter,aSponsor,aContactName,aContactEmail,aContactPhone,aWebsite,aExtra){
document.all.alertLayer.innerHTML = "<table border=0 width='100%' height='10%' bgcolor='#005EFB'>" +
"<tr height='25'><td background='../pics/textu1.gif' colspan=4 align=center class=alertTitle><font color=black>" + " " + aTitle + "</td></tr>" +
"<tr height='5'><td width=5 ></td></tr>" +
"<tr><td width=5 bgcolor='#005EFB'></td><td width=20 align=left bgcolor='black'><img src='pics/photos/"+aPicture+".jpg' width='"+fitt(150,250)+"' height='"+fitt(180,300)+"'></td><td background='../pics/textu2.JPG' align=left class=alertMessage>" +
"<table border='0'width='100%'><tr><td bgcolor='#005EFB' align=center class=alertTitulo>"+aTitleEvent+"<br>"+aPresenter+
"</td></tr><tr><td   height='10%' align=left class=alertMessage> &nbsp;&nbsp;&nbsp;&nbsp;<b>Field of Interest:<br></b> &nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"+aMessage+"<br><tr><td background='../pics/textu2.JPG' align=right class=alertExtra><p align=right><br><br><br> Office Number &nbsp;"+ aSponsor+
"<br>"+aContactName+"  "+ aContactEmail+"<br></b> Phone Number (805) "+aContactPhone+" <br>"+aWebsite+
"</p></b><font color=black>"+ aExtra +"</td></tr> </table></td></tr> "+
"<tr><td width=5 bgcolor='#005EFB'></td><td  bgcolor='#005EFB' colspan=2 align=center> <input type=button value='OK' onClick='hideAlert()' class=okButton><BR></td><td bgcolor='#005EFB' width=5></td></tr>" +
"<tr height=1><td bgcolor='#005EFB' width=5></td></tr></table>";
thisText = aMessage.length;
if (aTitle.length > aMessage.length){ thisText = aTitle.length; }

aWidth = (thisText * 8) + 80;
aHeight = 20;
if (aWidth < 150){ aWidth = 800; }
if (aWidth > 149){ aWidth = 800; }
if (thisText > 60){ aHeight = 190; }
if (thisText > 120){ aHeight = 190; }
if (thisText > 180){ aHeight = 190; }
if (thisText > 240){ aHeight = 190; }
if (thisText > 300){ aHeight = 190; }
if (thisText > 360){ aHeight = 190; }
if (thisText > 420){ aHeight = 190; }
if (thisText > 490){ aHeight = 190; }
if (thisText > 550){ aHeight = 190; }
if (thisText > 610){ aHeight = 190; }

 var scrOfX = 0, scrOfY = 0;
  if( typeof( window.pageYOffset ) == 'number' ) {
    //Netscape compliant
    scrOfY = window.pageYOffset;
    scrOfX = window.pageXOffset;
  } else if( document.body && ( document.body.scrollLeft || document.body.scrollTop ) ) {
    //DOM compliant
    scrOfY = document.body.scrollTop;
    scrOfX = document.body.scrollLeft;
  } else if( document.documentElement && ( document.documentElement.scrollLeft || document.documentElement.scrollTop ) ) {
    //IE6 standards compliant mode
    scrOfY = document.documentElement.scrollTop;
    scrOfX = document.documentElement.scrollLeft;
  }
  
alertBox.width = fitt(400,700);
alertBox.height = 365;
alertBox.left = (document.body.clientWidth - fitt(.75,1)*aWidth)/2;
alertBox.top = scrOfY*.95 + (document.body.clientHeight - aHeight)/5;

alertBox.visibility = "visible";
}


