//<![CDATA[

	// Settings for 75% off promo.
	// Set a global variable to get the date to run the promo.
	var start_date = new Date('7/1/2011');
	// Updated by IB on 04/30/2011 - Changed 4/30 to 5/1
	// When using the Date function, it returns the date + time requested.
	// If no time value is specified, it defaults to 00:00:00 which is AM of the day of
	// So if your last date is 4/30, Date produces 4/30/2011 00:00:00 which is 4/30 12:00AM (the start of the day)
	// So a comparison of now <= end_date using this format will never be valid, b/c 
	// the value of "now" will be 4/30/2011 14:20:30 (for example) which will always be greater than 
	// the AM of the same date.
	var end_date = new Date('8/1/2012');
	var now = new Date();
	// Updated by IB on 4/30/2011 - changed <= to <
	var show_promo = (now >= start_date && now < end_date);


	// Settings for VSC promo.
	// Updated by JZ on 06/15/2011
	var start_date_VSC = new Date('6/22/2011');
	var end_date_VSC = new Date('9/30/2011');
	var url = window.location.href;
	var show_promo_VSC = (now >= start_date_VSC && now < end_date_VSC) && ((url.indexOf('CC=VSC') != -1) || (url.indexOf('CC=VSC') != -1));

	// if VSC after the promo date...then redirect to standard login page
	//if (url.indexOf('CC=VSC') != -1) {
    //    location.href = "https://www.time4learning.com/SignUp/Parent_information.aspx";
    //}

	// Settings for MATH promo.
	// Updated by JZ on 06/24/2011
	var start_date_MATH = new Date('6/24/2011');
	var end_date_MATH = new Date('12/31/2011');
	var url = window.location.href;
	var show_promo_MATH = (now >= start_date_MATH && now < end_date_MATH) && ((url.indexOf('?Aid=15&CC=math&utm_source=Modern+Scholar&utm_medium=Gold+Sponsorship&utm_campaign=Modern+Scholar+Gold+Sponsorship+Package') != -1) || (url.indexOf('&CC=math&utm_source=Modern+Scholar&utm_medium=Gold+Sponsorship&utm_campaign=Modern+Scholar+Gold+Sponsorship+Package') != -1));

	$j().ready(
	function () {
	    // If the date falls between the start and end date, then show the promo slider.
	    if (show_promo) {
	        $j("#DemoBox").show();
	    }
	}
);

//Runs the cookie check function.
window.onload=checkCount;

function checkCount() {
	var count = GetCookie('count');
	if (count == null) {
	count=1;
	SetCookie('count', count, exp);
	setTimeout("flvFSL1('DemoBox',-18,5,1,10)",700); // ('Div ID',x-pos,y-pos,speed,speed)
	} else {
	count++;
	SetCookie('count', count, exp);
	}
}

//]]>

