// JavaScript Document
function mmLoadMenus() {
  if (window.mm_menu_1223103_0) return;
        window.mm_menu_1223103_0 = new Menu("root",116,20,"Arial, Helvetica, sans-serif",11,"#333333","#FFFFFF","#DBE7FA","#7091B9","left","middle",3,0,50,-5,7,true,true,true,0,true,true);
  mm_menu_1223103_0.addMenuItem("My Family","location='res_family.php'");
  mm_menu_1223103_0.addMenuItem("My Community","location='res_community.php'");
  mm_menu_1223103_0.addMenuItem("My Nation","location='res_nation.php'");
  mm_menu_1223103_0.addMenuItem("My&nbsp;World","location='res_world.php'");
  mm_menu_1223103_0.addMenuItem("My&nbsp;Media","location='res_news.php'");
  mm_menu_1223103_0.addMenuItem("Other&nbsp;events","location='res_eve.php'");
   mm_menu_1223103_0.hideOnMouseOut=true;
   mm_menu_1223103_0.bgColor='#CCCCCC';
   mm_menu_1223103_0.menuBorder=1;
   mm_menu_1223103_0.menuLiteBgColor='#CCCCCC';
   mm_menu_1223103_0.menuBorderBgColor='#CCCCCC';

mm_menu_1223103_0.writeMenus();
} // mmLoadMenus()


function MM_preloadImages() { //v3.0
  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_swapImgRestore() { //v3.0
  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_findObj(n, d) { //v4.01
  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() { //v3.0
  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];}
}


form_submitted=false
function ValidateEmail(theinput)
{
	s=theinput.value
	if(s.search)
	{
		return (s.search(new RegExp("^([a-z0-9_]|\-|\\.)+@(([a-z0-9_]|\-)+\\.)+[a-z]{2,4}$","gi"))>=0)
	}
	if(s.indexOf)
	{
		at_character=s.indexOf('@')
		if(at_character<=0 || at_character+4>s.length)
			return false
	}
	if(s.length<6)
		return false
	else
		return true
}
function ValidateForm(theform)
{
	if(theform.first_name.value=='First name:' || theform.first_name.value=='')
	{
		alert('You have not specified a First Name!')
		theform.elements[0].value='';
		theform.elements[0].focus()
		form_submitted=false
		return false
	}
	if(theform.last_name.value=='Last name:' || theform.last_name.value=='')
	{
		alert('You have not specified a Last Name!')
		theform.elements[1].value='';
		theform.elements[1].focus();
		form_submitted=false;
		return false;
	}
	if(theform.address1.value=='Address 1:' || theform.address1.value=='')
	{
		alert('You have not specified an address!')
		theform.elements[2].value='';
		theform.elements[2].focus();
		form_submitted=false;
		return false;
	}
	if(theform.city.value=='City:' || theform.city.value=='')
	{
		alert('You have not specified a City!')
		theform.elements[4].value='';
		theform.elements[4].focus();
		form_submitted=false;
		return false;
	}
	if((theform.zip.value.search && theform.zip.value.search(new RegExp("^[0-9]{5}$","g"))<0) || (theform.city.value=='Zip:'))
	{
		alert('Please input a 5 Digit Zip Code!')
		theform.elements[6].value='';
		theform.elements[6].focus();
		form_submitted=false;
		return false;
	}
 	if((theform.h_area_code.value.search
	&& theform.h_area_code.value.search(new RegExp("^[0-9]{3}$","g"))<0)
	|| isNaN(parseInt(theform.h_area_code.value,10))
	|| parseInt(theform.h_area_code.value,10) < 100
	|| 999 < parseInt(theform.h_area_code.value,10))
	{
		alert('Please input a 3 digit home area code')
		theform.elements[8].focus()
		form_submitted=false
		return false
	}
	if((theform.h_prefix.value.search
	&& theform.h_prefix.value.search(new RegExp("^[0-9]{3}$","g"))<0))
	{
		alert('Please input a 3 digit home prefix')
		theform.elements[9].focus()
		form_submitted=false
		return false
	}
	if((theform.h_suffix.value.search
	&& theform.h_suffix.value.search(new RegExp("^[0-9]{4}$","g"))<0))
	{
		alert('Please input a 4 digit home phone suffix')
		theform.elements[10].focus()
		form_submitted=false
		return false
	}
	if((ValidateEmail(theform.email)==false) || theform.email.value=='E-mail:' )
	{
		alert('Please specify a valid e-mail address!');
		theform.elements[7].value='';
		theform.elements[7].focus();
		form_submitted=false;
		return false;
	}
	return true
}

function PageLoad()
{
		document.subscription_form.elements[0].focus()
}


