var dNextSeminar = "October 19, 2010 19:00:00";
var dNextSession = "October 6, 2008";
var dNextDaySession = "May 30, 2009";
var dNextEveSession = "June 25, 2009";
var dMsg = false;
var cStts = false;
var dfltStts = 'Real Estate School of New England';
window.defaultStatus = 'Real Estate School of New England';
/* Tool Tip Setup */
var ttImage = '<img src="favicon.png" style="width:16px;height:16px;border:#999999 1px solid;" />&nbsp;&nbsp;';
var ttImage10 = '<img src="images/promissor_icon_016x016.png" width="16" height="16" style="border:#999999 1px solid;" />&nbsp;&nbsp;';
var ttMsg00 = 'Real Estate School of New England&#8217;s Home Page.';
var ttMsg01 = 'CENTURY 21 Access America invites you to attend a Complimentary Career Information Seminar.';
var ttMsg02 = 'The &#8220;Principles &amp; Practices of Real Estate&#8221; course is presented twice weekly as a revolving curriculum over 15 sessions.';
var ttMsg03 = 'Course location information, including address, direction, and map.';
var ttMsg04 = 'Course dates and times, including a current, printable schedule.';
var ttMsg05 = 'Course Instructor, John Socha, including a brief biography.';
var ttMsg06 = 'Course Application, apply on-line securely, or print a copy and mail or Fax your application.';
var ttMsg07 = 'Real Estate School of New England&#8217;s affiliations.';
var ttMsg08 = 'Education Policies and Procedures.';
var ttMsg09 = 'Information about the Connecticut State Real Estate Examinations, links to information about Connecticut Real Estate Law and Regulations, Real Estate Code of Ethics and Standards of Practice, and a Real Estate Glossary.';
var ttMsg10 = ttImage10+'Information available from the promissor.com website about the Connecticut State Real Estate Examinations.';
var ttMsg11 = 'Questions that are frequently asked about real estate education in the State of Connecticut.';
var ttMsg12 = 'Real Estate School of New England&#8217;s Website Map.';
var ttMsg13 = 'Links to Student Resources, including information on taking the CT Real Estate Exam, CT Department of Consumer Protection, and CT Real Estate Law and Regulations.';
var ttAdMsg01 = '<img src="images/etmo_icon_16x16.png" width="16" height="16">&nbsp;&nbsp;Sponsored in part by Transaction Management Online.&nbsp; This link opens a new browser window for the e-TMO.com website.';
var ttAdMsg02 = '<img src="images/nlo_icon_16x16.png" width="16" height="16">&nbsp;&nbsp;Sponsored in part by Nancy Laggis Orlando.&nbsp; This link opens a new browser window for the nancyorlando.com website.';
var ttAdMsg03 = '<img src="images/aarelo_icon_16x16.png" width="16" height="16">&nbsp;&nbsp;Sponsored in part by Access America Relocation.&nbsp; This link opens a new browser window for the accessamericarelocation.com website.';
var ttAdMsg04 = '<img src="images/nsm_icon_16x16.png" width="16" height="16">&nbsp;&nbsp;Sponsored in part by Northern States Mortgage.&nbsp; This link opens a new browser window for the northernstatesmortgage.com website.';
var ttAdMsg05 = '<img src="images/scm_icon_16x16.png" width="16" height="16">&nbsp;&nbsp;Sponsored in part by SCM Insurance.&nbsp; This link opens a new browser window for the scmins.com website.';
var ttAdMsg06 = '<img src="images/nlo_icon_16x16.png" width="16" height="16">&nbsp;&nbsp;Sponsored in part by Nancy Laggis Orlando.&nbsp; This link opens a new browser window for the nancyorlando.com website.';
var ttMsg000 = ttImage+'You are here.&nbsp; This is the Real Estate School of New England&#8217;s Home Page.';
var ttMsg001 = ttImage+'You are here.&nbsp; This is the Complimentary Career Information Seminar Page.';
var ttMsg002 = ttImage+'You are here.&nbsp; This is the &#8220;Principles &amp; Practices of Real Estate&#8221; Course Information Page.';
var ttMsg003 = ttImage+'You are here.&nbsp; This is the Course Location Information Page.';
var ttMsg004 = ttImage+'You are here.&nbsp; This is the Course Dates And Times Page.';
var ttMsg005 = ttImage+'You are here.&nbsp; This is the Course Instructor Page.';
var ttMsg006 = ttImage+'You are here.&nbsp; This is the Course Application Page.';
var ttMsg007 = ttImage+'You are here.&nbsp; This is the Real Estate School of New England&#8217;s Affiliations Page.';
var ttMsg011 = ttImage+'You are here.&nbsp; This is the Frequently Asked Questions Page.';
var ttMsg012 = ttImage+'You are here.&nbsp; This is the Web Site Map.';
var ttMsg013 = ttImage+'You are here.&nbsp; This is the Student Resource Links Page.';
var ttMsg101 = 'Real Estate School of New England complimentary career information seminar flyer.';
var ttMsg102 = 'More details to the directions.';
var ttMsg103 = 'This link opens a small window where you will be able to construct and send an electronic message to the school office.';
var ttMsg104 = 'This link opens another window where you will be able to view and print the course registration form.';
var ttMsg105 = 'Use our convenient and secure on-line course registration form.';
var ttMsg106 = 'This link opens a PDF form that displays the course outline, which may also be printed.';
var ttMsg107 = 'PSI offers a variety of services for Real Estate, Insurance, Construction, Barber, Cosmetology and other professional licenses and certifications.';
var ttMsg108 = 'CT Department of Consumer Protection is responsible for protecting citizens from marketplace fraud, unfair business practices, and physical injury from unsafe items.';
var ttMsg109 = 'A compilation of laws and regulations relating to the licensure and conduct of real estate brokers, salespersons, and appraisers.';
var ttMsg110 = 'A notice from the Connecticut Real Estate Commission concerning Student Rights.';
var ttMsg111 = 'Real Estate Salesperson Exam Application';
/* Sponsored Ads Setup */
var adCount = 3;
var adNow = new Date();
var adSeconds = adNow.getSeconds();
var adSelect = adSeconds % adCount;
var adDiv3 = new Array();
var adDiv4 = new Array();
var adDiv5 = new Array();
/* Removed Ads
adDiv3[0] = '<a class="ads" href="http://www.e-tmo.com/" target="etmo" onmouseover="return escape(ttAdMsg01);">Transaction Management Online</a>';
adDiv4[0] = '<a class="ads" href="http://www.e-tmo.com/" target="etmo" onmouseover="return escape(ttAdMsg01);">e-TMO.com</a>';
adDiv5[0] = 'Your single point of contact for real estate transactions.<br><a class="ads" href="http://www.e-tmo.com/" target="etmo" onmouseover="return escape(ttAdMsg01);">e-TMO.com</a> is ready 24x7, coordinating the interactions required to complete your buy or sell transaction &#8230;';
adDiv3[1] = '<a class="ads" href="http://www.accessamericarelocation.com/" target="aar" onmouseover="return escape(ttAdMsg03);">Access America Relocation</a>';
adDiv4[1] = '';
adDiv5[1] = 'Access America Relocation is committed to taking the stress and strain out of the relocation process &#8230; all areas of Real Estate Relocation Services, Corporate Personnel, Family, Government and Military Services.';
adDiv3[5] = '<a class="ads" href="http://www.nancyorlando.com/" target="nlo" onmouseover="return escape(ttAdMsg06);">Nancy Laggis Orlando</a>';
adDiv4[5] = '<a class="ads" href="http://www.nancyorlando.com/" target="nlo" onmouseover="return escape(ttAdMsg06);">nancyorlando.com</a>';
adDiv5[5] = 'Call 203-481-7247 to find out about the next scheduled date for a Buyer&#8217;s Consultation Seminar held on Saturdays, 10am, at 265 East Main Street, Branford, CT';
*/
adDiv3[0] = '<a class="ads" href="http://www.ShorelineTalking.com/" title="Real Estate Solutions In A Challenging Market">Real Estate Solutions</a>';
adDiv4[0] = '<a class="ads" href="http://www.ShorelineTalking.com/" title="Real Estate Solutions In A Challenging Market">ShorelineTalking.com</a>';
adDiv5[0] = 'Nancy Laggis Orlando offers real estate solutions in a challenging market.&nbsp; See the latest listings, check out the moving tips, read real estate newsletters, and more &#8230;';
adDiv3[1] = '<a class="ads" href="http://www.northernstatesmortgage.com/" title="Northern States Mortgage">Northern States Mortgage</a>';
adDiv4[1] = '';
adDiv5[1] = 'Northern States Mortgage uses advanced technology to close loans quickly at a low cost. Simple and worry-free process for new home and second mortgages, refinance, and home equity loans.';
adDiv3[2] = '<a class="ads" href="http://www.scmins.com/" title="SCM Insurance">SCM Insurance</a>';
adDiv4[2] = '<a class="ads" href="http://www.scmins.com/" title="SCM Insurance">scmins.com</a>';
adDiv5[2] = 'SCM Insurance specializes in the most competitive auto insurance and fast service for insurance needed for closings. Providing personal service at prices lower than nationally advertised insurance companies.';

