var contents=new Array()

// ========================================================================================   
// change this bit only
// be careful not to include a ' (single quote) anywhere between the a href and </a> tags 
// also, do not put a return anywhere inside the tags
// ========================================================================================



contents[0]='<a target="_blank" href="http://liberum.twst.com">Management Change is an opportunity for Smart Investors</a>'
contents[1]='<a target="_blank" href="http://easyreports.net">EasyReports.net - 10Ks/10Qs - and more.  Free and Easy-to-use</a>'

// ========================================================================================
// end configurable elements   
// ========================================================================================

function Set_Cookie(name,value,path,expires,domain,secure) {
    var today = new Date();
    var expdate = new Date(today.getYear(),today.getMonth(),today.getDate(),23,0,0);
    document.cookie = name + "=" +escape(value) +
        ( (expires) ? ";expires=" + expires.toGMTString()  : ";expires=" +  expdate.toGMTString()  ) +
        ( (path) ? ";path=" + path : ";path=/") + 
        ( (domain) ? ";domain=" + domain : "") +
        ( (secure) ? ";secure" : "");
}

function Get_Cookie(name) {
    var start = document.cookie.indexOf(name+"=");
    var len = start+name.length+1;
    // alert ( document.cookie );
    if ((!start) && (name != document.cookie.substring(0,name.length))) return '';
    if (start == -1) return '';
    var end = document.cookie.indexOf(";",len);
    if (end == -1) end = document.cookie.length;
    return unescape(document.cookie.substring(len,end));
}

function get_featured_links() {

   var content_index;
   var cookie =  Get_Cookie('featured_links')
   
   if ( cookie && cookie != '' ) {
      last_viewed = cookie - 0;
      content_index = last_viewed >= contents.length - 1  ? 0 : last_viewed + 1;
   } else {
      content_index = Math.floor( Math.random() * contents.length )
   }

   Set_Cookie('featured_links',content_index)
   return contents[content_index];
}

