function chkNumeric()
{
        if ((window.event.keyCode >= 48) && (window.event.keyCode <= 57)) 
        {
		  window.event.returnValue = true 
        }
        else
        {
		  window.event.returnValue = false
      	}
}

function chkAlphaSpace()
{
	if ( ((window.event.keyCode >= 97) && (window.event.keyCode <= 122)) || ((window.event.keyCode >= 65) && (window.event.keyCode <= 90)) || (window.event.keyCode == 32) )
    {
		window.event.returnValue = true
    }
    else
    {
        window.event.returnValue = false
     }
}

function IsValidDegree(pInputObject,pstrMessage)
{

  if (!((pInputObject.value >= 1 ) && (pInputObject.value <= 90 )))
    {
 	alert(pstrMessage)
	pInputObject.focus() 
	return false
     }

  return true
	

}
function IsValidDegree1(pInputObject,pstrMessage)
{

  if (!((pInputObject.value >= 1 ) && (pInputObject.value <= 180 )))
    {
 	alert(pstrMessage)
	pInputObject.focus() 
	return false
     }

  return true
	

}
function IsValidMinutes(pInputObject,pstrMessage)
{

  if (!((pInputObject.value >= 1 ) && (pInputObject.value <= 60 )))
    {
 	alert(pstrMessage)
	pInputObject.focus() 
	return false
     }

  return true
	

}


function IsValidSeconds(pInputObject,pstrMessage)
{

  if (!((pInputObject.value >= 1 ) && (pInputObject.value <= 60 )))
    {
 	alert(pstrMessage)
	pInputObject.focus() 
	return false
     }

  return true
	

}

function IsValidDate(pDay,pMonth,pYear)
{


  if ( ! ( (pMonth == 4) || (pMonth == 6 ) || (pMonth ==  9 ) || (pMonth ==  11 ) ) )
  {
    if ( pDay > 30 )
    {
      alert ("Invalid Day for the month")
      return (-1)
    }
  }

  return 1
	

}



function validateSelect(pobjSelect)
{
var strMessage

 	if (pobjSelect.selectedIndex == 0)
	{
			
	  strMessage = pobjSelect.options(0).text
	  alert (strMessage)
	  pobjSelect.focus()	  	
	  return false
	}

  return true

}

function validateLeapYear(pdd,pmm,pyy,pMessage)
{
	if (pmm.value == 2 )
	{
		if ( (parseInt(pyy.value) % 4) != 0 )
		{
			if ( pdd.value >= 29 )
			{
				alert( pMessage );
				pdd.focus()		
				return false;
			}
		}
	}
	return true
}



