// JavaScript Document

$(function(){
	$('#page').css("font-size",$.cookie('fsize'));

	$('.over').each(function(){
		rolloverSrc = $(this).attr('src').replace(/(\.gif|\.jpg|\.png)$/, "_on"+"$1");
		$(this).clone().insertAfter(this)
		.attr('src',rolloverSrc)
		.css('display','none');

		$(this).mouseover(function(){
			$(this).hide();
			$(this).next().show();
		});
	
		$(this).next().mouseout(function(){
			$(this).hide();
			$(this).prev().show();
		});
	});
});

function font(x){
	$('#page').css('font-size',x);
	$.cookie('fsize',x,{expires:30,path:'/'});
}

function m_win(url,windowname,width,height) {
	var features="location=no, menubar=no, status=no, scrollbars=no, resizable=yes, toolbar=no";
	if (width) {
		if (window.screen.width > width)
			features+=", left="+(window.screen.width-width)/2;
		else width=window.screen.width;
			features+=", width="+width;
		}
		if (height) {
			if (window.screen.height > height)
				features+=", top="+(window.screen.height-height)/2;
			else height=window.screen.height;
		features+=", height="+height;
	}
	window.open(url,windowname,features);
}
