if(document.doctype == null)
{
	var obj = JSON.parse(document.body.innerText)
	
	document.body.innerHTML = ""
	
	if(obj.summary){
		var title = document.createElement("h1");
		title.innerText = "Summary";
		title.className = "containerTitle";
		document.body.appendChild(title);

		var summary = document.createElement("div");
		summary.className = "container";
		summary.innerText = obj.summary;
		document.body.appendChild(summary);
	}

	if(obj.paragraphs){
		var title = document.createElement("h1");
		title.innerText = "Details";
		title.className = "containerTitle";
		document.body.appendChild(title);

		var details = document.createElement("div");
		details.className = "container";
		document.body.appendChild(details);

		for(var i=0; i< obj.paragraphs.length; i++){
			var paragraph = document.createElement("div");
			paragraph.className = "speaker speaker" + obj.paragraphs[i].speaker;
			details.appendChild(paragraph);
			for(var j=0; j<obj.paragraphs[i].utterances.length; j++){
				var utterance = document.createElement("span");
				
				if( obj.paragraphs[i].utterances[j].sentiment){
					utterance.classList.add("sentiment_" + obj.paragraphs[i].utterances[j].sentiment);
				}

				if(obj.paragraphs[i].utterances[j].emotion){
					utterance.classList.add("emotion_" + obj.paragraphs[i].utterances[j].emotion);
				}

				utterance.innerText = obj.paragraphs[i].utterances[j].text;
				paragraph.appendChild(utterance);
			}
		}
	}	
}