function load_banner(n) {
	try {
		var bn_d = document.getElementById("b_afterload_dest_" + n);
		var bn_s = document.getElementById("b_afterload_src_" + n);
	} catch (er) {}
	if (bn_d && bn_s) {
		try { 
			bn_d.innerHTML =  bn_s.innerHTML;
			bn_s.innerHTML = "";
		} catch (er) {}
	}
}

function show_icon(icon_number, link) {
	position = (icon_number-1) * -16;
	document.write('<span style="background-image: url(' + pics_path + '/ico/icons_set.png); background-position: ' + position + 'px 0px; width: 16px; height: 16px; display: block;">' + (link ? '<a href="' + link + '">' : '') + '<img width="16" height="16" border="0" src="/s.gif" title="" alt=""/>' + (link ? '</a>' : '') + '</span>');
}

function swap_display(main_div_id, second_div_id)
{
	var main_div = document.getElementById(main_div_id);
	if (second_div_id) {
		var second_div = document.getElementById(second_div_id);
	}
	if (main_div) {
		main_div.style.display = (main_div.style.display=="none") ? "block" : "none";
		if (second_div) {
			second_div.style.display = (main_div.style.display=="none") ? "block" : "none";
		}
	}
}

blink_enable = 1;

function blink_alert_div() {
	if (blink_enable == 1) {
		var b_div = document.getElementById("blink_alert");
		var t_div = document.getElementById("show_message");
		var e_img = document.getElementById("envelope_img");

		if (b_div) {
			if (t_div.style.display == "none") {
				if (b_div.className == "alert") {
					b_div.className = "alert_blink";
					e_img.style.visibility = "visible";
				} else {
					b_div.className = "alert";
					e_img.style.visibility = "hidden";
				}
			} else {
				b_div.className = "alert";
				e_img.style.visibility = "hidden";
			}
		}
		setTimeout(blink_alert_div, 500);
	}
}

function Cookies() {
	var decoded_value = '';
	this.cookie_store = new Array;
	var all_cookies = document.cookie.split('; ');
	if (all_cookies != '') {
		for (var i=0; i<all_cookies.length; i++) {
			var cookie_pair = all_cookies[i].split('=');
			decoded_value = cookie_pair[1].replace(/%3B/g, ';');
			decoded_value = decoded_value.replace(/%3D/g, '=');
			this.cookie_store[cookie_pair[0]] = decoded_value;
		}
	}
	this.get = function(name) {
		return this.cookie_store[name];
	}
	this.set = function(name, value, days) {
		var encoded_value = value.replace(/;/g, '%3B');
		encoded_value = encoded_value.replace(/=/g, '%3D');
		days = parseInt(days);
		if (days) {
			var date = new Date();
			date.setTime(date.getTime()+(days*24*60*60*1000));
			var expires = '; expires='+date.toGMTString();
		} else {
			var expires = '';
		}

		document.cookie = name+'='+encoded_value+expires+'; path=/; domain=.' + path_domain;
		this.cookie_store[name] = value;
	}
}

function changeLang(obj) {
	document.location = '/lang.php?go=' + obj.value;
}

function swap_display2(main_div_id, second_div_id) {

	var massiv_divov =  new Array();
	var spl = second_div_id.split(',');
	var results = new Array();
main_div = document.getElementById(main_div_id);
for (i=0; i<spl.length; ++i) {//-1
	results[i] = spl[i];
	
}


for (var t=0;t<results.length;t++)
{
	if (results[t]) var second_div = document.getElementById(results[t]);
	if (main_div_id!=results[t]) {
		if (second_div) second_div.style.display = "none";
	}
}

if (main_div) {
		main_div.style.display = (main_div.style.display=="none") ? "block" : "none";		
	}
}

function load_javascript(link) {
	var script = document.createElement('script');
	script.type = 'text/javascript';
	script.src = link;
	document.getElementsByTagName('head')[0].appendChild(script);
}

