Non puoi mettere una stringa su diverse righe.

Usa una variabile che poi metti nel document.xrite.

codice:
function scrivi()
{

html  = '<table border=0 width=766 height=70 cellpadding=0 cellspacing=0>';
html += '<td width=289 background="sfondo.gif" bgcolor="#185AFF" align=center valign=top>[img]logo1.gif[/img][img]logo.gif[/img]</td>';
document.write(html);
}