<!-- Begin

//Usage: The link is written as follows: 
//onclick="newWindow(this.href, 'popup', 500, 500, 1, 1, 0, 0, 0, 1, 0);"
//Usage Description:
//"this.href" refers to the URL given in the "a" tag; "'popup'" is the name of the popup window;
//600 is the width of the popup window; 500 is the height of the popup window; the numbers that
//follow designate whether a property is turned on ("1") or off ("0"), in this order:
//scrollbars, resizable, menubar, toolbar, addressbar, statusbar, fullscreen

function newWindow(a_str_windowURL, a_str_windowName, a_int_windowWidth, a_int_windowHeight, a_bool_scrollbars, a_bool_resizable, a_bool_menubar, a_bool_toolbar, a_bool_addressbar, a_bool_statusbar, a_bool_fullscreen) {
  var int_windowLeft = (screen.width - a_int_windowWidth) / 2;
  var int_windowTop = (screen.height - a_int_windowHeight) / 2;
  var str_windowProperties = 'height=' + a_int_windowHeight + ',width=' + a_int_windowWidth + ',top=' + int_windowTop + ',left=' + int_windowLeft + ',scrollbars=' + a_bool_scrollbars + ',resizable=' + a_bool_resizable + ',menubar=' + a_bool_menubar + ',toolbar=' + a_bool_toolbar + ',location=' + a_bool_addressbar + ',statusbar=' + a_bool_statusbar + ',fullscreen=' + a_bool_fullscreen + '';
  var obj_window = window.open(a_str_windowURL, a_str_windowName, str_windowProperties)
    if (parseInt(navigator.appVersion) >= 4) {
      obj_window.window.focus();
    }
}

function InsertQTMovie()
{
document.write('<object id="jtmov" classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B"\n');
document.write('codebase="http://www.apple.com/qtactivex/qtplugin.cab"\n');
document.write('width="240" height="196">\n');
document.write('  <param name="type" value="video/quicktime" />\n');
document.write('  <param name="src" value="jt.mov" />\n');
document.write('  <param name="href" value="./" />\n');
document.write('  <param name="controller" value="true" />\n');
document.write('  <param name="autoplay" value="true" />\n');
document.write('  <param name="starttime" value="0:3:20" />\n');
document.write('  <param name="endtime" value="5:21:8" />\n');
document.write('  <PARAM NAME="TARGET" VALUE="myself" />\n');
document.write('  <PARAM NAME="QTNEXT1" VALUE="javascript:document.jtmov.Stop();document.jtmov.Rewind();" />\n');
document.write('<EMBED NAME="jtmov" SRC="jt.mov" HEIGHT="196" WIDTH="240" TYPE="video/quicktime"\n');
document.write('  PLUGINSPAGE="http://www.apple.com/quicktime/download/" enablejavascript="true" CONTROLLER="true"\n');
document.write('  QTNEXT1="javascript:document.jtmov.Stop();document.jtmov.Rewind();"\n');
document.write('  STARTTIME="0:3:20" ENDTIME="5:21:8" HREF="./" TARGET="myself" />\n');
document.write('</object>\n');
}

function checkRadios() {
 var el = document.forms[0].elements;
 for(var i = 0 ; i < el.length ; ++i) {
  if(el[i].type == "radio") {
   var radiogroup = el[el[i].name]; // get the whole set of radio buttons.
   var itemchecked = false;
   for(var j = 0 ; j < radiogroup.length ; ++j) {
    if(radiogroup[j].checked) {
	 itemchecked = true;
	 break;
	}
   }
   if(!itemchecked) { 
    alert("Please answer whether you or\nyour partner are Jewish.");
    if(el[i].focus)
     el[i].focus();
	return false;
   }
  }
 }
 return true;
} 

function wordCounter(field, countfield, maxlimit) {
wordcounter=0;
for (x=0;x<field.value.length;x++) {
      if (field.value.charAt(x) == " " && field.value.charAt(x-1) != " ")  {wordcounter++}  // Counts the spaces while ignoring double spaces, usually one in between each word.
      if (wordcounter > maxlimit) {field.value = field.value.substring(0, x);}
      else {countfield.value = maxlimit - wordcounter;}
      }
   }

function textCounter(field, countfield, maxlimit) {
  if (field.value.length > maxlimit)
      {field.value = field.value.substring(0, maxlimit);}
      else
      {countfield.value = maxlimit - field.value.length;}
  }


//  End -->


