/* Zarządzanie wykonywaniem skryptow po doczytaniu strony */
var EditoStart = new Object();
EditoStart.functions = new Array();

EditoStart.Add = function(fnc)
{
	EditoStart.functions[EditoStart.functions.length] = fnc;
}

EditoStart.init = function()
{
	for(var i = 0; i < EditoStart.functions.length; i++)
	{
		EditoStart.functions[i]();
	}
}

$(document).ready(function()
{
	EditoStart.init();
});


/* Przegladarka zdjec */
$(document).ready(function()
{
	$('a[@rel*=lightbox]').lightBox();
	$('a[@class*=lightbox]').lightBox();
});



function insertActiveX(html)
{
	document.write(html);
}

/* Pozostale skrypty */
function findObj(obj) {
	return document.getElementById(obj);
}

function preloadimages(images) {
	if (!images) {
		var images = new Array();
	}
	var img = new Array();
	for (i=0; i<images.length; i++) {
		img[i] = new Image();
		img[i].src = images[i];
	}
}

function swapImage(id, img) {
	o = findObj(id);
	if(o) {
		o.src = img;
	}
}

function SendTo(before, after, user, host, label) {
	label = label.replace(' // ', '@');
	document.write('<a' + before + 'href="mailto:' + user + '@' + host + '"' + after+'>' + label + '</a>');
}

// zdjęcie bez opisu
function showImage(src, w, h) {
	noweOkienko = null;
	if (window.screen) {
		aw = screen.availWidth;
		ah = screen.availHeight;
	} else {
		aw = 640;
		ah = 450;
	}
	if (noweOkienko==null || noweOkienko.closed) {
		ustawienia=
		"left=" + (aw-w)/2 + ","
		+"top=" + (ah-h)/2 + ","
		+"screenX=" + (aw-w)/2 + ","
		+"screenY=" + (ah-h)/2 + ","
		+"width=" + w + ","
		+"height=" + h + ","
		+"innerWidth=" + w + ","
		+"innerHeight=" + h + ","
		+"toolbar=no,"
		+"location=no,"
		+"directories=no,"
		+"status=yes,"
		+"menubar=no,"
		+"scrollbars=no,"
		+"resizable=no"
		noweOkienko = window.open("/showImage.php?src="+src, 'obrazek', ustawienia);
	}
	try {
		noweOkienko.focus();
	}
	catch (e) {
	}
}

// zdjęcie z opisem
function showOImage(src, w, h, opis) {
	noweOkienko = null;
	if (window.screen) {
		aw = screen.availWidth;
		ah = screen.availHeight;
	} else {
		aw = 640;
		ah = 450;
	}
	if (noweOkienko==null || noweOkienko.closed) {
		w = w + 32;
		oldH = h;
		h = h + 45;
		ustawienia=
		"left=" + (aw-w)/2 + ","
		+"top=" + (ah-h)/2 + ","
		+"screenX=" + (aw-w)/2 + ","
		+"screenY=" + (ah-h)/2 + ","
		+"width=" + w + ","
		+"height=" + h + ","
		+"innerWidth=" + w + ","
		+"innerHeight=" + h + ","
		+"toolbar=no,"
		+"location=no,"
		+"directories=no,"
		+"status=yes,"
		+"menubar=no,"
		+"scrollbars=yes,"
		+"resizable=no"
		noweOkienko = window.open("/showImage.php?src="+src+":"+opis, 'obrazek', ustawienia);
	}
	try {
		noweOkienko.focus();
	}
	catch (e) {
	}
}

// popup
function popUpWindow(src, w, h) {
	noweOkienko = null;
	if (window.screen) {
		aw = screen.availWidth;
		ah = screen.availHeight;
	} else {
		aw = 640;
		ah = 450;
	}
	if (noweOkienko==null || noweOkienko.closed) {
		ustawienia=
		"left=" + (aw-w)/2 + ","
		+"top=" + (ah-h)/2 + ","
		+"screenX=" + (aw-w)/2 + ","
		+"screenY=" + (ah-h)/2 + ","
		+"width=" + w + ","
		+"height=" + h + ","
		+"innerWidth=" + w + ","
		+"innerHeight=" + h + ","
		+"toolbar=no,"
		+"location=no,"
		+"directories=no,"
		+"status=yes,"
		+"menubar=no,"
		+"scrollbars=yes,"
		+"resizable=no"
		var url = '/' + src; 
		noweOkienko = window.open(url, 'plik', ustawienia);
		
	}
	try {
		noweOkienko.focus();
	}
	catch (e) {
	}
}

