﻿function SetUniqueRadioButton(nameregex, current)
{
   re = new RegExp(nameregex);
   for(i = 0; i < document.forms[0].elements.length; i++)
   {
      elm = document.forms[0].elements[i]
      if (elm.type == 'radio')
      {
         if (re.test(elm.name))
         {
            elm.checked = false;
         }
      }
   }
   current.checked = true;
}


function popprescription(url)
{
    var newwindow;
	newwindow=window.open(url,'name','height=650,width=640,left=400,top=100,resizable=yes,scrollbars=yes,toolbar=yes,status=yes');

	if (window.focus) {newwindow.focus()}
}

function poplens(url)
{
    var newwindow;
	newwindow=window.open(url,'name','height=400,width=640,left=400,top=100,resizable=yes,scrollbars=yes,toolbar=yes,status=yes');

	if (window.focus) {newwindow.focus()}
}


 function HideLenses(lensesID, totalID)
 {
 if(document.getElementById(lensesID))
 {
     document.getElementById(lensesID).style.display = 'none';
     document.getElementById(totalID).style.display = 'none';
     }
 }   
