<!--

flag = null;

var agt=navigator.userAgent.toLowerCase(); 
var is_major = parseInt(navigator.appVersion); 
var is_minor = parseFloat(navigator.appVersion); 
    // Note: Opera and WebTV spoof Navigator.  We do strict client detection. 
    // If you want to allow spoofing, take out the tests for opera and webtv. 
var is_nav  = ((agt.indexOf('mozilla')!=-1) && (agt.indexOf('spoofer')==-1) 
              && (agt.indexOf('compatible') == -1) && (agt.indexOf('opera')==-1) 
                && (agt.indexOf('webtv')==-1)); 
var is_nav2 = (is_nav && (is_major == 2)); 
var is_nav3 = (is_nav && (is_major == 3)); 
var is_nav4 = (is_nav && (is_major == 4)); 
var is_nav4up = (is_nav && (is_major >= 4)); 
var is_navonly      = (is_nav && ((agt.indexOf(";nav") != -1) || 
                          (agt.indexOf("; nav") != -1)) ); 
var is_nav5 = (is_nav && (is_major == 5)); 
var is_nav5up = (is_nav && (is_major >= 5)); 

var is_ie     = ((agt.indexOf("msie") != -1) && (agt.indexOf("opera") == -1));
var is_ie3    = (is_ie && (is_major < 4));
var is_ie4    = (is_ie && (is_major == 4) && (agt.indexOf("msie 4")!=-1) );
var is_ie4up  = (is_ie && (is_major >= 4));
var is_ie5    = (is_ie && (is_major == 4) && (agt.indexOf("msie 5.")!=-1) );
var is_ie5_0    = (is_ie && (is_major == 4) && (agt.indexOf("msie 5.0")!=-1) );
var is_ie5_5  = (is_ie && (is_major == 4) && (agt.indexOf("msie 5.5") !=-1));
var is_ie5up  = (is_ie && !is_ie3 && !is_ie4);
var is_ie5_5up =(is_ie && !is_ie3 && !is_ie4 && !is_ie5);
var is_ie6    = (is_ie && (is_major == 4) && (agt.indexOf("msie 6.")!=-1) );
var is_ie6up  = (is_ie && !is_ie3 && !is_ie4 && !is_ie5 && !is_ie5_5);

var is_mac    = (agt.indexOf("mac")!=-1);
var is_pc    = (agt.indexOf("mac")==-1);

if ((is_ie) && (!is_ie5up))
window.location.replace("upgrade_browser.html");

if ((is_nav) && (!is_nav5up))
window.location.replace("upgrade_browser.html");


document.write('<LINK REL=stylesheet HREF="/styles2.css">');

function goto_URL(object) {
window.location.href =  object.options[object.selectedIndex].value;
}


function MM_jumpMenu(targ,selObj,restore){ //v3.0
  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
}

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_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_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.0
  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 && document.getElementById) x=document.getElementById(n); return x;
}


function blurIE(arg) {
if(is_ie) 
arg.blur();
}

function openDetailsWin(theURL) { //v2.0
window.open(theURL,"DetailWin","scrollbars=yes,menubar=yes,width=475,height=375,screenX=0,screenY=0,left=0,top=0");
}

function openAnnoucneWin(theURL) { //v2.0
window.open(theURL,"AnnounceWin","scrollbars=yes,menubar=yes,width=500,height=275,screenX=0,screenY=0,left=0,top=0");
}

function openVideoWin(theURL) { //v2.0
window.open(theURL,"videoWin","scrollbars=no,width=270,height=260,screenX=0,screenY=0,left=0,top=0");
}

function openVideoWinLarge(theURL) { //v2.0
window.open(theURL,"videoWinLarge","scrollbars=no,width=350,height=320,screenX=0,screenY=0,left=0,top=0");
}


function customScripts() {
populate();

MM_preloadImages('/images/bn_about_o.gif','/images/bn_life_o.gif','/images/bn_calendar_o.gif','/images/bn_support_o.gif','/images/bn_israel_o.gif','/images/bn_home_o.gif','/images/bn_contact_o.gif');
MM_preloadImages('images/home_tree1_o.gif','images/home_tree2_o_a.gif','images/home_tree2_o_b.gif','images/home_tree3_o_a.gif','images/home_tree3_o_b.gif','images/home_tree4_o_a.gif','images/home_tree4_o_b.gif','images/home_tree5_o_a.gif','images/home_tree5_o_b.gif');
MM_preloadImages('/images/icon_calendar_o.gif','/images/icon_listing_o.gif');
MM_preloadImages('/images/home_news_o.gif','/images/home_events_o.gif');
}

