// Variable below defines how many seconds to wait.
var howManySeconds = 600;

//Start
pause();

//This is the function that pauses, then calls your custom function. 
function pause() 
{
	myTimer=setTimeout("whatToDo()",howManySeconds*1000)
}

// This is the function that's executed after the delay time is up.
function whatToDo() 
{
	document.forms[0].KeepAlive.src = "../../KeepAlive.aspx";
	pause();
}

function FocusOnFirst()
{
	var form = document.forms[0];
	for (i=0; i<form.elements.length; i++)
	{
		//alert(form.elements[i].type);
		if (form.elements[i].type!="hidden")
		{
			form.elements[i].focus();
			break;
		}
	}
}

function ShowHandCursor(ID)
{
	try
	{
		if (document.getElementById(ID))
		{
			document.getElementById(ID).style.cursor = 'hand';
		}
	}
	catch (e)
	{}
}

function ShowNormalCursor(ID)
{
	try
	{
		if (document.getElementById(ID))
		{
			document.getElementById(ID).style.cursor = 'normal';
		}
	}
	catch (e)
	{}
}

function ShowMessage(msg)
{
	alert(msg);
}

function CheckNumeric(ev, obj) 
{ 
    var isIE = navigator.appName == "Microsoft Internet Explorer";
    var keycode; 
    
    if (isIE) 
        ev = window.event; 
    if (ev.which) 
        keycode = ev.which; 
    else if (ev.keyCode)
        keycode = ev.keyCode; 
    var status = true;
    if(((keycode <48) || (keycode >57))   && (keycode != 8 ) && (keycode != 46 ) && (keycode != 37 ) && (keycode != 39 ) && (keycode != 9 )/*&& (keycode != 45 )*/  ) 
        status = false
    if (isIE)
            ev.returnValue = status; 
        else 
            return status;
} 