Dlaczego to nie dziala na firefoxa a na IE dziala??

edytor.php:

<html>
<head>
<title></title>
<script language="Javascript" src="editor.js"></script>
</head>
<body>
<form method="POST">
<div>
<input type="button" onclick="Format('italic')" value="I" />
<input type="button" onclick="Format('Underline')" value="U" />
<input type="button" onclick="Format('justifycenter')" value="C" />
<input type="button" onclick="Format('justifyleft')" value="L" />
<input type="button" onclick="Format('justifyright')" value="R" /><br/>
<input type="button" name="pic" value="foto" onclick="format('InsertImage','','url')" />


<iframe id="textbox" style="width:300px; height:150px"></iframe><br/>
<input type="submit" value="Go" />
<input type="hidden" id="text" name="text" />
</div>
</form>
</body>
</html>

editor.js:

var Editor;

function Format(action)
{
Editor.execCommand(action, false, null);
}

function Colour(colour)
{
Editor.execCommand("forecolor",false, colour);
}

window.onload = function()
{
Editor = document.getElementById('textbox').contentWindow.document;
Editor.designMode = "on";
document.forms[0].onsubmit = function()
{
var text = document.getElementById('text');
text.value = Editor.body.innerHTML;
}
}

function document.onreadystatechange()
{
window.frames["textbox"].document.designMode="On";
}

function format(aa,bb)
{
window.frames['textbox'].focus;
window.frames['textbox'].document.selection.createRange();
window.frames['textbox'].document.execCommand(aa,true,bb);
}

**
chcialbym zeby to dzialalo na firefoxa chodzi o buttona z foto.**