<!--
	function goto_URL(object) 
	{
 	    window.location.href = object.options[object.selectedIndex].value;
 	}
 	
 	function checkNews()
	{	
		if (window.document.form1.firstname.value.length == 0) 
		{
			alert ("please enter a first name")
			document.form1.firstname.focus();
			return false;
		}
		if (window.document.form1.lastname.value.length == 0) 
		{
			alert ("please enter a last name")
			document.form1.lastname.focus();
			return false;
		}
		if (window.document.form1.email.value.length == 0) 
		{
			alert ("please enter an email")
			document.form1.email.focus();
			return false;
		}
		if (!emailcheck(window.document.form1.email.value)) 
		{
			alert("you have entered an invalid email");
			document.form1.email.focus();
			return false;
		}
		document.form1.submit();
	}
	
	function checkMail()
	{	
		if (window.document.form1.firstname.value.length == 0) 
		{
			alert ("please enter a first name")
			document.form1.firstname.focus();
			return false;
		}
		if (window.document.form1.lastname.value.length == 0) 
		{
			alert ("please enter a last name")
			document.form1.lastname.focus();
			return false;
		}
		if (window.document.form1.email.value.length == 0) 
		{
			alert ("please enter an email")
			document.form1.email.focus();
			return false;
		}
		if (!emailcheck(window.document.form1.email.value)) 
		{
			alert("you have entered an invalid email");
			document.form1.email.focus();
			return false;
		}
		if (window.document.form1.Comments.value.length > 1000) 
		{
			alert ("comments must be no greater than 1000 characters")
			document.form1.Comments.focus();
			return false;
		}
	}
 	
	function checklogin()
	{	
		if (window.document.form1.EmailAddress.value.length == 0) 
		{
			alert ("Please enter an email address")
			document.form1.EmailAddress.focus();
			return false;
		}
		if (window.document.form1.Password.value.length == 0) 
		{
			alert ("Please enter a password")
			document.form1.Password.focus();
			return false;
		}
	}

	function checkremind()
	{	
		if (window.document.remind.email.value.length == 0) 
		{
			alert ("Please enter an email")
			document.remind.email.focus();
			return false;
		}
	}

	function checkprofile()
	{	
		if (window.document.register.login.value.length == 0) 
		{
			alert ("please enter a login")
			document.register.login.focus();
			return false;
		}

		if (window.document.register.password.value.length == 0) 
		{
			alert ("please enter a password")
			document.register.password.focus();
			return false;
		}
		if (window.document.register.firstname.value.length == 0) 
		{
			alert ("please enter a first name")
			document.register.firstname.focus();
			return false;
		}
		if (window.document.register.lastname.value.length == 0) 
		{
			alert ("please enter a last name")
			document.register.lastname.focus();
			return false;
		}
		if (window.document.register.email.value.length == 0) 
		{
			alert ("please enter an email")
			document.register.email.focus();
			return false;
		}
		if (!emailcheck(window.document.register.email.value)) 
		{
			alert("you have entered an invalid email");
			document.register.email.focus();
			return false;
		}
	}
	
	function checkregister()
	{	

		if (window.document.form1.Password.value.length == 0) 
		{
			alert ("Please enter a password")
			document.form1.Password.focus();
			return false;
		}
		if (window.document.form1.FirstName.value.length == 0) 
		{
			alert ("Please enter a first name")
			document.form1.FirstName.focus();
			return false;
		}
		if (window.document.form1.LastName.value.length == 0) 
		{
			alert ("Please enter a last name")
			document.form1.LastName.focus();
			return false;
		}
		if (window.document.form1.Organization.value.length == 0) 
		{
			alert ("Please enter an organization")
			document.form1.Organization.focus();
			return false;
		}
		if (window.document.form1.Email.value.length == 0) 
		{
			alert ("Please enter an email address")
			document.form1.Email.focus();
			return false;
		}
		if (!emailcheck(window.form1.Email.value)) 
		{
			alert("You have entered an invalid email");
			document.form1.Email.focus();
			return false;
		}
	}	
	
	function checkrfp()
	{	
		var State = window.document.form1.State.options[window.document.form1.State.selectedIndex].value;
		
		if (window.document.form1.FirstName.value.length == 0) 
		{
			alert ("Please enter a first name")
			document.form1.FirstName.focus();
			return false;
		}
		if (window.document.form1.LastName.value.length == 0) 
		{
			alert ("Please enter a last name")
			document.form1.LastName.focus();
			return false;
		}
		if (window.document.form1.Organization.value.length == 0) 
		{
			alert ("Please enter an organization")
			document.form1.Organization.focus();
			return false;
		}
		if (window.document.form1.Addr1.value.length == 0) 
		{
			alert ("Please enter an address")
			document.form1.Addr1.focus();
			return false;
		}
		if (window.document.form1.City.value.length == 0) 
		{
			alert ("Please enter a city")
			document.form1.City.focus();
			return false;
		}
		if (State == '--') 
		{
			alert ("Please select a state")
			document.form1.State.focus();
			return false;
		}
		if (window.document.form1.Zip.value.length == 0) 
		{
			alert ("Please enter a zip")
			document.form1.Zip.focus();
			return false;
		}
		if (window.document.form1.Phone.value.length == 0) 
		{
			alert ("Please enter a phone")
			document.form1.Phone.focus();
			return false;
		}
		if (window.document.form1.Email.value.length == 0) 
		{
			alert ("Please enter an email address")
			document.form1.Email.focus();
			return false;
		}
		if (!emailcheck(window.form1.Email.value)) 
		{
			alert("You have entered an invalid email address");
			document.form1.Email.focus();
			return false;
		}
		if (window.document.form1.GroupSize.value.length == 0) 
		{
			alert ("Please enter a group size")
			document.form1.GroupSize.focus();
			return false;
		}
		if (window.document.form1.NumRooms.value.length == 0) 
		{
			alert ("Please enter number of overnight rooms")
			document.form1.NumRooms.focus();
			return false;
		}
		if (window.document.form1.Hist2002.value.length > 1000) 
		{
			var valN =window.document.form1.Hist2002.value.length;
			alert ("Maximum number of characters for Meeting History 2002 is 1000, you have entered " + valN)
			document.form1.Hist2002.focus();
			return false;
		}
		if (window.document.form1.Hist2001.value.length > 1000) 
		{
			var valN =window.document.form1.Hist2001.value.length
			alert ("Maximum number of characters for Meeting History 2001 is 1000, you have entered " + valN)
			document.form1.Hist2001.focus();
			return false;
		}
		if (window.document.form1.Spec.value.length > 1000) 
		{
			var valN =window.document.form1.Spec.value.length
			alert ("Maximum number of characters for Special Needs is 1000, you have entered " + valN)
			document.form1.Spec.focus();
			return false;
		}
		if (window.document.form1.Notes.value.length > 1000) 
		{
			var valN =window.document.form1.Notes.value.length
			alert ("Maximum number of characters for Notes is 1000, you have entered " + valN)
			document.form1.Notes.focus();
			return false;
		}
	}
	function emailcheck(emailStr) 
	{
		var emailPat=/^(.+)@(.+)$/
		var specialChars="\\(\\)<>@,;:\\\\\\\"\\.\\[\\]\\*"
		var validChars="\[^\\s" + specialChars + "\]"
		var firstChars=validChars
		var quotedUser="(\"[^\"]*\")"
		var ipDomainPat=/^\[(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})\]$/
		var atom="(" + firstChars + validChars + "*" + ")"
		var word="(" + atom + ")"
		var userPat=new RegExp("^" + word + "(\\." + word + ")*$")
		var domainPat=new RegExp("^" + atom + "(\\." + atom +")*$")
		var matchArray=emailStr.match(emailPat)
		if (matchArray==null) {
			return false
		}
		var user=matchArray[1]
		var domain=matchArray[2]
		if (user.match(userPat)==null) {
			return false
		}
		var IPArray=domain.match(ipDomainPat)
		if (IPArray!=null) {
			  for (var i=1;i<=4;i++) {
				if (IPArray[i]>255) {
					return false
				}
			}
			return true
		}
		var domainArray=domain.match(domainPat)
		if (domainArray==null) {
			return false
		}
		var atomPat=new RegExp(atom,"g")
		var domArr=domain.match(atomPat)
		var len=domArr.length
		if (domArr[domArr.length-1].length<2 || 
			domArr[domArr.length-1].length>3) {
		   return false
		}
		if (domArr[domArr.length-1].length==3 && len<2) {
		   var errStr="This address is missing a hostname!"
		   return false
		}
		return true;
	}
	
	function checknumbers(field)
	{
		var field = field
		var valid = "0123456789"
		var ok = "yes";
		var temp;
		for (var i=0; i<field.length; i++) 
			{
				temp = "" + field.substring(i, i+1);
				if (valid.indexOf(temp) == "-1") 
				ok = "no";
			}
		if (ok == "no") 
		{
			return false;
		}
		return true;
	}

	var UserValidated = 'N';
	
	function UserLookup(Field)
	{
		if(UserValidated == 'Y') return;	
	
		var m_objXMLhttp = null;
		var m_objXSL = null;
		document.body.style.cursor="wait";
		
		m_objXMLhttp = new ActiveXObject("Microsoft.XMLhttp"); 
		var UserXml =	'<?xml version="1.0"?>'	+ 
				'<UserLookup>' +	
				'<UserName><![CDATA[' + Field.value + ']]></UserName>' +
				'</UserLookup>';
						
			//alert(szPropfind);
	
		m_objXMLhttp.open( "POST", "UserLookup.asp",false);
		m_objXMLhttp.setRequestHeader( "Depth:", "0");
		m_objXMLhttp.setRequestHeader( "Content-type:", "text/xml");
		m_objXMLhttp.send(UserXml);

		if(200 == m_objXMLhttp.status)
		{
			if(null == m_objXMLhttp.responseXML || "" == m_objXMLhttp.responseXML.xml)
			{
				alert("Error: calendarview.htc>> onRSC_PropFind_StartEnd >>	m_objXMLhttp_propFind.responseXML is empty");
				return(false);
			}
			
			var obj	= m_objXMLhttp.responseXML;
			
			if(obj.selectSingleNode("Users/@found").text == 1)
				{
					alert("This user name already exits, please choose another user name.");
					document.form1.UserName.focus();
						
				}
		}
		document.body.style.cursor="default";
	}

	var EmailValidated = 'N';
	
	function EmailLookup(Field)
	{
		if(EmailValidated == 'Y') return;	
	
		var m_objXMLhttp = null;
		var m_objXSL = null;
		document.body.style.cursor="wait";
		
		m_objXMLhttp = new ActiveXObject("Microsoft.XMLhttp"); 
		var EmailXml =	'<?xml version="1.0"?>'	+ 
				'<EmailLookup>' +	
				'<EmailAddress><![CDATA[' + Field.value + ']]></EmailAddress>' +
				'</EmailLookup>';
						
			//alert(szPropfind);
			
		m_objXMLhttp.open( "POST", "EmailLookup.asp",false);
		m_objXMLhttp.setRequestHeader( "Depth:", "0");
		m_objXMLhttp.setRequestHeader( "Content-type:", "text/xml");
		m_objXMLhttp.send(EmailXml);

		if(200 == m_objXMLhttp.status)
		{
			if(null == m_objXMLhttp.responseXML || "" == m_objXMLhttp.responseXML.xml)
			{
				alert("Error: calendarview.htc>> onRSC_PropFind_StartEnd >>	m_objXMLhttp_propFind.responseXML is empty");
				return(false);
			}
			
			var obj	= m_objXMLhttp.responseXML;
			
			if(obj.selectSingleNode("Emails/@found").text == 1)
				{
					alert("This email address already exits in our database.");
					document.form1.Email.focus();
						
				}
		}
		document.body.style.cursor="default";
	}
	
	


	function validate2()
	{	
		var Search = window.document.form1.Search.options[window.document.form1.Search.selectedIndex].value;
		if (!window.document.form1.SearchDetail.disabled)
		{
			var SearchDetail = window.document.form1.SearchDetail.options[window.document.form1.SearchDetail.selectedIndex].value;
		}

		if (Search == "") 
		{
			alert ("Please select a search option")
			document.form1.Search.focus();
			return false;
		}
		if (SearchDetail == 0) 
		{
			alert ("Please select a value to search on")
			document.form1.SearchDetail.focus();
			return false;
		}
	}

	function MakeChanged2(Seaches, Details, detail_caption)
	{

		var ModelList = DetailArr[Seaches.options[Seaches.selectedIndex].value];
		
		clearList(Details);
		addElement(Details, detail_caption, 0);
		if(ModelList)
		{
			var rgModels = ModelList.split(',');
			for (var i = 0; i < rgModels.length; i++)
			{
				if (rgModels[i])
				{
					var rgModel = rgModels[i].split('#');
					addElement(Details, rgModel[0], rgModel[1]);
				}
			}
			Details.disabled = false;
		}
		else
		{
			Details.disabled = true;
		}
		Details.selectedIndex = 0;
	} 

	function clearList(list) 
	{
		var i = 0;
		var o = list.options;

		for (i = o.length; i >= 0; --i)
			o[i] = null;
		list.disabled = true;
	}


	function addElement(list, text_in, value_in)
	{
		var o = list.options;
		var nIdx;
		if (o.length < 0) //IE for Mac 4.5 sets length to -1 if list is empty
			nIdx = 0;
		else
			nIdx = o.length;

		o[nIdx] = new Option(text_in, value_in);
		list.disabled = false;
	}


	function setDefaultByText(list, text_in)
	{
		with (list)
		{
			for (var i = 0; i < (options.length); i++)
			{
				if (options[i].text == text_in)
				{
					selectedIndex = i;
					return;
				}
			}
		}
	}


	function setDefaultByValue(list, value_in)
	{
		with (list)
		{
			for (var i = 0; i < (options.length); i++)
			{
				if (options[i].value == value_in)
				{
					selectedIndex = i;
					return;
				}
			}
		}
	}
	
	
	function SearchDetailInit(Searches, Details, search, detail, search_caption, detail_caption)
	{
		var rgMake;

		clearList(Searches);
		addElement(Searches, search_caption, 0);


		for (var i = 0; i < SearchArr.length; i++)
		{
			if (SearchArr[i])
			{
				rgMake = SearchArr[i].split('#');
				addElement(Searches, rgMake[0], rgMake[1]);
			}
		}

		if (location)
		{
			setDefaultByValue(Searches, search);
			MakeChanged2(Searches, Details, detail_caption);
			if (detail)
				setDefaultByValue(Details, detail);
		}
		else
		{
			Searches.selectedIndex = 0;
			MakeChanged2(Searches, Details, detail_caption);
		}
	}
	
	function MM_swapImgRestore() 
	{ 	  var i,x,a=document.MM_sr; 
	  for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;	}	function MM_preloadImages() 
	{		var d=document; 
		if(d.images)
		{ 
			if(!d.MM_p) d.MM_p=new Array();			var i,j=d.MM_p.length,a=MM_preloadImages.arguments; 
			for(i=0; i<a.length; i++)			if (a[i].indexOf("#")!=0)
			{ 
				d.MM_p[j]=new Image; 
				d.MM_p[j++].src=a[i];
			}
		}	}	function MM_findObj(n, d) 
	{		var p,i,x;  
		if(!d) d=document; 
		if((p=n.indexOf("?"))>0&&parent.frames.length) 
		{			d=parent.frames[n.substring(p+1)].document; 
			n=n.substring(0,p);
		}		if(!(x=d[n])&&d.all) x=d.all[n]; 
		for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];		for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);		if(!x && d.getElementById) x=d.getElementById(n); 
		return x;	}	function MM_swapImage() 
	{ 		var i,j=0,x,a=MM_swapImage.arguments; 
		document.MM_sr=new Array; 
		for(i=0;i<(a.length-2);i+=3)		if ((x=MM_findObj(a[i]))!=null)
		{
			document.MM_sr[j++]=x; 
			if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];
		}	}

	var nw
	var mapWin
	var mapName = "mapWindow"
	var mapW	= "760"
	var mapH	= "535"	

	function openWindow(url, name, w, h)
	{
		if (!nw || nw.closed)
		{
			nw = window.open(url, name, 'scrollbars=no,resizable=no,status=no,location=no,menubar=no,width=' + w + ',height=' + h);
		} 
		else 
		{
			nw.close()
			nw = window.open(url, name, 'width=' + w + ',height=' + h)
			nw.focus()
		}
	}

	function openMap(url)
	{
		mapWin = window.open(url, mapName, 'scrollbars=no,resizable=no,status=no,location=no,menubar=no,top=0,left=0,width=' + mapW + ',height=' + mapH);
	}
	
	function DoDelete() 
	{
		window.open("yesno_popup2.htm","","width=150,height=150,toolbar=no,menubar=no");
	}	
	function DoSubmit() 
	{
		window.open("yesno_popup.htm","","width=150,height=150,toolbar=no,menubar=no");
	}
	
	function DoNewsletter()
	{
		window.open("newsletter.asp","","width=350,height=356,toolbar=no,menubar=no");
	}
	
	function whichChoice(YesNo)
	{
		if(YesNo)
		{
			document.form1.sendV.value="Y";
			document.form1.submit();
		}
	}
	
	function whichChoice2(YesNo)
	{
		if(YesNo)
		{
			document.form1.deleteV.value="Y";
			document.form1.submit();
		}
	}
	
	function submitNews()
	{
		return checkNews();
	}
	
	function popUp(URL) 
	{
		day = new Date();
		id = day.getTime();
		eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=1,width=400,height=300,left = 540,top = 362');");
	}
//-->