﻿// JScript File

function MaxWindow()
{
	if (window != top) top.location.href = location.href;
	
	window.moveTo(0,0);
	if (document.all)
	{
		top.window.resizeTo(screen.availWidth,screen.availHeight);
	}
	else if (document.layers||document.getElementById)
	{
		if (top.window.outerHeight<screen.availHeight||top.window.outerWidth<screen.availWidth)
		{
			top.window.outerHeight = screen.availHeight;
			top.window.outerWidth = screen.availWidth;
		}
	}
}

function IntOnly(evt)
{
	evt = (evt) ? evt : event;
	var keycode = (evt.charCode) ? evt.charCode : ((evt.which) ? evt.which : evt.keyCode);
	var evtControl = (evt.target) ? evt.target : ((evt.srcElement) ? evt.srcElement : null);
	
	if (keycode == 13)
	{
		
		return true;
	}
	if (keycode < 48 || keycode > 57)
	{
	
		return false;
	}
	

}

function Tab(currentField, nextField)
{
    // Determine if the current field's max length has been reached.

    if (currentField.value.length == currentField.maxLength)
    {
          // Retreive the next field in the tab sequence, and give it the focus.

        document.getElementById(nextField).focus();
    }
}

function ConfirmDeletion()
{
	var agree = confirm("Are you sure you want to delete?");
	if(agree)
		
	return true;
	
	else 
	
	return false; 
}



function ChangeImage(imagename, obj)
{ 

    obj.src = imagename;
}
