if (getCookie("cmywidth")) {
    setCookie("nevermind","nevermind");
}
else {
    if (screen.height >= 865 && screen.width >= 1024) {
        setCookie("cmywidth","820");
        setCookie("cmyheight","865");
        /** window.resizeTo("820","865"); */
    }
    else {
    if (screen.height <= 600 && screen.width <= 800) {
        setCookie("cmywidth",screen.width);
        setCookie("cmyheight",screen.height);
        /** window.resizeTo(screen.width,screen.height); */
    }
    else {
        setCookie("cmywidth","820");
        setCookie("cmyheight","865");
        /** window.resizeTo("820","865"); */
       }
    }
}


function validateSubmit()
{
	if(!document.FORMnaccrra.accept.checked) {
		alert("You must agree with the disclaimer in order to search the NACCRRA on-line database\nfor child care. Please check \"I accept this disclaimer\" and press Continue.");
		return false;
	}
	return true;
}

/**
 * Sets a Cookie with the given name and value.
 *
 * name       Name of the cookie
 * value      Value of the cookie
 * [expires]  Expiration date of the cookie (default: end of current session)
 * [path]     Path where the cookie is valid (default: path of calling document)
 * [domain]   Domain where the cookie is valid
 *              (default: domain of calling document)
 * [secure]   Boolean value indicating if the cookie transmission requires a
 *              secure transmission
 */
function setCookie(name, value, expires, path, domain, secure)
{
    document.cookie= name + "=" + escape(value) +
        ((expires) ? "; expires=" + expires.toGMTString() : "") +
        ((path) ? "; path=" + path : "") +
        ((domain) ? "; domain=" + domain : "") +
        ((secure) ? "; secure" : "");
}

/**
 * Gets the value of the specified cookie.
 *
 * name  Name of the desired cookie.
 *
 * Returns a string containing value of specified cookie,
 *   or null if cookie does not exist.
 */
function getCookie(name)
{
    var dc = document.cookie;
    var prefix = name + "=";
    var begin = dc.indexOf("; " + prefix);
    if (begin == -1)
    {
        begin = dc.indexOf(prefix);
        if (begin != 0) return null;
    }
    else
    {
        begin += 2;
    }
    var end = document.cookie.indexOf(";", begin);
    if (end == -1)
    {
        end = dc.length;
    }
    return unescape(dc.substring(begin + prefix.length, end));
}

/**
 * Deletes the specified cookie.
 *
 * name      name of the cookie
 * [path]    path of the cookie (must be same as path used to create cookie)
 * [domain]  domain of the cookie (must be same as domain used to create cookie)
 */
function deleteCookie(name, path, domain)
{
    if (getCookie(name))
    {
        document.cookie = name + "=" + 
            ((path) ? "; path=" + path : "") +
            ((domain) ? "; domain=" + domain : "") +
            "; expires=Thu, 01-Jan-70 00:00:01 GMT";
    }
}







function MM_checkPlugin(plgIn, theURL, altURL, autoGo) { //v4.0
    var ok=false;
    document.MM_returnValue = false;
    with (navigator) {
        if (appName.indexOf('Microsoft')==-1 || (plugins && plugins.length)) {
            ok=(plugins && plugins[plgIn]);
        } else if (appVersion.indexOf('3.1')==-1) { //not Netscape or Win3.1
            if (plgIn.indexOf("Flash")!=-1 && window.MM_flash!=null) {
                ok=window.MM_flash;
                var mycatch = "Catch 1";
            } else if (plgIn.indexOf("Director")!=-1 && window.MM_dir!=null) {
                ok=window.MM_dir;
                var mycatch = "Catch 2";
            } else {
                ok=autoGo;
                var mycatch = "Catch 3";
            }
        }
        if (!ok) { theURL=altURL; }
        //if (theURL) { window.location=theURL; }
        document.write(' + theURL + ');
    }
}