//**********************************************************
//  FUNCTION: makeCopyright
//    creates a copyright statement
//
function makeCopyright() {
	var thisDate = new Date();
	var thisYear = thisDate.getFullYear();
	var thisCopyright = '<p class="copyright">Copyright(&copy;) 2007-'+thisYear+' Real Estate School of New England.<br>All rights reserved.</p>';
	document.write(thisCopyright);
}

/**********************************************************/
/* FUNCTION: dm                                           */
/* function that displays status bar message              */
/**********************************************************/
function dm(msgStr) {
	dMsg = false;
	document.returnValue = false;
	if(document.images) {
		window.status = msgStr;
		dMsg = true;
		document.returnValue = true;
	}
}

/**********************************************************/
/* FUNCTION: dStts                                        */
/* function that displays status bar message              */
/**********************************************************/
// dStts: Display Status
function dStts(oStatus) {
	cStts = false;
	if(document.images) {
		window.status = oStatus;
		cStts = true;
	}
}

/**********************************************************/
/* FUNCTION: dSpclmsg - Display Special Message           */
/* PARAMETERS:                                            */
/*  pDateFrom format: January 13, 2008 12:00:00           */
/*  pDateTo format: January 14, 2008 23:59:59             */
/*  pMessageText: text of the message to be displayed     */
/*  pMessageClass: CSS class to be used                   */
/**********************************************************/
function dSpclmsg(pDateFrom,pDateTo,pMessageText,pMessageClass) {
	var todaysDate = new Date();
	var todaysTime = todaysDate.getTime();
	var messageTimeFrom = Date.parse(pDateFrom);
	var messageTimeTo = Date.parse(pDateTo);
	if(todaysTime>messageTimeFrom && todaysTime<messageTimeTo) {
		var Announcement = '<p class="'+pMessageClass+'"><b>SPECIAL NOTE:</b> '+pMessageText+'</p>';
		document.write(Announcement);
	}
}

