var detect=navigator.userAgent.toLowerCase();
var OS,browser,version,total,thestring;
function getBrowserInfo(){
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(_1){
place=detect.indexOf(_1)+1;
thestring=_1;
return place;
}
Event.observe(window,"load",getBrowserInfo,false);
Event.observe(window,"unload",Event.unloadCache,false);
var lightbox=Class.create();
lightbox.prototype={yPos:0,xPos:0,el:null,initialize:function(){
},setElement:function(el){
this.el=el;
},getElement:function(){
return this.el;
},activate:function(){
if(browser=="Internet Explorer"){
this.getScroll();
this.prepareIE("100%","hidden");
this.setScroll(0,0);
this.hideSelects("hidden");
}
this.displayLightbox();
},prepareIE:function(_3,_4){
bod=document.getElementsByTagName("body")[0];
bod.style.height=_3;
bod.style.overflow=_4;
htm=document.getElementsByTagName("html")[0];
htm.style.height=_3;
htm.style.overflow=_4;
},hideSelects:function(_5){
selects=document.getElementsByTagName("select");
for(i=0;i<selects.length;i++){
selects[i].style.visibility=_5;
}
},getScroll:function(){
if(self.pageYOffset){
this.yPos=self.pageYOffset;
}else{
if(document.documentElement&&document.documentElement.scrollTop){
this.yPos=document.documentElement.scrollTop;
}else{
if(document.body){
this.yPos=document.body.scrollTop;
}
}
}
},setScroll:function(x,y){
window.scrollTo(x,y);
},displayLightbox:function(){
$("overlay").style.display="block";
$("lightbox").style.display="block";
insertFirst(this.el,$("lbContent"));
},hideLightbox:function(){
$("lightbox").style.display="none";
$("overlay").style.display="none";
},deactivate:function(){
if(this.el&&this.el.parentNode&&this.el.parentNode==$("lbContent")){
this.el.parentNode.removeChild(this.el);
}
if(browser=="Internet Explorer"){
this.setScroll(0,this.yPos);
this.prepareIE("auto","auto");
this.hideSelects("visible");
}
this.hideLightbox();
}};

