/**** Window Load Functions ****/
window.onload = function()
{
	ob_win_eff = new WindowEffects();
	ob_bro_det = new BrowserDetails();
	
	if(window.popup_window_flag != undefined)
		ob_win_eff.PopUpsInit();
		// <a href="page.html" class="open_popup" rel="450x350">

	if(window.page_form_flag != undefined)
		ob_for_eff = new FormEffects();
	
	if(window.copy_form_fields_flag != undefined)
		ob_for_eff.CopyFormFieldsInit();
		
	if(window.check_all_boxes_flag != undefined)
		ob_for_eff.CheckAllBoxesInit();
		
	if(window.toggle_display_flag != undefined)
		ob_win_eff.ToggleDisplayInit();
		// Only works on toggling block elements for now
		
	if(window.flip_display_flag != undefined)
		ob_win_eff.FlipDisplayInit();
		// Only works on toggling block elements for now
	
	if(window.required_fields_flag != undefined)
	{
		ob_for_eff.RequiredFieldsInit();
		ob_for_eff.FormSubmitInit();
	}
	
	if(window.clear_fields_flag != undefined)
		ob_for_eff.ClearFormFields();
	
	if(window.confirm_click_flag != undefined)
		ob_win_eff.ConfirmClickInit();
		// <a href="page.html" class="confirm_click" title="Confirm message here">
		// <input type="submit" name="whatever" value=""  class="confirm_click" title="Confirm message here">
		// A question mark is added to the end of the title eg. Confirm message here?
	
	if(window.marquee_scroller_flag != undefined)
		ob_win_eff.InitMarqueeScroller(marquee_scroller_flag);
	
	if(window.quick_slideshow_flag != undefined)
		ob_win_eff.InitQuickSlideshow(quick_slideshow_flag);

}


/**** Visitor Browser ****/
function BrowserDetails()
{
	this.ua = navigator.userAgent;
	
	this.match_opera = "Opera";
	this.is_opera = false;
	
	this.match_gecko = "Gecko";
	this.is_gecko = false;
	
	this.match_msie = "MSIE";
	this.is_msie = false;
	
	this.match_msie7 = "MSIE 7";
	this.is_msie7 = false;
	
	this.match_safari = "Safari";
	this.is_safari = false;
	
	if(this.ua.search(this.match_opera) != -1)
		this.is_opera = true;
	else if(this.ua.search(this.match_gecko) != -1)
		this.is_gecko = true;
	else if(this.ua.search(this.match_msie) != -1)
	{
		this.is_msie = true;
		if(this.ua.search(this.match_msie7) != -1)
		{
			this.is_msie7 = true;
			this.is_msie = false;
		}
	}
	else if(this.ua.search(this.match_safari) != -1)
		this.is_safari = true;
	
	return this;
}


