function changeFontSize(divId,size){
	var sizeTable = new Array( '11px','14px','16px' );
	size=size>2?2:size<0?0:size;
	document.getElementById(divId).style.fontSize = sizeTable[size];
	
	if (size==0) {
	 	document.getElementById('font1').style.borderColor='#9d0005';	
	 	document.getElementById('font2').style.borderColor='white'
	 	document.getElementById('font3').style.borderColor='white';			
	}
	if (size==1) {
	 	document.getElementById('font1').style.borderColor='white';	
	 	document.getElementById('font2').style.borderColor='#9d0005'
	 	document.getElementById('font3').style.borderColor='white';			
	}
	if (size==2) {
	 	document.getElementById('font1').style.borderColor='white';	
	 	document.getElementById('font2').style.borderColor='white'
	 	document.getElementById('font3').style.borderColor='#9d0005';			
	}	
	
}


function galeria(gallery,img) {
        winscroll='no';
		  w=660; h=520;		        
        if (h>screen.height-80) {h=screen.height-80;w+=40;winscroll='yes';}
        if (w>screen.width-40) {w=screen.width-40;winscroll='yes';}
        px=screen.width/2-w/2; py=screen.height/2-h/2-80;        
        win=open('galeria.php?img='+img+'&gal='+gallery,'','left='+px+',top='+py+',width='+w+',height='+eval(h+100)+',scrollbars='+winscroll+',toolbars=no');
}

function writeflash(str) {
	document.write(str);
}

/**
 * @author Witold Graca
 */

var obj = null;
 
function checkHover() {
	if (obj) {
		obj.find('ul').fadeOut('fast');	
	} //if
} //checkHover


$(document).ready(function() {
	
	$('#NavMain > li').hover(function() {
		if (obj) {
			obj.find('ul').fadeOut('slow');
			obj = null;
		} //if
		var offset = $(this).offset();
		$("#status2").html( "left: " + offset.left + ", top: " + offset.top );
		
		if ($.browser.msie) {
			offset.left = offset.left -40;
		}
		
		if (offset.left < 0) {
			offset.left = 0;
		}
		
		
		$(this).find("ul").css("top",offset.top + $(this).height());
		$(this).find("ul").css("left",offset.left);
		$(this).find('ul').fadeIn('slow').fadeTo('fast',0.8);
	}, function() {
		obj = $(this);
		setTimeout(
			"checkHover()",
			400);
	});
	
	$("ul.submenu > li.item").hover(function () {
		$(this).css("border-bottom:","1px white dotted");
	},
		function () {
		$(this).css("border-bottom:","none");
	});
	


	
});
