Mootools errors help please
I have this mootools code but I get some errors that I need help with please:

    echo 
            "<script language=\"javascript\" type=\"text/javascript\">\n".
            "var praiseShowStartImage_".$moduleInstanceId." = '".$startImage."';\n".
            "var praiseShowImageOrder_".$moduleInstanceId." = '".$imageOrder."';\n".
            "var praiseShowPingPong_".$moduleInstanceId." = ".$pingPong.";\n".
            "var praiseShowImageCount_".$moduleInstanceId." = ".$index.";\n".
            "var praiseShowFxs_".$moduleInstanceId." = new Array();\n".
            "var praiseShowCurrentImageIndex_".$moduleInstanceId.";\n".
            "var praiseShowPlayCount_".$moduleInstanceId." = ".$playCount.";\n".
            "var praiseShowCurrentPlayCount_".$moduleInstanceId." = 0;\n".
            "if(praiseShowStartImage_".$moduleInstanceId." == 'random')\n".
            "{\n".
            "   praiseShowCurrentImageIndex_".$moduleInstanceId." = Math.floor(Math.random()*praiseShowImageCount_".$moduleInstanceId.");\n".
            "}\n".
            "else if(praiseShowStartImage_".$moduleInstanceId." == 'last_seen')\n".
            "{\n".
            "   praiseShowCurrentImageIndex_".$moduleInstanceId." = Cookie.get('praiseShowLastIndex_".$moduleInstanceId."');\n".
            "   if(!praiseShowCurrentImageIndex_".$moduleInstanceId.") { praiseShowCurrentImageIndex_".$moduleInstanceId." = 0; }\n".
            "}\n".
        "else if(praiseShowImageOrder_".$moduleInstanceId." == 'backward')\n".
        "{\n".
        "   praiseShowCurrentImageIndex_".$moduleInstanceId." = praiseShowImageCount_".$moduleInstanceId." - 1;\n".
        "}\n".
        "else\n".
        "{\n".
        "   praiseShowCurrentImageIndex_".$moduleInstanceId." = 0;\n".
        "}\n".
        "window.addEvent('domready',function() {\n".
        $domreadyScript.
        "});\n".
        "window.addEvent('load',function() {\n".
        "   var coords = $('".$containerTagId."').getCoordinates();\n".
        "   var elImage;\n".
        "   var elImageCoords;\n".
        "   $$('.mod_imageshowcase_div_".$moduleInstanceId."').each(function(el, i)\n".
        "   {\n".
        "       elImage = el.getElement('.mod_imageshowcase_image');\n";
    
        if($imageScaleMode == "fit_both" || $imageScaleMode == "fit_height")
        {
        echo "          elImage.setStyle('height', coords.height + 'px');\n";
        }
        if($imageScaleMode == "fit_both" || $imageScaleMode == "fit_width")
        {
        echo "          elImage.setStyle('width', coords.width + 'px');\n";
        }
    
        if($imageScaleMode != "fit_both")
        {
        switch($imageVerticalAlign)
        {
        case "top":
        $jsVerticalAlignText = "0";
        break;
        case "center":
        $jsVerticalAlignText = "(coords.height/2 - elImageCoords.height/2)";
        break;
        case "bottom":
        default:
        $jsVerticalAlignText = "(coords.height - elImageCoords.height)";
        break;
        }
        switch($imageHorizontalAlign)
        {
        case "left":
        $jsHorizontalAlignText = "0";
        break;
        case "center":
        $jsHorizontalAlignText = "(coords.width/2 - elImageCoords.width/2)";
        break;
        case "right":
        default:
        $jsHorizontalAlignText = "(coords.width - elImageCoords.width)";
        break;
        }
        echo
        "       elImageCoords = elImage.getCoordinates();\n".
        "       elImage.setStyle('left', ".$jsHorizontalAlignText." + 'px');\n".
        "       elImage.setStyle('top', ".$jsVerticalAlignText." + 'px');\n";
        }
        echo 
        "       if(i == praiseShowCurrentImageIndex_".$moduleInstanceId.") { var targetOpacity = 1; el.setStyle('opacity', targetOpacity); }\n".
        "       else { var targetOpacity = 0; el.setStyle('opacity', targetOpacit); }\n".
        "       praiseShowFxs_".$moduleInstanceId."[i] = Fx.Tween(el, {\n".
        "           link: 'cancel',\n".
        "           duration: " . $transition_time . ",\n".
        "           transition: Fx.Transitions.Quart.easeInOut,\n".
        "           property: 'opacity'\n".
        "       }).start(targetOpacity);\n".
        "   });\n".
        "   switchImage_".$moduleInstanceId.".periodical(" . ($delay_time + $transition_time) . ");\n".
        "});\n".
        "var switchImage_".$moduleInstanceId." = function()\n".
        "{\n".
        "   var nextImageIndex = praiseShowCurrentImageIndex_".$moduleInstanceId.";\n".
        "   switch(praiseShowImageOrder_".$moduleInstanceId.")\n".
        "   {\n".
        "       case 'random':\n".
        "           while(nextImageIndex == praiseShowCurrentImageIndex_".$moduleInstanceId." && praiseShowImageCount_".$moduleInstanceId." > 0)\n".
        "           {\n".
        "               nextImageIndex = Math.floor(Math.random()*praiseShowImageCount_".$moduleInstanceId.");\n".
        "           }\n".
        "           break;\n".
        "       case 'backward':\n".
        "           nextImageIndex = praiseShowCurrentImageIndex_".$moduleInstanceId." - 1;\n".
        "           if(nextImageIndex < 0) {\n".
        "               if(praiseShowPingPong_".$moduleInstanceId.") {\n".
        "                   praiseShowImageOrder_".$moduleInstanceId." = 'forward';\n".
        "                   nextImageIndex = 1;\n".
        "                   praiseShowCurrentPlayCount_".$moduleInstanceId."++;\n".
        "               } else {\n".
        "                   nextImageIndex = praiseShowImageCount_".$moduleInstanceId." - 1;\n".
        "               }\n".
        "           }\n".
        "           break;\n".
        "       default:\n".
        "           nextImageIndex = praiseShowCurrentImageIndex_".$moduleInstanceId." + 1;\n".
        "           if(nextImageIndex >= praiseShowImageCount_".$moduleInstanceId.") {\n".
        "               if(praiseShowPingPong_".$moduleInstanceId.") {\n".
        "                   praiseShowImageOrder_".$moduleInstanceId." = 'backward';\n".
        "                   nextImageIndex = praiseShowImageCount_".$moduleInstanceId." - 2;\n".
        "                   praiseShowCurrentPlayCount_".$moduleInstanceId."++;\n".
        "               } else {\n".
        "                   nextImageIndex = 0;\n".
        "               }\n".
        "           }\n".
        "           break;\n".
        "   }\n".
        "   praiseShowCurrentPlayCount_".$moduleInstanceId."++;\n".
        "   if(praiseShowPlayCount_".$moduleInstanceId." == 0 || praiseShowCurrentPlayCount_".$moduleInstanceId." < praiseShowPlayCount_".$moduleInstanceId."*praiseShowImageCount_".$moduleInstanceId.") {\n".
        "       praiseShowFxs_".$moduleInstanceId."[praiseShowCurrentImageIndex_".$moduleInstanceId."].start(1, 0);\n".
        "       praiseShowFxs_".$moduleInstanceId."[nextImageIndex].start(0, 1);\n".
        "       praiseShowCurrentImageIndex_".$moduleInstanceId." = nextImageIndex;\n".
        "       Cookie.set('praiseShowLastIndex_".$moduleInstanceId."', praiseShowCurrentImageIndex_".$moduleInstanceId.");\n".
        "   }\n".
        "}\n".
        "</script>\n";

