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 href="http://www.twst.com/info/info1571.htm">Medical Devices Report</a>'
	contents[1]='<a href="http://www.twst.com/info/info1570.htm">Marine Transportation Report</a>'
	contents[2]='<a href="http://www.twst.com/info/info1580.htm">Oilfield Services Report</a>'
	contents[3]='<a href="http://www.twst.com/info/info1579.htm">Internet Infrastructure Report</a>'
	contents[4]='<a href="http://www.twst.com/info/info1576.htm">Steel Producers Report</a>'
	contents[5]='<a href="http://www.twst.com/info/info1577.htm">Financial Services Report</a>'
	contents[6]='<a href="http://www.twst.com/info/info1574.htm">2008 Maxim Growth Conference Report</a>'
	contents[7]='<a href="http://www.twst.com/info/info1573.htm">Water Utilities Report</a>'
	contents[8]='<a href="http://www.twst.com/info/info1578.htm">TWST Investing Strategies Report</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_issue() {

   var content_index;
   var cookie =  Get_Cookie('featured_issue')
   
   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_issue',content_index)
   return contents[content_index];
}
