function writeBlogArticles () {

	blogCount = module[0].content.length;
	blogCount1 = moduleTalking[0].content.length;

	if (blogCount >= 4) {
		blogCount = 4;
	}
	if (blogCount1 >= 4) {
		blogCount1 = 4;
	}
	
	var forLoopContent = "<li class=\"one\">RECENT POSTS<ul>";
	var listStyle = "";

	for (j=0; j<4; j++) {
		if (module[0].content[j].url != "") {
			if (j==3) {
				listStyle = " class=\"last\"";
			}
			else {
				listStyle = "";
			}
			forLoopContent += "<li" + listStyle + "><span class=\"timestamp\">" + module[0].content[j].pubday + " " + module[0].content[j].timestamp + "<\/span><a href=\"" + module[0].content[j].url + "\">" + module[0].content[j].headline + "<\/a><\/li>";
		}
	}

	forLoopContent += "<\/ul><\/li><li class=\"two\">PEOPLE ARE TALKING&hellip;<ul>";

	for (j=0; j<4; j++) {
		if (moduleTalking[0].content[j].url != "") {
			if (j==3) {
				listStyle = " class=\"last\"";
			}
			else {
				listStyle = "";
			}

			var commentString = "";
			var totalComments = parseInt(moduleTalking[0].content[j].comments);

			if (totalComments != 1) {
				commentString = totalComments + " Comments";
			}
			else {
				commentString = totalComments + " Comment";
			}
			
			forLoopContent += "<li" + listStyle + "><span class=\"timestamp\">" + moduleTalking[0].content[j].pubdate + "<\/span><a href=\"" + moduleTalking[0].content[j].url + "\">" + moduleTalking[0].content[j].headline + " (" + commentString + ")<\/a><\/li>";
		}
	}

	forLoopContent += "<\/ul><\/li>";
	
	document.write(forLoopContent);	
}


