// JavaScript Document
function Submit()
{
  document.myform.submit();
}

function Reset()
{
  document.myform.yourname.value = "";
  document.myform.youremail.value = "";
  document.myform.recipient.value = "";
  document.myform.Rsemail.value = "";
}

<!--
function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}
function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}
function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}
function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
function MM_checkSWF(plgIn, theURL, altURL, autoGo) { //v4.0
  var ok=false; document.MM_returnValue = false;
  with (navigator) if (appName.indexOf('Microsoft')==-1 || (plugins && plugins.length)) {
    ok=(plugins && plugins[plgIn]);
  } else if (appVersion.indexOf('3.1')==-1) { //not Netscape or Win3.1
    if (plgIn.indexOf("Flash")!=-1 && window.MM_flash!=null) ok=window.MM_flash;
    else if (plgIn.indexOf("Director")!=-1 && window.MM_dir!=null) ok=window.MM_dir;
    else ok=autoGo; }
  if (!ok) theURL=altURL; if (theURL) window.location=theURL;
}
function MM_checkPlugin(plgIn, theURL, altURL, autoGo) { //v4.0
  var ok=false; document.MM_returnValue = false;
  with (navigator) if (appName.indexOf('Microsoft')==-1 || (plugins && plugins.length)) {
    ok=(plugins && plugins[plgIn]);
  } else if (appVersion.indexOf('3.1')==-1) { //not Netscape or Win3.1
    if (plgIn.indexOf("Flash")!=-1 && window.MM_flash!=null) ok=window.MM_flash;
    else if (plgIn.indexOf("Director")!=-1 && window.MM_dir!=null) ok=window.MM_dir;
    else ok=autoGo; }
  if (!ok) theURL=altURL; if (theURL) window.location=theURL;
}
function popwin(theURL)
{
  window.open(theURL,"","height=370,width=440,scrollbars=yes,resizable=yes,screenX=140,left=140,screenY=50,top=10");
}
function changePage(mainURL)
{
parent.main.location.href=mainURL
}
function openTarget (form, features, windowName) {
  if (!windowName)
    windowName = 'formTarget' + (new Date().getTime());
  form.target = windowName;
  open ('', windowName, features);
}
function checkEmail(emField){

var fieldValue = emField.value  // store field's value in variable, "fieldValue"

	if(fieldValue != ""){  //if field is not empty
	var atSymbol = 0
	
		for(var a = 0; a < fieldValue.length; a++){ //loop through field value string
			if(fieldValue.charAt(a) == "@"){ //look for @ symbol and for each @ found, increment atSymbol variable by 1
			atSymbol++
			}
		}
		
		if(atSymbol > 1){ // if more than 1 @ symbol exists
		alert("Please enter a valid email address.") // then cancel
		return false;
		}
		
		if(atSymbol == 1 && fieldValue.charAt(0) != "@"){  // if @ symbol was found, and it is not the 1st character in string
		var period = fieldValue.indexOf(".",fieldValue.indexOf("@")+2) //look for period at 2nd character after @ symbol
		var twoPeriods = (fieldValue.charAt((period+1)) == ".") ? true : false // "."  immediately following 1st "." ? 
				  
		//if period was not found OR 2 periods together OR field contains less than 5 characters OR period is in last position
			if(period == -1 || twoPeriods || fieldValue.length < period + 2 || fieldValue.charAt(fieldValue.length-1)=="."){
			alert("Please enter a valid email address.") // then cancel
			return false;
			}
		  		  
		}
		else{  // no @ symbol exists or it is in position 0 (the first character of the field)
		alert("Please enter a valid email address.")
		return false; // then cancel
		}
	}
	else{  // if field is empty
	alert("Please enter a valid email address.")
	return false;  // then cancel
	}
return true;
}
function openpopup(popurl){
var winpops=window.open(popurl,"","width=380,height=365")
}
function privacyPopup(popurl1){
var winpops=window.open(popurl1,"","width=380,height=365,toolbar=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes")
}
//-->
//Pop-under window- By JavaScript Kit
//Credit notice must stay intact for use
//Visit http://javascriptkit.com for this script
//specify page to pop-under
var popunder="http://extranet.ogilvypr.com/EpilepsyFoundation/AmyLee/flash/audioPlayer.cfm"
//specify popunder window features
//set 1 to enable a particular feature, 0 to disable
var winfeatures="width=320,height=320,scrollbars=0,resizable=0,toolbar=0,location=0,menubar=0,status=0,directories=0"
//Pop-under only once per browser session? (0=no, 1=yes)
//Specifying 0 will cause popunder to load every time page is loaded
var once_per_session=0

///No editing beyond here required/////

function get_cookie(Name) {
  var search = Name + "="
  var returnvalue = "";
  if (document.cookie.length > 0) {
    offset = document.cookie.indexOf(search)
    if (offset != -1) { // if cookie exists
      offset += search.length
      // set index of beginning of value
      end = document.cookie.indexOf(";", offset);
      // set index of end of cookie value
      if (end == -1)
         end = document.cookie.length;
      returnvalue=unescape(document.cookie.substring(offset, end))
      }
   }
  return returnvalue;
}

function loadornot(){
if (get_cookie('popunder')==''){
loadpopunder()
document.cookie="popunder=yes"
}
}

function loadpopunder(){
win2=window.open(popunder,"",winfeatures)
win2.blur()
window.focus()
}






