/** AppCountry.class.js
*
* @desc country-specific functions for the whole page
*  
* @author DEV5
* @copyright iMeal Ltd.
* @package iMeal
* @version 1.00.20101016
* @kit ignore
* 
* @revision 2010-10-16 DEV5: file created
* @revision 2010-10-11 DEV5: new design and new features uploaded
*/

var AppCountry = function()
{
    return {
        formatDate : function(oDate)
        {
            var nMonth = oDate.getMonth() + 1;
            var sMonth = (nMonth.toString().length == 2) ? nMonth : "0" + nMonth;
            var sYear = oDate.getFullYear();
            var sDate = (oDate.getDate().toString().length == 2) ? oDate.getDate() : "0" + oDate.getDate();
            var sHours = (oDate.getHours().toString().length == 2) ? oDate.getHours() : "0" + oDate.getHours();
            var sMinutes = (oDate.getMinutes().toString().length == 2) ? oDate.getMinutes() : "0" + oDate.getMinutes();
            
            switch(sCountryCode)
            {
                case "AT":
                    return sDate + "." + sMonth + "." + sYear + " " + sHours + ":" + sMinutes;
                    break;
                case "GB":
                    return sYear + "-" + sMonth + "-" + sDate + " " + sHours + ":" + sMinutes;
                    break;
            }
        }
    }
}();
