var tickerQualifier1 = "-";
var tickerQualifier2 = "_";
var tickerSpeed = 30;

function clean(input) {
	output = input.replace(/'/g, "\\'");
	output = output.replace(/\\\\/g, "\\");
	output = output.replace("&amp;", "&");
	output = output.replace("&quot;", "\"");
	return output;
}
function loadMe(loadElems) {
	elements = loadElems.split(",");
	headers = document.getElementsByTagName("h1");
	for (n=0;n<elements.length;n++) {
		thisid = "h1"+n;
		headers[n].setAttribute("id", thisid);
		fullText = clean(headers[n].innerHTML);
		headers[n].style.color = '#F20909';
		animateText(thisid, tickerQualifier1, fullText);
	}
}
function animateText(elementRef, currentText, fullText) {
	thisObj = document.getElementById(elementRef);
	thisObj.innerHTML = currentText;
	if (currentText.length % 2 == 0) thisQualifier = tickerQualifier1; else thisQualifier = tickerQualifier2;
	newText = fullText.substr(0, currentText.length) + thisQualifier;
	if (newText.length < fullText.length + 1) {
		ticker = setTimeout("animateText('"+elementRef+"', '"+clean(newText)+"', '"+clean(fullText)+"')", tickerSpeed);
	} else {
		thisObj.innerHTML = fullText;
	}
}