function popUpAgreement(file)
{
	smallWin = window.open(file,'smallWindow','toolbar=0,location=0, status=0, menubar=0,width=800,height=750,resizable=1,scrollbars=1');
	/*if (smallWin.opener = null) smallWin.opener = self;
	smallWin.focus();*/
	
}


 function newWin(url,w,h) {  
 // This insures it *ALWAYS* opens a new window instead  
 // of loading content into a window already open  
 	var day = new Date(); 
  	var id = day.getTime();  
  // Pad width and height a bit: 
   	w+=75;  
   	h+=126;  
  // Always always always leave scrollbars and resizable 
   // on - you won't know if you're cutting off client's  
   // viewing area!  
   params = 'width='+w+',height='+h+',scrollbars,resizable';  
   var win = open(url,id,params);  
   return false; 
   } 
   
   function MM_openBrWindow(theURL,winName,features) { //v2.0
		window.open(theURL,winName,features);
}  
   
<!--

// Email Validation Javascript
// copyright 23rd March 2003, by Stephen Chapman, Felgall Pty Ltd

// You have permission to copy and use this javascript provided that
// the content of the script is not changed in any way.

function validateEmail(addr,man,db) {
if (addr == '' && man) {
   if (db) alert('Email address is required.');
   return false;
}
var invalidChars = '\/\'\\ ";:?!()[]\{\}^|';
for (i=0; i<invalidChars.length; i++) {
   if (addr.indexOf(invalidChars.charAt(i),0) > -1) {
      if (db) alert('Email address contains invalid characters.');
      return false;
   }
}
for (i=0; i<addr.length; i++) {
   if (addr.charCodeAt(i)>127) {
      if (db) alert('Email address contains non-ascii characters.');
      return false;
   }
}

var atPos = addr.indexOf('@',0);
if (atPos == -1) {
   if (db) alert('Email address must contain an @.');
   return false;
}
if (atPos == 0) {
   if (db) alert('Email address must not start with @.');
   return false;
}
if (addr.indexOf('@', atPos + 1) > - 1) {
   if (db) alert('Email address must contain only one @.');
   return false;
}
if (addr.indexOf('.', atPos) == -1) {
   if (db) alert('Email address must contain a period in the domain name.');
   return false;
}
if (addr.indexOf('@.',0) != -1) {
   if (db) alert('Period must not immediately follow @ in email address.');
   return false;
}
if (addr.indexOf('.@',0) != -1){
   if (db) alert('Period must not immediately precede @ in email address.');
   return false;
}
if (addr.indexOf('..',0) != -1) {
   if (db) alert('Two periods must not be adjacent in email address.');
   return false;
}
var suffix = addr.substring(addr.lastIndexOf('.')+1);
if (suffix.length != 2 && suffix != 'com' && suffix != 'net' && suffix != 'org' && suffix != 'edu' && suffix != 'int' && suffix != 'mil' && suffix != 'gov' & suffix != 'arpa' && suffix != 'biz' && suffix != 'aero' && suffix != 'name' && suffix != 'coop' && suffix != 'info' && suffix != 'pro' && suffix != 'museum') {
   if (db) alert('Invalid primary domain in email address.');
   return false;
}
return true;
}

function CheckInput()
{
   if (document.dataForm.comments.value.length < 1) {
        window.alert("Please enter your comments.");
		return false;
   	}
   	else
   	{
   		var sqlInjectionPattern = new RegExp("\\w*((\\%27)|(\\'))((\\%6F)|o|(\\%4F))((\\%72)|r|(\\%52))");
   		var crossSiteScriptingPattern = new RegExp("((\\%3C)|<)(.|\\n)*?((\\%3E)|>)");
   		var phonePattern = new RegExp("\\([0-9]{3}\\)\\s?[0-9]{3}(-|\\s)?[0-9]{4}(\\s(x\\d+)?){0,1}$|^[0-9]{3}-?[0-9]{3}-?[0-9]{4}(\\s(x\\d+)?){0,1}$");
   		var emailPattern = new RegExp("[\\w-\\.]+@([\\w-]+\\.)+[\\w-]{2,4}$");
   		if (document.dataForm.comments.value.match(sqlInjectionPattern)) {
	    window.alert("Please remove any special characters such as '<' and '>'.");
		return false;
	  }
      else if (document.dataForm.comments.value.match(sqlInjectionPattern)) {
	    window.alert("Please remove any special characters such as '<' and '>'.");
		return false;
	  }
	  else if (document.dataForm.comments.value.match(crossSiteScriptingPattern)) {
	    window.alert("Please remove any special characters such as '<' and '>'.");
		return false;
	  }
	  else if (document.dataForm.phone.value.length > 1) {
	  	if (!document.dataForm.phone.value.match(phonePattern)) {
	    	window.alert("Please enter a valid phone number (e.g., 8005551212, (800)555-1212 x1234, 800-555-1212 x123).");
			return false;
		}
	  }
	  else if (document.dataForm.email.value.length > 1) {
	  	if (!document.dataForm.email.value.match(emailPattern)) {
	    	window.alert("Please enter a valid email address.");
			return false;
		}
	  }
   	}
}


function switchChart(theID) {
	var chartVal = document.chartForm.selectChart.options[document.chartForm.selectChart.selectedIndex].value;
	var dataVal = document.chartForm.selectData.options[document.chartForm.selectData.selectedIndex].value;
	//var methodVal = document.chartForm.selectData.options[document.chartForm.selectMethod.selectedIndex].value;
	var outputVal = document.chartForm.selectOutput.options[document.chartForm.selectOutput.selectedIndex].value;
	//var locationString = "allyears-chart.jsp?qid=" + theID + "&chartType=" + chartVal + "&dataType=" + dataVal + "&outputType=" + outputVal + "&method=" + methodVal;
	var locationString = "allyears-chart.jsp?qid=" + theID + "&chartType=" + chartVal + "&dataType=" + dataVal + "&outputType=" + outputVal;
	
	location.href = locationString;
}

   function MM_openBrWindow(theURL,winName,features) { //v2.0
		window.open(theURL,winName,features);
}  
   


 function MM_openBrWindow(theURL,winName,features) { //v2.0
		window.open(theURL,winName,features);
}  


