var theRnd;
 var tizerSz = 12;
			tizerArr = new Array(tizerSz);
			tizerArr[1] = "commonDrugs.htm";
			tizerArr[2] = "survey.htm";
			tizerArr[3] = "medIndex.asp";
			tizerArr[4] = "writeUs.asp";
			tizerArr[5] = "commonDrugs.htm";
			tizerArr[6] = "travelGuide.htm";
			tizerArr[7] = "immun.htm";
			tizerArr[8] = "medCalc.asp";
			tizerArr[9] = "medGlossary.asp";
			tizerArr[10] = "emergency.htm";
			tizerArr[11] = "testIndex.asp";
			
			
			tizerTxtArr = new Array(tizerSz);
			tizerTxtArr[1] = "בעיות נפוצות";
			tizerTxtArr[2] = "מישאלים";
			tizerTxtArr[3] = "אינדקס התרופות";
			tizerTxtArr[4] = "כתבו לנו";
			tizerTxtArr[5] = "בעיות נפוצות";
			tizerTxtArr[6] = "מדריך לנוסע לחו&quot;ל";
			tizerTxtArr[7] = "חיסונים";
			tizerTxtArr[8] = "מחשבונים רפואיים";
			tizerTxtArr[9] = "מילון מונחים רפואי";
			tizerTxtArr[10] = "עזרה ראשונה";
			tizerTxtArr[11] = "בדיקות רפואיות";
          theRnd = Math.round(Math.random()*(tizerSz-2)) + 1;

                   var adsSz = 3;
          adsRnd = Math.round(Math.random()*(adsSz-1)) + 1;
//			alert(adsRnd)
//		  alert("from Func " + theRnd + " tizerSz: " + tizerSz)
//   alert(navigator.userAgent)

   var numOnly = /^[0-9]+$/;
   var floatOnly = /^[0-9.]+$/;

/*  Possible Worlds Utilities 
 *
 */

 /* Geting the object by name - try to use getElementsByName, if fail then use eval */

  function PosWor_myGetName(fldStr) {
      if (document.getElementsByName) {
		  theObj = document.getElementsByName(fldStr)[0];
	  } else {
	       theObj   = eval("document." + fldStr);
      }
	  return theObj;
	  
  }




function replaceImg (theField, theImg)
{
   fImage = eval(theField)
   fImage.src = theImg
}

   function loadImages()
   {
       var docu = document;
       var arraySz = 26;
   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
		// vitamins
       docu.PW_img[25].src = "Images/NewInfomed/p18n.gif";
       } // !docu.PW_img

   } // if docu.images
    loadAds();
  } // loadImages

  function ImgOn (picNum)
{
//	alert(eval(this));
//	alert(theField.name)
   fImage =  PosWor_myGetName("Image" + picNum);
//   fImage.src = theImg + "_o.jpg";
//   fImage = eval("Image" + picNum);
   fImage.src = "Images/NewInfomed/p" + picNum + "n.gif";


}

function ImgOff (picNum)
{
   fImage =  PosWor_myGetName("Image" + picNum);
   fImage.src = "Images/NewInfomed/p" + picNum + ".gif";
}


  function ImgOn2 (picNum)
{
//	alert(eval(this));
//	alert(theField.name)
   fImage =  PosWor_myGetName("Image" + picNum);
//   fImage.src = theImg + "_o.jpg";
//   fImage = eval("Image" + picNum);
   fImage.src = "../Images/NewInfomed/p" + picNum + "n.gif";
//   if (picNum == '59') {
//	   MM_showMenu(window.mm_menu_0518162609_0,30,9,null,'popup');
//   }

}

function ImgOff2 (picNum)
{
   fImage =  PosWor_myGetName("Image" + picNum);
   fImage.src = "../Images/NewInfomed/p" + picNum + ".gif";
//   if (picNum == '59') {
//	   MM_startTimeout();
//   }
}



 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

//        mmLoadMenus("")
   } // if docu.images
    loadAds();
 } // 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
    loadAds();
  } // loadImagesOther


 function infoOpenWin (theURL,winName,features) { //v2.0
   if (features == "width=450,height=460")
   {
//	   features = "width=450,height=526";
//	   features = "width=450,height=551";
//	   features = "width=450,height=621";
	   features = "width=550,height=621";
   }
   features = features+",resizable=yes,status=yes"

   glosWindow = window.open(theURL,winName,features);
 //  glosWindow.focus();
 } //   infoOpenWin

 
 function openOuterWindow (theURL,winName,features) {
//	 alert("here");
   theWindow = window.open (theURL,winName,features);
 }



