// JavaScript Document
function neonmessage(msg, base, neon, litespeed, waitspeed){
message=msg;
neonbasecolor=neon;
neontextcolor=base;
flashspeed=litespeed;  //in milliseconds
ws=0;
buffer="";
wsZERO=waitspeed;
///No need to edit below this line/////
n=0;
if (document.all||document.getElementById){
document.write('<font color="'+neonbasecolor+'">');
for (m=0;m<message.length;m++)
document.write('<span id="neonlight'+m+'">'+message.charAt(m)+'</span>');
document.write('</font>');
}
else
document.write(message);

beginneon();

}

function crossref(number){
var crossobj=document.all? eval("document.all.neonlight"+number) : document.getElementById("neonlight"+number);
return crossobj;
}

function neon(){
//Change all letters to base color
if (n==0){
for (m=0;m<message.length;m++)
//////eval("document.all.neonlight"+m).style.color=neonbasecolor
crossref(m).style.color=neonbasecolor;
}
//cycle through and change individual letters to neon color
crossref(n).style.color=neontextcolor;

if (n<message.length-1)n++;
else{
n=0;
clearInterval(flashing);
setTimeout("beginneon()",ws);
return;
}
}
function beginneon(){
if (document.all||document.getElementById)
flashing=setInterval("neon()",flashspeed);
buffer=neontextcolor;
neontextcolor=neonbasecolor;
neonbasecolor=buffer;
buffer=ws;
ws=wsZERO;
wsZERO=buffer;
}
////////////end of NEON code////
//BG changer//
function doBG(bg_img) {
  var todaydate = new Date();
  var timeis = todaydate.getTime();
  todaydate.setTime(timeis);
  var houris = todaydate.getHours();
  
  if (houris==1) ;
  if (houris==2) ;
  if (houris==3) ;
  if (houris==4) ;
  if (houris==5) ;
  if (houris==6) ;
  if (houris==7) ;
  if (houris==8) ;
  if (houris==9) ;
  if (houris==10) ;
  if (houris==11) ;
  if (houris==12) ;
  if (houris==13) ;
  if (houris==14) ;
  if (houris==15) ;
  if (houris==16) ;
  if (houris==17) ;
  if (houris==18) ;
  if (houris==19) ;
  if (houris==20) ;
  if (houris==21) ;
  if (houris==22) ;
  if (houris==23) ;
  if (houris==24) ;
}


//END BG CHANGER//
////////////begin GREETING code//
function greet() {
  var todaydate = new Date();
  var timeis = todaydate.getTime();
  todaydate.setTime(timeis);
  var houris = todaydate.getHours();
  if (houris > 17) display = "Evening.";
  else if (houris >12) display = "Afternoon.";
  else display = "Morning.";
  
  if (houris==1) ;
  if (houris==2) ;
  if (houris==3) ;
  if (houris==4) ;
  if (houris==5) ;
  if (houris==6) ;
  if (houris==7) ;
  if (houris==8) ;
  if (houris==9) ;
  if (houris==10) ;
  if (houris==11) ;
  if (houris==12) ;
  if (houris==13) ;
  if (houris==14) ;
  if (houris==15) ;
  if (houris==16) ;
  if (houris==17) ;
  if (houris==18) ;
  if (houris==19) ;
  if (houris==20) ;
  if (houris==21) ;
  if (houris==22) ;
  if (houris==23) ;
  if (houris==24) ;
//  var title = document.title;
  var welcome = ("Good " + display/* + ". Welcome to " + title +"."*/);
  document.write(welcome);
}
//////////end of GREETING code///
/////////get browser////////////
function getbrowser(){
detect = navigator.userAgent.toLowerCase();
browser=version=place=OS=thestring="";
if (checkIt('konqueror')) {
browser = "Konqueror";
OS = "Linux";
} else if (checkIt('safari')) browser = "Safari";
else if (checkIt('omniweb')) browser = "OmniWeb";
else if (checkIt('k-meleon')) {
browser = "K-Meleon";
var rv = detect.match(/k-meleon ([\w.]+)/);
if (rv) {
rv = rv[0];
version = rv.substr(3);
}
}
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);
if (typeof(navigator.product) != "undefined") {
browser = "Mozilla";
rv = navigator.userAgent.match(/([Mozilla ]?Fire\w+)\/([\w|\+.]+)/);
if (rv) {
browser += rv[1];
version = rv[2];
} else {
rv = navigator.userAgent.match(/rv:([\w|\+.]+)/);
if (rv) {
rv = rv[0];
version = rv.substr(3);
}
}
}
}else browser = "An unknown browser";
if (!version) {
version = detect.charAt(place + thestring.length);
}
var browsername = "";
if (browser)
browsername += browser;
if (version)
browsername += " " + version;
(browsername) ? document.writeln(browsername) : document.writeln("Unable to detect!");

}
function checkIt(s) {
place = detect.indexOf(s) + 1;
thestring = s;
return place;
}



////////////get OS/////////
function getOS() {
var i_win;
var v_win;
var agt=navigator.userAgent.toLowerCase();
if (agt.indexOf("win")!=-1 || agt.indexOf("16bit")!=-1)i_win = true;
if (i_win) {
	if (agt.indexOf("win95")!=-1 || agt.indexOf("windows 95")!=-1)v_win = "Windows 95";
	if (agt.indexOf("win98")!=-1 || agt.indexOf("windows 98")!=-1)v_win = "Windows 98";
	if (agt.indexOf("win 9x 4.90")!=-1)v_win = "Windows ME";
	if (agt.indexOf("winnt")!=-1 || agt.indexOf("windows nt")!=-1)v_win = "Windows NT";
	if (agt.indexOf("windows nt 5.0")!=-1)v_win = "Windows 2000";
	if (agt.indexOf("windows nt 5.1")!=-1)v_win = "Windows XP";
	if (agt.indexOf("windows nt 6.0")!=-1)v_win = "Windows Vista";
	if (!v_win)v_win = "Unknown Windows";
	
}
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";
}
if (i_win)document.writeln(v_win);
else (typeof(navigator.oscpu) != "undefined" && navigator.oscpu != "") ? document.writeln(navigator.oscpu) : document.writeln(OS);
}



