

function replaceImg (theField, theImg)
{
   fImage = eval(theField)
   fImage.src = theImg
}

   function loadImages()
   {
       var docu = document;
       var arraySz = 25;
   if (docu.images)
    {
       if (!docu.PW_img) {
 	     docu.PW_img = new Array(arraySz);
 		 for(j=1; j<arraySz; j++) {
            docu.PW_img[j] = new Image;
        } // for
		for (j=1; j<=8; j++)
		{
	        docu.PW_img[j].src = "Images/NewInfomed/p" + (j+9) + "n.gif";
	        docu.PW_img[j+8].src = "Images/NewInfomed/p" + (j+19) + "n.gif";
	        docu.PW_img[j+16].src = "Images/NewInfomed/p" + (j+29) + "n.gif";
     	}  // for loading
       } // !docu.PW_img

   } // if docu.images
  } // loadImages

  function ImgOn (picNum)
{
//	alert(eval(this));
//	alert(theField.name)
   fImage = eval("document.btn_" + picNum);
//   fImage.src = theImg + "_o.jpg";
//   fImage = eval("Image" + picNum);
   fImage.src = "Images/FirstPage/btn_" + picNum + "n.jpg";

}

function ImgOff (picNum)
{
   fImage = eval("document.btn_" + picNum);
   fImage.src = "Images/FirstPage/btn_" + picNum  + ".jpg";
}


  function ImgOn2 (picNum)
{
//	alert(eval(this));
//	alert(theField.name)
   fImage = eval("document.Image" + picNum);
//   fImage.src = theImg + "_o.jpg";
//   fImage = eval("Image" + picNum);
   fImage.src = "../Images/NewInfomed/p" + picNum + "n.gif";

}

function ImgOff2 (picNum)
{
   fImage = eval("document.Image" + picNum);
   fImage.src = "../Images/NewInfomed/p" + picNum + ".gif";
}



 function doSelectSearch() 
 {
       document.searchSite.submit()
 }

   function loadImagesOther()
   {
       var docu = document;
       var arraySz = 10;
   if (docu.images)
    {
       if (!docu.PW_img) {
 	     docu.PW_img = new Array(arraySz);
 		 for(j=1; j<arraySz; j++) {
            docu.PW_img[j] = new Image;
        } // for
		for (j=1; j<arraySz; j++)
		{
	        docu.PW_img[j].src = "Images/NewInfomed/p" + (j+51) + "n.gif";
     	}  // for loading
       } // !docu.PW_img

   } // if docu.images
  } // loadImagesOther

   function loadImagesOther2()
   {
       var docu = document;
       var arraySz = 10;
   if (docu.images)
    {
       if (!docu.PW_img) {
 	     docu.PW_img = new Array(arraySz);
 		 for(j=1; j<arraySz; j++) {
            docu.PW_img[j] = new Image;
        } // for
		for (j=1; j<arraySz; j++)
		{
	        docu.PW_img[j].src = "../Images/NewInfomed/p" + (j+51) + "n.gif";
     	}  // for loading
       } // !docu.PW_img

   } // if docu.images
  } // loadImagesOther



function loadAtticImages() {
       var docu = document;
        var arraySz = 22;
        var firstarraySz = 7;
  if (docu.images)
    {
       if (!docu.PW_img) {
 	     docu.PW_img = new Array(arraySz);
 		 for(j=1; j<=arraySz; j++) {
            docu.PW_img[j] = new Image;
        } // for
		for (j=1; j<firstarraySz; j++)
		{
	        docu.PW_img[j].src = "Images/FirstPage/btn_" + (j) + "n.jpg";
     	}  // for loading
		for (j=11; j<=22; j++)
		{
	        docu.PW_img[j].src = "Images/FirstPage/btn_" + (j) + "n.jpg";
     	}  // for loading
	   }
	}
}



 function atticOpenWin (theURL,winName,features) { //v2.0
   if (features == "width=450,height=460")
   {
//	   features = "width=450,height=526";
	   features = "width=450,height=551";
   }
   features = features+",resizable=yes,status=yes"

   glosWindow = window.open(theURL,winName,features);
 //  glosWindow.focus();
 } //   infoOpenWin

 function doSendContact() 
 {
    var mailRE = /^[^\@]+\@[^\@]+$/
    if (document.writeForm.theName.value && document.writeForm.eMail.value && !document.writeForm.subject.options[0].selected  && document.writeForm.detailField.value) {
         toSend = true;
    } else {
         toSend = false;
    }
    // Now to find out if there is a @ in the E-mails
    if (!mailRE.test(document.writeForm.eMail.value)) {
       toSend = false;
    }
    if (toSend) {
       return true
    } else {
       alert ("All fields marked with * must be filled, E-mail should be a legal Email address")
 	  return false
    }
 }

 function doSendClub()
 {
    var mailRE = /^[^\@]+\@[^\@]+$/
    if (document.writeForm.theName.value && document.writeForm.eMail.value) {
         toSend = true;
    } else {
         toSend = false;
    }
    // Now to find out if there is a @ in the E-mails
    if (!mailRE.test(document.writeForm.eMail.value)) {
       toSend = false;
    }
	if (!document.writeForm.confirmed.checked) {
       toSend = false;
	}
    if (toSend) {
       return true
    } else {
       alert ("יש לסמן את כל השדות המסומנים ב- *, כולל הסכמה לקבלת חומר מעליית הגג. \nכמו כן יש לדאוג לכתובת דואר אלקטרוני חוקית");
 	  return false
    }
 }
