summaryrefslogtreecommitdiff
path: root/includes/css/grossbild.js
diff options
context:
space:
mode:
authorichdasich <ichdasich@29ba0400-6e00-0410-a75a-ca02368028f8>2008-09-10 03:42:44 +0000
committerichdasich <ichdasich@29ba0400-6e00-0410-a75a-ca02368028f8>2008-09-10 03:42:44 +0000
commitb00d5b96c6d33572b6d7c68688d6d1c4fbd0f0f4 (patch)
treecf02da8b2839bea3b6a966b575f2ba84966676bb /includes/css/grossbild.js
parent34aff10f383fe963cd3f8fd7f096321302e1efb6 (diff)
moved /inc to ../includes
git-svn-id: svn://svn.cccv.de/engel-system@281 29ba0400-6e00-0410-a75a-ca02368028f8
Diffstat (limited to 'includes/css/grossbild.js')
-rwxr-xr-xincludes/css/grossbild.js62
1 files changed, 62 insertions, 0 deletions
diff --git a/includes/css/grossbild.js b/includes/css/grossbild.js
new file mode 100755
index 00000000..618ecc1f
--- /dev/null
+++ b/includes/css/grossbild.js
@@ -0,0 +1,62 @@
+ function isClass(object, className) {
+ return (object.className.search('(^|\\s)' + className + '(\\s|$)') != -1);
+ }
+
+ var grossbild_an = 0
+
+ function grossbild_over(e) {
+ if(grossbild_an) return
+ grossbild_an = 1
+ if(!e) e = window.event;
+ body = document.getElementsByTagName("body")[0]
+ i = document.createElement("img")
+ i.src = e.target.src;
+ i.style.position = "absolute"
+ /*a = ""
+ for(b in e) a += b + " "
+ alert(a)*/
+ i.style.top = e.clientY + window.scrollY
+ i.style.left = e.clientX + window.scrollX
+ i.id = "mouseoverphoto"
+ i.onmouseover = grossbild_over
+ i.onmouseout = grossbild_out
+ //i.onmousemove = grossbild_move
+ body.appendChild(i);
+ }
+
+ function grossbild_out(e) {
+ if(!grossbild_an) return
+ grossbild_an = 0
+ if(!e) e = window.event;
+ body = document.getElementsByTagName("body")[0]
+ i = document.getElementById("mouseoverphoto")
+ body.removeChild(i)
+ }
+
+ function grossbild_move(e) {
+ if(!e) e = window.event;
+ i = document.getElementById("mouseoverphoto")
+ i.style.top = e.clientY + window.scrollY
+ i.style.left = e.clientX + window.scrollX
+}
+
+ function grossbild_register(objekt) {
+ objekt.onmouseover = grossbild_over
+ objekt.onmouseout = grossbild_out
+ objekt.onmousemove = grossbild_move
+ }
+
+ function grossbild_registrieren() {
+ if(grossbild_altonload)
+ grossbild_altonload()
+
+ objekte = document.getElementsByTagName("img");
+ for(var i = 0; i < objekte.length; i++) {
+ if(isClass(objekte[i], "photo")) {
+ grossbild_register(objekte[i])
+ }
+ }
+ }
+
+ var grossbild_altonload = window.onload
+ window.onload = grossbild_registrieren