//##########Launch new pop-up windows for Tell a Friend
function loadPopUpForTAFF()
{
	var newWin;
	var strURL = "/tellAFriend.aspx";
	
	var page_name = window.location.pathname;
	if (page_name.lastIndexOf("/")==page_name.length-1) 
		page_name = window.location.pathname + "default.aspx";
	strURL = strURL + "?pg=" + page_name;

	newWin = window.open(strURL,"Email","width=550,height=600,scrollbars=1,resizable=1");

}

//##########Launch new pop-up windows
function loadPopUpContent(strURL,strTitle,intWidth,intHeight)
{
	var newWin;
	
	newWin = window.open(strURL,strTitle,"width=" + intWidth + ",height=" + intHeight + ",scrollbars=auto,resizable=1");

}
//##########Launch new pop-up windows - Banana Nut
function loadPopUpBNC(strURL,strTitle,intWidth,intHeight)
{
	var newWin;
	
	newWin = window.open(strURL,strTitle,"width=" + intWidth + ",height=" + intHeight + ",scrollbars=0,resizable=1");

}
//##########Launch new pop-up windows
function loadPopUpFixed(strURL,strTitle,intWidth,intHeight)
{
	var newWin;
	
	newWin = window.open(strURL,strTitle,"width=" + intWidth + ",height=" + intHeight + ",scrollbars=0,resizable=0");

}
//##########Launch new pop-up windows
function loadPopUp(strURL,strTitle)
{
	var newWin;
	
	newWin = window.open(strURL,strTitle,"scrollbars=1,resizable=1");

}

//##########Launch new game pop-up windows
function loadPopUpGames(strURL,strTitle,intWidth,intHeight)
{
	var newWin;
	
	newWin = window.open(strURL,strTitle,"width=" + intWidth + ",height=" + intHeight + ",scrollbars=0,resizable=0");

}
//##########Redirect user based on drop-down list value
function onChange_AsTheyGrow() {
	
   var current = document.astheygrow.urlSelect.selectedIndex;
   window.location.href=document.astheygrow.urlSelect.options[current].value;

}

//##########COOKIE FUNCTIONS
function setCookie(name,value,days){
	if (days){
		var date = new Date();
		date.setTime(date.getTime() + (days * 24 * 60 * 60 * 1000));
		var expires = "; expires=" + date.toGMTString();
	} else {
		var expires = "";
	}
	document.cookie = name + "=" + value + expires + "; path=/";
}

function readCookie(name){
	var nameEQ = name + "=";
	var ca = document.cookie.split(';');
	for(var i=0;i < ca.length;i++)	{
		var c = ca[i];
		while (c.charAt(0)==' ') c = c.substring(1,c.length);
		if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length);
	}
	return null;
}
//##########END COOKIE FUNCTIONS
//#################################################################
//##########ROLL OVER FUNCTIONS
function changeImages() {
	if (document.images && (preloadFlag == true)) {
		for (var i=0; i<changeImages.arguments.length; i+=2) {
			document[changeImages.arguments[i]].src = changeImages.arguments[i+1];
		}
	}
}
function newImage(arg) {
	if (document.images) {
		rslt = new Image();
		rslt.src = arg;
		return rslt;
	}
}
//##########END ROLL OVER FUNCTIONS

//#################################################################
