function bmspot1Window()
{	
	var PWindow;  
	PWindow=window.open("http://www.bu.edu/met/adult_college_programs/boston_university_metropolitan_college_undergraduate_programs/undergraduate_degree/biomedical_clinical_science_degree/biomed-spotlight1.gif", "Spotlight", "location,top=200,left=200,height=500,width=450,resizable");
	return PWindow;
}
function bmspot2Window()
{	
	var PWindow;  
	PWindow=window.open("http://www.bu.edu/met/adult_college_programs/boston_university_metropolitan_college_undergraduate_programs/undergraduate_degree/biomedical_clinical_science_degree/biomed-spotlight2.gif", "Spotlight", "location,top=200,left=200,height=500,width=450,resizable");
	return PWindow;
}
function ads06Grad()
{	
	var PWindow;  
	PWindow=window.open("http://www.bu.edu/met/ads06/graduate_request.html", "Download_a_brochure", "location=no,top=50,left=200,height=420,width=380,resizable");
	return PWindow;
}
function photoWindow()
{	
	var PWindow;  
	PWindow=window.open("http://www.bu.edu/met/graduation/slideshow.html", "Photos", "location,top=100,left=200,height=430,width=460,resizable");
	return PWindow;
}
function artWindow()
{	
	window.open("http://www.bu.edu/met/programs/brochures/arts/index.html", "art", "location=1,top=200,left=200,height=370,width=370,resizable=1");
	return false;
}
function artCert()
{	
	var PWindow;  
	PWindow=window.open("http://www.bu.edu/met/programs/brochures/arts/certificate.html", "art", "location=1,top=200,left=200,height=305,width=370,resizable=1");
	return PWindow;
}
function actuary()
{	
	var PWindow;  
	PWindow=window.open("http://www.bu.edu/met/programs/brochures/actuary/index.html", "actuary", "location,top=200,left=200,height=350,width=370,resizable");
	return PWindow;
}
function msasWindow()
{	
	var PWindow;  
	PWindow=window.open("http://www.bu.edu/met/programs/brochures/msas/index.html", "MSAS", "location,top=200,left=200,height=350,width=370,resizable");
	return PWindow;
}
function biomedWindow()
{	
	var PWindow;  
	PWindow=window.open("http://www.bu.edu/met/programs/brochures/biomed/index.html", "BioMed", "location,top=200,left=200,height=350,width=370,resizable");
	return PWindow;
}
function bubWindow()
{	
	var PWindow;  
	PWindow=window.open("http://www.bu.edu/met/programs/brochures/brussels/brussels.html", "Brussels", "location,top=200,left=200,height=290,width=370,resizable");
	return PWindow;
}
function csWindow()
{	
	var PWindow;  
	PWindow=window.open("http://www.bu.edu/met/programs/brochures/computer/ms.html", "Download_a_brochure", "location,top=200,left=200,height=320,width=380,resizable");
	return PWindow;
}
function csgameWindow()
{	
	var PWindow;  
	PWindow=window.open("http://www.bu.edu/met/programs/brochures/computer/game.html", "Download_a_brochure", "location,top=200,left=200,height=320,width=380,resizable");
	return PWindow;
}
function csBsWindow()
{	
	var PWindow;  
	PWindow=window.open("http://www.bu.edu/met/programs/brochures/computer/bs.html", "Download_a_brochure", "location,top=200,left=200,height=285,width=380,resizable");
	return PWindow;
}
function cjWindow()
{	
	var PWindow;  
	PWindow=window.open("http://www.bu.edu/met/programs/brochures/criminal_justice/", "Download_a_brochure", "location,top=200,left=200,height=310,width=380,resizable");
	return PWindow;
}

function actuarialWindow()
{	
	var PWindow;  
	PWindow=window.open("http://www.bu.edu/met/programs/brochures/actuarial/index.html", "Download_a_brochure", "location,top=200,left=200,height=310,width=380,resizable");
	return PWindow;
}

function advWindow()
{	
	var PWindow;  
	PWindow=window.open("http://www.bu.edu/met/programs/brochures/advertising/", "Download_a_brochure", "location,top=200,left=200,height=310,width=380,resizable");
	return PWindow;
}
function pmcorpWindow()
{	
	var PWindow;  
	PWindow=window.open("http://www.bu.edu/met/programs/brochures/pm/index.html", "project_management", "location,top=200,left=200,height=450,width=370,resizable");
	return PWindow;
}
function uaWindow()
{	
	var PWindow;  
	PWindow=window.open("http://www.bu.edu/met/programs/brochures/cpua/index.html", "Download_a_brochure", "location,top=200,left=200,height=310,width=380,resizable");
	return PWindow;
}