function eventArchives()
{
    var error_string = "";
	var month, year, taskdate;
	
		// check for month accuracy
	month = window.document.archiveForm.archiveMonth.options[document.archiveForm.archiveMonth.selectedIndex].value;
    if (month == "")
    {
        error_string += "You must select a month.\n";
		error_string = error_string;
        alert(error_string);
		return false;
    }


		// check for year accuracy
	year = window.document.archiveForm.archiveYear.options[document.archiveForm.archiveYear.selectedIndex].value;
    if (year == "")
    {
        error_string += "You must select a year.\n";
		error_string = error_string;
        alert(error_string);
		return false;
    }

    if (error_string == "")
    {
		taskdate = month + "/1/" + year;
		archiveWin = window.open("archive-results.asp?taskDate=" + taskdate +  "","archiveWin","scrollbars=yes,width=600,height=420,left=0,top=0,screenX=0,screenY=0");
	   return true;
	   
    } 
}



var theImages = new Array() 

theImages[0] = '/images/quote0.gif'
theImages[1] = '/images/quote1.gif'
theImages[2] = '/images/quote2.gif'
theImages[3] = '/images/quote3.gif'
theImages[4] = '/images/quote4.gif'
theImages[5] = '/images/quote5.gif'

var j = 0
var p = theImages.length;
var preBuffer = new Array()
for (i = 0; i < p; i++){
   preBuffer[i] = new Image()
   preBuffer[i].src = theImages[i]
}
var whichImage = Math.round(Math.random()*(p-1));
function showImage(){
document.write('<img border="0" width="760" height="27" src="'+theImages[whichImage]+'">');
}


var theImagesCollage = new Array() 

theImagesCollage[0] = '/images/photo_homepage.jpg'
theImagesCollage[1] = '/images/photo_homepage.jpg'
theImagesCollage[2] = '/images/photo_homepage.jpg'
theImagesCollage[3] = '/images/photo_homepage.jpg'

var j = 0
var p = theImagesCollage.length;
var preBuffer = new Array()
for (i = 0; i < p; i++){
   preBuffer[i] = new Image()
   preBuffer[i].src = theImagesCollage[i]
}
var whichImageCollage = Math.round(Math.random()*(p-1));
function showImageCollage(){
document.write('<img border="0" width="521" height="82" src="'+theImagesCollage[whichImageCollage]+'">');
}



// The new function for the homepage slideshow

// the following builds the array for the homepage slideshow
    var imgArray = new Array();
            imgArray[1-1] = "images/photo_homepage0.jpg";
            imgArray[2-1] = "images/photo_homepage1.jpg";
            imgArray[3-1] = "images/photo_homepage2.jpg";
            imgArray[4-1] = "images/photo_homepage3.jpg";
            imgArray[5-1] = "images/photo_homepage4.jpg";
            imgArray[6-1] = "images/photo_homepage5.jpg";
            imgArray[7-1] = "images/photo_homepage6.jpg";

        var index = 0;
    function changeImg(what) {
        if (index >= imgArray.length) index=0;
        what.src = imgArray[index];
        index++;
    }


// the following generates a random photo to start the homepage slideshow
function showPhoto(){
var homePhoto = new Array() 

homePhoto[0] = 'images/photo_homepage0.jpg'
homePhoto[1] = 'images/photo_homepage1.jpg'
homePhoto[2] = 'images/photo_homepage2.jpg'
homePhoto[3] = 'images/photo_homepage3.jpg'
homePhoto[4] = 'images/photo_homepage4.jpg'
homePhoto[5] = 'images/photo_homepage5.jpg'
homePhoto[6] = 'images/photo_homepage6.jpg'

var j = 0
var p = homePhoto.length;
var preBuffer = new Array()
for (i = 0; i < p; i++){
   preBuffer[i] = new Image()
   preBuffer[i].src = homePhoto[i]
}
var whichPhoto = Math.round(Math.random()*(p-1));


document.write('<img border="0" width="521" height="82" name="slideshow" src="'+homePhoto[whichPhoto]+'">');
setInterval("changeImg(document.slideshow)",5000);
}





// End of new function for the homepage slideshow


function openNewsWin(theURL) { //v2.0
newsWin = window.open(theURL,"newsWin","scrollbars=yes,resizable=yes,width=600,height=420,screenX=0,screenY=0,left=0,top=0");
newsWin.focus();
}

writeResource = "";
if (window.location.href.indexOf('-israel') != -1) {
writeResource = "<a href='res-israel.html'>Pro-Israel Resources from Various Political Perspectives</a>";
}
else if (window.location.href.indexOf('-tufts') != -1) {
writeResource = "<a href='res-tufts.html'>List of Tufts Community Resources</a>";
}
else if (window.location.href.indexOf('-social') != -1) {
writeResource = "<a href='res-social.html'>List of Social Life Resources</a>";
}
else if (window.location.href.indexOf('-culture') != -1) {
writeResource = "<a href='res-culture.html'>List of Culture & Arts Resources</a>";
}
else if (window.location.href.indexOf('-holidays') != -1) {
writeResource = "<a href='res-holidays.html'>List of Shabbat & Holidays Resources</a>";
}
else if (window.location.href.indexOf('-learning') != -1) {
writeResource = "<a href='res-learning.html'>List of Jewish Life & Learning Resources</a>";
}
else if (window.location.href.indexOf('-justice') != -1) {
writeResource = "<a href='res-justice.html'>List of Social Justice Resources</a>";
}

