// build 2010-05-20

if(!ero_xml_id)ero_xml_id = '1';
if(!ero_static)ero_static = false;
if(!ero_alignLeft)ero_alignLeft = false;

// options
var ero_width = 450;
var ero_height = 300;
var ero_path = 'ero-t/ero-t-player.swf';
var ero_xml = "ero-t/playlist.xml";
var ero_wmode = "";
var browser = '';

// check browser
if (navigator.userAgent.indexOf("Opera") != '-1')browser = "opera";
else if (navigator.userAgent.indexOf("MSIE") != '-1')browser = "IE";
else if (navigator.userAgent.indexOf("Netscape") != '-1')browser = "NN";
else if (navigator.userAgent.indexOf("FireFox") != '-1')browser = "FireFox";

// create transparent flash
var html = '';

if(!ero_static)ero_wmode = "transparent";
if(!ero_static)html += '<div id="ero_transparent_flash" style="width:' + ero_width + '; height:' + ero_height + '; position: relative; z-index:10000; top: 0px; left: 0px; position:absolute; bottom:0;">';
html += '<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0" width="' + ero_width + '" height="' + ero_height + '" align="middle">';
html += '<param name="allowScriptAccess" value="sameDomain" />';
html += '<param name="allowFullScreen" value="false" />';
html += '<param name="FlashVars" value="xml_path='+ ero_xml + '" />';
html += '<param name="movie" value="' + ero_path + '?xml_path='+ ero_xml + '" />';
html += '<param name="quality" value="high" />';
html += '<param name="bgcolor" value="#ffffff" />';
html += '<param name="wmode" value="' + ero_wmode + '" />';
html += '<embed FlashVars="xml_path='+ ero_xml + '" src="' + ero_path + '?xml_path='+ ero_xml + '" quality="high" wmode="' + ero_wmode + '" bgcolor="#ffffff" width="' + ero_width + '" height="' + ero_height + '" name="transparent-player" align="middle" allowScriptAccess="sameDomain" allowFullScreen="false" type="application/x-shockwave-flash" pluginspage="http://www.adobe.com/go/getflashplayer" />';
html += '</object>';
if(!ero_static)html += '</div>';

document.write(html);

// resize listener
function ero_transparent_listener()
{
	if(ero_static)return;

	ero_transparent_resize();
	setTimeout('ero_transparent_listener()', 10);
}

// resize
function ero_transparent_resize()
{
	var width = document.compatMode=='CSS1Compat' && !window.opera?document.documentElement.clientWidth:document.body.clientWidth;
	var height = (window.innerHeight ? window.innerHeight : (document.documentElement.clientHeight ? document.documentElement.clientHeight : document.body.offsetHeight));
	var ero_banner = document.getElementById('ero_transparent_flash');

	width -= 470;

	if(browser == 'IE')height += document.body.scrollTop - 304;
	else height += document.body.scrollTop - 300;

	ero_banner.style.top = height + 'px';

	if(!ero_alignLeft){
		ero_banner.style.left = width + 'px';
	}else{
		ero_banner.style.left = '0px';
	}
}

// run listener
ero_transparent_listener();