First, it gives me an error of 
**Fx.Tween(el, {link: "cancel", duration: 1540, transition: Fx.Transitions.Quart.easeInOut, property: "opacity"}).start is not a function**

Mootools errors help please
===

I have this mootools code but I get some errors that I need help with please:

    echo 
            "<script language=\"javascript\" type=\"text/javascript\">\n".
            "var praiseShowStartImage_".$moduleInstanceId." = '".$startImage."';\n".
            "var praiseShowImageOrder_".$moduleInstanceId." = '".$imageOrder."';\n".
            "var praiseShowPingPong_".$moduleInstanceId." = ".$pingPong.";\n".
            "var praiseShowImageCount_".$moduleInstanceId." = ".$index.";\n".
            "var praiseShowFxs_".$moduleInstanceId." = new Array();\n".
            "var praiseShowCurrentImageIndex_".$moduleInstanceId.";\n".
            "var praiseShowPlayCount_".$moduleInstanceId." = ".$playCount.";\n".
            "var praiseShowCurrentPlayCount_".$moduleInstanceId." = 0;\n".
            "if(praiseShowStartImage_".$moduleInstanceId." == 'random')\n".
            "{\n".
            "   praiseShowCurrentImageIndex_".$moduleInstanceId." = Math.floor(Math.random()*praiseShowImageCount_".$moduleInstanceId.");\n".
            "}\n".
            "else if(praiseShowStartImage_".$moduleInstanceId." == 'last_seen')\n".
            "{\n".
            "   praiseShowCurrentImageIndex_".$moduleInstanceId." = Cookie.get('praiseShowLastIndex_".$moduleInstanceId."');\n".
            "   if(!praiseShowCurrentImageIndex_".$moduleInstanceId.") { praiseShowCurrentImageIndex_".$moduleInstanceId." = 0; }\n".
            "}\n".
        "else if(praiseShowImageOrder_".$moduleInstanceId." == 'backward')\n".
        "{\n".
        "   praiseShowCurrentImageIndex_".$moduleInstanceId." = praiseShowImageCount_".$moduleInstanceId." - 1;\n".
        "}\n".
        "else\n".
        "{\n".
        "   praiseShowCurrentImageIndex_".$moduleInstanceId." = 0;\n".
        "}\n".
        "window.addEvent('domready',function() {\n".
        $domreadyScript.
        "});\n".
        "window.addEvent('load',function() {\n".
        "   var coords = $('".$containerTagId."').getCoordinates();\n".
        "   var elImage;\n".
        "   var elImageCoords;\n".
        "   $$('.mod_imageshowcase_div_".$moduleInstanceId."').each(function(el, i)\n".
        "   {\n".
        "       elImage = el.getElement('.mod_imageshowcase_image');\n";
    
        if($imageScaleMode == "fit_both" || $imageScaleMode == "fit_height")
        {
        echo "          elImage.setStyle('height', coords.height + 'px');\n";
        }
        if($imageScaleMode == "fit_both" || $imageScaleMode == "fit_width")
        {
        echo "          elImage.setStyle('width', coords.width + 'px');\n";
        }
    
        if($imageScaleMode != "fit_both")
        {
        switch($imageVerticalAlign)
        {
        case "top":
        $jsVerticalAlignText = "0";
        break;
        case "center":
        $jsVerticalAlignText = "(coords.height/2 - elImageCoords.height/2)";
        break;
        case "bottom":
        default:
        $jsVerticalAlignText = "(coords.height - elImageCoords.height)";
        break;
        }
        switch($imageHorizontalAlign)
        {
        case "left":
        $jsHorizontalAlignText = "0";
        break;
        case "center":
        $jsHorizontalAlignText = "(coords.width/2 - elImageCoords.width/2)";
        break;
        case "right":
        default:
        $jsHorizontalAlignText = "(coords.width - elImageCoords.width)";
        break;
        }
        echo
        "       elImageCoords = elImage.getCoordinates();\n".
        "       elImage.setStyle('left', ".$jsHorizontalAlignText." + 'px');\n".
        "       elImage.setStyle('top', ".$jsVerticalAlignText." + 'px');\n";
        }
        echo 
        "       if(i == praiseShowCurrentImageIndex_".$moduleInstanceId.") { var targetOpacity = 1; el.setStyle('opacity', targetOpacity); }\n".
        "       else { var targetOpacity = 0; el.setStyle('opacity', targetOpacit); }\n".
        "       praiseShowFxs_".$moduleInstanceId."[i] = Fx.Tween(el, {\n".
        "           link: 'cancel',\n".
        "           duration: " . $transition_time . ",\n".
        "           transition: Fx.Transitions.Quart.easeInOut,\n".
        "           property: 'opacity'\n".
        "       }).start(targetOpacity);\n".
        "   });\n".
        "   switchImage_".$moduleInstanceId.".periodical(" . ($delay_time + $transition_time) . ");\n".
        "});\n".
        "var switchImage_".$moduleInstanceId." = function()\n".
        "{\n".
        "   var nextImageIndex = praiseShowCurrentImageIndex_".$moduleInstanceId.";\n".
        "   switch(praiseShowImageOrder_".$moduleInstanceId.")\n".
        "   {\n".
        "       case 'random':\n".
        "           while(nextImageIndex == praiseShowCurrentImageIndex_".$moduleInstanceId." && praiseShowImageCount_".$moduleInstanceId." > 0)\n".
        "           {\n".
        "               nextImageIndex = Math.floor(Math.random()*praiseShowImageCount_".$moduleInstanceId.");\n".
        "           }\n".
        "           break;\n".
        "       case 'backward':\n".
        "           nextImageIndex = praiseShowCurrentImageIndex_".$moduleInstanceId." - 1;\n".
        "           if(nextImageIndex < 0) {\n".
        "               if(praiseShowPingPong_".$moduleInstanceId.") {\n".
        "                   praiseShowImageOrder_".$moduleInstanceId." = 'forward';\n".
        "                   nextImageIndex = 1;\n".
        "                   praiseShowCurrentPlayCount_".$moduleInstanceId."++;\n".
        "               } else {\n".
        "                   nextImageIndex = praiseShowImageCount_".$moduleInstanceId." - 1;\n".
        "               }\n".
        "           }\n".
        "           break;\n".
        "       default:\n".
        "           nextImageIndex = praiseShowCurrentImageIndex_".$moduleInstanceId." + 1;\n".
        "           if(nextImageIndex >= praiseShowImageCount_".$moduleInstanceId.") {\n".
        "               if(praiseShowPingPong_".$moduleInstanceId.") {\n".
        "                   praiseShowImageOrder_".$moduleInstanceId." = 'backward';\n".
        "                   nextImageIndex = praiseShowImageCount_".$moduleInstanceId." - 2;\n".
        "                   praiseShowCurrentPlayCount_".$moduleInstanceId."++;\n".
        "               } else {\n".
        "                   nextImageIndex = 0;\n".
        "               }\n".
        "           }\n".
        "           break;\n".
        "   }\n".
        "   praiseShowCurrentPlayCount_".$moduleInstanceId."++;\n".
        "   if(praiseShowPlayCount_".$moduleInstanceId." == 0 || praiseShowCurrentPlayCount_".$moduleInstanceId." < praiseShowPlayCount_".$moduleInstanceId."*praiseShowImageCount_".$moduleInstanceId.") {\n".
        "       praiseShowFxs_".$moduleInstanceId."[praiseShowCurrentImageIndex_".$moduleInstanceId."].start(1, 0);\n".
        "       praiseShowFxs_".$moduleInstanceId."[nextImageIndex].start(0, 1);\n".
        "       praiseShowCurrentImageIndex_".$moduleInstanceId." = nextImageIndex;\n".
        "       Cookie.set('praiseShowLastIndex_".$moduleInstanceId."', praiseShowCurrentImageIndex_".$moduleInstanceId.");\n".
        "   }\n".
        "}\n".
        "</script>\n";

First, it gives me an error of 
**Fx.Tween(el, {link: "cancel", duration: 1540, transition: Fx.Transitions.Quart.easeInOut, property: "opacity"}).start is not a function**
