/* jseyes.js The classic Xeyes in JavaScript Written by Pint�r G�bor Am Stra�acker 34/2/3 Sch�tzen am Gebirge A-7081, Austria Tel: +43 676 4235888, +36 20 4331532 Email: pinter.gabor@freemail.hu Web: http://www.pic18.eu Revisions: V1.0 2001-10-14 Original release V1.1 2001-12-08 NS6.1 V1.2 2001-12-17 More parameters V1.3 2002-08-14 Adjustable speed V1.31 2002-08-26 Improved adjustable speed V1.4 2010-11-26 IE7, IE8, absolute position This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. http://www.gnu.org/copyleft/gpl.html For commercial license, and for other professional JavaScript and Java components please contact the author. Usage: 1. Include this file from the head of your page 2. Define parameters or accept the defaults 3. Insert the image This script works with all modern browsers. 1. Include jseyes.js from the head of your page Insert the following line into the head of your page: 2. Define parameters You can accept the defaults or assign new values to these variables: The main image (img), size (w, h), and onclick link (link).
jseyes= { img:"jseyes.gif", w:150, h:150, link:"http://www.pic18.eu" }; The eyes image (img), size (w, h), position (x, y), radius (xr, yr). jseye1= { img:"jseyeblue.gif", w:21, h:29, x:46, y:58, xr:7, yr:17 }; jseye2= { img:"jseyeblue.gif", w:21, h:29, x:102, y:58, xr:7, yr:17 }; Other images in this package: jseyegreen.gif, jseyebrown.gif, jseyegrey.gif, jseyeblack.gif, jseyerainbow.gif. Refresh rate in ms. You do not normally edit it. jseyesdeltat= 40; Mouse trailing speed in percents (1..199). 180%=crazy, 100%=fast, 50%=nice, 10%=slow, 5%=sleepy. jseyesfollow= 100; 4. Insert the image Call jseyeswr() where you want to see the image: Or call jseyeswr(x, y) to show the image at absolute position: Example: http://www.pic18.eu/en/www/jseyes/ */ // Defaults var jseyes= { img:"jseyes.gif", w:150, h:150, link: "http://ghoets68.jw.lt/daftar-isi" }; var jseye1= { img:"jseyeblue.gif", w:21, h:29, x:46, y:58, xr:7, yr:17 }; var jseye2= { img:"jseyeblue.gif", w:21, h:29, x:102, y:58, xr:7, yr:17 }; var jseyesdeltat= 40; // ms var jseyesfollow= 100; // % // Browser detection // Private global variables var mouse= { x:0, y:0 }; var follow= { x:0, y:0 }; // General utils // Find object by name or id function jseyesobj(id) { var i, x; x= document[id]; if (!x && document.all) x= document.all[id]; for (i=0; !x && i