//rollovers
var iName=""; 
default1 = new Image(); default1.src = "http://www.maredy.com/Images/Nav/ComparePrograms_Off.gif";
changed1 = new Image(); changed1.src = "http://www.maredy.com/Images/Nav/ComparePrograms_On.gif";
hover1 = new Image(); hover1.src = "http://www.maredy.com/Images/Nav/ComparePrograms_Hover.gif";

default2 = new Image(); default2.src = "http://www.maredy.com/Images/Nav/RequestInfo_Off.gif";
changed2 = new Image(); changed2.src = "http://www.maredy.com/Images/Nav/RequestInfo_On.gif";
hover2 = new Image(); hover2.src = "http://www.maredy.com/Images/Nav/RequestInfo_Hover.gif";

default3 = new Image(); default3.src = "http://www.maredy.com/Images/Nav/SuccessTips_Off.gif";
changed3 = new Image(); changed3.src = "http://www.maredy.com/Images/Nav/SuccessTips_On.gif";
hover3 = new Image(); hover3.src = "http://www.maredy.com/Images/Nav/SuccessTips_Hover.gif";

default4 = new Image(); default4.src = "http://www.maredy.com/Images/Nav/SpecialOffers_Off.gif";
changed4 = new Image(); changed4.src = "http://www.maredy.com/Images/Nav/SpecialOffers_On.gif";
hover4 = new Image(); hover4.src = "http://www.maredy.com/Images/Nav/SpecialOffers_Hover.gif";

default5 = new Image(); default5.src = "http://www.maredy.com/Images/Nav/GetStarted_Off.gif";
changed5 = new Image(); changed5.src = "http://www.maredy.com/Images/Nav/GetStarted_On.gif";
hover5 = new Image(); hover5.src = "http://www.maredy.com/Images/Nav/GetStarted_Hover.gif";

function Ichange(p) {
    var pSrc=eval(p+ ".src");
    document[iName].src = pSrc;
}

