$(document).ready(function() {
	$("#dialog").css("display","none");
});

/*old application warning popups*/


function hsapp()
{	
	var PWindow;  
	PWindow=window.open("apply/pop.shtml", "honorsapp", "left=100,top=100,location=no,height=350,width=600,resizable");
	return PWindow;
}

function scapp()
{	
	var PWindow;  
	PWindow=window.open("http://www.bu.edu/summer/program_high_school_students/summer_challenge/apply/online/pop.shtml", "scapp", "left=100,top=100,location=no,height=350,width=600,resizable");
	return PWindow;
}

function honorsapp()
{	
	var PWindow;  
	PWindow=window.open("apply/pop.shtml", "honorsapp", "left=100,top=100,location=no,height=350,width=600,resizable");
	return PWindow;
}

function internapp()
{	
	var PWindow;  
	PWindow=window.open("http://www.bu.edu/summer/visiting/internship_program/admissions/online/pop.shtml", "internapp", "left=100,top=100,location=no,height=350,width=600,resizable");
	return PWindow;
}
function intlapp()
{	
	var PWindow;  
	PWindow=window.open("http://www.bu.edu/summer/international/get_started/visa/online/pop.shtml", "intlapp", "left=100,top=100,location=no,height=350,width=600,resizable");
	return PWindow;
}

function isnull(str)
{
	var xstr
	//xstr=xstr.trim();
	xstr=str;
	for (var iii=0;iii<xstr.length;iii++) {
		if (xstr.substring(iii,iii+1)!=" ") return false;
	}
	return true;
}

function Reg_Validator(theForm)
{
  if (isnull(theForm.email.value))
  {
    alert("Please enter your e-mail address.");
    theForm.email.focus();
    return (false);
  }

  var emailFormat=/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,4})+$/;
  if (!emailFormat.test(theForm.email.value))
  {
    alert("Please enter a valid e-mail address.");
    theForm.email.focus();
    return (false);
  }  

  return (true);    
}