function checkGender ()
{
   with  (document.personalTest) {
   toSend = true
		if (!gender[0].checked && !gender[1].checked && !gender[2].checked) {
          errCode = 1
          toSend = false
	   }
      if (toSend)
      {
	      return true
      } else {
       switch (errCode) {
	     case 1:
            alert ("You must select one of the gender buttons")
			break;
	  } // switch	    
	  return false
	 }
   } // with
}

function checkEnteredTest ()
{
   toSend = true
   with  (document.perTestForm) {
	   if (tID.selectedIndex == 0 && tIDeng.selectedIndex == 0)
	   {
          errCode = 1
          toSend = false
	   }
      if (toSend)
      {
	      return true
      } else {
       switch (errCode) {
	     case 1:
            alert ("You must select a medical test (from the Hebrew or English menus)");
			break;
	  } // switch	    
	  return false
	 }
   }
} // checkEnteredTest

function checkEnteredDrug (modify)
{
   toSend = true
   with  (document.perDrugForm) {
	  if (modify != 2) {
  // let's make sure that no more than one drug option is selected
      drugSel = 0;
       if (dID.selectedIndex != 0) {
           drugSel++;
	   }
       if (dIDeng.selectedIndex != 0) {
           drugSel++;
	   }
       if (drugName.value) {
           drugSel++;
	   }

      switch (drugSel) {
	     case 0:
            errCode = 1;
            toSend = false;
			break;
	     case 1:
            errCode = 0;
			break;
	     case 2:
            errCode = 3;
			break;
	     case 3:
            errCode = 3;
			break;
	  } // switch

	  if (errCode == 3) {
		  // we selected more than one menu, let give the user a chance
         theMsg = "You have selected drugs in more than one options\n";
		 if (dID.selectedIndex != 0) {
			 theMsg = theMsg + "If you confirmed this message, than the Hebrew menu drug will be used";
		 } else {
			 theMsg = theMsg + "If you confirmed this message, than the English menu drug will be used";
		 }
		 if (confirm(theMsg))
	     {
              toSend = true
	     } else {
              toSend = false
	     }
     }
	  } // if not modify = 2

	  if (toSend) {
		  if (pillDosage.value && !floatOnly.test(pillDosage.value)) {
			  errCode = 2
              toSend = false
		  }
	  }

// and now for the date format
 // check date formats
 if (toSend) {
    tmpYear = nowYear.value
	 tmpYear =parseInt(tmpYear)  // convert it to number
	 if (!isNaN(tmpYear) ) {
         if (tmpYear < 100) {
            curDate = new Date()
	        curYear = curDate.getFullYear()
	        tmpYear = tmpYear + 2000
	        if (tmpYear > curYear)  {
	           tmpYear = tmpYear - 100  // in the future, then it is 1900 base
	        }
         }
	    
	 }
    tmpDate = new Date(tmpYear, nowMon.value-1, nowDay.value)
	if (isNaN(tmpDate) ) {
        toSend = false;
		errCode = 4
	} else {
      if (tmpYear < 100) {
         curDate = new Date()
	     curYear = curDate.getFullYear()
	     tmpYear = tmpYear + 2000
	     if (tmpYear > curYear)  {
	        tmpYear = tmpYear - 100  // in the future, then it is 1900 base
	     }
      }
//	  alert(tmpDate)
	   nowDay.value = tmpDate.getDate()
	   nowMon.value = tmpDate.getMonth()+1
	   nowYear.value = tmpDate.getFullYear()
	}
 }


      if (toSend)
      {
	      return true
      } else {
       switch (errCode) {
	     case 1:
            alert ("You must select a drug  (from the Hebrew or English menus) or enter it manually");
			break;
	     case 2:
            alert ("pill dosage must be numeric");
            pillDosage.focus()
            pillDosage.select()
			break;
	     case 4:
            alert ("Illegal Date");
			break;
	  } // switch	    
	  return false
	 }
   }
} // checkEnteredDrug


function checkNumOnly(theField) 
{
   theRetValue = true;
//   alert (theField.value)
   if (theField.value && numOnly.test(theField.value))
   {
   } else {
       theRetValue = false;
       errCode = 2
   }
   document.retVal = theRetValue;
   return theRetValue
} // checkNumOnly

function checkNumOnlyEr(theField) 
{
   theRetValue = true;
//   alert (theField.value)
   if (theField.value && numOnly.test(theField.value))
   {
   } else {
	   if (theField.value)
	   {
	       theRetValue = false;
           errCode = 2
        }
   }
   if (!theRetValue)
   {
	   alert("Only numeric values are legal here")
            theField.focus()
            theField.select()
   }
   document.retVal = theRetValue;
   return theRetValue
} // checkNumOnly