function printSellingNav() { 
	if (section == "ComparePrograms" ) {
		document.write('<A HREF="http://www.maredy.com/Compare/ComparePrograms.html"><IMG SRC="http://www.maredy.com/Images/Nav/ComparePrograms_On.gif" WIDTH="153" HEIGHT="22" HSPACE="0" VSPACE="0" BORDER="0" ALT="Compare Programs"></A>');
	} 
	else {
		document.write('<A HREF="http://www.maredy.com/Compare/ComparePrograms.html" onMouseOver="iName=\'image1\'; Ichange(\'hover1\')" onMouseOut="Ichange(\'default1\')"><IMG SRC="http://www.maredy.com/Images/Nav/ComparePrograms_Off.gif" WIDTH="153" HEIGHT="22" HSPACE="0" VSPACE="0" BORDER="0" name="image1" ALT="Compare Programs"></A>');
	}
	
	if (section == "RequestInfo" ) {
		document.write('<A HREF="http://www.maredy.com/RequestInfo/RequestInfo.php#Request"><IMG SRC="http://www.maredy.com/Images/Nav/RequestInfo_On.gif" WIDTH="152" HEIGHT="22" HSPACE="0" VSPACE="0" BORDER="0" ALT="Request Free Info"></A>');
	} 
	else {
		document.write('<A HREF="http://www.maredy.com/RequestInfo/RequestInfo.php#Request" onMouseOver="iName=\'image2\'; Ichange(\'hover2\')" onMouseOut="Ichange(\'default2\')"><IMG SRC="http://www.maredy.com/Images/Nav/RequestInfo_Off.gif" WIDTH="152" HEIGHT="22" HSPACE="0" VSPACE="0" BORDER="0" name="image2" ALT="Request Free Info"></A>');
	}
	
	if (section == "SuccessTips" ) {
		document.write('<A HREF="http://www.maredy.com/SuccessTips/SuccessTips.html"><IMG SRC="http://www.maredy.com/Images/Nav/SuccessTips_On.gif" WIDTH="104" HEIGHT="22" HSPACE="0" VSPACE="0" BORDER="0" ALT="Success Tips"></A>');
	} 
	else {
		document.write('<A HREF="http://www.maredy.com/SuccessTips/SuccessTips.html" onMouseOver="iName=\'image3\'; Ichange(\'hover3\')" onMouseOut="Ichange(\'default3\')"><IMG SRC="http://www.maredy.com/Images/Nav/SuccessTips_Off.gif" WIDTH="104" HEIGHT="22" HSPACE="0" VSPACE="0" BORDER="0" name="image3" ALT="Success Tips"></A>');
	}
if (section == "SpecialOffers" ) {
		document.write('<A HREF="http://www.maredy.com/SpecialOffers/SpecialOffers.html"><IMG SRC="http://www.maredy.com/Images/Nav/SpecialOffers_On.gif" WIDTH="216" HEIGHT="22" HSPACE="0" VSPACE="0" BORDER="0" ALT="Special Offers"></A>');
	} 
	else {
		document.write('<A HREF="http://www.maredy.com/SpecialOffers/SpecialOffers.html" onMouseOver="iName=\'image4\'; Ichange(\'hover4\')" onMouseOut="Ichange(\'default4\')"><IMG SRC="http://www.maredy.com/Images/Nav/SpecialOffers_Off.gif" WIDTH="216" HEIGHT="22" HSPACE="0" VSPACE="0" BORDER="0" name="image4" ALT="Special Offers"></A>');
	}
	
	if (section == "GetStarted" ) {
		document.write('<A HREF="http://www.maredy.com/GetStarted/GetStarted.html"><IMG SRC="http://www.maredy.com/Images/Nav/GetStarted_On.gif" WIDTH="135" HEIGHT="22" HSPACE="0" VSPACE="0" BORDER="0" ALT="Get Started Now"></A>');
	} 
	else {
		document.write('<A HREF="http://www.maredy.com/GetStarted/GetStarted.html" onMouseOver="iName=\'image5\'; Ichange(\'hover5\')" onMouseOut="Ichange(\'default5\')"><IMG SRC="http://www.maredy.com/Images/Nav/GetStarted_Off.gif" WIDTH="135" HEIGHT="22" HSPACE="0" VSPACE="0" BORDER="0" name="image5" ALT="Get Started Now"></A>');
	}
	document.write();
} 

function printLogoTop() {
	document.write('<A HREF="http://www.maredy.com/index.html"><IMG SRC="http://www.maredy.com/Images/Clear.gif" WIDTH="280" HEIGHT="59" HSPACE="0" VSPACE="0" BORDER="0" ALIGN="LEFT" ALT="Maredy"></A><IMG SRC="http://www.maredy.com/Images/Clear.gif" WIDTH="230" HEIGHT="36" HSPACE="0" VSPACE="0" BORDER="0"><BR><A HREF="http://www.maredy.com/index.html" CLASS="navlink">HOME</A>&nbsp;&nbsp;&nbsp;&nbsp<A HREF="http://www.maredy.com/Contact/Contact.php" CLASS="navlink">CONTACT US</A>&nbsp;&nbsp;&nbsp;&nbsp;<A HREF="http://www.maredy.com/About/About.html" CLASS="navlink">ABOUT US</A>&nbsp;&nbsp;&nbsp;&nbsp;<BR>');
}