// base64 decode script
function decode64(input) {
	var output = "";
	var chr1, chr2, chr3 = "";
	var enc1, enc2, enc3, enc4 = "";
	var i = 0;
	var keyStr = 	"ABCDEFGHIJKLMNOP" +
					"QRSTUVWXYZabcdef" +
					"ghijklmnopqrstuv" +
					"wxyz0123456789+/" +
					"=";

	// remove all characters that are not A-Z, a-z, 0-9, +, /, or =
	var base64test = /[^A-Za-z0-9\+\/\=]/g;
	if (base64test.exec(input)) {
		alert("There were invalid base64 characters in the input text.\n" +
					"Valid base64 characters are A-Z, a-z, 0-9, '+', '/', and '='\n" +
					"Expect errors in decoding.");
	}
	input = input.replace(/[^A-Za-z0-9\+\/\=]/g, "");

	do {
		enc1 = keyStr.indexOf(input.charAt(i++));
		enc2 = keyStr.indexOf(input.charAt(i++));
		enc3 = keyStr.indexOf(input.charAt(i++));
		enc4 = keyStr.indexOf(input.charAt(i++));

		chr1 = (enc1 << 2) | (enc2 >> 4);
		chr2 = ((enc2 & 15) << 4) | (enc3 >> 2);
		chr3 = ((enc3 & 3) << 6) | enc4;

		output = output + String.fromCharCode(chr1);

		if (enc3 != 64) {
			output = output + String.fromCharCode(chr2);
		}
		if (enc4 != 64) {
			output = output + String.fromCharCode(chr3);
		}

		chr1 = chr2 = chr3 = "";
		enc1 = enc2 = enc3 = enc4 = "";

	} while (i < input.length);

	return output;
}

// rozwijanie listy wynikow w wyszukiwarce
function showResult(id) {
	o = document.getElementById(id);
	if (o.style.display == '' || o.style.display == 'none') {
		o.style.display = 'block';
	} else {
		o.style.display = 'none';
	}
}

function limiter(obj, limit) {
	if (obj.value.length > limit) {
		obj.value = obj.value.substring(0,limit);
	}
}

// obliczanie pozostalych znakow w textarea
function limit(obj, limit, msg) {
	if (obj.value.length > limit) {
		obj.value = obj.value.substring(0,limit);
		alert(msg);
	}
}

function getCookie(name)
{
	var dc = document.cookie;
	var cname = name + "=";
	var clen = dc.length;
	var cbegin = 0;
	
	while (cbegin < clen)
	{ 
		var vbegin = cbegin + cname.length;
	
		if (dc.substring(cbegin, vbegin) == cname)
		{ 
			var vend = dc.indexOf (";", vbegin);
			if (vend == -1) vend = clen;
	
			return unescape(dc.substring(vbegin, vend));
		}
	
		cbegin = dc.indexOf(" ", cbegin) + 1;
	
		if (cbegin== 0) break;
	}
	return null;
}

function setCookie(name, value, days, path, domain, secure) 
{
	var expires = null;
	
	if(days)
	{
		expires = new Date();
		var theDay = expires.getDate();
		theDay = theDay + days;
		expires.setDate(theDay);
	}
	
	var ciacho = name + "=" + escape(value) +
        ((expires) ? "; expires=" + expires.toGMTString() : "") +
        ((path) ? "; path=" + path : "") +
        ((domain) ? "; domain=" + domain : "") +
        ((secure) ? "; secure" : "");
	
    document.cookie = ciacho;
}

/* obiekt zakladek TabStrip */
function TabStrip(id, tabsCount)
{
	this.selected = id;
	this.tabsCount = tabsCount;
	
	this.renderTabs(this.selected);
}

TabStrip.prototype.renderTabs = function(selected)
{
	for(var i=0; i < this.tabsCount; i++)
	{
		if(i == selected)
			this.setActive(i);
		else
			this.setInactive(i);
	}
}

TabStrip.prototype.setActive = function(id)
{
	findObj('TabStrip_'+id).style.display = '';
	findObj('TabStripHeader_'+id).className = 'TabStripActive';
	setCookie('TabStrip_activeTab', id);
}

