﻿//Create the Reminder Object
var locker_isLocked = 0;
var Reminder = {
    Version: "1.1.0",
    Build: "1",
    ReleaseDate: "June 11, 2009",
    LastModifiedDate: "January 28, 2010", //Without AJAX
    Projects: "CRM|Altair|AptecOnline|GoNow",
    
    UI: {
        toggleDiv: function(id , action){
            if(action.toLowerCase() == 'open'){
                if($(id).style.display != 'block' ) locker_isLocked += 1;
                $(id).style.display = 'block';
                $('cbg2').style.display = 'block';
                
            }
            if(action.toLowerCase() == 'close'){
                if($(id).style.display == 'block') locker_isLocked -= 1;
                $(id).style.display = 'none';
                if(locker_isLocked == 0) $('cbg2').style.display = 'none';
            }
        },
        
        showDiv: function(id){
            $(id).style.display = 'block';
            $('cbg2').style.display = 'block';
        },
        
        hideDiv: function(id){
            $(id).style.display = 'none';
            $('cbg2').style.display = 'none';
        },
        
        changeContent: function(id,toggle){
            
            if (toggle == 1)         
            {
                $(id).innerHTML = '<p><img id="img" src="Images/Cargo.gif" border="0"/><b>GoNow - Air Cargo Services</b><p>GoNow has identified a growing market for the ad-hoc transportation of cargo. Scheduled air cargo services may not meet the time and cost requirements of niche customers requiring a bespoke cargo service. GoNow has therefore identified those AOC charter operators that also hold a cargo approval as part of their AOC. This will include large, specialised cargo aircraft as well as smaller private jets that have approval to carry separate cargo within their baggage hold. This way GoNow can bring you tailored solution to carrying your cargo to anywhere in the world, whatever your cost requirement.</p><p>To book an Air Cargo flight simply click on the Air Cargo tab in the main Booking Box and select your routing as normal. In order to give you the most tailored options we request that you provide us with the number of accompanying passengers on the flights and the approximate weight of the cargo. Later in the booking stage we request a brief description of the cargo and volume. Our operators will get in touch with you to clarify the state of the cargo and coordinate transfers.</p><div style="float:right;"><a id="lnk_1" href="" onclick="Reminder.UI.changeContent(\'content_layer_1\',2);return false;"">GoNow - Air Ambulance Services</a></div>';
                  
            }
            if (toggle == 2)
            {
                $(id).innerHTML = '<p><img id="img" src="Images/Ambulance.gif" border="0"/><b>GoNow - Air Ambulance Services</b></p><p>GoNow has partnered with several leading Air Ambulance operators worldwide to give you the widest possible choice in booking patient transfer flights. All Air Ambulances are fully approved AOC operators with qualified medical staff onboard. There are a range of Ambulance aircraft available from Light Jets with single patient facilities to Heavy Jets with multiple patient berths and full medical facilities.</p><p>Booking an Air Ambulance flight is as easy as any other Private Jet flight. Just click on the Air Ambulance tab in the main Booking Box and select your routing as normal. Then simply add the number of patients (requiring stretchers and medical equipment) and the number of accompanying passengers. Our system will only search available, fully approved Air Ambulance operators to give you all available patient transfer options.</p><div style="float:right;"><a id="lnk_2" href="" onclick="Reminder.UI.changeContent(\'content_layer_1\',1);return false;"">GoNow - Air Cargo Services</a></div>';
                
            }   
            
        }
    }

    //execute directly without pending [self-executable function]
    /*
    init: (function(){
        setTimeout( function(){
            Reminder.Ajax.sendRequest({"_do":"get_data"});
        }, 5000);
    })()
    */
};

function $(){
    var elements = new Array();
    for (var i = 0 ; i < arguments.length ; i++) {
        var element = arguments[i];
        if ( typeof element == 'string' ) element = document.getElementById(element);
        if ( arguments.length == 1 ) return element;
        elements.push( element );
    }
    return elements;
}