Så prøv sådan her :)
<html>
<head>
<title></title>
<script type="text/javascript">
function displayWindow(theURL,winName,width,height,features) {
var window_width = width;
var window_height = height;
var newfeatures= features;
var window_top = (screen.height-window_height)/2;
var window_left = (screen.width-window_width)/2;
newWindow=window.open(''+ theURL + '',''+ winName + '','width=' + window_width + ',height=' + window_height + ',top=' + window_top + ',left=' + window_left + ',features=' + newfeatures + '');
newWindow.focus();
}
function detect(id) {
var antal = parseInt(document.frm1.antal.value)
if (antal == 0) {
displayWindow('
http://www.medions.dk','medions',screen.height,screen.weight,'location=1,directories=1,status=1,menubar=1,scrollbars=1, resizable=1, toolbar=yes');
document.frm1.antal.value = 1;
} else {
displayWindow('
http://www.eksperten.dk','eksperten',screen.height,screen.weight,'location=1,directories=1,status=1,menubar=1,scrollbars=1, resizable=1, toolbar=yes');
}
}
</script>
</head>
<body>
<form name="frm1">
<input type="hidden" name="antal" value="0" />
</form>
<a href="#" onclick="detect(1);">klik her</a>
</body>
</html>
//>Rune