if(!document.getElementById)
{
	if(document.all)
	{
		accessObj = function()
		{
			if(typeof document.all[arguments[0]]!="undefined")
			return document.all[arguments[0]]
			else
			return null
		}
	}
	else if(document.layers)
	{
		accessObj = function()
		{
			if(typeof document[arguments[0]]!="undefined")
			return document[arguments[0]]
			else
			return null
		}
	}
}
else
{
	accessObj = function()
	{
		return document.getElementById(arguments[0]);
	}
}

/*************************** Rollover function ************************************/
sfHover = function() {
	var list = accessObj("menu_list").getElementsByTagName("LI");
	for (var i=0; i<list.length; i++) {
		list[i].onmouseover=function() {
			this.className+=" sfhover";
			
		}
		list[i].onmouseout=function() {
			this.className=this.className.replace(new RegExp(" sfhover\\b"), "");
		}
	}
}
if (window.attachEvent) window.attachEvent("onload", sfHover);

/*************************** Opacity ***********************************************/

function setOpacity(objname, o)
{
	var obj = accessObj(objname);
	var per = o / 100;
	
    obj.style.opacity = (per);
    obj.style.MozOpacity = (per);
    obj.style.KhtmlOpacity = (per);
    obj.style.filter = 'alpha(opacity=' + o + ')';
}

/*************************** Lightbox *************************************/

function close_lightbox()
{
		if(($.browser.msie && jQuery.browser.version == "6.0"))
		{
			$('body').css("overflow-x", "auto");
		}
		$('#light_box').dialog('close');
}

function call_lightbox(tar,title)
{
	$("#light_box").dialog("open");
	if(tar != "")
	{
		$("#page_load").html("<img src='"+dir_fix+tar+"' alt='"+title+"' />");
		$(".ui-dialog").css("width",$("#page_load img").width()+20)
		$(".ui-dialog").css("height",$("#page_load img").height()+40)
	}
	else
	{
		$("#page_load").html('<a id="player" href="'+dir_fix+'video/zeitecs.flv" style="display:block;width:500px;height:324px;"></a>');
		$(".ui-dialog").css("width",520);
		$(".ui-dialog").css("height",374);
		flowplayer('player', dir_fix+'flash/flowplayer-3.2.2.swf', {"screen":{"height":"100pct","top":0},"plugins":{"controls":{"borderRadius":0,"timeColor":"rgba(0, 148, 217, 1)","bufferGradient":[0,0.4,0],"slowForward":true,"backgroundColor":"rgba(0, 0, 0, 1)","volumeSliderGradient":[0,0.4,0],"slowBackward":false,"progressGradient":[0,0.4,0],"time":true,"height":24,"volumeColor":"rgba(177, 177, 177, 0)","tooltips":{"stop":"Stop","slowMotionFBwd":"Fast backward","previous":"Previous","next":"Next","play":"Play","buttons":true,"slowMotionFwd":"Slow forward","fullscreen":"Fullscreen","unmute":"Unmute","pause":"Pause","marginBottom":5,"slowMotionFFwd":"Fast forward","fullscreenExit":"Exit fullscreen","volume":true,"scrubber":true,"slowMotionBwd":"Slow backward","mute":"Mute"},"opacity":1,"fastBackward":false,"volumeSliderColor":"rgba(71, 71, 71, 1)","border":"0px","bufferColor":"rgba(71, 71, 71, 1)","buttonColor":"rgba(17, 17, 17, 1)","mute":true,"autoHide":{"enabled":false,"hideDelay":500,"mouseOutDelay":500,"hideStyle":"fade","hideDuration":400,"fullscreenOnly":true},"backgroundGradient":"none","width":"100pct","display":"block","buttonOverColor":"rgba(0, 148, 217, 1)","url":"flowplayer.controls-3.2.1.swf","fullscreen":true,"timeBgColor":"rgba(17, 17, 17, 1)","borderWidth":0,"scrubberBarHeightRatio":1,"bottom":0,"stop":true,"zIndex":1,"sliderColor":"#000000","scrubberHeightRatio":0.4,"tooltipTextColor":"#ffffff","sliderGradient":"none","timeBgHeightRatio":0.4,"volumeSliderHeightRatio":0.4,"name":"controls","volumeBarHeightRatio":1,"left":"50pct","tooltipColor":"rgba(0, 148, 217, 1)","playlist":false,"durationColor":"#ffffff","play":true,"fastForward":true,"progressColor":"rgba(0, 114, 155, 1)","timeBorder":"1px solid rgba(0, 0, 0, 0.3)","volume":true,"scrubber":true,"builtIn":false}}});

	}
	$("#light_box").dialog({ position: 'centre' });
	$('.ui-widget-overlay').click(function() {close_lightbox()});
	$('.ui-widget-overlay').css("height",$(document).height());

	if($.browser.msie && jQuery.browser.version == "6.0")
	{
		$('body').css("overflow-x", "hidden");
	}
}