<!--
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;
  }
}

function nonewwindow() {
   if (event.ctrlKey)
   if (event.keyCode == 78)
    {
     event.cancelBubble = true;
     event.returnValue = false;
     return false;
   }
}

if (document.layers)
  document.captureEvents(Event.MOUSEDOWN);

/*
document.oncontextmenu = nocontextmenu;
document.onmousedown = norightclick;
document.onmouseup = norightclick;
*/

document.onkeydown=nonewwindow;

function setPointer() 
{
/*
	window.status="Processing...";
	if (document.all){
		for (var i=0;i < document.all.length; i++)
			document.all(i).style.cursor = 'wait';
	}
*/
	window.status="Processing...";
	document.forms[0].style.cursor = "wait";
}

function NewWindowPage(id)
{
	oNewWindow = window.open(id + '.aspx','newWin');
	oNewWindow.focus();
}

function PrintReport(URL,RowCount)
{
	var ans = true;
	var intTop = (screen.height - 500) / 2;
	var intLeft = (screen.width - 800) / 2;

	if (RowCount == 0)
		ans = confirm("There are " + RowCount + " rows to print.\n\nDo you still want to continue with the print option?\n\nOnce you click OK, the report to print will be presented in a Printer Friendly Format in a new window,\nwhich will invoke the print dialog to print.\n\nYou have to close the window after printing the report.");
	else
		alert("The report to print will be presented in a Printer Friendly Format in a new window,\nwhich will invoke the print dialog to print.\n\nYou have to close the window after printing the report.");
	
	if (ans == true)
	{
		if (RowCount > 250) 
		{
			ans = confirm("There are " + RowCount + " rows (approx. " + parseInt(RowCount/80) + " pages) to print,\nwhich may take long time depending on the internet traffic and your system.\n\nDo you want to continue ?");
			if (ans == true)
									if (window.showModalDialog) 
		{
	window.showModalDialog(URL,"PrintWindow","dialogHeight:500px;dialogWidth:800px;center:yes;status:no;resizable:no;help:no;");
		} 
		else 
		{
	window.open(URL,'PrintWindow','height=500,width=800,toolbar=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=no ,modal=yes,top=' + intTop + ',left=' + intLeft + '');
		}

		}
		else
					if (window.showModalDialog) 
		{
	window.showModalDialog(URL,"PrintWindow","dialogHeight:500px;dialogWidth:800px;center:yes;status:no;resizable:no;help:no;");
		} 
		else 
		{
	window.open(URL,'PrintWindow','height=500,width=800,toolbar=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=no ,modal=yes,top=' + intTop + ',left=' + intLeft + '');
		}
 

	}
}

function OpenRURL(URL)
{
	oNewWindow = window.open(URL,'newWin');
	oNewWindow.focus();
}


function AfterClientCallBackError(combo)
{
    document.location.href=document.location.href; 
    return false;
} 
//-->
