var userAgent = navigator.userAgent; var bName, bVer, pos; if (userAgent.indexOf('Opera')!=-1) bName='Opera'; else if (userAgent.indexOf('Firefox')!=-1) bName='Firefox'; else if ((navigator.appName).indexOf('Microsoft')!=-1) bName='IE'; else if (userAgent.indexOf('Safari') != -1 || (navigator.vendor == 'Apple Computer, Inc.')) bName='Safari'; else if (navigator.appName=='Netscape') bName='Netscape'; else if (userAgent.indexOf('Mozilla')!=-1) bName='Mozilla'; bName=Trim(bName); pos = userAgent.indexOf('MSIE'); if (pos!=-1){ bVer = userAgent.substring(pos + 5); pos = bVer.indexOf(';'); bVer = bVer.substring(0,pos); } if (bName=='Opera'){ pos = userAgent.indexOf('Opera'); bVer = userAgent.substring(pos + 6); pos = bVer.indexOf(' '); bVer = bVer.substring(0, 1); } if (bName == 'Netscape' || bName=='Firefox' || bName=='Mozilla'){ bVer = userAgent.substring(8); pos = bVer.indexOf(' '); bVer = bVer.substring(0, pos); } if (bName=='Safari'){ bVer=navigator.appVersion; pos = bVer.indexOf('Version/'); bVer = bVer.substring(pos+8, pos+11); } if (bName == 'Netscape' && parseInt(navigator.appVersion) >= 5){ pos = userAgent.lastIndexOf('/'); bVer = userAgent.substring(pos + 1); } var rotateBanners = false; if (bName=='Netscape' && bVer<7){ document.close(); document.location.href = '/tiptop/invalid_browser.asp?TTJREDIRECT=1'; } else if (bName=='IE'){ if (bVer<5){ if (userAgent.indexOf('Windows CE')==-1){ document.location.href = '/tiptop/invalid_browser.asp?TTJREDIRECT=1';} } else {rotateBanners = true;} } function open_newwindow(sURL,winheight,winwidth){ var winleft = (screen.width - winwidth) / 2; var wintop = (screen.height - winheight) / 2; var winprops = 'scrollbars=yes,toolbar=no,status=yes,resizable=yes,height=' + winheight + ',width=' + winwidth + ',top=' + wintop + ',left=' + winleft; var new_win = window.open(sURL,'new_win',winprops); if (new_win!=null){ if (window.focus) {new_win.focus()} } else{ alert('You may have popup blocking enabled,\n please disable it and try again.') } return false; } function add_bookmark(){ if ((navigator.appVersion.indexOf('MSIE') > 0) && (parseInt(navigator.appVersion) >= 4)){ window.external.AddFavorite(location.href,document.title); } else { var msg = 'For ease don\'t forget to Bookmark us!'; if(navigator.appName == 'Netscape') msg += ' (Use CTRL-D)'; sendMessage ('Bookmark Us..', msg, 50); } } function findObj(n, d) { var p,i,x; if(!d){d=document;} if((p=n.indexOf('?'))>0&&parent.frames.length){d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);} if(!(x=d[n])&&d.all){x=d.all[n];} for (i=0;!x&&i