with (navigator) {
    if (appName.indexOf('Microsoft')!=-1 && appVersion.indexOf('Mac')==-1) {
        document.write('<scr'+'ipt language="VBScript">\nOn error resume next\nMM_dir = IsObject(CreateObject("SWCtl.SWCtl.1"))\nMM_flash = NOT IsNull(CreateObject("ShockwaveFlash.ShockwaveFlash"))\n</script>');
    }
}

var detect = navigator.userAgent.toLowerCase();
var OS,browser,version,total,thestring;

if (checkIt('konqueror'))
{
        browser = "Konqueror";
        OS = "Linux";
}
else if (checkIt('safari')) browser = "Safari"
else if (checkIt('omniweb')) browser = "OmniWeb"
else if (checkIt('opera')) browser = "Opera"
else if (checkIt('webtv')) browser = "WebTV";
else if (checkIt('icab')) browser = "iCab"
else if (checkIt('msie')) browser = "Internet Explorer"
else if (!checkIt('compatible'))
{
        browser = "Netscape Navigator"
        version = detect.charAt(8);
}
else browser = "An unknown browser";

if (!version) version = detect.charAt(place + thestring.length);

if (!OS)
{
        if (checkIt('linux')) OS = "Linux";
        else if (checkIt('x11')) OS = "Unix";
        else if (checkIt('mac')) OS = "Mac"
        else if (checkIt('win')) OS = "Windows"
        else OS = "an unknown operating system";
}

function checkIt(string)
{
        place = detect.indexOf(string) + 1;
        thestring = string;
        return place;
}

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_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_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];}
}

function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}


function popOrder(strURL) {
        if(window.popupWin) {
                if(popupWin.closed != true) {
                        window.popupWin.focus();
                        window.popupWin.location = strURL;
                } else {
                        popupWin = window.open(strURL, "Trebro", 'resizable=no,resize=no,scrollbars=no,status=no,width=640,height=480,left=50,top=10');
                }
        } else {
                popupWin = window.open(strURL, "Trebro", 'resizable=no,resizble=no,scrollbars=no,status=no,width=640,height=480,left=50,top=10');
        }
}



function MM_showHideLayers() { //v6.0
  var i,p,v,obj,args=MM_showHideLayers.arguments;
  for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2];
    if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v=='hide')?'hidden':v; }
    obj.visibility=v; }
}

function P7_Snap() { //v2.63 by PVII
 var x,y,ox,bx,oy,p,tx,a,b,k,d,da,e,el,tw,q0,xx,yy,w1,pa='px',args=P7_Snap.arguments;a=parseInt(a);
 if(document.layers||window.opera){pa='';}for(k=0;k<(args.length);k+=4){
 if((g=MM_findObj(args[k]))!=null){if((el=MM_findObj(args[k+1]))!=null){
 a=parseInt(args[k+2]);b=parseInt(args[k+3]);x=0;y=0;ox=0;oy=0;p="";tx=1;
 da="document.all['"+args[k]+"']";if(document.getElementById){
 d="document.getElementsByName('"+args[k]+"')[0]";if(!eval(d)){
 d="document.getElementById('"+args[k]+"')";if(!eval(d)){d=da;}}
 }else if(document.all){d=da;}if(document.all||document.getElementById){while(tx==1){
 p+=".offsetParent";if(eval(d+p)){x+=parseInt(eval(d+p+".offsetLeft"));y+=parseInt(eval(d+p+".offsetTop"));
 }else{tx=0;}}ox=parseInt(g.offsetLeft);oy=parseInt(g.offsetTop);tw=x+ox+y+oy;
 if(tw==0||(navigator.appVersion.indexOf("MSIE 4")>-1&&navigator.appVersion.indexOf("Mac")>-1)){
  ox=0;oy=0;if(g.style.left){x=parseInt(g.style.left);y=parseInt(g.style.top);}else{
  w1=parseInt(el.style.width);bx=(a<0)?-5-w1:-10;a=(Math.abs(a)<1000)?0:a;b=(Math.abs(b)<1000)?0:b;
  x=document.body.scrollLeft+event.clientX+bx;y=document.body.scrollTop+event.clientY;}}
 }else if(document.layers){x=g.x;y=g.y;q0=document.layers,dd="";for(var s=0;s<q0.length;s++){
  dd='document.'+q0[s].name;if(eval(dd+'.document.'+args[k])){x+=eval(dd+'.left');y+=eval(dd+'.top');
  break;}}}e=(document.layers)?el:el.style;xx=parseInt(x+ox+a),yy=parseInt(y+oy+b);
 if(navigator.appVersion.indexOf("MSIE 5")>-1 && navigator.appVersion.indexOf("Mac")>-1){
  xx+=parseInt(document.body.leftMargin);yy+=parseInt(document.body.topMargin);}
 e.left=xx+pa;e.top=yy+pa;}}}
}