TabStrip.prototype.setInactive = function(id)
{
	findObj('TabStrip_'+id).style.display = 'none';
	findObj('TabStripHeader_'+id).className = 'TabStripInactive';
}

TabStrip.prototype.showTab = function(id)
{
	this.renderTabs(id);
}

var EditoCalendar = new Object();

/* wywolanie kalendarza */
EditoCalendar.showCalendar = function(obj, field, btn)
{
    Calendar.setup({
        inputField		:	field,
        ifFormat		:	"%Y-%m-%d",
        button			:	btn,
        singleClick		:	true,
		align			:	"Lt"
    });
	obj.onclick();
	
	return false;
}

/* wydarzenia */
function clickDay(o, blok)
{
	var dzien = o.id;
	dzien = dzien.substring(1, 11);	
	document.getElementById('dzionek'+blok).value = dzien;	
	$('#wybranydzien'+blok).submit();
}

/* bannery */
var EditoBannery = new Object();
EditoBannery.show = function(bannerList, kontener, mode, idBloku)
{
	if(mode == 'all')
	{
		for(bannerIndex in bannerList)
		{
			var cBanner = bannerList[bannerIndex];
			EditoBannery.showElement(kontener, cBanner);
		}
	}
	else if(mode == 'single_view_popup' && getCookie(kontener) == 1)
	{
		return;
	}
	else if(bannerList.length > 0)
	{
		// wylosuj banner z listy
		var randomIndex = Math.floor(Math.random() * bannerList.length);
		var cBanner = bannerList[randomIndex];
		
		// ustawianie ciacha jezeli popup ma sie pokazac tylko 1 raz
		if(mode == 'single_view_popup')
			setCookie(kontener, 1);
			
		EditoBannery.showElement(kontener, cBanner);
	}
}

EditoBannery.showElement = function(kontener, cBanner)
{
	switch( cBanner.params.type )
	{
		case 'flash':
		
			var box = Math.random();
			$("#"+kontener).append('<div class="reklama" id="' + kontener + box + '"></div>');
			
			var so = new SWFObject(cBanner.file, "", cBanner.width, cBanner.height, "8");
			so.useExpressInstall('images/flash/expressinstall.swf');
			so.addParam("wmode", "transparent");
			so.addParam("quality", "high");
			so.addParam("menu", "false");
			so.write(kontener + box);
		break;
		
		case 'flash_link':
		
			var box = Math.random();
			$("#"+kontener).append('<div style="position: relative; width: ' + cBanner.width + 'px; height: ' + cBanner.height + 'px; text-align: left; margin: 0 auto;"><a href="/'+ cBanner.params.link +'" class="reklamaMaska" style="height: '+cBanner.height+'px;"></a><div id="' + kontener + box + '"></div></div>');
			//$("#"+kontener).append('<div class="reklama" id="' + kontener + box + '"></div>');
			
			var so = new SWFObject(cBanner.file + "?alink1=" + cBanner.params.link + "&amp;atar1=" + cBanner.params.target, "", cBanner.width, cBanner.height, "8");
			so.useExpressInstall('images/flash/expressinstall.swf');
			so.addParam("wmode", "transparent");
			so.addParam("quality", "high");
			so.addParam("menu", "false");
			so.addParam("flashvars", "alink1=" + cBanner.params.link + "&amp;atar1=" + cBanner.params.target);
			so.write(kontener + box);
		break;
		
		case 'flash_popup':
			EditoStart.Add( function()
				{
					EditoPopup.Popup(cBanner.file, cBanner.params.link, cBanner.params.target, cBanner.width, cBanner.height, 'popup_flash', cBanner.params.popup_id, cBanner.params.popup_szablon, cBanner.params.popup_padding);
				}
			);
		break;
		
		case 'obrazek':
			$("#"+kontener).append('<div class="reklama"><img src="' + cBanner.file + '" width="' + cBanner.width + '" height="' + cBanner.height + '" border="0" alt="" /></div>');
		break;
		
		case 'obrazek_link':
			$("#"+kontener).append('<div class="reklama"><a href="' + cBanner.params.link + '" target="' + cBanner.params.target + '"><img src="' + cBanner.file + '" width="' + cBanner.width + '" height="' + cBanner.height + '" border="0" alt="" /></a></div>');
		break;
		
		case 'obrazek_popup':
			EditoStart.Add( function()
				{
					EditoPopup.Popup(cBanner.file, cBanner.params.link, cBanner.params.target, cBanner.width, cBanner.height, 'popup_obrazek', cBanner.params.popup_id, cBanner.params.popup_szablon, cBanner.params.popup_padding);
				}
			);
		break;
		
		case 'script':
			$("#"+kontener).append(cBanner.script);
			//document.write(cBanner.script);
		break;
	}
}