function printFooterNav() {
	document.write('<TABLE WIDTH="760" CELLPADDING="2" CELLSPACING="0" BORDER="0"><TR><TD WIDTH="560" ALIGN="LEFT" VALIGN="MIDDLE" CLASS="text"><DIV CLASS="footertext" ID="brown" STYLE="line-height: 11px;">&nbsp;&nbsp;Looking for great fundraising options?<BR></DIV>&nbsp;&nbsp;<A HREF="http://www.cookiedoughfundraiser.com" class="navlink">Cookie Dough</A>&nbsp;&nbsp;&#149;&nbsp;&nbsp;<A HREF="http://www.ezoncampusfundraisers.com" class="navlink">EZ On-Campus Fundraisers</A></TD><TD WIDTH="200" ALIGN="LEFT" VALIGN="BOTTOM" CLASS="text"><A HREF="http://www.maredy.com/SiteMap/SiteMap.html" CLASS="navlink">Site Map</A>&nbsp;&nbsp;&#149;&nbsp;&nbsp;<A HREF="http://www.maredy.com/Contact/Contact.php" CLASS="navlink">Contact Us</A>&nbsp;&nbsp;&#149;&nbsp;&nbsp;<A HREF="http://www.maredy.com" CLASS="navlink">Maredy.com</A>&nbsp;&nbsp;<BR></TD></TR></TABLE>');
}

function printFooter() {
	document.write('<IMG SRC="/Images/Clear.gif" WIDTH="770" HEIGHT="6" HSPACE="0" VSPACE="0" BORDER="0"><BR><address>Maredy &#149; 12150 Flint Place &#149; Poway, CA 92064 &#149; Tel: 1-800-4-MAREDY (1-800-462-7339) &#149; e: <a href="mailto:sales@maredy.com" style="color: #B8A889">sales@maredy.com</a></address><BR>&copy; 2008 All Rights Reserved<BR><BR>Member in Good Standing: Association of Fund-Raising Distributors and Suppliers<BR><A HREF="http://www.afrds.org" TARGET="_blank"><IMG SRC="/Images/AFRDSSm.gif" WIDTH="59" HEIGHT="59" HSPACE="0" VSPACE="0" BORDER="0" ALT="Association of Fund-Raising Distributors and Suppliers"></A><BR><BR>');
}
function printCareersFooter() {
	document.write('<IMG SRC="http://www.maredy.com/Images/Clear.gif" WIDTH="770" HEIGHT="6" HSPACE="0" VSPACE="0" BORDER="0"><center><BR>Maredy &#149; 12150 Flint Place &#149; Poway, CA 92064 &#149; Tel: 1-800-4-MAREDY (1-800-462-7339)<BR>&copy; 2008 All Rights Reserved<BR><BR>Member in Good Standing: Association of Fund-Raising Distributors & Suppliers and the Better Business Bureau<BR><A HREF="http://www.afrds.org" TARGET="_blank"><IMG SRC="http://www.maredy.com/Images/AFRDCareers.gif" WIDTH="59" HEIGHT="59" HSPACE="0" VSPACE="0" BORDER="0" ALT="Association of Fund-Raising Distributors and Suppliers"></A><A HREF="" onClick="Rcertify();return false;"><IMG SRC="http://www.maredy.com/Images/CareersBBBLogo1.gif" WIDTH="166" HEIGHT="59" HSPACE="0" VSPACE="0" BORDER="0" ALT="Better Business Bureau Online Reliablilty program" style="margin-left:130px"></a></center><BR><BR>');
}

// simple CSS calendar popup
// written by Darren Munk 7/05
// ---

var bName = navigator.appName;
var bVer = parseInt(navigator.appVersion);
var NS4 = (bName == "Netscape" && bVer >= 4);
var IE4 = (bName == "Microsoft Internet Explorer" && bVer >= 4);