function jsPrntVersion(theField)
{
	/*
	if (theField.checked)
	{ 
		    document.getElementById("sideBanner").style.display = 'none';
		    document.getElementById("topBanner").style.display = 'none';
		    document.getElementById("rightBanner").style.display = 'none';
		
	} else {
		    document.getElementById("sideBanner").style.display = 'block';
		    document.getElementById("topBanner").style.display = 'block';
		    document.getElementById("rightBanner").style.display = 'block';
	}
	*/
	
	var bans = new Array("sideBanner","topBanner","rightBanner");
	
	for(i=0;i<bans.length;i++) {
		id = bans[i];
		var obj = "";
		if(document.getElementById)
			obj = document.getElementById(id);
		else if(document.all)
			obj = document.all[id];
		else if(document.layers)
			obj = document.layers[id];
		else
			return false;
			
		if (!obj)
			return false;
		else if (obj.style) {
			if (theField.checked)
				obj.style.display="none";
			else {
				obj.style.display="";
				obj.visibility = "show";
			}
		}
	}
	
} // prntVersion`

function showId(theID,tOrF) {
		if(document.getElementById)
			obj = document.getElementById(theID);
		else if(document.all)
			obj = document.all[theID];
		else if(document.layers)
			obj = document.layers[theID];
		else
			return false;
		if (!obj)
			return false;
		else if (obj.style) {
			if (!tOrF)
				obj.style.display="none";
			else {
				obj.style.display="";
				obj.visibility = "show";
			}
		}
}

function myGetID(theID)
{
		if(document.getElementById)
			obj = document.getElementById(theID);
		else if(document.all)
			obj = document.all[theID];
		else if(document.layers)
			obj = document.layers[theID];
		else
			return false;
		return obj;
}


function showId1(theID) {
//		alert(theID);
		var obj = myGetID(theID);
//		alert(obj);
		var objDisp = myGetID(theID + "Sp");
//		alert(theID + "Sp");
//		alert(objDisp.innerHTML);
		if (!obj) {
//			return false;
		}
		else if (obj.style) {
//			alert(obj.style.display)
			if (obj.style.display != "none") {
//				  alert( objDisp.innerHTML);
			      objDisp.innerHTML = "<b>הצג</b> <img src=../Images/common/showIcon.jpg border=0 align=absbottom>";
				  obj.style.display="none";
			}
			else {
				obj.style.display="";
			    objDisp.innerHTML = "<b>הסתר</b> <img src=../Images/common/hideIcon.jpg border=0 align=absbottom>";
				obj.visibility = "show";
			}
		}
}

function findSearchTarget(theForm, menuFld)
{
//	alert (menuFld.value);
	menuVal = menuFld.value;
	menuVal = menuVal - 0; // convert it to num
//		alert(theForm.action);
// alert(menuVal);
	switch (menuVal) {
	     case 1:
             theForm.action = "doSearch.asp";
			 break;

	     case 2:
             theForm.action = "doSearchTest.asp";
		     theForm.testName.value = theForm.drugName.value;
//		alert(theForm.action);
			 break;

	     case 3:
             theForm.action = "doSearchVacc.asp";
			 break;

		 case 4:
             theForm.action = "doSearchV.asp";
			 break;
} // switch

	return true;

}


// ------- popup section
/**
 * mm_menu 20MAR2002 Version 6.0
 * Andy Finnell, March 2002
 * Copyright (c) 2000-2002 Macromedia, Inc.
 *
 * based on menu.js
 * by gary smith, July 1997
 * Copyright (c) 1997-1999 Netscape Communications Corp.
 *
 * Netscape grants you a royalty free license to use or modify this
 * software provided that this copyright notice appears on all copies.
 * This software is provided "AS IS," without a warranty of any kind.
 */

 // -- Eli additions - Add dirPrefix

function preLoader(dirPrefix) {
} // mmLoadMenus()


