var profits_org = '/imgs/Profits.png';
var profits_swt = '/imgs/Profits_rollover.png';
var coaches_org = '/imgs/testy.png';
var coaches_swt = '/imgs/testy_rollover.png';
var works_org   = '/imgs/WOrks.png';
var works_swt   = '/imgs/WOrks_rollover.png';
var hms_org = '/imgs/hms.png';
var hms_swt = '/imgs/hms_rollover.png';
var whyworks_org = '/imgs/Why_works.png';
var whyworks_swt = '/imgs/Why_Rollover.png';
var sponsor_org = '/imgs/Sponsorship_Letter.png';
var sponsor_swt = '/imgs/Sponsorship_Rollover.png';
var web_org = '/imgs/Web_Page.png';
var web_swt = '/imgs/Web_Rollover.png';
var donate_org = '/imgs/Team_Donations.png';
var donate_swt = '/imgs/Team_Rollover.png';
var group_org = '/imgs/Group_Donations.png';
var group_swt = '/imgs/Group_Donations_rollover.png';
var easy_org = '/imgs/easy_steps.png';
var easy_swt = '/imgs/easy_steps_rollover.png';
var about_org = "/imgs/about.png";
var about_swt = "/imgs/about_rollover.png";
var directions_org = "/imgs/directions.png";
var directions_swt = "/imgs/directions_rollover.png";
var directory_org = "/imgs/directory.png";
var directory_swt = "/imgs/directory_rollover.png";
var divisions_org = "/imgs/divisions.png";
var divisions_swt = "/imgs/divisions_rollover.png";
var staff_org = "/imgs/staff.png";
var staff_swt = "/imgs/staff_rollover.png";
var call_org = '/imgs/call_button_rollover.png';
var call_swt = '/imgs/call_button.png';

var company = '';

var loc = "<div style=\"font-size: 15px; width: 414px; height: 382px; overflow-x: hidden; overflow-y: scroll;\"><b>Mailing Address:</b> 258 Rt-117 By Pass Rd, Bedford Hills, NY 10507<br><br><b>Mapquest.com Address:</b> 196 Route 117 By Pass Rd, Bedford Hills, NY 10507<br><br><b>GPS Address:</b>  160 Harris Road, Bedford Hills, NY 10507 (we're located across the street in the Northern Westchester Plaza)<br><br><b>From the 684 points north</b><br>Take 684 to Exit 5. Bear right towards Saw Mill Parkway and follow signs for Route 117. Get off at exit 43. Exit ramp loops around and becomes Rt-117 / By Pass Rd and we are the second building on the right, on the corner next to Country Willow Kids.<br><br><b>From 684 points south</b><br>Take 684 North to Exit 6. Make a left on to Rt 35. Immediately make a left and get back onto 684 heading south. Bear right towards Saw Mill Parkway and follow signs for Route 117. Get off at exit 43. Exit ramp loops around and becomes Rt-117 By Pass Rd and we are the second building on the right, on the corner next to Country Willow Kids.<br><br><b>From Saw Mill River Parkway points south</b><br>Take Saw Mill River Parkway north and get off at exit 42. Turn left on to Railroad Ave and then right on to Harris Road. Go to light and make left on to Rt-117 By Pass Road. We are in the third building on the left, on the corner next to Country Willow Kids.<br><br><b>From points East and West</b><br>Take Rt 35 towards Katonah. Follow signs for Saw Mill Parkway South. As you go down the ramp and get onto the parkway, bear right and follow signs for Route 117. Get off at exit 43. Exit ramp loops around and becomes Rt-117 / By Pass Rd and we are the second building on the right, on the corner next to Country Willow Kids.</div>";

