function replacetag(expr,a,b) {	var i = 0;	while (i != -1) {		i=expr.indexOf(a,i);		if (i>=0) {			expr = expr.substring(0,i)+b+expr.substring(i+a.length);			i += b.length;		}	}	return expr;}function replacetext(text) {	var	l = replacetag(text,'&','%26');	 	//l += replacetag(text,'/','%47');	return l;}function resizer(strng){	var anArray = strng.split("/");	divId = anArray[0];	flashId = anArray[1];	newSize = parseFloat(anArray[2]);	$(divId).setStyles({'height':newSize+'px'});	$(flashId).setStyles({'height':newSize+'px'});	// obj=document.getElementById(divId);	// obj.style.height=newSize+'px';	// obj=document.getElementById(flashId);	// obj.style.height=newSize+'px';	//alert(flashId);}window.addEvent('domready', function(){		function replacetag(expr,a,b) {		var i = 0;		while (i != -1) {			i=expr.indexOf(a,i);			if (i>=0) {				expr = expr.substring(0,i)+b+expr.substring(i+a.length);				i += b.length;			}		}		return expr;	}	function replacetext(text) {		text = replacetag(text,'&','%26');		text = replacetag(text,'=','%3D');		text = replacetag(text,'"','%22');		text = replacetag(text,'+','%2B');				return text;	}		function Title(){								var Title = $$('.flashtitle');		var nTitle = 0;		Title.each(function(obj){			var width = obj.getCoordinates().width;			var height = obj.getCoordinates().height;			obj.set('id','d'+nTitle);			var text = obj.get('html');						text = text.trim();			text = text.clean();			text = text.replace(/<\/h1>\s+<h2>/i, "</h1><h2>");		 	text = text.replace(/<\/h2>\s+<h1>/i, "</h2><h1>");		 	text = text.replace(/<\/h4>\s+<h3>/i, "</h4><h3>");		 	text = text.replace(/<\/h3>\s+<h4>/i, "</h3><h4>");		 	text = text.replace(/<\/h3>\s+<h2>/i, "</h3><h2>");		 	text = text.replace(/<\/h3>\s+<h1>/i, "</h3><h1>");		 	text = text.replace(/<\/h4>\s+<h1>/i, "</h4><h1>");		 	text = text.replace(/<\/h4>\s+<h2>/i, "</h4><h2>");		 	text = text.replace(/<\/h1>\s+<h4>/i, "</h1><h4>");		 	text = text.replace(/<\/h2>\s+<h4>/i, "</h2><h4>");		 	text = text.replace(/<\/h2>\s+<h3>/i, "</h2><h3>");			//alert(text);			var color = obj.getStyle('color');			var size = obj.getStyle('font-size');			//obj.empty();			var swfObj = new SWFObject('swf/Title.swf', 'f'+nTitle, width, height, '8', '#ff0000', false);			swfObj.addParam('scale', 				'noscale');			swfObj.addParam('quality', 				'best');			swfObj.addParam('wmode', 				'transparent');			swfObj.addParam('AllowscriptAccess', 	'always'); 			swfObj.addParam('salign', 	'lt');			swfObj.addVariable('ID', 				'f'+nTitle);			swfObj.addVariable('DIV', 			'd'+nTitle);			swfObj.addVariable('textWidth',		  width);			swfObj.addVariable('textHeight',	  height);			swfObj.addVariable('ccolor',			color);			swfObj.addVariable('fsize',			size);			swfObj.addVariable('date', 			'');			swfObj.addVariable('title', 			replacetext(text));			swfObj.addVariable('subtitle', 		'');			swfObj.write(obj);						nTitle++;		});			}				function pickColor(string){			return string.length & 3;		}	if(Browser.Plugins.Flash.version > 7){		var IE = Browser.Engine.trident;  		var IE6 = (navigator.userAgent.toLowerCase().indexOf('msie 6') != -1) && (navigator.userAgent.toLowerCase().indexOf('msie 7') == -1);  		if ( ! IE && ! IE6 ) Title();	} else {		// var myCSS = new Asset.css('css/altflash.css', {id: 'myStyle', title: 'myStyle'});		// 		$$('#Menu h1').setStyles({'color': Daycolor});		// 		$$('.Title h2 a').setStyles({'color': Daycolor});		// 		$$('h2').setStyles({'color': Daycolor});	}	});