/*******************************
function drawPages shows page listing
example of use: <script type="text/javascript">drawPages(167, "34", 12, "Pages:", "index.php", "user=13", 10);</script>
where:
* 167 -- total number of items.
* 34 -- current page.
* 12 -- amount of items per one page.
* Pages: -- text before page listing.
* index.php -- name of file where listing is used.
* user=13 -- additional variables if needed. & at beginning is not needed.
* 10 -- amount of pages listed on one page. if not added, then will be 10 by default.

ATTENTION! second, fourth, fifth and sixth variables need quotes.
*******************************/

function drawPages(items_total, curr_page, page_split, pages_text, page_name, add_params, page_count)
{
	curr_page = parseInt(curr_page);

	var html;
	var next_flag = 1;
	var numbers;

	if (items_total <= page_split) {
		return false;
	} else {
		numbers = Math.ceil(items_total/page_split);
	}

	if (curr_page > numbers) {
		curr_page = numbers;
	} else if (!curr_page) {
		curr_page = 1;
	}

	if (add_params) {
		add_params = "&amp;" + add_params;
	}

	if (!page_count) {
		page_count = 10;
	}

	var curr_num = parseInt((curr_page - 1)/page_count) * page_count;

	html = "<div class=\"pages\"> " + pages_text + " ";

	if (curr_page > page_count) {
		html += "<a href=\"/" + page_name + "?page=" + curr_num + add_params + "\">&laquo;<\/a> ";
	}

	for (var i = (curr_num + 1); i <= (curr_num + page_count); i++) {
		if ((i == (items_total + 1)) || (i > numbers)) {
			next_flag = 0;
			break;
		} else {
			if (i == curr_page) {
				html += "<span class=\"selected3\">" + i + "<\/span>";
			} else {
				html += "<a href=\"/" + page_name + "?page=" + i + add_params + "\">" + i + "<\/a>";
			}
		}

		html += " "
	}

	if (next_flag && (curr_num + page_count) < numbers) {
		html += "<a href=\"/" + page_name + "?page=" + i + add_params + "\">&raquo;<\/a>";
	}

	html += "<span class=\"pages_pr\">&nbsp;<\/span><\/div>";
	
	if (html) {
		document.write(html);
	}
}

/*******************************
function getPos calculates position of element. returns array.
example of use: var parentPosition = getPos(document.getElementById('text_field'));
where:
* document.getElementById('text_field') -- is a id of elemnt for which you want to calculate position.

ATTENTION! value have to be like in example or 'this'.
*******************************/

function getPos (element)
{
	var absPos = new Array();
		absPos['left'] = element.offsetLeft;
		absPos['top'] = element.offsetTop;

	var parentPos;

	parentPos = element.offsetParent;
	while (parentPos != null) {
		absPos['left'] = (parentPos.offsetLeft) + absPos['left'];
		parentPos = parentPos.offsetParent;
	}

	parentPos = element.offsetParent;
	while (parentPos != null) {
		absPos['top'] = (parentPos.offsetTop) + absPos['top'];
		parentPos = parentPos.offsetParent;
	}

	return absPos;
}

function show_div(img, pic_id, type)
{
	var div = document.getElementById('imgpopup');
	var pos = getPos(img);
	div.style.left    = pos['left'] + img.width - (pic_id > 0 ? 55 : 27) + 'px';
	div.style.top     = pos['top'] + 'px';
	div.style.display = 'block';
	div.is_alive      = 1;
	div.onmouseover = function()
	{
		div.is_alive = 1;
	}
	div.onmouseout = function()
	{
		div.is_alive = 0;
		window.setTimeout('close_popup()', 100);
	}

	//link_zoom_div
	var zoom_div = document.getElementById('link_zoom_div');
	zoom_div.onclick = function() {
		newWnd('/photo_view.php?photoID='+pic_id,760,770);
		return false;
	}
	if (pic_id > 0) {
		zoom_div.style.display = 'block';
	} else {
		zoom_div.style.display = 'none';
	}

	//link_message_div
	var link_message_div = document.getElementById('link_message_div');
	link_message_div.onclick = function() {
		var link_message_img_name = img.name;
		var link_message_reg= /img_(.*)_/;
		var link_message_arr=link_message_reg.exec(link_message_img_name);
		if(link_message_arr && link_message_arr[1]) {
			link_message_img_name = link_message_arr[1];
		}
		//alert(link_message_img_name);
		newWnd('/mail.php?act=new_message&user='+link_message_img_name,560,630);
		return false;
	}
	
}

