/*
Heritage Makers Virtual Office JavaScript
*/

function HMfullScreen(theURL)
{
	window.open(theURL, '',"resizable=yes,menubar=no,location=no,status=no,toolbar=no,width=" + screen.availWidth + ",height=" + screen.availHeight);
}

var HMpopUpWin=0;
function HMpopUpWindow(URLStr, left, top, width, height)
{
  if(HMpopUpWin)
  {
    if(!HMpopUpWin.closed) HMpopUpWin.close();
  }
  HMpopUpWin = open(URLStr, 'HMpopUpWin', 'toolbar=no,location=no,directories=no,status=no,menub ar=no,scrollbar=no,resizable=no,copyhistory=yes,width='+width+',height='+height+',left='+left+', top='+top+',screenX='+left+',screenY='+top+'');
}

function popitup(url) {
	newwindow=window.open(url,'name','height=1040,width=432,scrollbars=1');
	if (window.focus) {newwindow.focus()}
	return false;
}

var popUpWin=0;
function popUpWindow(URLStr, left, top, width, height)
{
  if(popUpWin)
  {
    if(!popUpWin.closed) popUpWin.close();
  }
  popUpWin = window.open(URLStr, 'popUpWin', 'toolbar=no,location=no,directories=no,status=no,menub ar=no,scrollbar=1,resizable=no,copyhistory=yes,width='+width+',height='+height+',left='+left+', top='+top+',screenX='+left+',screenY='+top+'');
}

function closeWindow() {
window.open('','_parent','');
window.close();
}


function OpenModule(NoKillPopBox) {
if (navigator.userAgent.indexOf("Opera") != -1)     // Opera
	{ document.getElementById(NoKillPopBox).style.visibility="visible"; }
else if(navigator.userAgent.indexOf("Gecko") != -1) // NS6+
	{ document.getElementById(NoKillPopBox).style.visibility="visible"; }
else if(document.layers)                            // NS4
	{ eval('document.' + NoKillPopBox + '.visibility="show"'); }
else if(document.all)                               // IE and clones
	{ eval(NoKillPopBox + '.style.visibility="visible"'); }
else           // Might or might not work on other types of browsers.
	{ eval(NoKillPopBox + '.style.visibility="visible"'); }
} // end of function OpenNoKillPopBox()

function CloseModule(NoKillPopBox) {
if (navigator.userAgent.indexOf("Opera") != -1)     // Opera
	{ document.getElementById(NoKillPopBox).style.visibility="hidden"; }
else if(navigator.userAgent.indexOf("Gecko") != -1) // NS6+
	{ document.getElementById(NoKillPopBox).style.visibility="hidden"; }
else if(document.layers)                            // NS4
	{ eval('document.' + NoKillPopBox + '.visibility="hide"'); }
else if(document.all)                               // IE and clones
	{ eval(NoKillPopBox + '.style.visibility="hidden"'); }
else           // Might or might not work on other types of browsers.
	{ eval(NoKillPopBox + '.style.visibility="hidden"'); }
} // end of function CloseNoKillPopBox()

function ChangeModule(From, To) {
if (navigator.userAgent.indexOf("Opera") != -1)     // Opera
	{ document.getElementById(From).style.visibility="hidden";
	document.getElementById(To).style.visibility="visible"; }
else if(navigator.userAgent.indexOf("Gecko") != -1) // NS6+
	{ document.getElementById(From).style.visibility="hidden";
	document.getElementById(To).style.visibility="visible"; }
else if(document.layers)                            // NS4
	{ eval('document.' + From + '.visibility="hide"');
	eval('document.' + To + '.visibility="show"'); }
else if(document.all)                               // IE and clones
	{ eval(From + '.style.visibility="hidden"');
	eval(To + '.style.visibility="visible"'); }
else           // Might or might not work on other types of browsers.
	{ eval(From + '.style.visibility="hidden"');
	eval(To + '.style.visibility="visible"'); }
} // end of function CloseNoKillPopBox()