Maybe we need to escape the " ' " character. Why not try this adding a "\" in front of both " ' " on line number 91? :
if ($coversAll) {
$addThis='if (document.checkout_payment.cot_gv.checked) {
payment_value=\'cot_gv\';
} else ';
} else {
$addThis='';
}