// JavaScript Document


// Begin Rollover Button Preloader
function preloadImages() {
	pics = new Array("toc_home_on.gif","toc_corporate_on.gif","toc_productlaunches_on.gif","toc_fundraising_on.gif","toc_strolling_on.gif","toc_magicclubmailer_on.gif","toc_funagram_on.gif","toc_birthdays_on.gif","toc_preschools_on.gif","toc_schools_on.gif","toc_balloonology_on.gif","toc_wow_on.gif","toc_comments_on.gif","toc_photos_on.gif","toc_links_on.gif","toc_mailorder_on.gif","toc_email_on.gif");
	for (imgnum = 0; imgnum < pics.length; imgnum++) { imgfile = new Image(); imgfile.src = "../images/"+pics[imgnum]; }
}
// End Rollover Button Preloader

// Begin Popup Open Resize
// Centered Pop-Up Window (v1.0) | (C) 2002-2003 www.smileycat.com | Free for all users, but leave in this header

/*
Use the line below in html code as the link
<a href="#null" onclick="newWindow('your_site.html','','750','450','resizable,status=no,status,toolbar')">Click Here</a>
Note: href="#null" makes the link display as a link. Don't leave it out!

Variables for above link:
750 - width | 450 - height
resizable - window can be resized
scrollbars - window displays the scrollbar on the right
status - window displays the status bar at the bottom
toolbar - window displays the toolbar at the top
*/

function autoWindow(mypage,myname,w,h,features) {
	if (!document.cookie) {
		//document.cookie = "TOAbool = true; expires = Thu,31-Dec-2020 00:00:00 GMT;"
		//document.cookie = "MagicClubPopupShown"+"="+"true"+";expires="+expire.toGMTString();
		document.cookie = "MagicClubPopupShown=true; expires=;"; // cookie set to limit autopopup to once per session
		newWindow(mypage,myname,w,h,features);
	}
}

var win = null;
function newWindow(mypage,myname,w,h,features) {
		var winl = (screen.width-w)/2;
		var wint = (screen.height-h)/2;
		if (winl < 0) winl = 0;
		if (wint < 0) wint = 0;
		var settings = 'height=' + h + ',';
		settings += 'width=' + w + ',';
		settings += 'top=' + wint + ',';
		settings += 'left=' + winl + ',';
		settings += features;
		win = window.open(mypage,myname,settings);
		win.window.focus();
	}
// End Popup Open Resize