// Copyright Notice:
//			     calendar_config.js v1.0.1
//			Copyright@2008 - OpenSiteMobile
//				All rights reserved
// ==========================================================================
//			http://www.opensitemobile.com
// ==========================================================================
// Contact Information:
//			Author: Dwight Vietzke
//			Email:  dwight_vietzke@yahoo.com

/*
	OpenSiteMobile calendar configuration w/ heavy dojo integration
*/

dojo.provide("msos.calendar_config");


// Set global calendar parameters for your website here, then change them in page
// as necessary for specific calendar start/end dates etc.

msos.calendar_config.create = function() {

    // Std date format as expressed by dojo.date.locale (what will be the final input format)
    this.std_in_out_date_format = { formatLength:'medium', selector:'date' };

    // Set an intial display date like 'new Date(2006, 0, 1)'
    this.initial_date = null;

    // Enter upper most and/or lower most avail.
    this.cal_top_date = new Date();		// Set upper	(using today's date)
    this.cal_bot_date = new Date(2006, 0, 1);	// Set lower	(year, month index, day)

    // Alternate input formats as accepted by dojo.date.locale (what can be parsed before conversion)
    this.alt_input_date_formats = [
	{ selector:'date', formatLength:'long'  },
	{ selector:'date', formatLength:'short' }
    ];

    // Language specific alternate input formats (to add flexibility to input acceptance)
    this.lang_specific_date_formats = {
	en: [
	    { selector:'date', datePattern: "MMMd,yyyy" },
	    { selector:'date', datePattern:"MMMMd,yyyy" },
	    { selector:'date', datePattern:"MM.d.yyyy" },
	    { selector:'date', datePattern:"MM-d-yyyy" }
	]
    };

    // Adjust initial calendar placement in px's (relative to input, numeric value only)
    this.adj_left = 5;
    this.adj_top = 10;

    // Set True/False calendar controls
    this.close_cal_on_date_pick = true;
    this.exec_on_complete = true;
    this.display_prior_mon_days = true;
    this.display_next_mon_days = true;
    this.pick_weekdays = true;
    this.pick_weekends = true;
    this.pick_prior_mon_days = true;
    this.pick_next_mon_days = true;
    this.position_below = true;
    this.use_prior_next_links = true;
    this.use_today_date_link = true;
    this.use_no_date_link = true;
    this.use_six_rows = true;

    // Dojo style date format
    this.day_title_format = "shrt_day";

    // Calendar spacing characters
    this.blank_date_text = "";
    this.next_month_text = " »";
    this.prior_month_text = "« ";
    this.prior_next_na = " - ";

    // Suppress IE element show-thru
    this.ie_element_suppression = ['select', 'object', 'applet'];
}