function toggleVisibility(id)
{
	toggleVisibility("div", id);
}

function toggleVisibility(tag, id)
{
	jQuery(tag+"[id='"+id+"']").toggleClass('hideContent');
}

function addClass(tag, className)
{
	jQuery(tag+"[class*='"+className+"']").addClass('hideContent');	
}


function removeClass(tag, className)
{
	jQuery(tag+"[class*='"+className+"']").removeClass('hideContent');	
}


function beforeThickBoxShow()
{
	addClass('div', 'HideWhenPopupOpens');
}

function beforeThickBoxCloses()
{
	removeClass('div', 'HideWhenPopupOpens');
}

function makeDoubleDelegate(function1, function2) {
// return function is needed to not execute the stated functions immediately
	return function() {
		if (function1)
		{
			function1();
		}
		if (function2)
		{
			function2();
		}
	}
}

function isIE(version) {
	return (jQuery.browser.msie && jQuery.browser.version == version);
}

var lightStreamerIFrameCheck = 0;
var maxChecks = 20;
function hideLightstreamerIFrame()
{
	if((jQuery('body > iframe')[0] == null)
		&& (lightStreamerIFrameCheck < maxChecks))
	{
		lightStreamerIFrameCheck++;
		setTimeout('hideLightstreamerIFrame()', 200);
	}
	else
	{
		if(lightStreamerIFrameCheck < maxChecks)
		{
			jQuery('body > iframe').css('display', 'none');
		}
	}
}