var NewWindows;
var WinWidth = screen.width - 10;
var WinHeight = screen.height - 60;

function AbrirJanela(link) {
	var Feature
	if (is.ns4 ||is.ns6||is.mac) {
		WinFHeight = screen.height * 0.83;
	}
	if (is.ie4 || is.ie5 || is.ie6) {
		//WinFHeight = screen.height - 80;
		WinFHeight = screen.height * 0.85;
	}
	if (is.aol) {
		WinWidth = document.body.clientWidth + 145;
		WinHeight = document.body.clientheight;
		WinFHeight = screen.height - 160;
	}
	Feature = "fullscreen=yes,scrollbars=yes,width=" + WinWidth + ",height=" + WinHeight + ",top=0,left=0,location=no,resizable=yes"
	NewWindows = window.open("","Photo",Feature);
	NewWindows.focus();
	NewWindows.document.write("<a href='javascript:window.close()'><img name='show' src='" + link + "' height='" + WinFHeight + "'alt='Click to Close' border='0'></a>");
	NewWindows.document.close();
}  

function AbrirXLS(link) {
	var Feature
	if (is.ns4 ||is.ns6||is.mac) {
		WinFHeight = screen.height - 100;
	}
	if (is.ie4 || is.ie5 || is.ie6) {
		WinFHeight = screen.height - 80;
	}
	if (is.aol) {
		WinWidth = document.body.clientWidth + 145;
		WinHeight = document.body.clientheight;
		WinFHeight = screen.height - 160;
	}
	Feature = "fullscreen=no,scrollbars=yes,width=" + WinWidth + ",height=" + WinHeight + ",top=0,left=0,location=yes,resizable=yes"
	NewWindows = window.open(link,"XLS",Feature);
	NewWindows.focus();
}

function AbrirVideo(link) {
	var NewWindows;	
	var Feature;
	Feature = "fullscreen=no,location=no,scrollbars=yes,width=420,height=420,top=0,left=0,resizable=yes"
	NewWindows = window.open(link,"Video",Feature);
	NewWindows.focus()
}

function AbrirVideoBig(link) {
	var NewWindows;	
	var Feature;
	Feature = "fullscreen=no,location=no,scrollbars=yes,width=720,height=560,top=0,left=0,resizable=yes"
	NewWindows = window.open(link,"Video",Feature);
	NewWindows.focus()
}

function barColor(Site) {
	if (document.all) {
		if (Site == "N") {
			document.body.style.scrollbarBaseColor = '#E7CBA5';
			}
		else if (Site == "L") {
			document.body.style.scrollbarBaseColor = '#E7CBA5';
		}
   }
}

function AbrirListURL(){
var URL = document.FormPageURL.ListPageURL.options[document.FormPageURL.ListPageURL.selectedIndex].value;
parent.list.location.href = URL;
//window.location.href = URL;
}

function printWindow() {
bV = parseInt(navigator.appVersion);
if (bV >= 4) window.print();
}

// this is for opening pop-up windows
function OpenPopup( url, name, openerUrl )
{
	var widgets = "toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,width=320,height=230";	var host = location.hostname;
	var popupWin = window.open( url, name, widgets );	popupWin.focus();

	if ( popupWin && popupWin.opener ) {
		if ( openerUrl )
		{
			popupWin.opener.location = openerUrl;
			popupWin.focus();
		}
		popupWin.opener.top.name = "opener";
	}
}