Javascript works in Preview only

Hi,

I am using this script for a centered popup-window:

<SCRIPT LANGUAGE=“JavaScript”>
function Copyright()
{
var padding;
(navigator.appName == “Microsoft Internet Explorer”) ? (padding = 10) : (padding = 0);

var screenw = screen.availWidth; 
var screenh = screen.availHeight; 
var winw = (390 + 15 + padding); 
var winh = (400 + 15 + padding); 
var posx = (screenw / 2) - (390 / 2); 
var posy = (screenh / 2) - (400 / 2); 

var mywin = window.open('Material/Copyright.html','',"top="+posy+",left="+posx+",width="+390+",height="+400+",menubar=no,locationbar=no,statusbar=no,resizable=no,toolbar=no,dependent=yes,scrollbars=no");
mywin.focus(); 

}
</script>

When I preview it out of Dreamweaver it works great in all browsers except IE;
when I upload the .html file it is not working at all in no browsers.

Has any body an idea why?
Thank you very much in advance.
Lars

Hi,

Just in case anybody likes to know - I just tried this one and it works so far:

<SCRIPT LANGUAGE=“JavaScript”>
function PopUp() {
leftPos = 0
topPos = 0
if (screen) {
leftPos = (screen.width/2) - 195
topPos = (screen.height/2) - 200
}
window.open(‘PopUp.html’,’’,‘toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,width=390,height=400,left=’+leftPos+’,top=’+topPos);
}
</script>

Lars