function showWin(src, w, h, title)
{
	//alert(document.body.clientHeight);
	$('#PopupDiv').css("height", document.body.clientHeight + "px");
	$('#PopupDiv #PopupContent').css("width", w);
	$('#PopupDiv #PopupContent').css("height", h);
	
	if($('#PopupDiv #PopupContent').find('#start').length == 0)
	{
		var content = '<table id="PopUp" class="PopUp" cellspacing="0" cellpadding="0" border="0">'
		+'					<tr>'
		+'						<td colspan="3" class="TitleBar">'
		+'							<table width="100%" cellspacing="0" cellpadding="0" border="0">'
		+'								<tr>'
		+'									<td class="btl">&nbsp;</td>'
		+'									<td class="bt"><span class="Title"></span></td>'
		+'									<td class="btc"><a href="javascript: void(hideWin());"><img src="/admin/Data/Images/popup/BtnClose.gif" width="16" height="16" border="0" class="Close" /></a></td>'
		+'									<td class="btr">&nbsp;</td>'
		+'								</tr>'
		+'							</table>'
		+'						</td>'
		+'					</tr>'
		+'					<tr>'
		+'						<td class="b bl">&nbsp;</td>'
		+'						<td class="bg"><div style="width: 100%; height:' + h + 'px; position: relative;">'
		+'							<div id="PopupLoading" style="width: 100%; height: 100%; background-color: #ffffff; position: absolute; border: 1px solid #888888;">'
		+'								<table border="0" style="width: 100%; height: 100%;">'
		+'									<tr>'
		+'										<td align="center" valign="middle">'
		+'											<img src="/admin/Data/Images/bigrotation.gif" border="0">'
		+'										</td>'
		+'									</tr>'
		+'								</table>'
		+'							</div>'
		+'							<iframe src="/szablony/blank.html" name="start" id="start" width="100%" height="100%" style="border: 1px solid #888888; background-color: #ffffff;" frameborder="0" marginheight="0" marginwidth="0" scrolling="auto"></iframe></div>'
		+'						</td>'
		+'						<td class="b br">&nbsp;</td>'
		+'					</tr>'
		+'					<tr>'
		+'						<td class="b bbl">&nbsp;</td>'
		+'						<td class="b bb">&nbsp;</td>'
		+'						<td class="b bbr">&nbsp;</td>'
		+'					</tr>'
		+'				</table>';
		
		$('#PopupDiv #PopupContent').append(content);
	}
	if(title != undefined) $('.PopUp .Title').html(title);
	$('#PopupLoading').show();
	$('#PopupDiv').show();
	
	//hideSelectField();
	
	window.frames['start'].location.href = src + '&ispopup=1';
	return window.frames['start'];
}

function hideWin()
{
	$('.PopUp .Title').html('');
	$('#PopupDiv').hide();
	window.frames['start'].location.href = '/szablony/blank.html';
	//window.top.start.showSelectField();
}

/* wizytowki */

function wizDelete(id,ilosc,prefix)
{	
	for (i=1;i<=ilosc;i++)
	{
		if (id==i)
		{
			if (document.getElementById(prefix+id).style.display=="none")
			{
				document.getElementById(prefix+id).style.display="block";
			}
			else
			{
				document.getElementById(prefix+id).style.display="none";
			}
		}
		else
		{
			document.getElementById(prefix+i).style.display="none";
		}
	}
}

function wizShow(id)
{
	if (document.getElementById(id).style.display=="none")
	{
		document.getElementById(id).style.display="block";
	}
	else
	{
		document.getElementById(id).style.display="none";
	}
}

function wizScroll(id)
{
	window.scrollTo(document.getElementById(id).offsetLeft,document.getElementById(id).offsetTop+100);
}