function hide_div()
{
	var div = document.getElementById('imgpopup');
	div.is_alive = 0;
	window.setTimeout('close_popup()', 100);
}
function close_popup()
{
	var div = document.getElementById('imgpopup');
	if (div.is_alive == 0) {
		div.style.display = 'none';
	}
}


/*******************************
function getSize calculates width and height of an element. returns array.
example of use: var parentSize = getSize(document.getElementById('text_field'));
where:
* document.getElementById('text_field') -- is a id of elemnt for which you want to calculate size.

ATTENTION! value have to be like in example or 'this'.
*******************************/

function getSize (element) {
	var width = new Array();

	width['width']  = element.offsetWidth;
	width['height'] = element.offsetHeight;

	return width;
}

/*******************************
function getSize shows help box message near some HTML element.
example of use: onFocus="helpPos(document.getElementById('text_field'), 10, 30, 250, 1);"
where:
* document.getElementById('text_field') -- is a id of elemnt for which you want to calculate size.
* 10 -- message id from helpMessages array.
* 30 -- left padding from HTML element
* 250 -- width of help box.
* 1 -- type of help box.
	### TYPE IDs ###
	1: simple help box near form elements.

ATTENTION! somewhere in document you have to set array with messages. it looks like this:
	var helpMessages = new Array();
	helpMessages[0] = 'Help message number one. Really good help text.';
	helpMessages[1] = 'And another one is here. Read me.';
*******************************/

function helpPos (parentElement, helpID, helpPadding, helpParam, type)
{
	if (!type) {
		type = 1;
		width = helpParam;
	}
	
	var helpElement = document.getElementById('helpDiv');
	if (!helpElement) {
		var newHelp = document.createElement('DIV');
			newHelp.setAttribute('id', 'helpDiv', 0);
			newHelp.style.position = 'absolute';

		document.body.appendChild(newHelp);
		var helpElement = document.getElementById('helpDiv');
	}

	if(type == 1) {
		helpElement.className = 'reg_help_box1 txt11 pt2';
	} else {
		helpElement.className = 'blog_help_box1 txt11 pt2';
	}

	helpElement.style.display = 'block';

	var parentPosition = getPos(parentElement);
	var parentSize = getSize(parentElement);
	var helpPosition = new Array();

	if (type == 1) {
		helpPosition['left'] = parentPosition['left'] + parentSize['width'] + (helpPadding ? helpPadding : 0);
		helpPosition['top'] = parentPosition['top'];
		var content = '<div class="help_tip"><img src="'+pics_path+'/img/helpbox_arrow_yellow.gif" border="0" class="help_tip_arrow" width="9" height="15" /><div>' + helpMessages[helpID] + '</div></div>';
	}
	else {
		helpPosition['left'] = parentPosition['left'] + (helpPadding ? helpPadding : 0);
		helpPosition['top'] = parentPosition['top'] - (parentSize['width']+helpParam);
		var content = '<div class="blog_tip"><img src="'+pics_path+'/img/blog_tip_arrow.gif" border="0" class="blog_tip_arrow" width="15" height="9" /><div>' + helpMessages[helpID] + '</div></div>';
	}
	helpElement.innerHTML = content;
	helpElement.style.left = helpPosition['left'] + 'px';
	helpElement.style.top = helpPosition['top'] + 'px';
	if (type == 1) helpElement.style.width = width + 'px';

}

function hide_helpPos ()
{
	var helpElement = document.getElementById('helpDiv');
	helpElement.style.display = 'none';
}

var ajaxml = false;

