var galerija6Id="galerija6"; 
var galerija6Width=910; 
var galerija6Height=400+150;
var firstShow=true; 
var galerija6Visible=false;

function getAvailableWidth(){
	var calcWidth=0;
	if(window.innerWidth)calcWidth=window.innerWidth;
	else calcWidth=(document.compatMode=='CSS1Compat'?document.documentElement.clientWidth:document.body.clientWidth);
	return calcWidth;
}
function getAvailableHeight(){
	var calcHeight=0;
	if(window.innerHeight) calcHeight=window.innerHeight;
	else calcHeight=(document.compatMode=='CSS1Compat'?document.documentElement.clientHeight:document.body.clientHeight);
	return calcHeight;
}
function toggleGalerija6(){
	if(firstShow){
		var style=document.getElementById(galerija6Id).style;
		style.left=Math.round((getAvailableWidth()-galerija6Width)/2 -8)+"px";
		style.top=Math.round((getAvailableHeight()-galerija6Height)/2 -40)+"px";
		firstShow=false;
	}
	if(galerija6Visible){
		document.getElementById('galerija6').style.display='none';
		galerija6Visible=false;
	}
	else{
		var style=document.getElementById('galerija6').style;
		style.left=Math.round((getAvailableWidth()-galerija6Width)/2 -8)+"px";
		style.top=Math.round((getAvailableHeight()-galerija6Height)/2 -40)+"px";
		style.display='block';
		galerija6Visible=true;
	}
}
function initGalerija6(){
	var element=document.getElementById(galerija6Id);
	if(element==null) return;
	var style=element.style;
	if(style==null) return;
	style.visibility="visible";
	style.position="absolute";
	style.width=galerija6Width+"px";
	style.height=galerija6Height+"px";
}
function loadGalerija6(){
	toggleGalerija6();
}
