function EnsureNumeric()
{
var key = window.event.keyCode; 


if  ((key < 48 || key >57) && (key != 46))
	window.event.returnValue = false; 
}

function DisplayDialogMeeting()
{
if (confirm("General session will be held in Doral D which is 4,408 square feet with 13 foot ceilings.  Four of the five breakouts will be held in the lower level of the conference center, with the fifth breakout in the general session room.  The square footage on the breakouts will range in size from 646 square feet to 4,408 square feet.  Food and Beverage functions will be held in The Lobby Lounge and Terrace overlooking the golf course.")==true)
	return false;
else
	return false;

}


function confirm_delete()
{
  if (confirm("Are you sure you want to delete?")==true)
    return true;
  else
    return false;
}

function confirm_clone()
{
  if (confirm("Are you sure you want to clone this event?")==true)
    return true;
  else
    return false;
}

function confirm_donotcount()
{
  if (confirm("This will remove user from showing up in reports. Are you sure you want to continue?")==true)
    return true;
  else
    return false;
}
function KeyDownHandler(btn)
{
	// process only the Enter key
	if (event.keyCode == 13)
	{
		// cancel the default submit
		event.returnValue=false;
		event.cancel = true;
		// submit the form by programmatically clicking the specified button
		btn.click();
	}
}

function ToggleGroup1(sControl)
{
	var theForm = document.forms[0]
	
  	for(i=0; i<theForm.elements.length; i++)
		{
		if (theForm.elements[i].getAttribute('Group1'))
			{
			//alert(sControl.options[sControl.selectedIndex].text)
			//alert(theForm.elements[i].getAttribute('Group1'))
			if (sControl.options[sControl.selectedIndex].text==theForm.elements[i].getAttribute('Group1'))
				{
				//theForm.elements[i].style.visibility="hidden"
				theForm.elements[i].style.display=""
				}
			else
				{
				theForm.elements[i].style.display="none"
				//theForm.elements[i].style.visibility="visible"
				}
			
   		}
		}
		
	var doc = theForm.getElementsByTagName('span');
	for (j=0; j<doc.length; j++)
	   {
	//		alert(doc[j].innerHTML
 	  		if (doc[j].getAttribute('Group1'))
			{
			if (sControl.options[sControl.selectedIndex].text==doc[j].getAttribute('Group1'))
				{
				//theForm.elements[i].style.visibility="hidden"
				doc[j].style.display=""
				}
			else
				{
				doc[j].style.display="none"
				//theForm.elements[i].style.visibility="visible"
				}
			
   		}
 	  //alert(doc[j].innerHTML)
	    }
   //alert('done')

}
function RegToggleGroup1()
{
   //alert('start')
   var theForm = document.forms[0]
   var temp
   //alert(theForm.name)
   
   for(i=0; i<theForm.elements.length; i++)
   {
      //alert(theForm.elements[i].name)
      if(theForm.elements[i].type == "select-one")
      {
         //alert(theForm.elements[i].name)
         //alert(theForm.elements[i].getAttribute('onchange'))
         //for(j=0; j<theForm.elements[i].attributes.length; j++)
         //{
            //alert(theForm.elements[i].attributes[j].name)
         temp = theForm.elements[i].getAttribute('onchange') + ''

         //temp = "Tony and Tony's cousin, also called Tony, are here.";
         //alert(temp.indexOf("Tony"))
         //alert(temp.indexOf("ToggleGroup1(this)"))
         if (temp.indexOf("ToggleGroup1(this)")>-1)
         {
            //alert(theForm.elements[i].name)
            ToggleGroup1(theForm.elements[i])
         }
         //}
      }
   }
}