function wizCopy() 
{
	if (document.getElementById("f_firma").value != undefined && document.getElementById("pole_nazwa").value != undefined)
	{
		document.getElementById("f_firma").value = document.getElementById("pole_nazwa").value;
	}
	
	if (document.getElementById("f_ulica").value != undefined && document.getElementById("pole_ulica").value != undefined)
	{
		document.getElementById("f_ulica").value = document.getElementById("pole_ulica").value;
	}
	
	if (document.getElementById("f_nr_domu").value != undefined && document.getElementById("pole_nr_domu").value != undefined)
	{
		document.getElementById("f_nr_domu").value = document.getElementById("pole_nr_domu").value;
	}
	
	if (document.getElementById("f_nr_lokalu").value != undefined && document.getElementById("pole_nr_lokalu").value != undefined)
	{
		document.getElementById("f_nr_lokalu").value = document.getElementById("pole_nr_lokalu").value;
	}
	
	if (document.getElementById("f_kod_pocztowy").value != undefined && document.getElementById("pole_kod_pocztowy").value != undefined)
	{
		document.getElementById("f_kod_pocztowy").value = document.getElementById("pole_kod_pocztowy").value;
	}
	
	if (document.getElementById("f_miejscowosc").value != undefined && document.getElementById("pole_miejscowosc").value != undefined)
	{
		document.getElementById("f_miejscowosc").value = document.getElementById("pole_miejscowosc").value;
	}
	
	if (document.getElementById("f_nip").value != undefined && document.getElementById("pole_nip").value != undefined)
	{
		document.getElementById("f_nip").value = document.getElementById("pole_nip").value;
	}
}

function wizChecked(id)
{
	document.getElementById(id).checked=true;
}

function wizRowDisplay(ilosc,podmiot,max_ilosc)
{
	if (max_ilosc>0)
	{
		for (i=1;i<=max_ilosc;i++)
		{
			if (i<=ilosc)
			{
				document.getElementById(podmiot+'_row_'+i).style.display="block";
			}
			else
			{
				document.getElementById(podmiot+'_row_'+i).style.display="none";
			}
		}
		
		if (max_ilosc>1)
		{
			document.getElementById(podmiot+'_info').style.display="none";
			
			if (ilosc==max_ilosc)
			{
				document.getElementById(podmiot+'_add').style.display="none";
				document.getElementById(podmiot+'_del').style.display="none";
				document.getElementById(podmiot+'_info').style.display="block";
				
			}
			else if (ilosc==1)
			{
				document.getElementById(podmiot+'_add').style.display="block";
				document.getElementById(podmiot+'_del').style.display="none";
			}
			else
			{
				document.getElementById(podmiot+'_add').style.display="block";
				document.getElementById(podmiot+'_del').style.display="none";
			}
		}
		else
		{
			document.getElementById(podmiot+'_add').style.display="none";
			document.getElementById(podmiot+'_del').style.display="none";
		}
	}
	else
	{
		document.getElementById(podmiot+'_add').style.display="none";
		document.getElementById(podmiot+'_del').style.display="none";
		document.getElementById(podmiot+'_info').style.display="none";
	}
}

function wizRowAdd(podmiot,max_ilosc)
{
	for (i=1;i<=max_ilosc;i++)
	{
		if (document.getElementById(podmiot+'_row_'+i).style.display=="none")
		{
			document.getElementById(podmiot+'_row_'+i).style.display="block";
			document.getElementById('ilosc_'+podmiot).value=i;
			if (i==max_ilosc)
			{
				document.getElementById(podmiot+'_add').style.display="none";
				document.getElementById(podmiot+'_del').style.display="block";
				document.getElementById(podmiot+'_info').style.display="block";
			}
			else
			{
				document.getElementById(podmiot+'_add').style.display="block";
				document.getElementById(podmiot+'_del').style.display="block";
				document.getElementById(podmiot+'_info').style.display="none";
			}
			break;
		}
	}
}

function wizRowDel(podmiot,max_ilosc,ilosc)
{
	for (i=max_ilosc;i>=ilosc;i--)
	{
		if (document.getElementById(podmiot+'_row_'+i).style.display=="block")
		{
			var j=i-1;
			document.getElementById(podmiot+'_row_'+i).style.display="none";
			document.getElementById(podmiot+'_'+i).value='';
			document.getElementById('ilosc_'+podmiot).value=j;
			
			if (podmiot!='kluczowe')
			{
				document.getElementById(podmiot+'_opis_'+i).value='';
				document.getElementById(podmiot+'_alt_'+i).value='';
			}
			
			if (i==ilosc)
			{
				document.getElementById(podmiot+'_info').style.display="none";
				document.getElementById(podmiot+'_add').style.display="block";
				document.getElementById(podmiot+'_del').style.display="none";
			}
			else
			{
				document.getElementById(podmiot+'_info').style.display="none";
				document.getElementById(podmiot+'_add').style.display="block";
				document.getElementById(podmiot+'_del').style.display="block";
			}
			break;
		}
	}
}

