// block the right mouse click
var message="This link can\'t be opened in a new window"

function rightclick(e)
{
	// just check to be sure
	if(e.type != 'mousedown')
	{
		return false;
	}

	if (document.all)
	{
		if (e.button == 2 || e.button == 3)
		{
			alert(message);
			return false;
		}
	}

	if (document.layers)
	{
		if (e.which == 2 || e.which == 3)
		{
			alert(message);
			return false;
		}
	}

	return false;
}

var popcount = 0;

function condoPopupWindow(title,imgfile,text,sizeX,sizeY,imgX,imgY,atext)
{
	config = 'toolbar=no,location=no,directories=no,status=no,menubar=no,width=' + sizeX + ',height=' + sizeY + ',scrollbars=no,resizable=no';

	pop = null;
	pop = window.open('','Window' + popcount,config);

	if(pop == null || pop.closed)
	{
		alert('Please disable your pop-up blocking software to view this image\n\nIf using PanicWare\'s Pop-Up Stopper, hold down the CTRL key while clicking the link');
		return;
	}

	self.focus();

	popcount++;

	// screen resolution
	swidth = screen.width 
	sheight = screen.height 

//	// actual window dimensions
//	swidth=(window.innerWidth)?window.innerWidth:document.body.clientWidth; 
//	sheight=(window.innerHeight)?window.innerHeight:document.body.clientHeight; 

	wCenter = swidth/2;
	hCenter = sheight/2;
//	alert(swidth + ' ' + sheight);

	// center window
	px = wCenter - (sizeX/2);
	py = hCenter - (sizeY/2);

	pop.moveTo(px,py);
	pop.focus();

	pop.document.write('<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\">\n<HTML LANG=\"en\">\n<HEAD>');
	pop.document.write('\n<meta http-equiv=\"Content-Type\" content=\"text/html; charset=iso-8859-1\">');
	pop.document.write('\n<TITLE>' + title + '</TITLE>');
	pop.document.write('\n</HEAD>\n<BODY BGCOLOR=\"#01D7D4\" TEXT=\"#001C82\" LINK=\"#001C82\" VLINK=\"#001C82\" ALINK=\"#05B0E1\">');
	pop.document.write('\n<CENTER>');
	pop.document.write('\n' + '<FONT SIZE=\"1\"><FONT FACE="\Arial,Helvetica,Sans-serif\">' + 'Please wait for the image to load...' + '</FONT></FONT><BR>');
	pop.document.write('\n<IMG SRC=\"' + imgfile + '\"' + ' BORDER=\"1\"' + ' WIDTH=\"' + imgX +  '\" HEIGHT=\"' + imgY + '\" ALT=\"' + atext + '\">');
	pop.document.write('\n<P>');
	pop.document.write('\n' + '<B><FONT SIZE=\"2\"><FONT FACE="\Arial,Helvetica,Sans-serif\">' + text + '</FONT></FONT></B>');
	pop.document.write('\n<P>')

	pop.document.write('\n<FONT SIZE=\"2\"><FONT FACE="\Arial,Helvetica,Sans-serif\">' + '<A HREF=\"javascript:window.close()\">close</A>' + '</FONT></FONT>')

	pop.document.write('\n</CENTER>');
	pop.document.write('\n</BODY>\n</HTML>');
}