var companyInfo = "";
companyInfo +="<div style=\"font-size: 17px;width: 414px; height: 382px; overflow-x: hidden; overflow-y: scroll;\">";
companyInfo += "<b>Our Mission</b><br />";
companyInfo +="My Sports Dreams is dedicated to assisting collegiate, high school and travel teams raise thousands of dollars with a process that is fast, painless and requires no selling.<br /><br />";
companyInfo +="<b>Pretty Good Company</b><br />";
companyInfo +="In addition to thousands of high school and travel teams around the country, we’ve also worked with teams from many of America’s great colleges and Universities, like Johns Hopkins, Tufts, Williams, Cal Poly, Utah, Temple, Rutgers, Maryland, Cal Berkeley, Ohio Wesleyan, U. of the Pacific, UMass, Butler, Valparaiso, Ball State, Bowling Green and many more.<br /><br />";
companyInfo +="<b>How We Do It</b><br />";
companyInfo +="We enable people to contribute to a team or an athlete, without having to purchase something they don’t want. They have the freedom to contribute by check or by credit card, or not at all. Our team clients routinely raise $4,000 - $10,000. The fundraising process takes less than an hour.<br /><br />";
companyInfo +="<b>Sports People</b><br />";
companyInfo +="The principals of My Sports Dreams include the co-founder of a sports radio network and owners of a popular high school showcase camp. Our young and growing company is packed with people who competed in organized sports at the high school, collegiate, and professional levels.<br /><br />";
companyInfo +="<b>Passion</b><br />";
companyInfo +="Everyone who works at My Sports Dreams has a passion about helping teams and student-athletes achieve great things. We want our clients to spend as little time as possible fundraising, so they can focus on what really matters: excellence in competition and in the classroom.<br /><br />";
companyInfo +="<b>The Landscape</b><br />";
companyInfo +="When it comes to funding for athletics these days, it’s not a pretty picture. You’re reading this because you’re a coach, an athlete or the parent of an athlete. So, you already know that scholastic and collegiate teams are struggling.<br /><br />";
companyInfo +="At colleges across the country, basketball and football teams might be prospering, but too often non revenue sports like field hockey, soccer, baseball, softball, lacrosse and others struggle to cover basic needs.<br /><br />";
companyInfo +="At the high school and youth level, funding challenges are more dramatic and widespread. Nationwide, fields and facilities are under-maintained, schedules have been curtailed, outdated or unsafe equipment is still in use, and many teams are simply being eliminated.<br /><br />";
companyInfo +="<b>Reality Check</b><br />";
companyInfo +="We can’t change this reality on a national level (yet!), but we CAN make a huge impact for teams on an individual basis. For any given college, high school or travel team, thousands of dollars can close the gap between what athletes and coaches need to compete and what the team budget actually is.<br /><br />";
companyInfo +="<b>Old and Inefficient</b><br />";
companyInfo +="For decades, traditional fundraising has meant student-athletes canvassing neighborhoods selling candy, magazines or raffle tickets, running car washes or organizing spaghetti dinners. But those days are fading fast. The few hundreds of dollars these efforts typically raise can’t make an impact anymore and no one has the time to devote to these activities.<br /><br />";
companyInfo +="<b>Makes Sense</b><br />";
companyInfo +="The basic premise of My Sports Dreams is simple. Rather than ask student-athletes to sell things people don’t want; rather than relying on the support of people whose only common interest with a team might be the zip code they live in; we connect student-athletes with the people who really care about them. Whether they live next door, a county away or across the country, we make the connections that lead to contributions.<br /><br />";
companyInfo +="And, we do it in a classy, professional and personalized manner initiated by the student-athletes themselves. So, instead of asking people to purchase a product they don’t want and didn’t ask for, we make it easy for them to contribute directly to the team. Does anyone really need another bumper sticker, magnet, seat cushion, umbrella or candle anyway?<br /><br />";
companyInfo +="And rather than collect money $10 at a time, supporters to the teams we work with are contributing $25 to $2,000 at a time. That’s the kind of money that can quickly add up to the thousands of dollars that can actually change a team’s approach to their season.<br /><br />";
companyInfo +="<b>Some Numbers</b><br />";
companyInfo +="We started our business in 2004. We employ 25 people. We’ve helped over 15,000 teams. Over $25 million has been generated for student-athletes across the country. We are endorsed by more than 50 coaching associations, tournaments, leagues and equipment manufacturers.<br /><br />";
companyInfo +="There are more than 500,000 organized sports teams in America and almost every one of them could put thousands of dollars to work right now.<br /><br />";
companyInfo +="We want to help them all, including your team!";
companyInfo +="</div>";

function change_image(spot,imgName)
{
	if(document[spot]){
        if(document[spot].getAttribute('class') != 'active')
                document[spot].src = imgName;
	}
}

function changeBack()
{
        document['profits'].src = profits_org;
        document['profits'].removeAttribute('class');   
        document['coaches'].src = coaches_org;
        document['coaches'].removeAttribute('class');
        document['works'].src = works_org;
        document['works'].removeAttribute('class');
        document['hms'].src = hms_org;
        document['hms'].removeAttribute('class');
}

function DetectImageSize(picName,picTitle){
      picURL=picName.src;
      newWindow=window.open(picURL,'newWin','toolbar=no,width='+picName.width+',height='+picName.height);
      newWindow.document.write('<html><head><title>'+picTitle+'</title></head><body background="'+picURL+'"></body></html>');
      newWindow.resizeBy(picName.width-newWindow.document.body.clientWidth,picName.height-newWindow.document.body.clientHeight);
      newWindow.focus();
}

