// portfolio javascript routines

function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
var rl = document.getElementById("ReferenceLayer");
function showRef(tf,e){
    if(tf) rl.style.visibility = 'visible';
    else   rl.style.visibility ='hidden';
}
MM_reloadPage(true);

function PortfolioWin(url)
{
  var wideness = '580';
  var height   = '560';
  var prefs = "width=" +wideness+ ",height=" +height+ ",resizable=no,scrollbars=no,toolbar=no,statusbar=no";
  var portWin = window.open('','Portfolio',prefs);

  portWin.document.open();
  portWin.document.writeln('<html><body bgcolor="white"><img src="' +url+ '" vspace="6" hspace="6"></body></html>');
  portWin.document.close();
}
function PortfolioWin2(url)
{
  var wideness = '620';
  var height   = '540';
  var prefs = "width=" +wideness+ ",height=" +height+ ",resizable=no,scrollbars=no,toolbar=no,statusbar=no";
  var portWin = window.open('','Portfolio',prefs);

  portWin.document.open();
  portWin.document.writeln('<html><body bgcolor="white"><img src="' +url+ '" vspace="8" hspace="6"></body></html>');
  portWin.document.close();
}

// Access the correct HTML element, regardless of the browser it's in
function getObj(name)
{
	if (document.getElementById) {
		return document.getElementById(name).style;
	}
	else if (document.all) {
		return document.all[name].style;
	} 
	else if (document.layers) {
		return MM_findObj(name);
	}
}

// Visibility and Invisibility. flag=1 => invisible, flag=0 => visible
function invis(id,flag)
{
	if (!DHTML) return;
	var x = getObj(id);
	//alert(x+' = '+id);
	x.visibility = (flag) ? 'hidden' : 'visible'
}