function ajaxSend(url, field, additional) {
	var outputDiv = document.getElementById(field);

	if (!ajaxml) {
		if (window.XMLHttpRequest) {
			ajaxml = new XMLHttpRequest();
		} else if (window.ActiveXObject) {
			ajaxml = new ActiveXObject('Microsoft.XMLHTTP');
		}
	} if (ajaxml) {
		ajaxml.open('GET', url, true);
		ajaxml.onreadystatechange = function() {
			if (ajaxml.readyState == 4 && ajaxml.status == 200) {
				var content = ajaxml.responseText;
				outputDiv.innerHTML = content;
				if (field == 'regions') {
					var region_id = document.getElementById('region_id');
					var town_div = document.getElementById('towns');
					var makeURL_ = 'locations_popup.php?country_id=0&region_id=' + region_id.value + '&town_id=' + additional + '&type=3';
					setTimeout("ajaxSend('" + makeURL_ + "', 'towns');", 100);
					if (region_id.value == 0) {
						town_div.style.display = 'none';
						if (town_div.style.display == 'block') {
							document.getElementById('town_id').selectedIndex = 0;
						}
					} else {
						town_div.style.display = 'block';
					}
				} else if (field == 'towns') {
					document.getElementById('submit_button').style.display = 'block';
				}
			}
		};
		ajaxml.send(null);
	}
}

function newWnd(page,w,h)
{
	var root = '';

	var scroll=1;
	if (w>screen.width) {
		w=screen.width;
		scroll=1;
	}
	if (h>screen.height) {
		h=screen.height;
		scroll=1;
	}

	var left = (screen.width/2) - w/2;
	var top = (screen.height/2) - h/2;

	var opt='toolbar=0,location=0,directories=0,status=1,menubar=0,scrollbars='+scroll+',height='+h+',width='+w+',top='+top+',left='+left;

	var newWindow = window.open(root+page,'',opt);

	newWindow.focus();

}

/* Textarea counter */
function textCounter(field, cntfield, maxlimit) {
	if (field.value.length > maxlimit) {
		field.value = field.value.substring(0, maxlimit);
	} else {
		cntfield.innerHTML = maxlimit - field.value.length;
	}
}

function updateParent(url) {
	opener.document.location = url;
	self.close();
	return false;
}

function updateParentPhotoPopup(url) {
	opener.document.location = url;

	var is_chrome = navigator.userAgent.toLowerCase().indexOf('chrome') > -1;  

	if (is_chrome) {
		opener.blur(); // Chrome
	} else {
		opener.focus();  // FF and IE
	}
	
	return false;
}

function mypop(mytext){
	mytext = '<br><font class=txt>'+mytext+'</font><br><br>';
	return overlib(mytext,
	'AUTO',WRAP,50,'AUTO',VAUTO,FGCOLOR,'#7AA6D1',BGCOLOR,'#999999',TEXTCOLOR,'#ffffff;',
	SHADOW, SHADOWCOLOR,'#B5D3EF', SHADOWOPACITY, 60);
}

function include(filename) {
	var ext = /^.+\.([^.]+)$/.exec(filename);
	filetype = ext == null ? "" : ext[1];

	if (filetype=="js"){ //if filename is a external JavaScript file
		var fileref=document.createElement('script');
		fileref.setAttribute("type","text/javascript");
		fileref.setAttribute("src", filename);
	}
	else if (filetype=="css"){ //if filename is an external CSS file
		var fileref=document.createElement("link");
		fileref.setAttribute("rel", "stylesheet");
		fileref.setAttribute("type", "text/css");
		fileref.setAttribute("href", filename);
	}
	if (typeof fileref!="undefined") {
		document.getElementsByTagName("head")[0].appendChild(fileref);
	}
}

function create_style_tag(cssText) {
	var style=document.createElement("style");
	style.setAttribute("type", "text/css");

	if(style.styleSheet){// IE
		style.styleSheet.cssText = cssText;
	} else {// w3c
		var cssText = document.createTextNode(cssText);
		style.appendChild(cssText);
	}

	if (typeof style!="undefined") {
		document.getElementsByTagName("head")[0].appendChild(style);
	}
	
}









