André: PopUp Zentrierung

Beitrag lesen

Hallo Leute,

bin leider kein Programierer, habe mir aber dennoch eine kleine java Spielerei gedacht.
Habe 2 html seiten.
Aus der zweiten html Seite soll sich ein PopUp öffnen(in dem mein FlashFilm läuft).
Dieses soll zentreirt stehen!

Eigentlich gar nicht so schwer, oder?

Anbei mein Monsterscript, welches immer noch nicht funktioniert, der linkt einfach nicht!

Wäre euch über Verbesserungsvorschläge sehr dankbar!

(Habe auch im Archiv gesucht, bin dort auch auf Scripte gestossen, allerdings waren die so dermassen kurz...)

<html>

<head>
  <meta http-equiv="content-type" content="text/html;charset=ISO-8859-1">
  <meta name="generator" content="Adobe GoLive 5">
  <title>Lucia_H/W_2002</title>
<script language="javascript"><!--
var useragent = navigator.userAgent;
var bName = (useragent.indexOf('Opera') > -1) ? 'Opera' : navigator.appName;
var pos = useragent.indexOf('MSIE');
if (pos > -1) {
bVer = useragent.substring(pos + 5);
var pos = bVer.indexOf(';');
var bVer = bVer.substring(0,pos);
}
var pos = useragent.indexOf('Opera');
if (pos > -1) {
bVer = useragent.substring(pos + 6);
var pos = bVer.indexOf(' ');
var bVer = bVer.substring(0, pos);
}
if (bName == "Netscape") {
var bVer = useragent.substring(8);
var pos = bVer.indexOf(' ');
var bVer = bVer.substring(0, pos);
}
if (bName == "Netscape" && parseInt(navigator.appVersion) >= 5) {
var pos = useragent.lastIndexOf('/');
var bVer = useragent.substring(pos + 1);
}

if ((navigator.userAgent.indexOf("Mac") != -1)){
 kistenName = "mac";
 }
if ((navigator.userAgent.indexOf("Win") != -1)){
 kistenName = "pc";
 }
if (bName =="Netscape"){
 if (bVer <= 4.75) {
  positionOffsetX = -10;
  positionOffsetY = -30;
 }else {
  positionOffsetX = -5;
  positionOffsetY = -5;
 }
}else {
 positionOffset = 0;
}

xStartPos = (screen.width) ? (screen.width-710)/2 : 0;
yStartPos = (screen.height) ? (screen.height-530)/2 : 0;

function flashPriro(mypagePriro1,mynamePriro1,w,h,scroll){
LeftPosition = xStartPos;
TopPosition = yStartPos;
settings = 'height='+h+',width='+w+',ScreenX='+TopPosition+',ScreenY='+LeftPosition+'top='+TopPosition+',left='+LeftPosition+',scrollbars='+scroll+',resizable"no"'
win = window.open(mypagePriro1,mynamePriro1,settings)
win.focus()
}
// -->
  </script>
  <csscriptdict>
   <script><!--
CSInit = new Array;
function CSScriptInit() {
if(typeof(skipPage) != "undefined") { if(skipPage) return; }
idxArray = new Array;
for(var i=0;i<CSInit.length;i++)
 idxArray[i] = i;
CSAction2(CSInit, idxArray);}
CSAg = window.navigator.userAgent; CSBVers = parseInt(CSAg.charAt(CSAg.indexOf("/")+1),10);
function IsIE() { return CSAg.indexOf("MSIE") > 0;}
function CSIEStyl(s) { return document.all.tags("div")[s].style; }
function CSNSStyl(s) { return CSFindElement(s,0); }
function CSFindElement(n,ly) { if (CSBVers < 4) return document[n];
 var curDoc = ly ? ly.document : document; var elem = curDoc[n];
 if (!elem) { for (var i=0;i<curDoc.layers.length;i++) {
  elem = CSFindElement(n,curDoc.layers[i]); if (elem) return elem; }}
 return elem;
}

function CSClickReturn () {
 var bAgent = window.navigator.userAgent;
 var bAppName = window.navigator.appName;
 if ((bAppName.indexOf("Explorer") >= 0) && (bAgent.indexOf("Mozilla/3") >= 0) && (bAgent.indexOf("Mac") >= 0))
  return true; // dont follow link
 else return false; // dont follow link
}

function CSButtonReturn () {
 var bAgent = window.navigator.userAgent;
 var bAppName = window.navigator.appName;
 if ((bAppName.indexOf("Explorer") >= 0) && (bAgent.indexOf("Mozilla/3") >= 0) && (bAgent.indexOf("Mac") >= 0))
  return false; // follow link
 else return true; // follow link
}