/**
 * SWFObject v1.5: Flash Player detection and embed - http://blog.deconcept.com/swfobject/
 *
 * SWFObject is (c) 2007 Geoff Stearns and is released under the MIT License:
 * http://www.opensource.org/licenses/mit-license.php
 *
 */
if(typeof deconcept=="undefined"){var deconcept=new Object();}if(typeof deconcept.util=="undefined"){deconcept.util=new Object();}if(typeof deconcept.SWFObjectUtil=="undefined"){deconcept.SWFObjectUtil=new Object();}deconcept.SWFObject=function(_1,id,w,h,_5,c,_7,_8,_9,_a){if(!document.getElementById){return;}this.DETECT_KEY=_a?_a:"detectflash";this.skipDetect=deconcept.util.getRequestParameter(this.DETECT_KEY);this.params=new Object();this.variables=new Object();this.attributes=new Array();if(_1){this.setAttribute("swf",_1);}if(id){this.setAttribute("id",id);}if(w){this.setAttribute("width",w);}if(h){this.setAttribute("height",h);}if(_5){this.setAttribute("version",new deconcept.PlayerVersion(_5.toString().split(".")));}this.installedVer=deconcept.SWFObjectUtil.getPlayerVersion();if(!window.opera&&document.all&&this.installedVer.major>7){deconcept.SWFObject.doPrepUnload=true;}if(c){this.addParam("bgcolor",c);}var q=_7?_7:"high";this.addParam("quality",q);this.setAttribute("useExpressInstall",false);this.setAttribute("doExpressInstall",false);var _c=(_8)?_8:window.location;this.setAttribute("xiRedirectUrl",_c);this.setAttribute("redirectUrl","");if(_9){this.setAttribute("redirectUrl",_9);}};deconcept.SWFObject.prototype={useExpressInstall:function(_d){this.xiSWFPath=!_d?"expressinstall.swf":_d;this.setAttribute("useExpressInstall",true);},setAttribute:function(_e,_f){this.attributes[_e]=_f;},getAttribute:function(_10){return this.attributes[_10];},addParam:function(_11,_12){this.params[_11]=_12;},getParams:function(){return this.params;},addVariable:function(_13,_14){this.variables[_13]=_14;},getVariable:function(_15){return this.variables[_15];},getVariables:function(){return this.variables;},getVariablePairs:function(){var _16=new Array();var key;var _18=this.getVariables();for(key in _18){_16[_16.length]=key+"="+_18[key];}return _16;},getSWFHTML:function(){var _19="";if(navigator.plugins&&navigator.mimeTypes&&navigator.mimeTypes.length){if(this.getAttribute("doExpressInstall")){this.addVariable("MMplayerType","PlugIn");this.setAttribute("swf",this.xiSWFPath);}_19="<embed type=\"application/x-shockwave-flash\" src=\""+this.getAttribute("swf")+"\" width=\""+this.getAttribute("width")+"\" height=\""+this.getAttribute("height")+"\" style=\""+this.getAttribute("style")+"\"";_19+=" id=\""+this.getAttribute("id")+"\" name=\""+this.getAttribute("id")+"\" ";var _1a=this.getParams();for(var key in _1a){_19+=[key]+"=\""+_1a[key]+"\" ";}var _1c=this.getVariablePairs().join("&");if(_1c.length>0){_19+="flashvars=\""+_1c+"\"";}_19+="/>";}else{if(this.getAttribute("doExpressInstall")){this.addVariable("MMplayerType","ActiveX");this.setAttribute("swf",this.xiSWFPath);}_19="<object id=\""+this.getAttribute("id")+"\" classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" width=\""+this.getAttribute("width")+"\" height=\""+this.getAttribute("height")+"\" style=\""+this.getAttribute("style")+"\">";_19+="<param name=\"movie\" value=\""+this.getAttribute("swf")+"\" />";var _1d=this.getParams();for(var key in _1d){_19+="<param name=\""+key+"\" value=\""+_1d[key]+"\" />";}var _1f=this.getVariablePairs().join("&");if(_1f.length>0){_19+="<param name=\"flashvars\" value=\""+_1f+"\" />";}_19+="</object>";}return _19;},write:function(_20){if(this.getAttribute("useExpressInstall")){var _21=new deconcept.PlayerVersion([6,0,65]);if(this.installedVer.versionIsValid(_21)&&!this.installedVer.versionIsValid(this.getAttribute("version"))){this.setAttribute("doExpressInstall",true);this.addVariable("MMredirectURL",escape(this.getAttribute("xiRedirectUrl")));document.title=document.title.slice(0,47)+" - Flash Player Installation";this.addVariable("MMdoctitle",document.title);}}if(this.skipDetect||this.getAttribute("doExpressInstall")||this.installedVer.versionIsValid(this.getAttribute("version"))){var n=(typeof _20=="string")?document.getElementById(_20):_20;n.innerHTML=this.getSWFHTML();return true;}else{if(this.getAttribute("redirectUrl")!=""){document.location.replace(this.getAttribute("redirectUrl"));}}return false;}};deconcept.SWFObjectUtil.getPlayerVersion=function(){var _23=new deconcept.PlayerVersion([0,0,0]);if(navigator.plugins&&navigator.mimeTypes.length){var x=navigator.plugins["Shockwave Flash"];if(x&&x.description){_23=new deconcept.PlayerVersion(x.description.replace(/([a-zA-Z]|\s)+/,"").replace(/(\s+r|\s+b[0-9]+)/,".").split("."));}}else{if(navigator.userAgent&&navigator.userAgent.indexOf("Windows CE")>=0){var axo=1;var _26=3;while(axo){try{_26++;axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash."+_26);_23=new deconcept.PlayerVersion([_26,0,0]);}catch(e){axo=null;}}}else{try{var axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7");}catch(e){try{var axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");_23=new deconcept.PlayerVersion([6,0,21]);axo.AllowScriptAccess="always";}catch(e){if(_23.major==6){return _23;}}try{axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash");}catch(e){}}if(axo!=null){_23=new deconcept.PlayerVersion(axo.GetVariable("$version").split(" ")[1].split(","));}}}return _23;};deconcept.PlayerVersion=function(_29){this.major=_29[0]!=null?parseInt(_29[0]):0;this.minor=_29[1]!=null?parseInt(_29[1]):0;this.rev=_29[2]!=null?parseInt(_29[2]):0;};deconcept.PlayerVersion.prototype.versionIsValid=function(fv){if(this.major<fv.major){return false;}if(this.major>fv.major){return true;}if(this.minor<fv.minor){return false;}if(this.minor>fv.minor){return true;}if(this.rev<fv.rev){return false;}return true;};deconcept.util={getRequestParameter:function(_2b){var q=document.location.search||document.location.hash;if(_2b==null){return q;}if(q){var _2d=q.substring(1).split("&");for(var i=0;i<_2d.length;i++){if(_2d[i].substring(0,_2d[i].indexOf("="))==_2b){return _2d[i].substring((_2d[i].indexOf("=")+1));}}}return "";}};deconcept.SWFObjectUtil.cleanupSWFs=function(){var _2f=document.getElementsByTagName("OBJECT");for(var i=_2f.length-1;i>=0;i--){_2f[i].style.display="none";for(var x in _2f[i]){if(typeof _2f[i][x]=="function"){_2f[i][x]=function(){};}}}};if(deconcept.SWFObject.doPrepUnload){if(!deconcept.unloadSet){deconcept.SWFObjectUtil.prepUnload=function(){__flash_unloadHandler=function(){};__flash_savedUnloadHandler=function(){};window.attachEvent("onunload",deconcept.SWFObjectUtil.cleanupSWFs);};window.attachEvent("onbeforeunload",deconcept.SWFObjectUtil.prepUnload);deconcept.unloadSet=true;}}if(!document.getElementById&&document.all){document.getElementById=function(id){return document.all[id];};}var getQueryParamValue=deconcept.util.getRequestParameter;var FlashObject=deconcept.SWFObject;var SWFObject=deconcept.SWFObject;
/* -------------------- */

