function makeRemote(url,name, w , h) {
	var winl = (screen.width - w) / 2;
	var wint = (screen.height - h) / 2;
	winprops = 'height='+h+',width='+w+',top='+wint+',left='+winl+',toolbar=yes,directories=no,status=no,menubar=no,scrollbars=yes';

	remote = window.open(url,name, winprops);
	if (remote.opener == null) remote.opener = window; 
		remote.opener.name = "opener";
}

function makeNormalWindow(url,name, w , h) {
	var winl = (screen.width - w) / 2;
	var wint = (screen.height - h) / 2;
	winprops = 'height='+h+',width='+w+',top='+wint+',left='+winl+',toolbar=no,resizable=no,directories=no,status=no,menubar=no,scrollbars=yes';

	remote = window.open(url,name, winprops);
	if (remote.opener == null) remote.opener = window; 
		remote.opener.name = "opener";
}

function printme() {
	window.print();
	setTimeout("window.close()",4000);
}

var checked = true;

function checkall(formid) {
	f = document.getElementById(formid);
	if (checked) {
		for (var i = 0; i < f.length; i++) {
			if (f.elements[i].type == 'checkbox') {
				f.elements[i].checked = true;
			}
		}
	} else {
		for (var i = 0; i < f.length; i++) {
			if (f.elements[i].type == 'checkbox') {
				f.elements[i].checked = false;
			}
		}
	}
	checked = !checked;
	
}

function DeleteConfirmation(value)
{
	document.getElementById('confirmation').value = value;
}

function FormDinamicAction(formid,action)
{
	f = document.getElementById(formid);
	f.action = action;
	f.submit();
}

	$(function() {
		// set opacity to nill on page load
		$("ul#menu span").css("opacity","0");
		// on mouse over
		$("ul#menu span").hover(function () {
			// animate opacity to full
			$(this).stop().animate({
				opacity: 1
			}, "fast");
		},
		// on mouse out
		function () {
			// animate opacity to nill
			$(this).stop().animate({
				opacity: 0
			}, "slow");
		});
	});
	
	$(document).ready(function() {
		$('#highlights').cycle({ 
			fx:    'fade', 
			speed:  1000,
			timeout:  5000 
		});
		
		$('#roster_secondary_imgs a').lightBox({
			overlayBgColor: '#000',
			overlayOpacity: 0.6,
			imageLoading: '/img/frontlayout/images_lightbox/loading.gif',
			imageBtnClose: '/img/frontlayout/images_lightbox/close.gif',
			imageBtnPrev: '/img/frontlayout/images_lightbox/prev.gif',
			imageBtnNext: '/img/frontlayout/images_lightbox/next.gif',
			containerResizeSpeed: 350,
			txtImage: 'Imagem',
			txtOf: 'de'
		});
	});