var persWin=null;
var printIt=null;
var openWins = new Array("persiwin")
function regWin(winName) {
	for(f=0;f<=openWins.length;f++) {

		if (!openWins[f]) {
			openWins[f] = winName;
			break;
		}
	}
}

function closeAll() {
	for(f=0;f<openWins.length;f++) {
			alert (openWins[f]);
			persWin=openWins[f];
			persWin.window.close();
	}
}

function popItUp(file_url,file_title,menu_bar,xwide,yhigh,frameIt,cacheBust,printLink)
{
printIt=printLink;
if (cacheBust==true) {
file_url += '?';
file_url += Math.random();
}

	if (frameIt==true){
var frames_html='<html><head><title>' + file_title + '</title></head><frameset frameborder="0" framespacing="0" border="0" rows="20,*" ><frame name="blank" src="/locallife/includes/popnav.htm" scrolling="no"><frame name="popup_page" src="' + file_url + '" scrolling="auto" marginwidth="10" marginheight="0"></frameset></html>';
persWin=window.open('','persiwin','toolbar=no,location=no,directories=no,status='+menu_bar+',menubar='+menu_bar+',scrollbars=no,resizable=yes,copyhistory=no,width='+xwide+',height='+yhigh);
persWin.document.clear();
persWin.document.open();
persWin.resizeTo(xwide,yhigh); 
setTimeout('persWin.window.focus();',250);
persWin.document.write(frames_html);
persWin.document.close();
	}
else
	{
	persWin=window.open(file_url,'persiwin','toolbar=no,location=no,directories=no,status='+menu_bar+',menubar='+menu_bar+',scrollbars=no,resizable=no,copyhistory=no,width='+xwide+',height='+yhigh);
	persWin.resizeTo(xwide,yhigh); 
	setTimeout('persWin.window.focus();',250);
	} 
}