defaultStatus ="Sterling Planning Alliance"

hex=255; // Initial color value.
hex2=255;

function fadetext(){ 
  if(hex>0) { //If color is not black yet
    hex-=11; // increase color darkness
    document.getElementById("text").style.color="rgb("+hex+","+hex+","+hex+")";
    document.getElementById("text2").style.color="rgb("+hex2+","+hex2+","+hex2+")";
    setTimeout("fadetext()",10); 
  }
    else
    setTimeout("fadetext2()",10);
}

function fadetext2(){
  if(hex2>0) { //If color is not black yet
    hex2-=11; // increase color darkness
    document.getElementById("text2").style.color="rgb("+hex2+","+hex2+","+hex2+")";
    setTimeout("fadetext2()",200); 
  }
}

//centered pop up window
var win = null;
function NewWindow(mypage,myname,w,h,scroll){
LeftPosition = (screen.width) ? (screen.width-w)/2 : 0;
TopPosition = (screen.height) ? (screen.height-h)/2 : 0;
settings =
'height='+h+',width='+w+',top='+TopPosition+',left='+LeftPosition+',scrollbars='+scroll+',resizable'
win = window.open(mypage,myname,settings)
}

//open new application window
var newWin = null;
function NewAppWindow(pageURI){
newWin = window.open(pageURI, "_blank", "menubar=yes,toolbar=yes,location=yes,resizable=yes,scrollbars=yes,status=yes" );
}

function createCookie() {
  var date = new Date();
  date.setTime(date.getTime()+(30*24*60*60*1000));
  var expires = "; expires="+date.toGMTString();
  document.cookie = "seenit=true"+expires+"; path=/";
}

function readCookie() {
  alert(document.cookie);
  var ca = document.cookie.split(';');
  for(var i=0; i < ca.length; i++) {
    var c = ca[i];
    if (c.indexOf("seenit=true") >= 0) {
      window.replace("home.html");
    }
}
}
