// JavaScript Document
var msgWin=0;
function imgWin(url, width, height)
{	
// 060826 revised for 1024 x 768
  if(width > 1024) {
  //	if(height > height * 800/width) {
		height = height * 1024/width;
	//	}
  	width=1024;
	}
  if(height > 768) {
  // scale width if necessary
  	//if(width > width * 600/height) {
		width = width * 768/height;
	//	}
	height = 768;
	}
  var left = (screen.width/2) - width/2; if(left < 0) left = 10;
  var top = (screen.height/2) - height/2; if(top < 0) top = 10;
  var styleStr = 'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbar=no,resizable=no,copyhistory=yes,width='+width+',height='+height+',left='+left+',top='+top+',screenX='+left+',screenY='+top;
  if(msgWin)  {
    if(!msgWin.closed) {
		msgWin.close();
		}
  	}
  msgWin = window.open(url,"msgWin", styleStr); 
  msgWin.focus();   
}

function isValidEmailAddress( sAddress ) {
							
		var re = new RegExp("^[a-z0-9#$%&][a-z0-9#$%\-&\\.]+[^\\.]@[^\\.][a-z0-9#$%\-&\\.]+\\.[a-z]{2,4}$", "ig"); // \\-_]{2,}\\.[a-z]{2,4}");
        
		bTestOne = sAddress.match(re);
		// alert("test one: " + bTestOne);
		bTwoDots =  sAddress.match(/\.\./);  // no adjacent dots
		// alert("test two: " + bTwoDots);
		// alert("Final Result: " + (bTestOne && !bTwoDots) );
		if(bTestOne && !bTwoDots) {
			return true;
			}
		else {
			alert( sAddress + " does not appear to be a valid email address.");
			return false;
			} 
    }

function openDynFrameSet() {
    if(arguments.length > 0) {
        document.location.href=
             "index_dynframeset.php?content="
            + arguments[0];
        }
}    // end function