// © 2003 Thunderblast Software Studios - Francesco Abbattista



if (window.Event)
  document.captureEvents(Event.MOUSEUP);
function nocontextmenu() { event.cancelBubble = true, event.returnValue = false;return false; } 
function norightclick(e) { if (window.Event) { if (e.which == 2 || e.which == 3) return false; } else if (event.button == 2 || event.button == 3) {
event.cancelBubble = true, event.returnValue = false; return false; }}
if (document.layers)
  document.captureEvents(Event.MOUSEDOWN);
document.oncontextmenu = nocontextmenu;document.onmousedown = norightclick;document.onmouseup = norightclick;


function getQueryVariable(variable) {
  var query = window.location.search.substring(1);
  var vars = query.split("&");
  for (var i=0;i<vars.length;i++) {
    var pair = vars[i].split("=");
    if (pair[0] == variable) {
      return pair[1];
    }
  } 
  alert ('Query Variable ' + variable + ' not found');
}

function openNewWin(sUrl,sName,sWidth,sHeight,iMode)
{
var w=screen.width; 
var x=(w-800)/2;
var h=screen.height; 
var y=((h-600)/2)-50;

	if (iMode==0)
	{
		window.open(sUrl,sName,'width=' + sWidth + ',height=' + sHeight + ',alwaysRaised=yes'
					+ ',dependent=yes,directories=no,hotkeys=no' 
					+ ',location=no' 
					+ ',menubar=no'
					+ ',resizable=no'
					+ ',left=' + x
					+ ',top=' + y 
					+ ',status=no'
					+ ',titlebar=no'
					+ ',scrollbars=no' 
					+ ',toolbar=no');
	}
	else if (iMode==1)
	{
		window.open(sUrl,sName,'width=' + sWidth + ',height=' + sHeight + ',alwaysRaised=yes'
					+ ',dependent=yes,directories=no,hotkeys=no' 
					+ ',location=no' 
					+ ',menubar=no'
					+ ',resizable=yes'
					+ ',left=' + x
					+ ',top=' + y 
					+ ',status=no'
					+ ',titlebar=no' 
					+ ',scrollbars=yes'
					+ ',toolbar=yes');
	}
			
}