/**********************************************************/
/* FUNCTION: dNotice - Display Notice                     */
/* PARAMETERS:                                            */
/*  pDateStart format: January 13, 2008 12:00:00          */
/*  pDateExpire format: January 14, 2008 23:59:59         */
/*  pMessage: message to be displayed during window       */
/*  pMessageAlt: message to be displayed outside window   */
/**********************************************************/
function dNotice(pDateStart,pDateExpire,pMessage,pMessageAlt) {
	var todaysDate = new Date();
	var todaysTime = todaysDate.getTime();
	var messageTimeFrom = Date.parse(pDateStart);
	var messageTimeTo = Date.parse(pDateExpire);
	/********************************************************/
	/*  If today's date falls within the display dates,     */
	/*  display the message                                 */
	/********************************************************/
	if(todaysTime>messageTimeFrom && todaysTime<messageTimeTo) {
		document.write(pMessage);
	}
	/********************************************************/
	/*  If today's date falls outside the display dates,    */
	/*  display the alternate message if available          */
	/********************************************************/
	else {
		if(pMessageAlt != '') {
			document.write(pMessageAlt);
		}
	}
}

/**********************************************************/
/* FUNCTION: dSeminar - Display Seminar Date / Time       */
/* PARAMETERS:                                            */
/*  pDate format: January 13, 2008 12:00:00               */
/*  pClass: CSS class to be used                          */
/**********************************************************/
function dSeminar(pDate,pClass) {
	var todaysDate = new Date();
	var todaysTime = todaysDate.getTime();
	var seminarTime = Date.parse(pDate);
	var seminarDate = new Date(seminarTime);
/*
	var seminarDisplay = seminarDate.toLocaleString();
	seminarDisplay = seminarDisplay.replace(/:00 AM/, "am");
	seminarDisplay = seminarDisplay.replace(/:00 PM/, "pm");
*/
	var tdate = seminarDate.toLocaleDateString();
	var ttime = seminarDate.toLocaleTimeString();
	var seminarDisplay = tdate + " at " + ttime;
	seminarDisplay = seminarDisplay.replace(/:00 AM/, "am");
	seminarDisplay = seminarDisplay.replace(/:00 PM/, "pm");
	seminarDisplay = seminarDisplay.replace(" 0", " ");
	if(seminarTime>todaysTime) {
		var Announcement = '<p class="'+pClass+'"><b>INFO SEMINAR:</b> On <span class="uline">'+seminarDisplay+'</span>, CENTURY 21 Access America will be hosting a career information seminar at 265 East Main Street, Branford, CT.&nbsp; Contact Nancy Orlando at 203-481-7247.</p>';
		document.write(Announcement);
	}
}

