var newsArr = []; 
newsArr[0] = new Object(); 
newsArr[0].created = 'Jul 13,2010'; 
newsArr[0].urls = 'http://www.theage.com.au/business/new-drug-may-bring-sufferers-light-relief-20100713-108hf.html'; 
newsArr[0].title = 'New drug may bring sufferers light relief'; 
newsArr[1] = new Object(); 
newsArr[1].created = 'Jul 13,2010'; 
newsArr[1].urls = 'http://www.bloomberg.com/news/2010-07-13/clinuvel-drug-offers-relief-for-rare-light-sensitivity-malady-study-shows.html'; 
newsArr[1].title = 'Clinuvel Drug Offers Relief for Rare Light Sensitivity Malady, Study Shows'; 
newsArr[2] = new Object(); 
newsArr[2].created = 'May 18,2010'; 
newsArr[2].urls = 'http://www.biotechnologynews.net/storyview.asp?storyid=1135740'; 
newsArr[2].title = 'Clinuvel finesses Scenesse debut'; 
newsArr[3] = new Object(); 
newsArr[3].created = 'May 17,2010'; 
newsArr[3].urls = 'http://www.lifescientist.com.au/article/346731/clinuvel_gets_pre-approval_win_italy/?fp=4194304&fpid=1'; 
newsArr[3].title = 'Clinuvel gets pre-approval win in Italy'; 
newsArr[4] = new Object(); 
newsArr[4].created = 'May 07,2010'; 
newsArr[4].urls = 'http://au.lifestyle.yahoo.com/who/article/-/7165733/allergic-to-sunlight/'; 
newsArr[4].title = 'Allergic to sunlight'; 
newsArr[5] = new Object(); 
newsArr[5].created = 'Apr 26,2010'; 
newsArr[5].urls = 'http://www.dailyorange.com/news/living-in-the-shadows-su-freshman-struggles-with-sun-allergy-1.1427658'; 
newsArr[5].title = 'Living in the shadows: SU freshman struggles with sun allergy '; 
newsArr[6] = new Object(); 
newsArr[6].created = 'Apr 26,2010'; 
newsArr[6].urls = 'http://www.thenewshouse.com/story/shadow-jumping'; 
newsArr[6].title = 'Shadow Jumping'; 
newsArr[7] = new Object(); 
newsArr[7].created = 'Apr 01,2010'; 
newsArr[7].urls = 'http://www.aacc.org/publications/cln/2010/april/Pages/series.aspx'; 
newsArr[7].title = 'Porphyrias: A Guide to Laboratory Assessment  '; 
newsArr[8] = new Object(); 
newsArr[8].created = 'Oct 29,2009'; 
newsArr[8].urls = 'http://www.checkorphan.org/news/uabs_joseph_bloomer_given_aasld_2009_distinguished_service_award'; 
newsArr[8].title = 'UABs Joseph Bloomer Given AASLD 2009 Distinguished Service Award'; 
newsArr[9] = new Object(); 
newsArr[9].created = 'May 31,2008'; 
newsArr[9].urls = 'http://www.porphyriafoundation.com/images/newsletter/newsQ208.pdf'; 
newsArr[9].title = 'American Porphyria Foundation Q2 2008 Newsletter'; 

//toggle categories

function toggle_content(cat) {
	//cats array
	var catsArray = ['cli_QA', 'cli_disc', 'cli_news'];
	for (var i=0; i < catsArray.length; i++) {
		var el = document.getElementById(catsArray[i]);
		var tab = document.getElementById(catsArray[i]+"_tab");
		if (catsArray[i] == cat) {
			el.className = 'cli_show';
			tab.className = 'active_tab';
		} else {
			el.className = 'cli_hide';
			tab.className = 'inactive_tab';
		}
	}
}

//attach the cli_stylesheet
var cli_style = document.createElement("link");
cli_style.setAttribute("rel", "stylesheet");
cli_style.setAttribute("type", "text/css");

//Check the browser. If ie, attach ie sheet
var cli_nav = navigator.appName

if (/Firefox[\/\s](\d+\.\d+)/.test(navigator.userAgent)){ 
    cli_style.setAttribute("href", "http://clinuvel.com/apf/webfeed/apfffoxfix.css");
}
 else if (cli_nav.indexOf("Explorer") > 0) {
    cli_style.setAttribute("href", "http://www.clinuvel.com/apf/webfeed/apfiefix.css");
} else {
    cli_style.setAttribute("href", "http://clinuvel.com/apf/webfeed/apf.css");
}

document.getElementsByTagName("head")[0].appendChild(cli_style);

//build and populate the device ** WAIT UNTIL IT'S LOADED **
var wrapper = document.getElementById("cli_wrapper");
//content
var cli_content = document.createElement('div');
cli_content.className = 'cli_content';
//content wrapper
var cli_content_wrap = document.createElement('div');
cli_content_wrap.setAttribute('id', 'cli_content_wrapper');

//create each content section

var cli_news = document.createElement('div');
cli_news.setAttribute('id', 'cli_news');

//build innerHTML strings
cli_news_str =  "<ul>"; 
for (i = 0; i < 3; i++) {
      cli_news_str += "<li>" + newsArr[i].created + " <br /><a href='" + newsArr[i].urls + "' target='_blank'>" + newsArr[i].title + "</a></li>\n";
    
}
cli_news_str +=  "</ul>\n"; 

cli_news.innerHTML = cli_news_str;

//attach the elements
wrapper.appendChild(cli_content);
cli_content.appendChild(cli_content_wrap);
cli_content_wrap.appendChild(cli_news);