resources ="";
if (window.location.href.indexOf('-involved') == -1) {
resources = "<p class='subheadblue'>Resources</p><ul><li>" + writeResource + "</li></ul>";
}




function checkForm()
{
    var error_string = "";
    // check the first name field
    if (window.document.form1.name.value == "")
    {
        error_string += "You must enter your name.\n";
    }

 // check the company field
    if (window.document.form1.studentID.value == "")
    {
        error_string += "You must enter your student ID. If you don't have one, please type N/A \n";
    }

// check the phone field
    if (window.document.form1.address.value == "")
    {
        error_string += "You must enter your local address.\n";
    }

// check the email field
    if (window.document.form1.phone.value == "")
    {
        error_string += "You must enter a phone number.\n";
    }

// check the product number field
    if (window.document.form1.email.value == "")
    {
        error_string += "You must enter an email address.\n";
    }

    if (error_string == "")
    {
	   return true;
	   
    } else {
        error_string = error_string;
        alert(error_string);
        return false;
    } 
}


function checkFormNew()
{
	if (window.document.form1.emailtwo.value != "") {
	return false;	
	}
	
    var error_string = "";
    // check the first name field
    if (window.document.form1.name.value == "")
    {
        error_string += "You must enter your name.\n";
    }

 // check the company field
    if (window.document.form1.studentID.value == "")
    {
        error_string += "You must enter your student ID. If you don't have one, please type N/A \n";
    }

// check the phone field
    if (window.document.form1.address.value == "")
    {
        error_string += "You must enter your local address.\n";
    }

// check the email field
    if (window.document.form1.phone.value == "")
    {
        error_string += "You must enter a phone number.\n";
    }

// check the product number field
    if (window.document.form1.email.value == "")
    {
        error_string += "You must enter an email address.\n";
    }

    if (error_string == "")
    {
	   return true;
	   
    } else {
        error_string = error_string;
        alert(error_string);
        return false;
    } 
}

function checkFormFund()
{
    var error_string = "";
    // check the first name field
    if (window.document.form1.name.value == "")
    {
        error_string += "You must enter your name.\n";
    }

// check the address field
    if (window.document.form1.address1.value == "")
    {
        error_string += "You must enter your address.\n";
    }

// check the city field
    if (window.document.form1.city.value == "")
    {
        error_string += "You must enter your city.\n";
    }
	
// check the state field
    if (window.document.form1.state.value == "")
    {
        error_string += "You must enter your state.\n";
    }
// check the zip field
    if (window.document.form1.zip.value == "")
    {
        error_string += "You must enter your zip or postal code.\n";
    }
	

// check the phone field
    if (window.document.form1.phone.value == "")
    {
        error_string += "You must enter your phone number.\n";
    }

// check the email field
    if (window.document.form1.email.value == "")
    {
        error_string += "You must enter an email address.\n";
    }


    if (error_string == "")
    {
	   return true;
	   
    } else {
        error_string = error_string;
        alert(error_string);
        return false;
    } 
}


function populate(){
if (flag == "homepage") {

if (iedom){
cross_marquee=document.getElementById? document.getElementById("iemarquee") : document.all.iemarquee
cross_marquee.style.left=parseInt(marqueewidth)+8+"px"
cross_marquee.innerHTML=marqueecontent
actualwidth=document.all? temp.offsetWidth : document.getElementById("temp").offsetWidth
}
else if (document.layers){
ns_marquee=document.ns_marquee.document.ns_marquee2
ns_marquee.left=parseInt(marqueewidth)+8
ns_marquee.document.write(marqueecontent)
ns_marquee.document.close()
actualwidth=ns_marquee.document.width
}
lefttime=setInterval("scrollmarquee()",20)
}

}

function performSearch() {
searchTerm = document.searchForm.zoom_query.value;
searchTermQuery = "/search/search.asp?zoom_query=" + searchTerm + "&zoom_per_page=10&zoom_and=1&zoom_sort=0";

window.location.href = searchTermQuery;
}

function checkEvent(e) {
var unicode=e.keyCode? e.keyCode : e.charCode;
//alert(unicode);
if (unicode == 13) {

searchTerm = document.searchForm.zoom_query.value;
searchTermQuery = "/search/search.asp?zoom_query=" + searchTerm + "&zoom_per_page=10&zoom_and=1&zoom_sort=0";

window.location.href = searchTermQuery;

}

}//-->