Im trying to edit a div tag in a popup window based on what button is clicked. Now this works fine locally and creates the pop up but when i upload the file to a site its not editing the <div>

here is the code i am using
PHP Code:
function blankWin(video) {
win window.open("""win""width=800,height=800" video);
with (win.document) {
htmlstr "<OBJECT ID=RVOCX CLASSID=\"clsid:CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA\" WIDTH=266 HEIGHT=220>";
htmlstr += "<PARAM NAME=\"SRC\" VALUE=\"" video ".rpm\">";
htmlstr += "<PARAM NAME=\"CONTROLS\" VALUE=\"ImageWindow\">";
htmlstr += "<PARAM NAME=\"CONSOLE\" value=\"clip1\">";
htmlstr += "<PARAM NAME=\"AUTOSTART\" value=\"true\">";
htmlstr += "<PARAM NAME=\"CENTER\" VALUE=\"true\">";
htmlstr += "<EMBED src=\"" video ".rpm\" width=266 height=240 NOJAVA=true controls=ImageWindow autostart=true></embed>";
htmlstr += "</OBJECT>";
win.document.getElementById('videoPlayer').innerHTML htmlstr;

HTML Code:
<FORM name="myform">
<INPUT TYPE="button" id="test1" NAME="video" VALUE="test1" onClick="blankWin('test1');">
<INPUT TYPE="button" id="test2" NAME="video" VALUE="test2" onClick="blankWin('test2');">
the new window simplay has opening and closing tags and the div id="videoPlayer"