/* ##################################################################
 *    LillyApps, LLC
 * ##################################################################
 *
 *    Copyright          : (C) 2010 LillyApps, LLC
 *    Contact            : jimmy@lillyapps.com
 *
 *    - LillyApps and all of its source code and files are protected by Copyright Laws.
 *
 *    - The license for LillyApps denies you from copying this work.
 *
 *    - You may also not remove this copyright screen which shows the copyright information and credits for LillyApps.
 *
 * ##################################################################
 *****************************************************************************/

/****************************************************
 * General Functions
 ***************************************************/


function $doc(para) {
    return document.getElementById(para);
}


function Focus1stField() {
    // Generic
    if( $doc('idFirstField') ) {
        try {
            $doc('idFirstField').focus();
        }
        catch(err) {}
        return;
    }

    // On Payment page
    if( $doc('idProgrammingAmt') ) {
        try {
            $doc('idProgrammingAmt').focus();
            $doc('idProgrammingAmt').select();
        }
        catch(err) {}
        return;
    }

    // On Ad Banner Payment page
    if( $doc('inpPlan1') ) {
        $doc('inpPlan1').checked = 'checked';
        $doc('inpLevel1').checked = 'checked';
        $doc('inpSize1').checked = 'checked';
        $doc('inpLength1').checked = 'checked';
        ChangePlan('1');
        ChangeLevel('1');
        ChangeSize('1');
        ChangeLength('1');
        try {
            $doc('inpPlan1').focus();
        }
        catch(err) {}
        return;
    }
}


function GetURL(url) {
    var host = window.location.protocol + '//' + window.location.hostname;
    var path = url;

    return host + url;
}

