var hasRightVersion = DetectFlashVer(requiredMajorVersion, requiredMinorVersion, requiredRevision);

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

function writeHeader() {
	var hdrText = header.normalize_space();
	var subText = subHeader.normalize_space();
		
	if(hasRightVersion) { 
		AC_FL_RunContent( 'codebase','http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0','width','100%','height','47','id','hdrHandler','align','middle','src','swf/hdrHandler?title='+encodeURIComponent(hdrText)+'&subTitle='+encodeURIComponent(subText),'quality','high','wmode','transparent','bgcolor','#ffffff','name','hdrHandler','allowscriptaccess','sameDomain','pluginspage','http://www.macromedia.com/go/getflashplayer','movie','swf/hdrHandler?title='+encodeURIComponent(hdrText)+"&subTitle="+encodeURIComponent(subText) ); //end AC code
	} else {
		var writeString = "<h5>"+subText+"</h5><h6>"+hdrText+"</h6>";
		document.write(writeString);
	}
}