|
ont...
heres something bwuk just a posted® some time back...
<SCRIPT LANGUAGE="JavaScript"><!--
function Is() {
var agent = navigator.userAgent.toLowerCase();
this.major = parseInt(navigator.appVersion);
this.minor = parseFloat(navigator.appVersion);
this.ns = ((agent.indexOf('mozilla')!=-1) && ((agent.indexOf('spoofer')==-1) &&
(agent.indexOf('compatible') == -1)));
this.ns2 = (this.ns && (this.major == 3));
this.ns3 = (this.ns && (this.major == 3));
this.ns4 = (this.ns && (this.major >= 4));
this.ns406 = (this.ns && (this.minor == 4.06));
this.ns407 = (this.ns && (this.minor == 4.07));
this.ns408 = (this.ns && (this.minor == 4.08));
this.ns45 = (this.ns && (this.minor == 4.5));
this.ie = (agent.indexOf("msie") != -1);
this.ie3 = (this.ie && (this.major == 2));
this.ie4 = (this.ie && (this.major >= 4));
this.op3 = (agent.indexOf("opera") != -1);
}
var is = new Is();
var yourWindow = null;
function openyourwindow() {
if(is.ns4 || is.ie4) {
var buffer = (is.ns406 || is.ns407 || is.ns408) ? 30 : 48;
if(screen.height <= 768) {
var window_width = screen.width-12;
var window_height = screen.height-buffer;
} else {
var window_width = 1024-12;
var window_height = 768-buffer;
}
var window_top = 0;
var window_left = 0;
yourWindow =
window.open('yourpage.htm','window','resizable=yes,status=yes,width=' +
window_width + ',height=' + window_height + ',top=' + window_top + ',left=' +
window_left + '');
}
}
// -->
</SCRIPT>
and in your body tag:
<body onload="openyourwindow()">
That script was taken from http://www.htmlguru.com
A fantastic site for people who've never seen it.
just a goodluck® ...
|