function popUpWin(url, winName, width, height) {
   var features = "toolbar=no,menubar=no,scrollbars=yes,resizable=yes,width="+width+",height="+height+",top=100,left=100,screenX=100,screenY=100";
   window.open(url, winName, features);
}

function demoWin(url) {
   var features = "width=785,height=650,top=80,left=150,screenX=150,screenY=80,scrollbars=yes";
   window.open(url, "DEMO", features);
}

function isRadioButtonChecked(radio) {
    var isChecked = 0;
    if(!radio.length) {
        if (radio.checked) {
            isChecked = 1;
        }
    } else {
        for (i=0; i<radio.length; i++) {
            if (radio[i].checked) {
                isChecked = 1;
                break;
            }
        }
    }

    if (isChecked == 1) {
        return true;
    } else {
        return false;
    }
}

function checkEmail (strng) {
  if (strng == "") {
    return false;
  }

  var emailFilter=/^.+@.+\..{2,3}$/;
  if (!(emailFilter.test(strng))) {
       return false;
  }else {
       var illegalChars= /[\(\)\<\>\,\;\:\\\"\[\]]/
         if (strng.match(illegalChars)) {
          return false;
       }
    }
  return true;
}

function printIframe(iFrm) {
    frames[iFrm].focus();
    frames[iFrm].print();
}