function loadAds() {
		var obj = myGetID("cube120");
		if (obj) {theStr2 = "<iframe id='a7cbcfe2' name='a7cbcfe2' src='http://leadim.securest.org/www/delivery/afr.php?zoneid=2&amp;cb=INSERT_RANDOM_NUMBER_HERE' framespacing='0' frameborder='no' scrolling='no' width='120' height='120'><a href='http://leadim.securest.org/www/delivery/ck.php?n=a85d4e87&amp;cb=INSERT_RANDOM_NUMBER_HERE' target='_blank'><img src='http://leadim.securest.org/www/delivery/avw.php?zoneid=2&amp;cb=INSERT_RANDOM_NUMBER_HERE&amp;n=a85d4e87' border='0' alt='' /></a></iframe>";
		  obj.innerHTML = theStr2;
		var obj2 = myGetID("left500");
 theStr2 = "<iframe id='a53aea3e' name='a53aea3e' src='http://leadim.securest.org/www/delivery/afr.php?zoneid=3&amp;cb=INSERT_RANDOM_NUMBER_HERE' framespacing='0' frameborder='no' scrolling='no' width='120' height='500'><a href='http://leadim.securest.org/www/delivery/ck.php?n=a671b682&amp;cb=INSERT_RANDOM_NUMBER_HERE' target='_blank'><img src='http://leadim.securest.org/www/delivery/avw.php?zoneid=3&amp;cb=INSERT_RANDOM_NUMBER_HERE&amp;n=a671b682' border='0' alt='' /></a></iframe>";
		  obj2.innerHTML = theStr2;
		var obj3 = myGetID("top640");
 theStr2 = "<iframe id='a2a4b4af' name='a2a4b4af' src='http://leadim.securest.org/www/delivery/afr.php?zoneid=1&amp;cb=INSERT_RANDOM_NUMBER_HERE' framespacing='0' frameborder='no' scrolling='no' width='640' height='60'><a href='http://leadim.securest.org/www/delivery/ck.php?n=af888d1a&amp;cb=INSERT_RANDOM_NUMBER_HERE' target='_blank'><img src='http://leadim.securest.org/www/delivery/avw.php?zoneid=1&amp;cb=INSERT_RANDOM_NUMBER_HERE&amp;n=af888d1a' border='0' alt='' /></a></iframe>";
		  obj3.innerHTML = theStr2;
		var obj4 = myGetID("cube120low");
theStr2 = "<iframe id='a5fd0e36' name='a5fd0e36' src='http://leadim.securest.org/www/delivery/afr.php?zoneid=12&amp;cb=INSERT_RANDOM_NUMBER_HERE' framespacing='0' frameborder='no' scrolling='no' width='120' height='120'><a href='http://leadim.securest.org/www/delivery/ck.php?n=a60172dd&amp;cb=INSERT_RANDOM_NUMBER_HERE' target='_blank'><img src='http://leadim.securest.org/www/delivery/avw.php?zoneid=12&amp;cb=INSERT_RANDOM_NUMBER_HERE&amp;n=a60172dd' border='0' alt='' /></a></iframe>";
		  obj4.innerHTML = theStr2;
		} // if obj (if one found, than the rest will be found as well)
		var obj5 = myGetID("topTxt_1");
 		  	if (obj5) {
 theStr2 = "<iframe id='ad0de694' name='ad0de694' src='http://leadim.securest.org/www/delivery/afr.php?zoneid=13&amp;cb=INSERT_RANDOM_NUMBER_HERE' framespacing='0' frameborder='no' scrolling='no' width='200' height='20'><a href='http://leadim.securest.org/www/delivery/ck.php?n=a04a48f1&amp;cb=INSERT_RANDOM_NUMBER_HERE' target='_blank'><img src='http://leadim.securest.org/www/delivery/avw.php?zoneid=13&amp;cb=INSERT_RANDOM_NUMBER_HERE&amp;n=a04a48f1' border='0' alt='' /></a></iframe>";
		  obj5.innerHTML = theStr2;
		var obj6 = myGetID("topTxt_2");
theStr2 = "<iframe id='a71a32d2' name='a71a32d2' src='http://leadim.securest.org/www/delivery/afr.php?zoneid=14&amp;cb=INSERT_RANDOM_NUMBER_HERE' framespacing='0' frameborder='no' scrolling='no' width='200' height='20'><a href='http://leadim.securest.org/www/delivery/ck.php?n=a0c2dac7&amp;cb=INSERT_RANDOM_NUMBER_HERE' target='_blank'><img src='http://leadim.securest.org/www/delivery/avw.php?zoneid=14&amp;cb=INSERT_RANDOM_NUMBER_HERE&amp;n=a0c2dac7' border='0' alt='' /></a></iframe>";
		  obj6.innerHTML = theStr2;
		var obj7 = myGetID("topTxt_3");
theStr2 = "<iframe id='a4142fe1' name='a4142fe1' src='http://leadim.securest.org/www/delivery/afr.php?zoneid=15&amp;cb=INSERT_RANDOM_NUMBER_HERE' framespacing='0' frameborder='no' scrolling='no' width='200' height='20'><a href='http://leadim.securest.org/www/delivery/ck.php?n=a058a88e&amp;cb=INSERT_RANDOM_NUMBER_HERE' target='_blank'><img src='http://leadim.securest.org/www/delivery/avw.php?zoneid=15&amp;cb=INSERT_RANDOM_NUMBER_HERE&amp;n=a058a88e' border='0' alt='' /></a></iframe>";
		  obj7.innerHTML = theStr2;
		var obj8 = myGetID("topTxt_4");
 theStr2 = "<iframe id='a1eb64fb' name='a1eb64fb' src='http://leadim.securest.org/www/delivery/afr.php?zoneid=16&amp;cb=INSERT_RANDOM_NUMBER_HERE' framespacing='0' frameborder='no' scrolling='no' width='200' height='20'><a href='http://leadim.securest.org/www/delivery/ck.php?n=a0c5ce78&amp;cb=INSERT_RANDOM_NUMBER_HERE' target='_blank'><img src='http://leadim.securest.org/www/delivery/avw.php?zoneid=16&amp;cb=INSERT_RANDOM_NUMBER_HERE&amp;n=a0c5ce78' border='0' alt='' /></a></iframe>";
		  obj8.innerHTML = theStr2;
		var obj9 = myGetID("topTxt_5");
theStr2 = "<iframe id='a619ad95' name='a619ad95' src='http://leadim.securest.org/www/delivery/afr.php?zoneid=17&amp;cb=INSERT_RANDOM_NUMBER_HERE' framespacing='0' frameborder='no' scrolling='no' width='200' height='20'><a href='http://leadim.securest.org/www/delivery/ck.php?n=ac4f6b0d&amp;cb=INSERT_RANDOM_NUMBER_HERE' target='_blank'><img src='http://leadim.securest.org/www/delivery/avw.php?zoneid=17&amp;cb=INSERT_RANDOM_NUMBER_HERE&amp;n=ac4f6b0d' border='0' alt='' /></a></iframe>";
		  obj9.innerHTML = theStr2;
		var obj10 = myGetID("topTxt_6");
theStr2 = "<iframe id='a095f757' name='a095f757' src='http://leadim.securest.org/www/delivery/afr.php?zoneid=18&amp;cb=INSERT_RANDOM_NUMBER_HERE' framespacing='0' frameborder='no' scrolling='no' width='200' height='20'><a href='http://leadim.securest.org/www/delivery/ck.php?n=ab63bcb7&amp;cb=INSERT_RANDOM_NUMBER_HERE' target='_blank'><img src='http://leadim.securest.org/www/delivery/avw.php?zoneid=18&amp;cb=INSERT_RANDOM_NUMBER_HERE&amp;n=ab63bcb7' border='0' alt='' /></a></iframe>";
		  obj10.innerHTML = theStr2;
		} // if obj (if one found, than the rest will be found as well)
		var obj11 = myGetID("cube120right");
 		  	if (obj11) {
 theStr2 = "<iframe id='a48d31b0' name='a48d31b0' src='http://leadim.securest.org/www/delivery/afr.php?zoneid=22&amp;cb=INSERT_RANDOM_NUMBER_HERE' framespacing='0' frameborder='no' scrolling='no' width='120' height='120'><a href='http://leadim.securest.org/www/delivery/ck.php?n=a2d2cd57&amp;cb=INSERT_RANDOM_NUMBER_HERE' target='_blank'><img src='http://leadim.securest.org/www/delivery/avw.php?zoneid=22&amp;cb=INSERT_RANDOM_NUMBER_HERE&amp;n=a2d2cd57' border='0' alt='' /></a></iframe>";
		  obj11.innerHTML = theStr2;
		var obj12 = myGetID("right500");
theStr2 = "<iframe id='a0503c83' name='a0503c83' src='http://leadim.securest.org/www/delivery/afr.php?zoneid=23&amp;cb=INSERT_RANDOM_NUMBER_HERE' framespacing='0' frameborder='no' scrolling='no' width='120' height='500'><a href='http://leadim.securest.org/www/delivery/ck.php?n=a3c4c97b&amp;cb=INSERT_RANDOM_NUMBER_HERE' target='_blank'><img src='http://leadim.securest.org/www/delivery/avw.php?zoneid=23&amp;cb=INSERT_RANDOM_NUMBER_HERE&amp;n=a3c4c97b' border='0' alt='' /></a></iframe>";
		  obj12.innerHTML = theStr2;
			}
}
