////////////////////// Execute Functions As Needed ///////////////////////////////////////////////////////////////
//Execute the function on window load
window.onload=function(){
changePlaceholder();//replace movie placeholders where needed
}

/*////////////////////// Replace Images //////////////////////////////////////////////////////////////////////////
<img src="blah blah.jpg" name="placeholder"></a>
//////////////////////////////////////////////////////////////////////////////////////////////////////////////*/
function changePlaceholder(){

var siteRoot = 'http://' + location.host + '/'; 					//site root
var placeholder = document.images.placeholder; 						//placeholder image
var flashmovie = document.getElementById('flashmovie');		//flash movie
var imageRoot = "/images/placeholders/";									//root of the replacement images

if(window.document.location.href == siteRoot + 'calendar-of-events.htm'){
	placeholder.src = imageRoot + "mslm_image1.jpg";
	}
if(window.document.location.href == siteRoot + 'faqs.htm'){
	placeholder.src = imageRoot + "mslm_image2.jpg";
	}
if(window.document.location.href == siteRoot + 'about-us.htm'){
	placeholder.src = imageRoot + "AboutUsMainTab.jpg";
	}
if(window.document.location.href == siteRoot + 'history-1950s.htm'){
	placeholder.src = imageRoot + "movieplaceholderpic16.jpg";
	}
if(window.document.location.href == siteRoot + 'history-1960s.htm'){
	placeholder.src = imageRoot + "mslm_image6.jpg";
	}
if(window.document.location.href == siteRoot + 'history-1970s.htm'){
	placeholder.src = imageRoot + "mslm_image7.jpg";
	}
if(window.document.location.href == siteRoot + 'history-1980s.htm'){
	placeholder.src = imageRoot + "mslm_image8.jpg";
	}
if(window.document.location.href == siteRoot + 'history-1990s.htm'){
	placeholder.src = imageRoot + "history-90'sTab.jpg";
	}
if(window.document.location.href == siteRoot + 'history-2000-present.htm'){
	placeholder.src = imageRoot + "mslm_image10.jpg";
	}
if(window.document.location.href == siteRoot + 'mountain-info.htm'){
	placeholder.src = imageRoot + "mslm_image11.jpg";
	}
if(window.document.location.href == siteRoot + 'hours.htm'){
	placeholder.src = imageRoot + "mslm_image12.jpg";
	}
if(window.document.location.href == siteRoot + 'trail-map.htm'){
	placeholder.src = imageRoot + "mslm_image13.jpg";
	}
if(window.document.location.href == siteRoot + 'stats-services.htm'){
	placeholder.src = imageRoot + "mslm_image15.jpg";
	}
if(window.document.location.href == siteRoot + 'park-pipe.htm'){
	placeholder.src = imageRoot + "Park&PipeTab.jpg";
	}
if(window.document.location.href == siteRoot + 'conditions.htm'){
	placeholder.src = imageRoot + "Conditions.jpg";
	}
if(window.document.location.href == siteRoot + 'snow-report.htm'){
	placeholder.src = imageRoot + "SnowReportTab.jpg";
	}
if(window.document.location.href == siteRoot + 'ski-conditions.htm'){
	placeholder.src = imageRoot + "mslm_image19.jpg";
	}
if(window.document.location.href == siteRoot + 'weather-road.htm'){
	placeholder.src = imageRoot + "Weather&RoadTab.jpg";
	}
if(window.document.location.href == siteRoot + 'webcams.htm'){
	placeholder.src = imageRoot + "mslm_image22.jpg";
	}
if(window.document.location.href == siteRoot + 'snow-school.htm'){
	placeholder.src = imageRoot + "SNOW-SCHOOL.jpg";
	}
if(window.document.location.href == siteRoot + 'directors-message.htm'){
	placeholder.src = imageRoot + "Directors-Message.jpg";
	}
if(window.document.location.href == siteRoot + 'jims-snow-school-academy.htm'){
	placeholder.src = imageRoot + "Jims-Snow-School-Academy.jpg";
	}
if(window.document.location.href == siteRoot + 'what-is-my-ability.htm'){
	placeholder.src = imageRoot + "Whats-my-Ability-Tab.jpg";
	}
if(window.document.location.href == siteRoot + 'snow-school-faqs.htm'){
	placeholder.src = imageRoot + "SnowSchool-FAQS.jpg";
	}
if(window.document.location.href == siteRoot + 'daily-session-rates.htm'){
	placeholder.src = imageRoot + "Daily-Session-Rates.jpg";
	}
if(window.document.location.href == siteRoot + '8-week-program.htm'){
	placeholder.src = imageRoot + "8-week-Program.jpg";
	}
if(window.document.location.href == siteRoot + 'kids-weekend-programs.htm'){
	placeholder.src = imageRoot + "KidsProgram.jpg";
	}
if(window.document.location.href == siteRoot + 'session-request.htm'){
	placeholder.src = imageRoot + "SessionRequest.jpg";
	}
if(window.document.location.href == siteRoot + 'rates.htm'){
	placeholder.src = imageRoot + "mslm_image32.jpg";
	}
if(window.document.location.href == siteRoot + 'daily-rates.htm'){
	placeholder.src = imageRoot + "DailyRatesTab.jpg";
	}
if(window.document.location.href == siteRoot + 'daily-rentals.htm'){
	placeholder.src = imageRoot + "DailyRantalTab.jpg";
	}
if(window.document.location.href == siteRoot + 'group-rates.htm'){
	placeholder.src = imageRoot + "GroupRatesTab.jpg";
	}
if(window.document.location.href == siteRoot + 'daily-session-rates.htm'){
	placeholder.src = imageRoot + "DailySessionTab.jpg";
	}
if(window.document.location.href == siteRoot + 'group-information.htm'){
	placeholder.src = imageRoot + "mslm_image37.jpg";
	}
if(window.document.location.href == siteRoot + 'race-rates.htm'){
	placeholder.src = imageRoot + "RaceRatesTab.jpg";
	}
if(window.document.location.href == siteRoot + 'memberships.htm'){
	placeholder.src = imageRoot + "MembershipTab.jpg";
	}
if(window.document.location.href == siteRoot + 'student-trips.htm'){
	placeholder.src = imageRoot + "StudentTripMainTab.jpg";
	}
if(window.document.location.href == siteRoot + 'trip-information.htm'){
	placeholder.src = imageRoot + "TripInformationTab.jpg";
	}
if(window.document.location.href == siteRoot + 'alpine-responsibility-code.htm'){
	//placeholder.src = imageRoot + "mslm_image42.jpg";
	placeholder.src = imageRoot + "warning.jpg";
	}
if(window.document.location.href == siteRoot + 'rental-forms.htm'){
	placeholder.src = imageRoot + "RentalFormsTab.jpg";
	}
if(window.document.location.href == siteRoot + 'education-rates.htm'){
	placeholder.src = imageRoot + "EducationRates.jpg";
	}
if(window.document.location.href == siteRoot + 'special-needs.htm'){
	placeholder.src = imageRoot + "SpecialNeedsTab.jpg";
	}
if(window.document.location.href == siteRoot + 'reserving-your-trip.htm'){
	placeholder.src = imageRoot + "mslm_image46.jpg";
	}
if(window.document.location.href == siteRoot + 'how-to-get-here.htm'){
	placeholder.src = imageRoot + "HowToGetHere-MainTab.jpg";
	}
if(window.document.location.href == siteRoot + 'amenities.htm'){
	placeholder.src = imageRoot + "mslm_image48.jpg";
	}
if(window.document.location.href == siteRoot + 'accommodations.htm'){
	placeholder.src = imageRoot + "mslm_image17.jpg";
	}
if(window.document.location.href == siteRoot + 'day-care.htm'){
	placeholder.src = imageRoot + "Amenites-DayCare.jpg";
	}
if(window.document.location.href == siteRoot + 'lost-and-found.htm'){
	placeholder.src = imageRoot + "mslm_image30.jpg";
	}
if(window.document.location.href == siteRoot + 'responsibility-code.htm'){
	placeholder.src = imageRoot + "ResponsibilityCodeTab.jpg";
	}
if(window.document.location.href == siteRoot + 'join-our-team.htm'){
	placeholder.src = imageRoot + "JoinourTeam.jpg";
	}
if(window.document.location.href == siteRoot + 'contact-us.htm'){
	placeholder.src = imageRoot + "mslm_image23.jpg";
	}
if(window.document.location.href == siteRoot + 'webcam.htm'){
	placeholder.src = imageRoot + "webcamtab.jpg";
	}

}//end changePlaceholder

function openwindow(url,w,h)
{

  var winwidth = screen.availWidth;
  var winheight = screen.availHeight;
  var leftt=Math.floor((winwidth/2)-(w/2));
  var topt=Math.floor((winheight/2)-(h/2));
  window.open(url,'popup','left='+leftt+',top='+topt+',width='+w+', height='+h+', toolbar=0,  location=0, directories=0,status=0, titlebar=0, menubar=0, resizable=1, scrollbars=1')
};
