function licensing_customerscontent_licensing_BeforeShow(&$sender)
{
    $licensing_customerscontent_licensing_BeforeShow = true;
    $Component =& $sender;
    $Container =& CCGetParentContainer($sender);
    global $licensing_customerscontent;
    //Compatibility
    //End licensing_customerscontent_licensing_BeforeShow
    //Custom Code @225-2A29BDB7
    // -------------------------
    // Write your own code here.
    global $MainPage;
    $o = trim(CCGetFromGet("o", ""));
    $dguid = trim(CCGetFromGet("dguid", ""));
    $customer_guid = trim(CCGetFromGet("guid", ""));
    $querystring = CCGetQueryString("QueryString", array("o", "dguid"));
    switch ($o) {
        case "addsupport":
            $params = array();
            $params["guid"] = $dguid;
            $products = new Alm\Products();
            $license = $products->getLicenseByGuid($params);
            $license = $license["licenses"];
            $license = $license[0];
            //Returns an array, but this case will always return 1 record only
            if (count($license) >= 1) {
                $licensing_customerscontent->licensing->manufacturer->SetValue($license["id_manufacturer"]);
                $licensing_customerscontent->licensing->suite_code->SetValue($license["id_suite"]);
                $licensing_customerscontent->licensing->id_product_type->SetValue($license["id_product_type"]);
                $licensing_customerscontent->licensing->id_license_sector->SetValue($license["id_license_sector"]);
                //Product type 2 = hardware, 1 software, 3 and 4 not yet defined for this rule
                if ($license["id_product_type"] == 2) {
                    $licensing_customerscontent->licensing->id_license_type->SetValue("11");
                } else {
                    $licensing_customerscontent->licensing->id_license_type->SetValue("10");
                }
                //11 Code for product type software support
                $licensing_customerscontent->licensing->suitedescription->SetValue($license["suite_description"]);
                $licensing_customerscontent->licensing->id_reseller->SetValue($license["id_reseller"]);
                $licensing_customerscontent->licensing->id_licensed_by->SetValue($license["id_licensed_by"]);
                $licensing_customerscontent->licensing->licensed_amount->SetValue($license["licensed_amount"]);
                $licensing_customerscontent->licensing->nodes->SetValue($license["nodes"]);
                $licensing_customerscontent->licensing->granttype->SetValue($license["id_license_granttype"]);
                $licensing_customerscontent->licensing->grant_number->SetValue($license["grant_number"]);
                //Show general alert with duplication info taking place
                //global $CCSLocales;
                //CCSetSession("showglobal_alert","show");
                //$licensing_customerscontent->licensing->showglobal_alert->SetValue("show");
                //$licensing_customerscontent->licensing->lbtitle->SetValue($CCSLocales->GetText("duplicate_product"));
                //$licensing_customerscontent->licensing->lbmessage->SetValue($CCSLocales->GetText("duplicate_message"));
            }
            break;
        case "renew":
            $params = array();
            $params["guid"] = $dguid;
            $products = new Alm\Products();
            $license = $products->getLicenseByGuid($params);
            $license = $license["licenses"];
            $license = $license[0];
            //Returns an array, but this case will always return 1 record only
            if (count($license) >= 1) {
                $licensing_customerscontent->licensing->manufacturer->SetValue($license["id_manufacturer"]);
                $licensing_customerscontent->licensing->suite_code->SetValue($license["id_suite"]);
                $licensing_customerscontent->licensing->id_product_type->SetValue($license["id_product_type"]);
                $licensing_customerscontent->licensing->id_license_sector->SetValue($license["id_license_sector"]);
                $licensing_customerscontent->licensing->id_license_type->SetValue($license["id_license_type"]);
                $licensing_customerscontent->licensing->channel_sku->SetValue($license["channel_sku"]);
                $licensing_customerscontent->licensing->msrp_price->SetValue($license["msrp_price"]);
                $licensing_customerscontent->licensing->suitedescription->SetValue($license["suite_description"]);
                $licensing_customerscontent->licensing->id_reseller->SetValue($license["id_reseller"]);
                $licensing_customerscontent->licensing->id_licensed_by->SetValue($license["id_licensed_by"]);
                $licensing_customerscontent->licensing->licensed_amount->SetValue($license["licensed_amount"]);
                $licensing_customerscontent->licensing->nodes->SetValue($license["nodes"]);
                $licensing_customerscontent->licensing->granttype->SetValue($license["id_license_granttype"]);
                $licensing_customerscontent->licensing->id_product->SetValue($license["id_product"]);
            }
            break;
    }
    // -------------------------
    //End Custom Code
    //Close licensing_customerscontent_licensing_BeforeShow @154-9F545D26
    return $licensing_customerscontent_licensing_BeforeShow;
}