function writeFlash(sSrc,nWidth,nHeight, id)	{
	flash =  '<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="https://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" width="'+nWidth+'" height="'+nHeight+'" id="'+id+'">';
	flash +=  '<param name="allowscriptaccess" value="always" />';
	flash +=  '<param name="movie" value="'+sSrc+'" />';
	flash +=  '<param name="wmode" value="transparent" />';
	flash +=  '<embed src="'+sSrc+'" width="'+nWidth+'" height="'+nHeight+'" name="'+id+'" wmode="transparent" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="https://www.macromedia.com/go/getflashplayer" />';
	flash +=  '</object>';
	return(flash);
}

function replaceTitle(){
//    return;
	/*
  var array = document.getElementsByTagName('h1');
	//document.write(array.length);
	for (var i=(array.length-1); i>=0; i--) {
		var h1 = array[i];
		var width = getElementWidth(array[i]);
		var height = getElementHeight(array[i]); // tu treba domyslet akym sposobom vyzistit vysku a sirku flashu		
		//window.alert(width+":"+height);
		var flashURL = "/flash/main.swf?txt="+h1.innerHTML+"&size="+30+"&width="+width+"&height="+height;		
		var c = document.createElement('div');
		array[i].parentNode.replaceChild(c,h1);
//		c.setAttribute( "cssClass", "replacedTitle");
//		c.setAttribute( "class", "replacedTitle");
		c.innerHTML = writeFlash(flashURL,width,height);
	}
	*/
}

function getElementWidth(e) {
	if (typeof e.clip !== "undefined") {
		return e.clip.width;
	} else {
		if (e.style.pixelWidth) {
			return e.style.pixelWidth;
		} else {
			return e.offsetWidth;
		}
	}
}
function getElementHeight(e) {
	if (typeof e.clip !== "undefined") {
		return e.clip.height;
	} else {
		if (e.style.pixelHeight) {
			return e.style.pixelHeight;
		} else {
			return e.offsetHeight;
		}
	}
}