function showCalendar(month,year)
{
	theID = "calendar";
	document.getElementById(theID).innerHTML = calendarHTML(month,year);
	document.getElementById(theID).style.display = '';
	document.getElementById(theID).style.position = 'absolute';
	theButton = document.images['popcalendar'];

	if( NS4 )
	{
		theButton_x = theButton.x;
	}
	else
	{
		xPos = theButton.offsetLeft;
		tempEl = theButton.offsetParent;
  	while (tempEl != null) {
  		xPos += tempEl.offsetLeft;
  		tempEl = tempEl.offsetParent;
  	}
	  theButton_x = xPos;
	}

	if( NS4 )
	{
		theButton_y = theButton.y;
	}
	else
	{
		yPos = theButton.offsetTop;
		tempEl = theButton.offsetParent;
		while (tempEl != null) {
  		yPos += tempEl.offsetTop;
  		tempEl = tempEl.offsetParent;
  	}
		theButton_y = yPos;
	}
	  
	document.getElementById(theID).style.left = (theButton_x + theButton.width + 3 ) +"px";
	document.getElementById(theID).style.top = (theButton_y - 2) + "px";
}

function hideCalendar()
{
	theID = "calendar";
	document.getElementById(theID).style.display = 'none';
}

function setDateField(fieldID,theValue)
{
	document.getElementById(fieldID).value = theValue;
	hideCalendar();
}

function calendarHTML(month,year)
{
	months = new Array("Jan","Feb","Mar","Apr","May","June","July","Aug","Sept","Oct","Nov","Dec");
	month_days = new Array(31,28,31,30,31,30,31,31,30,31,30,31);
	
	if( month == 2 && ( year % 4 ) == 0 )
	  eom = 29;
	else
	  eom = month_days[month-1];
	
	if( month == 1 )
	{
		last_month = 12;
		last_month_year = year - 1;
	}
	else
	{
	  last_month = month - 1;
	  last_month_year = year;
	}
	
	if( month == 12 )
	{
		next_month = 1;
		next_month_year = year + 1;
	}
	else
	{
	  next_month = month + 1;
	  next_month_year = year;
	}
	
	month_date = new Date(year,month-1,1);
	start = month_date.getDay();
	ret_val = '<table><thead><tr><td colspan="7" class="month"><span style="font-size:8px;color:#AAA;padding-right:8px;" class="clickable" onclick="showCalendar('+last_month+','+last_month_year+')">'+months[last_month-1]+'</span>'+months[month-1]+' '+year;
	ret_val += '<span style="font-size:8px;color:#AAA;padding-left:8px;" class="clickable" onclick="showCalendar('+next_month+','+next_month_year+')">'+months[next_month-1]+'</span></td></tr><tr><td>s</td><td>m</td><td>t</td><td>w</td>';
	ret_val += '<td>t</td><td>f</td><td>s</td></tr></thead><tbody><tr>';
	
	today = new Date();
	today_date = (today.getMonth() + 1) + '/' + today.getDate() + '/' + today.getFullYear();
	
	for( i=1;i<=eom+start;i++ )
	{
		d = i - start;
		display_day = d;
		calendar_month = month;
		compare_date = month + '/' + d + '/' + year;
		
		if( calendar_month < 10 )
			calendar_month = '0' + calendar_month;
	  if( d < 10 )
	  	d = '0' + d;
		
		calendar_date = calendar_month + '/' + d + '/' + year;
		if( d > 0 )
		{
			ret_val += '<td class="clickable';
		
		 	if( Date.parse(compare_date) == Date.parse(today_date) )
		 	{
		 		ret_val += ' today';
		 	}
		 	else if( Date.parse(compare_date) < Date.parse(today_date) )
		 	{
		 		ret_val += ' past';
		 	}
		 	else
		 	{
		 		ret_val += ' future';
		 	}
		 	
			ret_val += '" onclick="setDateField(\'00N30000000mSnb\',\''+ calendar_date + '\')">'+ display_day +'</td>';
		}
		else
			ret_val += "<td class='empty'>&nbsp;</td>";
		
		if( i == eom+start )
		{
			if( i % 7 > 0 )
			{
				cells_remaining = 7 - (i%7);
				for( j=0;j<cells_remaining;j++ )
					ret_val += "<td>&nbsp;</td>";
			}
		}
		else if( i % 7 == 0 )
			ret_val += "</tr><tr>";
	}
	
	ret_val += '</tr></tbody></table>';
	return ret_val;
}