See the change of color? The " is closing the comment here:
$document->add(new Comment("<script language=" <-- this closed it
Inside comments, try to use '' instead of quotation marks, try this:
PHP Code:
$document->add(new Comment("<script language='JavaScript'>
// ==============================================
// Copyright 2004 by CodeLifter.com
// Free for all; but please leave in this header.
// ==============================================
var Quotation=new Array() // do not change this!
// Set up the quotations to be shown, below.
// To add more quotations, continue with the
// pattern, adding to the array. Remember
// to increment the Quotation[x] index!
Quotation[0] = 'Quote 1';
// ======================================
// Do not change anything below this line
// ======================================
var Q = Quotation.length;
var whichQuotation=Math.round(Math.random()*(Q-1));
function showQuotation(){document.write(Quotation[whichQuotation]);}
showQuotation();</script>"));
Also, I'm not sure if document.write will write the sentence in the right place. If it doesn't, you will have to add an element with Comment() (like $document->add(new Comment("<p class='quote'></p>")) or something) and then in the javascript fill the element with what you want