I don´t know much about mel, but you could try something. change your script. replace
"polyTexturePlacementPanel1" in line 1173 and 361 with "TextureViewWindow" and save it. then reopen maya.
if that doesn´t work try this: in the scriptEditor check "Echo All Commands". now open the textureEditor by using maya´s GUI.
doing so my SE says:
tearOffPanel "UV Texture Editor" "polyTexturePlacementPanel" true;
// Result: polyTexturePlacementPanel1Window //
//closing the textureEditor//
I know this sounds weird, cause by default textureEditor is panel1. if you have another panelnumber, let´s say polyTexturePlacementPanel23, change this number in your script. that might be of no help at all, but whenever I have a prob I take a close look to what the SE says. SE is a real great improvement for troubleshooting.