function isEmail(str) {
  var supported = 0;
  if (window.RegExp) {
    var tempStr = "a";
    var tempReg = new RegExp(tempStr);
    if (tempReg.test(tempStr)) supported = 1;
  }
  if (!supported) 
    return (str.indexOf(".") > 2) && (str.indexOf("@") > 0);
    var r1 = new RegExp("(@.*@)|(\\.\\.)|(@\\.)|(^\\.)");
    var r2 = new RegExp("^.+\\@(\\[?)[a-zA-Z0-9\\-\\.]+\\.([a-zA-Z]{2,4}|[0-9]{1,3})(\\]?)$");
    return (!r1.test(str) && r2.test(str));
}
function openWin(wName, wWidth, wHeight, wResize){
	if(isEmail(document.optin.OILB_EMAIL.value) == "") {
		alert("A Valid E-mail Address is Required");
		document.optin.OILB_EMAIL.focus();
		return false;
	}else{
		features = 'top=0,left=0,scrollbars=1,status=0,resizable=' + ((wResize) ? 0 : 0) + ((wWidth) ? ',width=' + wWidth : '') + ((wHeight) ? ',height=' + wHeight : '');
		popWin = window.open('', wName, features);
		if(popWin.focus) { popWin.focus(); }
		return true;
		}
}
