/* www.studioat.hr - main javascript file
 * particulary based on FlashObject v1.2.3: Flash detection and embed - http://blog.deconcept.com/flashobject/
 */

function getversion(){
var PlayerVersion=0;		
	if(navigator.plugins && navigator.mimeTypes.length){
		var x = navigator.plugins["Shockwave Flash"];
		if(x && x.description) {
			PlayerVersion = x.description.replace(/([a-z]|[A-Z]|\s)+/, "").replace(/(\s+r|\s+b[0-9]+)/, ".").split(".");
		}
	}else if (window.ActiveXObject){
		try {
			var axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash");
			PlayerVersion = axo.GetVariable("$version").split(" ")[1].split(",");
		} catch (e) {}
	}
return parseInt(PlayerVersion[0]) || 0;
}


function pisi(elementId){
	var repl = "";
	if(getversion() >= 8){
		if (navigator.plugins && navigator.mimeTypes && navigator.mimeTypes.length){
			repl += '<embed src="studioat/studio.swf" menu="false" quality="high" scale="noscale" bgcolor="#1f1f1f"width="100%" height="100%" name="studio" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />';
		} else {
			repl += '<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="100%" height="100%" id="studio">';
			repl += '<param name="movie" value="studioat/studio.swf" />';
			repl += '<param name="quality" value="high" />';
			repl += '<param name="scale" value="noscale" />';
			repl += '<param name="bgcolor" value="#1f1f1f" />';		
			repl += '</object>';
		}
	document.getElementById(elementId).innerHTML = repl;
	}
document.getElementById(elementId).style.display="block";
}