function poptastic(url)
{
	var newwindow=window.open(url,'name','height=400,width=600,scrollbars=yes,resizable=true');
	if (window.focus) {newwindow.focus()}
}
function helpWindow()
{
	window.open ("/help_popup.php","mywindow","status=0,address=0,width=400,height=300,scrollbar=no"); 
}
function clearTeamField(groupText)
{
	if(document.approval.Ticket_Name.value == groupText)
	document.approval.Ticket_Name.value = '';
	else if(document.approval.Ticket_Name.value == '')
	document.approval.Ticket_Name.value = groupText;
}
function clearCoachField(coachText)
{
	if(document.approval.Password.value == coachText)
	document.approval.Password.value = '';
	else if(document.approval.Password.value == '')
	document.approval.Password.value = coachText;
}
function fbs_click() 
{
	u=location.href;
	t=document.title;
	window.open('http://www.facebook.com/sharer.php?u='+encodeURIComponent(u)+'&t='+encodeURIComponent(t),'sharer','toolbar=0,status=0,width=626,height=436');
	return false;
}
function mail_it()
{
var str = jQuery("#theForm2").serialize();
            jQuery.ajax({
               type: "POST",
               url: "/page-post.php",
               data: str,
               success: function(msg){
            jQuery("#rightSide").ajaxComplete(function(event, request, settings){
            if(msg == 'OK')
            {
	    if(jQuery('#purpose').val() == 'hold')
            result = '<center><div class="notification_ok">Thank you for holding a spot to begin a campaign.<br />We will contact you shortly to go over all of the details.</div></center>';
	    else if(jQuery('#purpose').val() == 'call')
	    result = '<center><div class="notification_ok">Thank You for completing this form.<br />We will contact you shortly to go over all of the details.</div></center>';
            jQuery("#theForm2").hide();
            }
            else
            {
            result = msg;
            }
            jQuery('#rightSide').html(result);
            });
            }
             });
            return false;
}

function clearFormName()
{
	if(document.myform.name.value == 'Enter Name')
		document.myform.name.value = '';
    else if(document.myform.name.value == '')
		document.myform.name.value = 'Enter Name';
}

function clearFormEmail()
{
        if(document.myform.email.value == 'Enter Email')
                document.myform.email.value = '';
        else if(document.myform.email.value == '')
                document.myform.email.value = 'Enter Email';
}

function clearNameField()
{
        if(document.myform.name.value == 'Your Name')
                document.myform.name.value = '';
        else if(document.myform.name.value == '')
                document.myform.name.value = 'Your Name';
}
function clearEmailField()
{
        if(document.myform.email.value == 'Email')
                document.myform.email.value = '';
        else if(document.myform.email.value == '')
                document.myform.email.value = 'Email';
}
function clearTeamNameField()
{
        if(document.myform.team.value == 'Team Name')
                document.myform.team.value = '';
        else if(document.myform.team.value == '')
                document.myform.team.value = 'Team Name';
}

function checkemail(str){
var filter=/^([\w-]+(?:\.[\w-]+)*)@((?:[\w-]+\.)*\w[\w-]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?)$/i
if (filter.test(str))
testresults=true
else{
alert("Please input a valid email address!")
testresults=false
}
return (testresults)
}

function checkPage(checker)
{
	pathArray = window.location.href.split( '/' );
	for(var x=3;x<pathArray.length;x++)
	{
	    if(pathArray[x] == checker)
	        return true;
	}
	return false;
}

function info_form()
{
	var filter=/^([\w-]+(?:\.[\w-]+)*)@((?:[\w-]+\.)*\w[\w-]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?)$/i;
	if(checkemail(jQuery('#email').val())){
	var str = jQuery("#theForm").serialize();
            jQuery.ajax({
               type: "POST",
               url: "/page-post.php",
               data: str,
               success: function(msg){
		            jQuery("#rightSide").ajaxComplete(function(event, request, settings){
						if(msg == 'OK')
						{
							//result = '<img width="400" height="293" src="/imgs/submission.jpg" /></div>';
							//document.getElementById('show_me_img').src='/imgs/submission.jpg';
							jQuery('#show_me_img').attr('src','/imgs/submission.jpg');
							jQuery("#myformy").remove();
							pageTracker._trackPageview('/formSubmit'); 
						}
						else
						{
							if(jQuery('#og').val() == 'Youth/Travel' && checkPage(''))
							{
								youthOverlay();
								//alert('Youth/Travel Selected');
							}
							jQuery('#show_me_form').html(msg);
							jQuery("#myformy").remove();
							pageTracker._trackPageview('/formSubmit');
							//result = msg;
							//alert(msg);
						}
						//jQuery('#show_me_form').html(result);
		            });
            	}
             });
	}
            return false;
}

