function ShowResourceCenter($lang)
{
    $current_user = wp_get_current_user();
    $_SESSION['CurrentUser'] = $current_user->ID;
    $_SESSION['current_user_email'] = $current_user->user_email;
    $_SESSION['DB_HOST'] = DB_HOST;
    $_SESSION['DB_NAME'] = DB_NAME;
    $_SESSION['DB_USER'] = DB_USER;
    $_SESSION['DB_PASSWORD'] = DB_PASSWORD;
    $_SESSION['PageSize'] = 10;
    $_SESSION['ImagePath'] = get_template_directory_uri() . '/images/';
    $_SESSION['ThemePath'] = get_template_directory_uri() . '/';
    $_SESSION['Lang'] = $lang;
    $StartPage = 1;
    $EndPage = 5;
    ?>
	<div id="primary" class="site-content">
		<div id="content" role="main">
        	<input type="hidden" id="QueryType" /> 
			<input name="keywords" type="hidden" id="keywords"> 
			<input name="keywords-advanced" type="hidden" id="keywords_advanced">
			<input name="investment-managers" type="hidden" id="investment-managers">
			<input name="mutual-funds" type="hidden" id="mutual-funds"> 
			<input name="asset-class" type="hidden" id="asset-class"> 
			<input name="region" type="hidden" id="region"> 
			<input name="investment-theme" type="hidden" id="investment-theme"> 
			<input name="document-type" type="hidden" id="document-type">    	
<?php 
    ShowResourceCenterMenu($lang);
    ?>
			<div id="ResourceCentreWrapper">
<?php 
    $action = $_REQUEST['RCPage'];
    ShowResourceCenterDetails($action, $lang);
    ?>
                    
          	</div>
	  	</div><!-- #content -->
	</div><!-- #primary -->
<?php 
}
       </div>
<?php 
        break;
    case 'AdvancedSearch':
        $form_name = $_REQUEST['form_name'];
        $lang = $_REQUEST['lang'];
        // display main menu system
        ShowResourceCenterDetails($form_name, $lang);
        break;
    case 'ShowRCPage':
        $form_name = $_REQUEST['FormName'];
        $lang = $_REQUEST['Lang'];
        // reset the page size //FIXES THE PAGINATION ISSUE
        $_SESSION['PageSize'] = 10;
        $_SESSION['current_language'] = $lang;
        ShowResourceCenterDetails($form_name, $lang);
        break;
}
function GetDisplayTableSpecs()
{
    if ($_REQUEST['OrderBy'] == 'undefined') {
        $OrderBy = 'Date';
    } else {
        $OrderBy = $_REQUEST['OrderBy'];
    }
    if ($_REQUEST['CurrentPage'] == 'undefined') {
        $CurrentPage = 1;
    } else {
        $CurrentPage = $_REQUEST['CurrentPage'];
    }
    if ($_REQUEST['PageSize'] == 'undefined') {