PopupWindow = "";

// *************************************************************************************************
// Execute when window is loading
// *************************************************************************************************
function OpenPopUp(windowsname,address,width,height,scrollbars,resizable)
{
	var w = 480, h = 340;
		
	if (document.all || document.layers)
	{
	   w = screen.availWidth;
	   h = screen.availHeight;
	}
	var popW = width, popH = height;
	
	var leftPos = (w-popW)/2, topPos = (h-popH)/2;
	
	if(PopupWindow)
	{
		if(!PopupWindow.closed)
		{
			PopupWindow.close();
		}
	}
	PopupWindow = window.open(address, windowsname,'width=' + popW + ',height=' + popH + ',top=' + topPos + ',left=' + leftPos + ',scrollbars=' + scrollbars + ',resizable=' + resizable + ',status=0,toolbar=0,location=0,menubar=0,directories=0');
	PopupWindow.focus();
}

//**************************************************************************************************************
function noRightClick() 
{
	var ie=(document.all);
	var ns=(document.layers);
	var ns6=(document.getElementById && !ie);
	
	strMessage = "Please contact Neighborhood Center Inc. for the use of pictures.";

	function IE() {
		if (event.button > 1)
		{ 
			//alert(strMessage);
			return false;
		}
	}
	function NS(e) {
		if (document.layers || (document.getElementById && !document.all))
		{
			if (e.which > 1)
			{ 
				//alert(strMessage);
				return false;
			}
		}
	}
	document.onmousedown=IE;
	document.onmouseup=NS;
	document.oncontextmenu=new Function("return false");
	
}

//**************************************************************************************************************
function flashPlayer(filename, width, height) 
{
    document.write(
    '<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"\n'+
    ' codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0"\n'+
    ' WIDTH="' + width + '" HEIGHT="' + height + '" id="test">\n'+
    ' <PARAM NAME=movie VALUE="' + filename + '">\n'+
    ' <PARAM NAME=quality VALUE=high>\n'+
    ' <PARAM NAME=bgcolor VALUE=#FFFFFF>\n'+
    ' <param name=wmode value=transparent>\n' + 
    ' <EMBED src="' + filename + '"\n'+ 
    '  wmode=transparent quality=high bgcolor=#FFFFFF  WIDTH="' + width + '" HEIGHT="' + height + '" NAME="test"\n'+
    '  TYPE="application/x-shockwave-flash"\n'+
    '  PLUGINSPAGE="http://www.macromedia.com/go/getflashplayer"></EMBED>\n'+
    '</OBJECT>');

}