

	Df.importModule('Df.Lightbox');
	
	flashPage = function(str){
		SWFAddress.setValue(str);
	}
	
Event.observe(window, 'load', function(e){
/*		
	var customContentCompare ='<img border="0" src="/maxfli08/images/ballChart.gif" />';
	
	$('compareBalls').observe('click', function(){
		if (Df.Lightbox._modal){
			removeDialogs();
		}
		Df.Lightbox.pars.dialog.className = 'df_modal_dialog_ballchart';
		Df.Lightbox.pars.dialog.animate = {opacity:1};
		Df.Lightbox.pars.dialog.title = "";
		Df.Lightbox.getDialog().element.setStyle({opacity:0});	
		
		Df.Lightbox.getDialogContent().update(customContentCompare);
		Df.Lightbox.show();
	});*/
	var customContentAbout ='<img src="/maxfli08/images/maxAboutHdr.jpg"/><p>Maxfli has been a leader in golf for more than 80 years. Many golf professionals have played Maxfli with outstanding results. The Maxfli brand is trusted to deliver performance by consistently incorporating proven technological advancements into our products.</p>';
	
	$('aboutMax').observe('click', function(){
		if (Df.Lightbox._modal){
			removeDialogs();
		}
		Df.Lightbox.pars.dialog.className = 'df_modal_dialog_aboutmax';
		Df.Lightbox.pars.dialog.animate = {opacity:1};
		Df.Lightbox.pars.dialog.title = "";
		Df.Lightbox.getDialog().element.setStyle({opacity:0});	
		
		Df.Lightbox.getDialogContent().update(customContentAbout);
		Df.Lightbox.show();
	});
	
	
	var customContentContactForm ='<iframe id="contactFrame" src="http://www.dickssportinggoods.com/maxfli08/contactForm.jsp" frameborder=”0" height="400px" width="400px"></iframe>';
	
	$('contactFormBut').observe('click', function(){
		if (Df.Lightbox._modal){
			removeDialogs();
		}
		Df.Lightbox.pars.dialog.className = 'df_modal_dialog_contactform';
		Df.Lightbox.pars.dialog.animate = {opacity:1};
		Df.Lightbox.pars.dialog.title = "";
		Df.Lightbox.getDialog().element.setStyle({opacity:0});	
		
		Df.Lightbox.getDialogContent().update(customContentContactForm);
		Df.Lightbox.show();
		
	});
	
	removeDialogs = function(){
		$$(Df.Lightbox.pars.dialog.className).each(function(ele){
			ele.remove();
		});
		
		$$(Df.Lightbox.pars.modal.className).each(function(ele){
			ele.remove();
		});
											
		Df.Lightbox._modal = false;
		Df.Lightbox._dialog = false;
		
		return true;
	}
	formSubmittedScript = function(){
		Df.Lightbox.hide();
		
		if (Df.Lightbox._modal){
			removeDialogs();
		}
		var customContentThanks ='<h4>THANK YOU</h4><p>Thank you for contacting us! We will respond to your inquiry as quickly as possible.</p><img id="closeThanksBut" src="/maxfli08/images/thanksClose.jpg"/>';
		Df.Lightbox.pars.dialog.className = 'df_modal_dialog_thanks';
		Df.Lightbox.pars.dialog.animate = {opacity:1};
		Df.Lightbox.pars.dialog.title = "";
		Df.Lightbox.getDialog().element.setStyle({opacity:0});	
		
		Df.Lightbox.getDialogContent().update(customContentThanks);
		Df.Lightbox.show();
		
		$('closeThanksBut').observe('click', function(c){
			Df.Lightbox.hide();
		});
	};
	
		
});