String.prototype.normalize_space = function() {
	// Replace repeated spaces, newlines and tabs with a single space
	return this.replace(/^\s*|\s(?=\s)|\s*$/g, "");
}

var hasRightVersion = DetectFlashVer(requiredMajorVersion, requiredMinorVersion, requiredRevision);
var whichInput = document.getElementById('strTitle');

var hdrText = whichInput.value || "";
hdrText = hdrText.normalize_space();

var flashVars = "?hdrText="+encodeURIComponent(hdrText);
var swfDir = "/swf/";

if(hasRightVersion) { 
	AC_FL_RunContent( 'codebase','http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0','width','100%','height','34','id','hdrHandler','align','middle','src',swfDir+'hdrHandler'+flashVars,'quality','high','wmode','transparent','bgcolor','#ffffff','name','hdrHandler','allowscriptaccess','sameDomain','pluginspage','http://www.macromedia.com/go/getflashplayer','movie',swfDir+'hdrHandler'+flashVars ); //end AC code
} else {
	var startDiv = '<div class="hrdText">';
	var headText = hdrText;
	var endDiv = '</div>';
	var combinedString = startDiv + headText + endDiv;
	document.write(combinedString);
}