[BlackHole]

Alle Inhalte innerhalb der Div Tags werden in das schwarze Loch gezogen. Ein Klick auf den Link aktiviert das schwarze Loch und transportiert Sie zum Ziel des Links. Works in MSIE Only.

Hier ist ein Beispiel: Link.

Beim Klicken auf einen Link werden die umliegenden Inhalte in ein schwarzes Loch gezogen und die entsprechende Seite aufgerufen.

[Code]

[zwischen <HEAD> und </HEAD>]
<script>
<!--
//created by Vjekoslav Begovic (vjbegovic@inet.hr
//please keep this intact

var href;
function showBlackHole(){
 var obj = document.getElementById("hole").style;
 obj.position = 'absolute';
 obj.top = Math.round((document.body.clientHeight - document.imgHole.height)/2);
 obj.left = Math.round((document.body.clientWidth - document.imgHole.width)/2);
 obj.visibility = 'visible';
}

function fitToScreen(){
 var obj = document.getElementById("doc").style;
 obj.position = 'absolute';
 obj.top = 0;
 obj.height = document.body.clientHeight;
 obj.width = document.body.clientWidth;
 obj.overflow = 'hidden';
}

function initImplode(){
 if ((!document.all) || (!document.getElementById)){
 document.location.href = href;
 return;
 }
 showBlackHole();
 fitToScreen();
 var docdiv = document.getElementById("doc").style;
 x1 = parseInt(docdiv.left);
 y1 = parseInt(docdiv.top);
 x2 = x1 + docdiv.width;
 y2 = y1;
 x3 = x2;
 y3 = y1 + docdiv.height;
 x4 = x1;
 y4 = y3;
 imgdiv = document.getElementById("hole").style;
 a1 = parseInt(imgdiv.left);
 b1 = parseInt(imgdiv.top);
 a2 = a1 + document.imgHole.width;
 b2 = b1;
 a3 = a2;
 b3 = b2 + document.imgHole.height;
 a4 = a1;
 b4 = b3;
 oldWidth = parseInt(docdiv.width);
 oldHeight = parseInt(docdiv.height);
 blackTimer = null;
 i = x1 + 1;
 implode();
}

function implode(){
 var obj = document.getElementById("doc").style;
 if ((parseInt(obj.left) >= a1+Math.ceil(parseInt(document.getElementById('imgHole').height) / 2)) || (parseInt(obj.top) >= b1+Math.ceil(parseInt(document.getElementById('imgHole').width) / 2))){
  obj.top = b1 + Math.ceil(parseInt(document.getElementById('imgHole').width) / 2);
  obj.left = a1 + Math.ceil(parseInt(document.getElementById('imgHole').height) / 2);
  obj.width = 0;
  obj.height = 0;
  stop();
  return;
 }
 obj.left = i;
 try{
 obj.width = oldWidth - 2*i;
 }
 catch(e){}
 var j = Math.round(((y1-b1)/(x1-a1))*i);
 obj.top = j;
 try{
 obj.height = oldHeight - 2*j;
 }
 catch(e){}
 i+=10;
 blackTimer = window.setTimeout("implode()", 1);
}

function stop(){
 window.clearTimeout(blackTimer);
 document.location.href = href;
}

function hyperlink(ref){
 href = ref;
 initImplode();
}
-->
</script>

[zwischen <BODY> und </BODY>]
<div id="hole" style="visibility:hidden; z-index:100;"><img name="imgHole" src="hole.gif" border="0" alt="" width="100" height="100"></div>
<div id="doc" style="position:absolute; top: 5; left: 5;">
<!--All HTML goes here-->
Any text between the div tags gets sucked into the black hole.
Clicking the link activates the all powerful Balck Hole and
 transport you to your destination link. Works in MSIE Only.
<p>Here's an example: <a href = "javascript:hyperlink('http://www.nightfire.ch')">JavaScripts</a>.
<p><a href="javascript:hyperlink('http://www.nightfire.ch')">More JavaScripts.....</a>
<!--End of document-->
</div>

[Autor]

Vjekoslav Begovic

[Download]

Kopieren Sie bitte den Code

Copyright © 1998- Nightfire Webworker Archiv Script No: 422