//Contents for menu 1
var menu1=new Array()
menu1[0]='<a href="http://hrdc7.truebroadcast.com/aboutus.php">About HRDC</a>'
menu1[1]='<a href="http://hrdc7.truebroadcast.com/community_involvement.php">Community Involvement</a>'
menu1[2]='<a href="http://hrdc7.truebroadcast.com/newsletter/">News & Press</a>'
menu1[3]='<a href="http://hrdc7.truebroadcast.com/contactus.php">Contact Information</a>'
menu1[4]='<a href="http://hrdc7.truebroadcast.com/boardofdirectors.php">Board Of Directors</a>'
menu1[5]='<a href="http://hrdc7.truebroadcast.com/cgi-bin/jobs.cgi">Employment</a>'

//Contents for menu 2, and so on
var menu2=new Array()
menu2[0]='<a href="http://ask.truebroadcast.com">ASK Directory</a>'
menu2[1]='<a href="http://hrdc7.truebroadcast.com/housing.php">Housing</a>'
menu2[2]='<a href="http://hrdc7.truebroadcast.com/childcare.php">Child Care</a>'
menu2[3]='<a href="http://hrdc7.truebroadcast.com/assistance.php">Assistance</a>'
menu2[4]='<a href="http://hrdc7.truebroadcast.com/energy.php">Energy Services</a>'
menu2[5]='<a href="http://hrdc7.truebroadcast.com/employmentprograms.php">Employment Programs</a>'
menu2[6]='<a href="http://hrdc7.truebroadcast.com/servicesfordisabled.php">Service for Disabled</a>'
menu2[7]='<a href="http://hrdc7.truebroadcast.com/youthprograms.php">Youth Programs</a>'

//Contents for menu 2, and so on
var menu3=new Array()
menu3[0]='<a href="http://hrdc7.truebroadcast.com/youcanhelp.php">We Need Your Help</a>'


//Contents for menu 2, and so on
var menu4=new Array()
menu4[0]='<a href="http://hrdc7.truebroadcast.com/resources_associations.php">Associations</a>'
menu4[1]='<a href="http://hrdc7.truebroadcast.com/resources_educational.php">Educational Institutions</a>'
menu4[2]='<a href="http://hrdc7.truebroadcast.com/resources_government.php">Government Agencies</a>'
menu4[3]='<a href="http://hrdc7.truebroadcast.com/resources_private.php">Private Organizations</a>'
menu4[4]='<a href="http://hrdc7.truebroadcast.com/poverty.php">Poverty Information</a>'

//Contents for menu 2, and so on
var menu5=new Array()
menu5[0]='<a href="http://hrdc7.truebroadcast.com/roma_caa.php">Community Action Agencies</a>'
menu5[1]='<a href="http://hrdc7.truebroadcast.com/roma_overview.php">Overview of ROMA</a>'
menu5[2]='<a href="http://hrdc7.truebroadcast.com/roma_implementation.php">CAA Implementation</a>'
menu5[3]='<a href="http://hrdc7.truebroadcast.com/roma_faq.php">ROMA FAQs</a>'

		
var menuwidth='165px' //default menu width
var menubgcolor='#dedede'  //menu bgcolor
var disappeardelay=250  //menu disappear speed onMouseout (in miliseconds)
var hidemenu_onclick="yes" //hide menu when user clicks within menu?