CSIm = new Object();
function CSIShow(n,i) {
 if (document.images) {
  if (CSIm[n]) {
   var img = (!IsIE()) ? CSFindElement(n,0) : document[n];
   if (img && typeof(CSIm[n][i].src) != "undefined") {img.src = CSIm[n][i].src;}
   if(i != 0)
    self.status = CSIm[n][3];
   else
    self.status = " ";
   return true;
  }
 }
 return false;
}
function CSILoad(action) {
 im = action[1];
 if (document.images) {
  CSIm[im] = new Object();
  for (var i=2;i<5;i++) {
   if (action[i] != '') { CSIm[im][i-2] = new Image(); CSIm[im][i-2].src = action[i]; }
   else CSIm[im][i-2] = 0;
  }
  CSIm[im][3] = action[5];
 }
}
CSStopExecution = false;
function CSAction(array) {
 return CSAction2(CSAct, array);
}
function CSAction2(fct, array) {
 var result;
 for (var i=0;i<array.length;i++) {
  if(CSStopExecution) return false;
  var actArray = fct[array[i]];
  if (actArray == null) return false;
  var tempArray = new Array;
  for(var j=1;j<actArray.length;j++) {
   if((actArray[j] != null) && (typeof(actArray[j]) == "object") && (actArray[j].length == 2)) {
    if(actArray[j][0] == "VAR") {
     tempArray[j] = CSStateArray[actArray[j][1]];
    }
    else {
     if(actArray[j][0] == "ACT") {
      tempArray[j] = CSAction(new Array(new String(actArray[j][1])));
     }
    else
     tempArray[j] = actArray[j];
    }
   }
   else
    tempArray[j] = actArray[j];
  }
  result = actArray0;
 }
 return result;
}
CSAct = new Object;

// --></script>
  </csscriptdict>
  <csactiondict>
   <script><!--
CSInit[CSInit.length] = new Array(CSILoad,/*CMP*/'button',/*URL*/'EnterIntro.jpg',/*URL*/'EnterIntrorot.jpg',/*URL*/'','');
CSInit[CSInit.length] = new Array(CSILoad,/*CMP*/'button3',/*URL*/'flashweiss.gif',/*URL*/'flashrot.gif',/*URL*/'','');

// --></script>
  </csactiondict>
 </head>

<body bgcolor="#666666" onload="CSScriptInit();">
  <table cool width="506" height="356" usegridx usegridy showgridx showgridy gridx="5" gridy="5" border="0" cellpadding="0" cellspacing="0">
   <tr height="5">
    <td width="505" height="5" colspan="4"></td>
    <td width="1" height="5"><spacer type="block" width="1" height="5"></td>
   </tr>
   <tr height="295">
    <td width="5" height="295"></td>
    <td width="500" height="295" colspan="3" valign="top" align="left" xpos="5"><img src="LUCIA_WebLogo.gif" border="0"></td>
    <td width="1" height="295"><spacer type="block" width="1" height="295"></td>
   </tr>
   <tr height="55">
    <td width="20" height="55" colspan="2"></td>
    <td width="325" height="55" valign="top" align="left" xpos="20"><csobj w="150" h="50" t="Button" ht="EnterIntrorot.jpg" csclick="B97D4BA51"><a href="#" onmouseover="return CSIShow(/*CMP*/'button',1)" onmouseout="return CSIShow(/*CMP*/'button',0)" onclick="CSAction(new Array(/*CMP*/'B97D4BA51'));return CSClickReturn()"><img src="EnterIntro.jpg" width="150" height="50" name="button" border="0"></a></csobj></td>
    <td width="160" height="55" valign="top" align="left" xpos="345"><csobj w="150" h="50" t="Button" ht="flashrot.gif"><a href="franz.html" target="content" onmouseover="return CSIShow(/*CMP*/'button3',1)" onmouseout="return CSIShow(/*CMP*/'button3',0)" onclick="return CSButtonReturn()"><img src="flashweiss.gif" width="150" height="50" name="button3" border="0"></a></csobj></td>
    <td width="1" height="55"><spacer type="block" width="1" height="55"></td>
   </tr>
   <tr height="1" cntrlrow>
    <td width="5" height="1"><spacer type="block" width="5" height="1"></td>
    <td width="15" height="1"><spacer type="block" width="15" height="1"></td>
    <td width="325" height="1"><spacer type="block" width="325" height="1"></td>
    <td width="160" height="1"><spacer type="block" width="160" height="1"></td>
    <td width="1" height="1"></td>
   </tr>
  </table>
  <p></p>
 </body>

</html>