/**********************************************************/
/* FUNCTION: dSession - Display Next Session Start Date   */
/* PARAMETERS:                                            */
/*  pDate format: January 13, 2008 12:00:00               */
/**********************************************************/
function dSession(pDate) {
	var myDate = new Date();
	var expireDate = new Date();
	expireDate.setDate(myDate.getDate()+3);
	var expireTime = expireDate.getTime();
	var todaysDate = new Date();
	var todaysTime = todaysDate.getTime();
	var sessionTime = Date.parse(pDate);
	var sessionDate = new Date(sessionTime);
	var sessionDisplay = sessionDate.toLocaleString();
	sessionDisplay = seminarDisplay.replace(/:00 AM/, "am");
	sessionDisplay = seminarDisplay.replace(/:00 PM/, "pm");
	if(expireTime>todaysTime) {
		var nextSession = '<h2 class="pagesubhead"><span class="yellowhighlight">Next Session Start Date: '+pDate+'</span></h2>';
		document.write(nextSession);
	}
	else {
		var nextSession = '<h2 class="pagesubhead"><span class="yellowhighlight">Next Session Start Date: Please call school voice mail 203-483-7710 or Nancy Orlando at 203-481-7247.</span></h2>';
		document.write(nextSession);
	}
}

/***********************************************************
 *	FUNCTION:	dClass - Display Class Start Date
 *						Class Start Date will display for 14 days
 *						beyond the Class Start Date
 *	PARAMETERS:
 *						pType; format: Evening|Saturday
 *						pDate; format: January 13, 2008
 *						pCSS; format: [text]
 **********************************************************/
