function OnFocusHandler()
{
	CheckForChild();
}

function printPage()
{
	window.print();
}

// This function captures the enter key 
function DEST_KeyPress(e)
{
	if (window.event.keyCode == 13)
	{
		// This is the only way to avoid the default event handler for the enter key press
		// to fire and submit the form
		window.event.keyCode = 0;
		window.event.cancelBubble = true;
		
		DEST_DefaultButton.focus();
		DEST_DefaultButton.click();
	}
}

var DEST_PageInit = false;
var DEST_DefaultButton = null;

function DEST_PageLoad()
{
	//if(!(window.parent.navFrame == undefined))
	//	window.parent.navFrame.location.reload();
	
	if ((typeof(document.all) != 'undefined') && (!DEST_PageInit))
	{
		if (document.forms.length > 0)
		{	
			for (i = 0; i < document.forms[0].elements.length; i++)
			{
				var control = document.forms[0].elements[i];

				// Binds any input or password control to the KeyPress event
				if ((control.tagName == 'INPUT') && ((control.type == 'text') || (control.type == 'password') || control.type == 'checkbox'))
					control.onkeypress = DEST_KeyPress;

				// Sets the default button to be the first input button on the page
				if ((DEST_DefaultButton == null) && (control.tagName == 'INPUT'))
					if (control.type == 'submit')
						DEST_DefaultButton = control;
						
			}
		}
	}
	
	DEST_PageInit = true;
}

var newWindow;
function openWin(pagename)
{ 
 newWindow=window.open(pagename,'Viewer','height=400,width=600,top=100,left=100,resizable,scrollbars') ;
 newWindow.focus() ;
}

function openWin(vPage) 
{ 
	var vWin;
	vWin = window.open(vPage,'_blank','width=600,height=400,top=100,left=100,resizable,scrollbars');
	vWin.focus();
}