function sepWindow()
{	
	var PWindow;  
	PWindow=window.open("http://www.bu.edu/met/programs/brochures/sep/index.html", "Download_a_brochure", "location,top=200,left=200,height=285,width=380,resizable");
	return PWindow;
}
function gradWindow()
{	
	var PWindow;  
	PWindow=window.open("http://www.bu.edu/met/graduation/ask.html", "ASK_MET", "location,top=200,left=200,height=385,width=380,resizable");
	return PWindow;
}
function askWindow()
{	
	var PWindow;  
	PWindow=window.open("http://www.bu.edu/met/contact/ask.html", "More_Information", "location,top=100,left=200,height=450,width=380,resizable");
	return PWindow;
}
function askExpress()
{	
	var PWindow;  
	PWindow=window.open("http://www.bu.edu/met/metropolitan_college_express_enrollment/ask.html", "More_Information", "location,top=100,left=200,height=450,width=380,resizable");
	return PWindow;
}
function csWindow()
{	
	var PWindow;  
	PWindow=window.open("http://www.bu.edu/met/programs/brochures/computer/ms.html", "Download_a_brochure", "location,top=200,left=200,height=290,width=380,resizable");
	return PWindow;
}
function asksep()
{	
	var PWindow;  
	PWindow=window.open("http://www.bu.edu/met/contact/sep.html", "Ask_MET", "location,top=200,left=200,height=260,width=360,resizable");
		return PWindow;
}
function pmWindow()
{	
	var PWindow;  
	PWindow=window.open("http://www.bu.edu/met/news/project_management/register.html", "Photos", "location=no,top=100,left=200,height=680,width=683,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);    
}

function phone(theForm)
{
  if (theForm.home_phone.value =="" && theForm.work_phone.value =="")
  {
    alert("Please enter either your business or home phone number");
    theForm.work_phone.focus();
    return (false);
  }
}
/**
 * DHTML phone number validation script. Courtesy of SmartWebby.com (http://www.smartwebby.com/dhtml/)
 */

// Declaring required variables
var digits = "0123456789";
// non-digit characters which are allowed in phone numbers
var phoneNumberDelimiters = "()- ";
// characters which are allowed in international phone numbers
// (a leading + is OK)
var validWorldPhoneChars = phoneNumberDelimiters + "+";
// Minimum no of digits in an international phone no.
// Maximum no of digits in an international phone no.
var minDigitsInIPhoneNumber = 10;
var maxDigitsInIPhoneNumber = 11;

function isInteger(s)
{   var i;
    for (i = 0; i < s.length; i++)
    {   
        // Check that current character is number.
        var c = s.charAt(i);
        if (((c < "0") || (c > "9"))) return false;
    }
    // All characters are numbers.
    return true;
}

function phonelength(s)
{
	if (s.length < minDigitsInIPhoneNumber) return false;
	
	else return true;
}

function stripCharsInBag(s, bag)
{   var i;
    var returnString = "";
    // Search through string's characters one by one.
    // If character is not in bag, append to returnString.
    for (i = 0; i < s.length; i++)
    {   
        // Check that current character isn't whitespace.
        var c = s.charAt(i);
        if (bag.indexOf(c) == -1) returnString += c;
    }
    return returnString;
}

function checkInternationalPhone(strPhone){
s=stripCharsInBag(strPhone,validWorldPhoneChars);
return (isInteger(s) && s.length >= minDigitsInIPhoneNumber && s.length <= maxDigitsInIPhoneNumber);
}

function phone2(theForm)
{
  if (theForm.home_phone.value =="" && theForm.work_phone.value =="")
  {
    alert("Please enter either your business or home phone number");
    theForm.work_phone.focus();
    return (false);
  }
  var Phone=document.myform.home_phone
  var Phone2=document.myform.work_phone
    if (checkInternationalPhone(Phone.value)==false && checkInternationalPhone(Phone2.value)==false){
			alert("Please Enter a Valid Phone Number")
			Phone.value=""
			Phone2.value=""
			document.myform.work_phone.focus()
			return false
		}
		if (checkInternationalPhone(Phone.value)==true || checkInternationalPhone(Phone2.value)==true){
			document.myform.submit();
		}
}

