public static function ReplaceList($sListName, $aData){
            $oThis = self::CreateInstanceIfNotExists();
            $oThis->sBuffer = str_replace("{end}", "<?php } ?>", $oThis->sBuffer);
            $Offset = 0;

            $aC = "abcdefghijklmnopqrstuvxzywABCDEFGHIJKLMNOPQRSTUVXZWY";
            $sHash = "";

            for($i = 0; $i < 10; $i++)
                $sHash .= substr($aC, rand(0, strlen($aC)), 1);

            while(preg_match('/{list\:(.*?)}/i', $oThis->sBuffer, $aMatches, PREG_OFFSET_CAPTURE, $Offset)){
                if($aMatches[1][0] == $sListName){
                    if(!empty($aData))
                        $sList = "\${$sHash} = unserialize(base64_decode('". base64_encode(serialize($aData)) ."'));";
                    else
                        $sList = "\${$sHash} = array();";

                    $oThis->sBuffer = str_replace($aMatches[0][0], "<?php  ".$sList."\r\n if(count(\${$sHash}) > 0) foreach(\${$sHash} as \${$sListName}){ ?>", $oThis->sBuffer);
                }

                $Offset = $aMatches[0][1]+strlen($aMatches[0][0]);
            }

            $Offset = 0;

            while(preg_match('/{list\.(.*?)\.(.*?)}/i', $oThis->sBuffer, $aMatches, PREG_OFFSET_CAPTURE, $Offset)){
                $oThis->sBuffer = str_replace($aMatches[0][0], "<?php echo \$".$aMatches[1][0]."[\"".$aMatches[2][0]."\"]; ?>", $oThis->sBuffer);
                $Offset = $aMatches[0][1]+strlen($aMatches[0][0]);
            }
        }