function dClass(pType, pDate, pClass) {
	var mainMessage = "";
	var altMessage = "";
	var sessionTime = Date.parse(pDate);
	var expireTime = sessionTime + (60*60*24*14*1000);
	var todaysDate = new Date();
	var todaysTime = todaysDate.getTime();
	//	default to Evening Class
  mainMessage = '<p class="' +pClass+ '"><b>NOTE: <\/b><span class="uline">Evening Classes<\/span> - Next Session scheduled to start '+pDate+'; 15 sessions 6pm-10pm.&nbsp; <a class="pagenav" href="application.html">Sign Up Here!<\/a><\/p>';
	altMessage = '<p class="' +pClass+ '"><b>NOTE: <\/b><span class="uline">Evening Classes<\/span> - For Next Session Start Date, please call Nancy Orlando at 203-481-7247.</p>';
	if (pType == "Saturday") {
		//	override if Saturday Class
		mainMessage = '<p class="' +pClass+ '"><b>NOTE: <\/b><span class="uline">Saturday Classes<\/span> - Next Session tenatively scheduled to start '+pDate+'; 8 week course 9am-5pm.&nbsp; <a class="pagenav" href="application.html">Sign Up Here!</a></p>';
		altMessage = '<p class="' +pClass+ '"><b>NOTE: <\/b><span class="uline">Saturday Classes<\/span> - For Next Session Start Date, please call Nancy Orlando at 203-481-7247.</p>';
	}
	if(todaysTime>expireTime) {
		//	write alternate message if time HAS expired
		document.write(altMessage);
	}
	else {
		//	write main message if time HAS NOT expired
		document.write(mainMessage);
	}
}

// fullMonth: Translate month number to full text
function fullMonth(pMonth) {
	var monthNames=new Array(12);
	monthNames[0]="January";
	monthNames[1]="February";
	monthNames[2]="March";
	monthNames[3]="April";
	monthNames[4]="May";
	monthNames[5]="June";
	monthNames[6]="July";
	monthNames[7]="August";
	monthNames[8]="September";
	monthNames[9]="October";
	monthNames[10]="November";
	monthNames[11]="December";
	return(monthNames[pMonth])
}

// fullDay: Translate weekday number to full text
function fullDay(pDay) {
	var dayNames=new Array(7);
	dayNames[0]="Sunday";
	dayNames[1]="Monday";
	dayNames[2]="Tuesday";
	dayNames[3]="Wednesday";
	dayNames[4]="Thursday";
	dayNames[5]="Friday";
	dayNames[6]="Saturday";
	return(dayNames[pDay])
}

// displayAd: Display Advertisement
function displayAd() {
	document.write('<div class="ad001">');
	document.write('<div class="ad002">Sponsored Ad</div>');
	if(adDiv3[adSelect]) { document.write('<div class="ad003">' + adDiv3[adSelect] + '</div>'); }
	if(adDiv4[adSelect]) { document.write('<div class="ad004">' + adDiv4[adSelect] + '</div>'); }
	if(adDiv5[adSelect]) { document.write('<div class="ad005">' + adDiv5[adSelect] + '</div>'); }
	document.write('</div>');
	document.writeln();
}

function na_open_window(name, url, left, top, width, height, toolbar, menubar, statusbar, scrollbar, resizable) {
	toolbar_str = toolbar ? 'yes' : 'no';
	menubar_str = menubar ? 'yes' : 'no';
	statusbar_str = statusbar ? 'yes' : 'no';
	scrollbar_str = scrollbar ? 'yes' : 'no';
	resizable_str = resizable ? 'yes' : 'no';
	window.open(url, name, 'left='+left+',top='+top+',width='+width+',height='+height+',toolbar='+toolbar_str+',menubar='+menubar_str+',status='+statusbar_str+',scrollbars='+scrollbar_str+',resizable='+resizable_str);
}

/*
Open Centered Popup Window Script-
© DHTML Shock (www.dhtmlshock.com)
To add more shock to your site, visit www.DHTML Shock.com
*/
function OpenBrWindow(theURL,winName,features, myWidth, myHeight, isCenter) { //v3.0
	if(window.screen)if(isCenter)if(isCenter=="true") {
		var myLeft = (screen.width-myWidth)/2;
		var myTop = (screen.height-myHeight)/2;
		features+=(features!='')?',':'';
		features+=',left='+myLeft+',top='+myTop;
	}
	window.open(theURL,winName,features+((features!='')?',':'')+'width='+myWidth+',height='+myHeight);
}

