function stripReplies() {
	var isLoggedIn = document.getElementById('myProfileSettings');
	if(isLoggedIn == null || isLoggedIn == undefined) {
		var arr = document.getElementsByTagName('span');
		for(var i=0;i<arr.length;i++) {
			var classNameOfElement = arr[i].className;
			if(classNameOfElement.indexOf("message-reply") >= 0 || classNameOfElement.indexOf("reply-action-link") >= 0) {
				arr[i].parentNode.removeChild(arr[i]);
			}
		}
		arr = document.getElementsByTagName('div');
		for(var i=0;i<arr.length;i++) {
			var classNameOfElement = arr[i].className;
			if(classNameOfElement.indexOf("lia-message-actions") >= 0 ||  classNameOfElement.indexOf("lia-message-options") >= 0) {
				arr[i].parentNode.removeChild(arr[i]);
			}
		}
	}
}

function addLocale () {
	var locale=location.host.split(".")[0];
	if (!locale.match("^[a-z][a-z]$")) {
		locale="uk";
	}
document.getElementById('comicsheader').src="http://"+locale+".playstationcomics.com/main/headerstandalone.html";
document.getElementById('pdcFooterIframe').src="http://"+locale+".playstationcomics.com/main/footerstandalone.html";
}

function start () {
	 stripReplies ();
	 addLocale ();
}

window.onload=start;