/**
 * SWFObject v1.5.1: 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 = {};
if(typeof deconcept.util == "undefined") deconcept.util = {};
if(typeof deconcept.SWFObjectUtil == "undefined") deconcept.SWFObjectUtil = {};
deconcept.SWFObject = function(swf, id, w, h, ver, c, quality, xiRedirectUrl, redirectUrl, detectKey) {
	if (!document.getElementById) { return; }
	this.DETECT_KEY = detectKey ? detectKey : 'detectflash';
	this.skipDetect = deconcept.util.getRequestParameter(this.DETECT_KEY);
	this.params = {};
	this.variables = {};
	this.attributes = [];
	if(swf) { this.setAttribute('swf', swf); }
	if(id) { this.setAttribute('id', id); }
	if(w) { this.setAttribute('width', w); }
	if(h) { this.setAttribute('height', h); }
	if(ver) { this.setAttribute('version', new deconcept.PlayerVersion(ver.toString().split("."))); }
	this.installedVer = deconcept.SWFObjectUtil.getPlayerVersion();
	if (!window.opera && document.all && this.installedVer.major > 7) {
		// only add the onunload cleanup if the Flash Player version supports External Interface and we are in IE
		// fixes bug in some fp9 versions see http://blog.deconcept.com/2006/07/28/swfobject-143-released/
		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(c) { this.addParam('bgcolor', c); }
	var q = quality ? quality : 'high';
	this.addParam('quality', q);
	this.setAttribute('useExpressInstall', false);
	this.setAttribute('doExpressInstall', false);
	var xir = (xiRedirectUrl) ? xiRedirectUrl : window.location;
	this.setAttribute('xiRedirectUrl', xir);
	this.setAttribute('redirectUrl', '');
	if(redirectUrl) { this.setAttribute('redirectUrl', redirectUrl); }
}
deconcept.SWFObject.prototype = {
	useExpressInstall: function(path) {
		this.xiSWFPath = !path ? "expressinstall.swf" : path;
		this.setAttribute('useExpressInstall', true);
	},
	setAttribute: function(name, value){
		this.attributes[name] = value;
	},
	getAttribute: function(name){
		return this.attributes[name] || "";
	},
	addParam: function(name, value){
		this.params[name] = value;
	},
	getParams: function(){
		return this.params;
	},
	addVariable: function(name, value){
		this.variables[name] = value;
	},
	getVariable: function(name){
		return this.variables[name] || "";
	},
	getVariables: function(){
		return this.variables;
	},
	getVariablePairs: function(){
		var variablePairs = [];
		var key;
		var variables = this.getVariables();
		for(key in variables){
			variablePairs[variablePairs.length] = key +"="+ variables[key];
		}
		return variablePairs;
	},
	getSWFHTML: function() {
		var swfNode = "";
		if (navigator.plugins && navigator.mimeTypes && navigator.mimeTypes.length) { // netscape plugin architecture
			if (this.getAttribute("doExpressInstall")) {
				this.addVariable("MMplayerType", "PlugIn");
				this.setAttribute('swf', this.xiSWFPath);
			}
			swfNode = '<embed type="application/x-shockwave-flash" src="'+ this.getAttribute('swf') +'" width="'+ this.getAttribute('width') +'" height="'+ this.getAttribute('height') +'" style="'+ (this.getAttribute('style') || "") +'"';
			swfNode += ' id="'+ this.getAttribute('id') +'" name="'+ this.getAttribute('id') +'" ';
			var params = this.getParams();
			 for(var key in params){ swfNode += [key] +'="'+ params[key] +'" '; }
			var pairs = this.getVariablePairs().join("&");
			 if (pairs.length > 0){ swfNode += 'flashvars="'+ pairs +'"'; }
			swfNode += '/>';
		} else { // PC IE
			if (this.getAttribute("doExpressInstall")) {
				this.addVariable("MMplayerType", "ActiveX");
				this.setAttribute('swf', this.xiSWFPath);
			}
			swfNode = '<object id="'+ this.getAttribute('id') +'" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="'+ this.getAttribute('width') +'" height="'+ this.getAttribute('height') +'" style="'+ (this.getAttribute('style') || "") +'">';
			swfNode += '<param name="movie" value="'+ this.getAttribute('swf') +'" />';
			var params = this.getParams();
			for(var key in params) {
			 swfNode += '<param name="'+ key +'" value="'+ params[key] +'" />';
			}
			var pairs = this.getVariablePairs().join("&");
			if(pairs.length > 0) {swfNode += '<param name="flashvars" value="'+ pairs +'" />';}
			swfNode += "</object>";
		}
		return swfNode;
	},
	write: function(elementId){
		if(this.getAttribute('useExpressInstall')) {
			// check to see if we need to do an express install
			var expressInstallReqVer = new deconcept.PlayerVersion([6,0,65]);
			if (this.installedVer.versionIsValid(expressInstallReqVer) && !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 elementId == 'string') ? document.getElementById(elementId) : elementId;
			n.innerHTML = this.getSWFHTML();
			return true;
		}else{
			if(this.getAttribute('redirectUrl') != "") {
				document.location.replace(this.getAttribute('redirectUrl'));
			}
		}
		return false;
	}
}

/* ---- detection functions ---- */
deconcept.SWFObjectUtil.getPlayerVersion = function(){
	var PlayerVersion = new deconcept.PlayerVersion([0,0,0]);
	if(navigator.plugins && navigator.mimeTypes.length){
		var x = navigator.plugins["Shockwave Flash"];
		if(x && x.description) {
			PlayerVersion = 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){ // if Windows CE
		var axo = 1;
		var counter = 3;
		while(axo) {
			try {
				counter++;
				axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash."+ counter);
//				document.write("player v: "+ counter);
				PlayerVersion = new deconcept.PlayerVersion([counter,0,0]);
			} catch (e) {
				axo = null;
			}
		}
	} else { // Win IE (non mobile)
		// do minor version lookup in IE, but avoid fp6 crashing issues
		// see http://blog.deconcept.com/2006/01/11/getvariable-setvariable-crash-internet-explorer-flash-6/
		try{
			var axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7");
		}catch(e){
			try {
				var axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");
				PlayerVersion = new deconcept.PlayerVersion([6,0,21]);
				axo.AllowScriptAccess = "always"; // error if player version < 6.0.47 (thanks to Michael Williams @ Adobe for this code)
			} catch(e) {
				if (PlayerVersion.major == 6) {
					return PlayerVersion;
				}
			}
			try {
				axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash");
			} catch(e) {}
		}
		if (axo != null) {
			PlayerVersion = new deconcept.PlayerVersion(axo.GetVariable("$version").split(" ")[1].split(","));
		}
	}
	return PlayerVersion;
}
deconcept.PlayerVersion = function(arrVersion){
	this.major = arrVersion[0] != null ? parseInt(arrVersion[0]) : 0;
	this.minor = arrVersion[1] != null ? parseInt(arrVersion[1]) : 0;
	this.rev = arrVersion[2] != null ? parseInt(arrVersion[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;
}
/* ---- get value of query string param ---- */
deconcept.util = {
	getRequestParameter: function(param) {
		var q = document.location.search || document.location.hash;
		if (param == null) { return q; }
		if(q) {
			var pairs = q.substring(1).split("&");
			for (var i=0; i < pairs.length; i++) {
				if (pairs[i].substring(0, pairs[i].indexOf("=")) == param) {
					return pairs[i].substring((pairs[i].indexOf("=")+1));
				}
			}
		}
		return "";
	}
}
/* fix for video streaming bug */
deconcept.SWFObjectUtil.cleanupSWFs = function() {
	var objects = document.getElementsByTagName("OBJECT");
	for (var i = objects.length - 1; i >= 0; i--) {
		objects[i].style.display = 'none';
		for (var x in objects[i]) {
			if (typeof objects[i][x] == 'function') {
				objects[i][x] = function(){};
			}
		}
	}
}
/* add document.getElementById if needed (mobile IE < 5) */
if (!document.getElementById && document.all) { document.getElementById = function(id) { return document.all[id]; }}

/* add some aliases for ease of use/backwards compatibility */
var getQueryParamValue = deconcept.util.getRequestParameter;
var FlashObject = deconcept.SWFObject; // for legacy support
var SWFObject = deconcept.SWFObject;

/**
 * end of SWFObject v1.5.1: 

 */

var notWhitespace = /\S/;
function cleanWhitespace(node) {
	for (var x = 0; x < node.childNodes.length; x++) {
		var childNode = node.childNodes[x];
		if ((childNode.nodeType == 3) && (!notWhitespace.test(childNode.nodeValue))) {
			node.removeChild(node.childNodes[x]);
			x--;
		}
		if (childNode.nodeType == 1) {
			cleanWhitespace(childNode);
		}
	}
}