/////No further editting needed

var ie4=document.all
var ns6=document.getElementById&&!document.all

if (ie4||ns6)
document.write('<div id="dropmenudiv" style="visibility:hidden;width:'+menuwidth+';background-color:'+menubgcolor+'" onMouseover="clearhidemenu()" onMouseout="dynamichide(event)"></div>')

function getposOffset(what, offsettype){
var totaloffset=(offsettype=="left")? what.offsetLeft : what.offsetTop;
var parentEl=what.offsetParent;
while (parentEl!=null){
totaloffset=(offsettype=="left")? totaloffset+parentEl.offsetLeft : totaloffset+parentEl.offsetTop;
parentEl=parentEl.offsetParent;
}
return totaloffset;
}


function showhide(obj, e, visible, hidden, menuwidth){
if (ie4||ns6)
dropmenuobj.style.left=dropmenuobj.style.top=-500
if (menuwidth!=""){
dropmenuobj.widthobj=dropmenuobj.style
dropmenuobj.widthobj.width=menuwidth
}
if (e.type=="click" && obj.visibility==hidden || e.type=="mouseover")
obj.visibility=visible
else if (e.type=="click")
obj.visibility=hidden
}

function iecompattest(){
return (document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body
}

function clearbrowseredge(obj, whichedge){
var edgeoffset=0
if (whichedge=="rightedge"){
var windowedge=ie4 && !window.opera? iecompattest().scrollLeft+iecompattest().clientWidth-15 : window.pageXOffset+window.innerWidth-15
dropmenuobj.contentmeasure=dropmenuobj.offsetWidth
if (windowedge-dropmenuobj.x < dropmenuobj.contentmeasure)
edgeoffset=dropmenuobj.contentmeasure-obj.offsetWidth
}
else{
var windowedge=ie4 && !window.opera? iecompattest().scrollTop+iecompattest().clientHeight-15 : window.pageYOffset+window.innerHeight-18
dropmenuobj.contentmeasure=dropmenuobj.offsetHeight
if (windowedge-dropmenuobj.y < dropmenuobj.contentmeasure)
edgeoffset=dropmenuobj.contentmeasure+obj.offsetHeight
}
return edgeoffset
}

function populatemenu(what){
if (ie4||ns6)
dropmenuobj.innerHTML=what.join("")
}


function dropdownmenu(obj, e, menucontents, menuwidth){
if (window.event) event.cancelBubble=true
else if (e.stopPropagation) e.stopPropagation()
clearhidemenu()
dropmenuobj=document.getElementById? document.getElementById("dropmenudiv") : dropmenudiv
populatemenu(menucontents)

if (ie4||ns6){
showhide(dropmenuobj.style, e, "visible", "hidden", menuwidth)
dropmenuobj.x=getposOffset(obj, "left")
dropmenuobj.y=getposOffset(obj, "top")
dropmenuobj.style.left=dropmenuobj.x-clearbrowseredge(obj, "rightedge")+"px"
dropmenuobj.style.top=dropmenuobj.y-clearbrowseredge(obj, "bottomedge")+obj.offsetHeight+"px"
}

return clickreturnvalue()
}

function clickreturnvalue(){
if (ie4||ns6) return false
else return true
}

function contains_ns6(a, b) {
while (b.parentNode)
if ((b = b.parentNode) == a)
return true;
return false;
}

function dynamichide(e){
if (ie4&&!dropmenuobj.contains(e.toElement))
delayhidemenu()
else if (ns6&&e.currentTarget!= e.relatedTarget&& !contains_ns6(e.currentTarget, e.relatedTarget))
delayhidemenu()
}

function hidemenu(e){
if (typeof dropmenuobj!="undefined"){
if (ie4||ns6)
dropmenuobj.style.visibility="hidden"
}
}

function delayhidemenu(){
if (ie4||ns6)
delayhide=setTimeout("hidemenu()",disappeardelay)
}

function clearhidemenu(){
if (typeof delayhide!="undefined")
clearTimeout(delayhide)
}

if (hidemenu_onclick=="yes")
document.onclick=hidemenu

function MyContactForm(theForm)
{

  if (theForm.Name.value == "")
  {
    alert("Please enter a value for the \"Name\" field.");
    theForm.Name.focus();
    return (false);
  }

  if (theForm.Name.value.length < 1)
  {
    alert("Please enter at least 1 characters in the \"Name\" field.");
    theForm.Name.focus();
    return (false);
  }

  if (theForm.Name.value.length > 100)
  {
    alert("Please enter at most 100 characters in the \"Name\" field.");
    theForm.Name.focus();
    return (false);
  }

  if (theForm.Mail_to.value == "")
  {
    alert("Please enter a value for the \"Mailing Address\" field.");
    theForm.Mail_to.focus();
    return (false);
  }

  if (theForm.Mail_to.value.length < 1)
  {
    alert("Please enter at least 1 characters in the \"Mailing Address\" field.");
    theForm.Mail_to.focus();
    return (false);
  }

  if (theForm.Mail_to.value.length > 100)
  {
    alert("Please enter at most 100 characters in the \"Mailing Address\" field.");
    theForm.Mail_to.focus();
    return (false);
  }

  if (theForm.City.value == "")
  {
    alert("Please enter a value for the \"City or Town\" field.");
    theForm.City.focus();
    return (false);
  }

  if (theForm.City.value.length < 1)
  {
    alert("Please enter at least 1 characters in the \"City or Town\" field.");
    theForm.City.focus();
    return (false);
  }

  if (theForm.City.value.length > 100)
  {
    alert("Please enter at most 100 characters in the \"City or Town\" field.");
    theForm.City.focus();
    return (false);
  }

  var checkOK = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyzƒŠŒŽšœžŸÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõöøùúûüýþÿ \t\r\n\f";
  var checkStr = theForm.City.value;
  var allValid = true;
  var validGroups = true;
  for (i = 0;  i < checkStr.length;  i++)
  {
    ch = checkStr.charAt(i);
    for (j = 0;  j < checkOK.length;  j++)
      if (ch == checkOK.charAt(j))
        break;
    if (j == checkOK.length)
    {
      allValid = false;
      break;
    }
  }
  if (!allValid)
  {
    alert("Please enter only letter and whitespace characters in the \"City or Town\" field.");
    theForm.City.focus();
    return (false);
  }

  if (theForm.State.value == "")
  {
    alert("Please enter a value for the \"State or Province\" field.");
    theForm.State.focus();
    return (false);
  }

  if (theForm.State.value.length < 1)
  {
    alert("Please enter at least 1 characters in the \"State or Province\" field.");
    theForm.State.focus();
    return (false);
  }

  if (theForm.State.value.length > 50)
  {
    alert("Please enter at most 50 characters in the \"State or Province\" field.");
    theForm.State.focus();
    return (false);
  }

  var checkOK = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyzƒŠŒŽšœžŸÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõöøùúûüýþÿ \t\r\n\f";
  var checkStr = theForm.State.value;
  var allValid = true;
  var validGroups = true;
  for (i = 0;  i < checkStr.length;  i++)
  {
    ch = checkStr.charAt(i);
    for (j = 0;  j < checkOK.length;  j++)
      if (ch == checkOK.charAt(j))
        break;
    if (j == checkOK.length)
    {
      allValid = false;
      break;
    }
  }
  if (!allValid)
  {
    alert("Please enter only letter and whitespace characters in the \"State or Province\" field.");
    theForm.State.focus();
    return (false);
  }

  if (theForm.Zip.value == "")
  {
    alert("Please enter a value for the \"Zip\" field.");
    theForm.Zip.focus();
    return (false);
  }

  if (theForm.Zip.value.length < 5)
  {
    alert("Please enter at least 5 characters in the \"Zip\" field.");
    theForm.Zip.focus();
    return (false);
  }

  if (theForm.Zip.value.length > 10)
  {
    alert("Please enter at most 10 characters in the \"Zip\" field.");
    theForm.Zip.focus();
    return (false);
  }

  var checkOK = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyzƒŠŒŽšœžŸÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõöøùúûüýþÿ0123456789--";
  var checkStr = theForm.Zip.value;
  var allValid = true;
  var validGroups = true;
  for (i = 0;  i < checkStr.length;  i++)
  {
    ch = checkStr.charAt(i);
    for (j = 0;  j < checkOK.length;  j++)
      if (ch == checkOK.charAt(j))
        break;
    if (j == checkOK.length)
    {
      allValid = false;
      break;
    }
  }
  if (!allValid)
  {
    alert("Please enter only letter, digit and \"-\" characters in the \"Zip\" field.");
    theForm.Zip.focus();
    return (false);
  }

  if (theForm.Country.value == "")
  {
    alert("Please enter a value for the \"Country\" field.");
    theForm.Country.focus();
    return (false);
  }

  if (theForm.Country.value.length < 3)
  {
    alert("Please enter at least 3 characters in the \"Country\" field.");
    theForm.Country.focus();
    return (false);
  }

  if (theForm.Country.value.length > 50)
  {
    alert("Please enter at most 50 characters in the \"Country\" field.");
    theForm.Country.focus();
    return (false);
  }

  var checkOK = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyzƒŠŒŽšœžŸÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõöøùúûüýþÿ";
  var checkStr = theForm.Country.value;
  var allValid = true;
  var validGroups = true;
  for (i = 0;  i < checkStr.length;  i++)
  {
    ch = checkStr.charAt(i);
    for (j = 0;  j < checkOK.length;  j++)
      if (ch == checkOK.charAt(j))
        break;
    if (j == checkOK.length)
    {
      allValid = false;
      break;
    }
  }
  if (!allValid)
  {
    alert("Please enter only letter characters in the \"Country\" field.");
    theForm.Country.focus();
    return (false);
  }

  if (theForm.country_code.value == "")
  {
    alert("Please enter a value for the \"country_code\" field.");
    theForm.country_code.focus();
    return (false);
  }

  if (theForm.country_code.value.length < 1)
  {
    alert("Please enter at least 1 characters in the \"country_code\" field.");
    theForm.country_code.focus();
    return (false);
  }

  if (theForm.country_code.value.length > 4)
  {
    alert("Please enter at most 4 characters in the \"country_code\" field.");
    theForm.country_code.focus();
    return (false);
  }

  var checkOK = "0123456789-.,";
  var checkStr = theForm.country_code.value;
  var allValid = true;
  var validGroups = true;
  var decPoints = 0;
  var allNum = "";
  for (i = 0;  i < checkStr.length;  i++)
  {
    ch = checkStr.charAt(i);
    for (j = 0;  j < checkOK.length;  j++)
      if (ch == checkOK.charAt(j))
        break;
    if (j == checkOK.length)
    {
      allValid = false;
      break;
    }
    if (ch == ".")
    {
      allNum += ".";
      decPoints++;
    }
    else if (ch == "," && decPoints != 0)
    {
      validGroups = false;
      break;
    }
    else if (ch != ",")
      allNum += ch;
  }
  if (!allValid)
  {
    alert("Please enter only digit characters in the \"country_code\" field.");
    theForm.country_code.focus();
    return (false);
  }

  if (decPoints > 1 || !validGroups)
  {
    alert("Please enter a valid number in the \"country_code\" field.");
    theForm.country_code.focus();
    return (false);
  }

  if (theForm.area_code.value == "")
  {
    alert("Please enter a value for the \"area_code\" field.");
    theForm.area_code.focus();
    return (false);
  }

  if (theForm.area_code.value.length < 3)
  {
    alert("Please enter at least 3 characters in the \"area_code\" field.");
    theForm.area_code.focus();
    return (false);
  }

  if (theForm.area_code.value.length > 5)
  {
    alert("Please enter at most 5 characters in the \"area_code\" field.");
    theForm.area_code.focus();
    return (false);
  }

  var checkOK = "0123456789-.,";
  var checkStr = theForm.area_code.value;
  var allValid = true;
  var validGroups = true;
  var decPoints = 0;
  var allNum = "";
  for (i = 0;  i < checkStr.length;  i++)
  {
    ch = checkStr.charAt(i);
    for (j = 0;  j < checkOK.length;  j++)
      if (ch == checkOK.charAt(j))
        break;
    if (j == checkOK.length)
    {
      allValid = false;
      break;
    }
    if (ch == ".")
    {
      allNum += ".";
      decPoints++;
    }
    else if (ch == "," && decPoints != 0)
    {
      validGroups = false;
      break;
    }
    else if (ch != ",")
      allNum += ch;
  }
  if (!allValid)
  {
    alert("Please enter only digit characters in the \"area_code\" field.");
    theForm.area_code.focus();
    return (false);
  }

  if (decPoints > 1 || !validGroups)
  {
    alert("Please enter a valid number in the \"area_code\" field.");
    theForm.area_code.focus();
    return (false);
  }

  if (theForm.number.value == "")
  {
    alert("Please enter a value for the \"number\" field.");
    theForm.number.focus();
    return (false);
  }

  if (theForm.number.value.length < 7)
  {
    alert("Please enter at least 7 characters in the \"number\" field.");
    theForm.number.focus();
    return (false);
  }

  if (theForm.number.value.length > 10)
  {
    alert("Please enter at most 10 characters in the \"number\" field.");
    theForm.number.focus();
    return (false);
  }

  var checkOK = "0123456789-.,";
  var checkStr = theForm.number.value;
  var allValid = true;
  var validGroups = true;
  var decPoints = 0;
  var allNum = "";
  for (i = 0;  i < checkStr.length;  i++)
  {
    ch = checkStr.charAt(i);
    for (j = 0;  j < checkOK.length;  j++)
      if (ch == checkOK.charAt(j))
        break;
    if (j == checkOK.length)
    {
      allValid = false;
      break;
    }
    if (ch == ".")
    {
      allNum += ".";
      decPoints++;
    }
    else if (ch == "," && decPoints != 0)
    {
      validGroups = false;
      break;
    }
    else if (ch != ",")
      allNum += ch;
  }
  if (!allValid)
  {
    alert("Please enter only digit characters in the \"number\" field.");
    theForm.number.focus();
    return (false);
  }

  if (decPoints > 1 || !validGroups)
  {
    alert("Please enter a valid number in the \"number\" field.");
    theForm.number.focus();
    return (false);
  }

  if (theForm.email.value == "")
  {
    alert("Please enter a value for the \"email\" field.");
    theForm.email.focus();
    return (false);
  }

  if (theForm.email.value.length > 100)
  {
    alert("Please enter at most 100 characters in the \"email\" field.");
    theForm.email.focus();
    return (false);
  }

  var checkOK = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyzƒŠŒŽšœžŸÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõöøùúûüýþÿ0123456789-@.";
  var checkStr = theForm.email.value;
  var allValid = true;
  var validGroups = true;
  for (i = 0;  i < checkStr.length;  i++)
  {
    ch = checkStr.charAt(i);
    for (j = 0;  j < checkOK.length;  j++)
      if (ch == checkOK.charAt(j))
        break;
    if (j == checkOK.length)
    {
      allValid = false;
      break;
    }
  }
  if (!allValid)
  {
    alert("Please enter only letter, digit and \"@.\" characters in the \"email\" field.");
    theForm.email.focus();
    return (false);
  }

  if (theForm.Questions.value == "")
  {
    alert("Please enter a value for the \"Questions\" field.");
    theForm.Questions.focus();
    return (false);
  }

  if (theForm.Questions.value.length > 500)
  {
    alert("Please enter at most 500 characters in the \"Questions\" field.");
    theForm.Questions.focus();
    return (false);
  }
  return (true);
}

