Search in forum:
Search


Author Message
Post10/17/2008 at 5:25pm (UTC)    
Post subject:

Easter Egg Trailing Cursor

Code:
<div
id="span0" style="position:absolute;visibility:hidden;"><img
src="egg1.gif"></div> <div id="span1" style="position:absolute;visibility:hidden;"><img
src="egg2.gif"></div> <div id="span2" style="position:absolute;visibility:hidden;"><img
src="egg3.gif"></div> <div id="span3" style="position:absolute;visibility:hidden;"><img
src="egg1.gif"></div> <div id="span4" style="position:absolute;visibility:hidden;"><img
src="egg2.gif"></div> <div id="span5" style="position:absolute;visibility:hidden;"><img
src="egg3.gif"></div> <div id="span6" style="position:absolute;visibility:hidden;"><img
src="egg1.gif"></div> <div id="span7" style="position:absolute;visibility:hidden;"><img
src="egg2.gif"></div> <div id="span8" style="position:absolute;visibility:hidden;"><img
src="egg3.gif"></div> <script> // CREDITS: // Easter
Cursor Trailer // by Urs Dudli and Peter Gehrig // Copyright (c) 2001 Peter Gehrig
and Urs Dudli. All rights reserved. // Distributed by http://www.hypergurl.com
// Permission given to use the script provided that this notice remains as is.
var step=8 var stepbasic=8 var numberofimages=8 var spacebetweenimgs=30 var x,y
var flag=0 var xpos=new Array() var ns6=document.getElementById&&!document.all?1:0
for (i=0;i<=8;i++) { xpos[i]=-100 } var ypos=new Array() for (i=0;i<=numberofimages;i++)
{ ypos[i]=-100 } function handlerMM(e) { x = (document.layers || ns6) ? e.pageX
: document.body.scrollLeft+event.clientX y = (document.layers || ns6) ? e.pageY
: document.body.scrollTop+event.clientY flag=1 } function initiatetracker() {
if (document.all) { for (i=0; i<numberofimages; i++) { var thisspan=eval("span"+(i)+".style")
thisspan.posLeft=xpos[i] thisspan.posTop=ypos[i] thisspan.visibility="visible"
} makesnake() } if (ns6) { for (i=0; i<numberofimages; i++) { document.getElementById("span"+i).style.left=xpos[i]
document.getElementById("span"+i).style.top=ypos[i] document.getElementById("span"+i).style.visibility="visible"
} makesnake() } if (document.layers) { for (i=0; i<numberofimages; i++) { var
thisspan=eval("document.span"+i) thisspan.left=xpos[i] thisspan.top=ypos[i]
thisspan.visibility="visible" } makesnake() } } function makesnake()
{ if (flag==1 && document.all) { for (i=numberofimages; i>=1; i--)
{ xpos[i]=xpos[i-1]+spacebetweenimgs ypos[i]=ypos[i-1] } xpos[0]=x+stepbasic ypos[0]=y
for (i=0; i<numberofimages; i++) { var thisspan = eval("span"+(i)+".style")
thisspan.posLeft=xpos[i] thisspan.posTop=ypos[i] } } if (flag==1 && ns6)
{ for (i=numberofimages; i>=1; i--) { xpos[i]=xpos[i-1]+spacebetweenimgs ypos[i]=ypos[i-1]
} xpos[0]=x+stepbasic ypos[0]=y for (i=0; i<numberofimages; i++) { document.getElementById("span"+i).style.left=xpos[i]
document.getElementById("span"+i).style.top=ypos[i] } } else if (flag==1
&& document.layers) { for (i=numberofimages; i>=1; i--) { xpos[i]=xpos[i-1]+spacebetweenimgs
ypos[i]=ypos[i-1] } xpos[0]=x+stepbasic ypos[0]=y for (i=0; i<numberofimages;
i++) { var thisspan = eval("document.span"+i) thisspan.left=xpos[i]
thisspan.top=ypos[i] } } var timer=setTimeout("makesnake()",30) } if
(document.layers){ document.captureEvents(Event.MOUSEMOVE); } document.onmousemove=handlerMM;
window.onload=initiatetracker </script>
Post10/17/2008 at 5:25pm (UTC)    
Post subject:

Message Cursor Javascript

Code:
<style
type="text/css"> #divCursor{position:absolute; width:100; height:15;}
</style> <script type="text/javascript" language="JavaScript">
/********************************************************************************
Copyright (C) 1999 Thomas Brattli This script is made by and copyrighted to Thomas
Brattli at www.bratta.com Visit for more great scripts. This may be used freely
as long as this msg is intact! I will also appreciate any links you could give
me. Distributed by http://www.hypergurl.com ********************************************************************************/
//Default browsercheck, added to all scripts! function checkBrowser(){ this.ver=navigator.appVersion
this.dom=document.getElementById?1:0 this.ie5=(this.ver.indexOf("MSIE 5")>-1
&& this.dom)?1:0; this.ie4=(document.all && !this.dom)?1:0; this.ns5=(this.dom
&& parseInt(this.ver) >= 5) ?1:0; this.ns4=(document.layers &&
!this.dom)?1:0; this.bw=(this.ie5 || this.ie4 || this.ns4 || this.ns5) return
this } bw=new checkBrowser() //Set these variables: fromLeft=10 // How much from
the left of the cursor should the div be? fromTop=10 // How much from the top
of the cursor should the div be? /********************************************************************
Initilizes the objects *********************************************************************/
function cursorInit(){ oCursor=new makeCursorObj('divCursor') scrolled=bw.ns4
|| bw.ns5?"window.pageYOffset":"document.body.scrollTop" if(bw.ns4)document.captureEvents(Event.MOUSEMOVE)
document.onmousemove=move; } /********************************************************************
Contructs the cursorobjects *********************************************************************/
function makeCursorObj(obj,nest){ nest=(!nest) ? '':'document.'+nest+'.' this.css=bw.dom?
document.getElementById(obj).style:bw.ie4?document.all[obj].style:bw.ns4?eval(nest+"document.layers."
+obj):0; this.moveIt=b_moveIt; return this } function b_moveIt(x,y){this.x=x;
this.y=y; this.css.left=this.x; this.css.top=this.y} /********************************************************************
Tracking the mousemove and moves the object along. *********************************************************************/
function move(e){ x=bw.ns4 || bw.ns5?e.pageX:event.x y=bw.ns4 || bw.ns5?e.pageY:event.y
if(bw.ie4 || bw.ie5) y=y+eval(scrolled) oCursor.moveIt(x+fromLeft,y+fromTop) }
onload=cursorInit; </script>
Post10/17/2008 at 5:26pm (UTC)    
Post subject:

Underwater Bubbles Cursor

Code:
<script
language="JavaScript"> // Under Water Mouse - Kurt Grigg - // http://www.btinternet.com/~kurt.grigg/javascript
<!-- More scripts available at http://www.hypergurl.com n4=(document.layers);
n6=(document.getElementById&&!document.all); ie=(document.all); o6=(navigator.appName.indexOf("Opera")
!= -1)?true:false; img0=new Image(); img0.src="bluebub.gif"; num=(n6)?10:15;
y=0; x=0; if (n4||n6){ window.captureEvents(Event.MOUSEMOVE); function mouse1(e){
y = e.pageY-20-window.pageYOffset; x = e.pageX-4; } if (n4) window.onMouseMove=mouse1;
else document.onmousemove=mouse1; } if (ie||o6){ function mouse2(){ y = (ie)?event.clientY-20:event.clientY-20-window.pageYOffset;
x = event.clientX-4; } document.onmousemove=mouse2; } yp=new Array(); xp=new Array();
sp=new Array(); rt=new Array(); gr=new Array(); s1=new Array(); s2=new Array();
nz=new Array(); wh=(ie)?window.document.body.clientHeight:window.innerHeight;
for (i=0; i < num; i++){ yp[i]=Math.random()*wh-y; xp[i]=x; sp[i]= 6+Math.random()*3;
s1[i]=0; s2[i]=Math.random()*0.1+0.05; gr[i]=4; nz[i]=Math.random()*15+5; rt[i]=Math.random()*0.5+0.1;
} if (n4){ for (i=0; i < num; i++){ document.write("<LAYER NAME='bub"+i+"'
LEFT=0 TOP=-50>" +"<img src='bluebub.gif' width="+nz[i]+"
height="+nz[i]+"></LAYER>"); } } if (ie){ document.write('<div
style="position:absolute;top:0px;left:0px"><div style="position:relative">');
for (i=0; i < num; i++){ document.write('<img id="bub'+i+'" src="'+img0.src+'"
style="position:absolute;top:-50px;left:0px">'); } document.write('</div></div>');
} if (n6||o6){ for (i=0; i < num; i++){ document.write("<div id='bub"+i+"'
style='position:absolute;top:-50px;left:0px'>" +"<img src="+img0.src+"
width="+nz[i]+" height="+nz[i]+"></div>"); }
} function MouseBubbles(){ scy=(document.all)?document.body.scrollTop:window.pageYOffset;
scx=(document.all)?document.body.scrollLeft:window.pageXOffset; for (i=0; i <
num; i++){ sy = sp[i]*Math.sin(270*Math.PI/180); sx = sp[i]*Math.cos(s1[i]*5);
yp[i]+=sy; xp[i]+=sx; if (yp[i] < -40){ yp[i]=y; xp[i]=x; sp[i]= 6+Math.random()*3;
gr[i]=4; nz[i]=Math.random()*15+5; } if (n4){ document.layers["bub"+i].left=xp[i]+scx;
document.layers["bub"+i].top=yp[i]+scy; } if (ie){ document.getElementById("bub"+i).style.left=xp[i]+scx;
document.getElementById("bub"+i).style.top=yp[i]+scy; document.getElementById("bub"+i).style.width=gr[i];
document.getElementById("bub"+i).style.height=gr[i]; } if (n6||o6){
document.getElementById("bub"+i).style.left=xp[i]+scx; document.getElementById("bub"+i).style.top=yp[i]+scy;
} gr[i]+=rt[i]; s1[i]+=s2[i]; if (gr[i] > 14) gr[i]=15; } setTimeout('MouseBubbles()',10);
} MouseBubbles(); //--> </script>
Post10/17/2008 at 5:26pm (UTC)    
Post subject:

Floating Dots Cursor

Code:
<script> // CREDITS: // Floating
Dots Cursor // By Urs Dudli and Peter Gehrig www.24fun.com // Copyright (c) 2002
Peter Gehrig and Urs Dudli. All rights reserved. // Distributed by http://www.hypergurl.com
// Permission given to use the script provided that this notice remains as is.
// CONFIGURATION STARTS HERE // URLs of the splash images. Replace it with your
images. var imgurl=new Array ("greensmall.gif","redsmall.gif","yellowsmall.gif")
// maximum numbers of splash images displayed on your webpage var max_img=100
// how long shall the images be displayed after the animation is over (seconds)
var standstill=2 // speed of animation: lower means faster var speed=6 // CONFIGURATION
ENDS HERE. Do not edit below. var imgpreload=new Array() for (i=0;i<=imgurl.length-1;i++)
{ imgpreload[i]=new Image() imgpreload[i].src=imgurl[i] } var isfinished=false
var range=imgurl.length var ns4=document.layers?1:0 var ns6=document.getElementById&&!document.all?1:0
var ie=document.all?1:0 var i_img=0 var posleft var postop var shownext=0 var
standstill=standstill*1000 function showimages(e) { if (i_img<=max_img &&
isfinished==false) { if (shownext==0) { if (ie) { posleft=document.body.scrollLeft+window.event.x;
postop=document.body.scrollTop+window.event.y; thisobj=eval("document.all.d"+i_img+".style")
thisobj.visibility="visible" thisobj.posLeft=posleft thisobj.posTop=postop
} if (ns6) { posleft=e.pageX postop=e.pageY var thisid="d"+i_img thisobj=document.getElementById(thisid).style
thisobj.visibility="visible" thisobj.left=posleft thisobj.top=postop
} if (ns4) { posleft=e.pageX postop=e.pageY thisobj=eval("document.d"+i_img)
thisobj.visibility="visible" thisobj.left=posleft thisobj.top=postop
} i_img++ shownext++ } else { shownext++ if (shownext>speed) {shownext=0} }
} else if (isfinished==false) { isfinished=true i_img=0 var ti=setTimeout("clearimages()",standstill)
} } function clearimages() { if(i_img<=max_img) { if (ie) { thisobj=eval("document.all.d"+i_img+".style")
thisobj.visibility="hidden" } if (ns6) { var thisid="d"+i_img
thisobj=document.getElementById(thisid).style thisobj.visibility="hidden"
} if (ns4) { thisobj=eval("document.d"+i_img) thisobj.visibility="hidden"
} i_img++ var timer=setTimeout("clearimages()",20) } else { clearTimeout(timer)
} } function pageisloaded() { if (ns4) {document.captureEvents(Event.MOUSEMOVE);}
document.onmousemove=showimages } if (ie || ns4 || ns6) { window.onload=pageisloaded
} for (i=0;i<=max_img;i++) { var randimg=Math.floor(range*Math.random()) if
(ie || ns6) { document.write("<DIV id='d"+i+"' style='position:absolute;left:0;top:0;visibility:hidden'><img
src='"+imgurl[randimg]+"'></div>"); } if (ns4) { document.write("<layer
name='d"+i+"' left=0 top=0 visibility=hide><img src='"+imgurl[randimg]+"'></layer>");
} } document.close() </script>
Post10/17/2008 at 5:27pm (UTC)    
Post subject:

Elastic Trailing Cursor

Code:
<div
id="dot0" style="position: absolute; visibility: hidden; height:
11; width: 11;"><img src="bluebullet.gif" height=11 width=11></div>
<div id="dot1" style="position: absolute; height: 11; width:
11;"><img src="bluebullet.gif" height=11 width=11></div>
<div id="dot2" style="position: absolute; height: 11; width:
11;"><img src="bluebullet.gif" height=11 width=11></div>
<div id="dot3" style="position: absolute; height: 11; width:
11;"><img src="bluebullet.gif" height=11 width=11></div>
<div id="dot4" style="position: absolute; height: 11; width:
11;"><img src="bluebullet.gif" height=11 width=11></div>
<div id="dot5" style="position: absolute; height: 11; width:
11;"><img src="bluebullet.gif" height=11 width=11></div>
<div id="dot6" style="position: absolute; height: 11; width:
11;"><img src="bluebullet.gif" height=11 width=11></div>
<SCRIPT LANGUAGE="JavaScript"> <!-- Original: Philip Winston
(pwinston@yahoo.com) --> <!-- Web Site: http://members.xoom.com/ebullets
--> <!-- 'Scrolling Fix' by Troels Jakobsen <tjak@get2net.dk> -->
<!-- Distributed by http://www.hypergurl.com --> <!-- Permission granted
to use the script if above is left intact --> <!-- Begin var nDots = 7;
var Xpos = 0; var Ypos = 0; var DELTAT = .01; var SEGLEN = 10; var SPRINGK = 10;
var MASS = 1; var GRAVITY = 50; var RESISTANCE = 10; var STOPVEL = 0.1; var STOPACC
= 0.1; var DOTSIZE = 11; var BOUNCE = 0.75; var isNetscape = navigator.appName=="Netscape";
var followmouse = true; var dots = new Array(); init(); function init() { var
i = 0; for (i = 0; i < nDots; i++) { dots[i] = new dot(i); } if (!isNetscape)
{ // I only know how to read the locations of the // <LI> items in IE //skip
this for now // setInitPositions(dots) } for (i = 0; i < nDots; i++) { dots[i].obj.left
= dots[i].X; dots[i].obj.top = dots[i].Y; } if (isNetscape) { startanimate();
} else { // let dots sit there for a few seconds // since they're hiding on the
real bullets setTimeout("startanimate()", 3000); } } function dot(i)
{ this.X = Xpos; this.Y = Ypos; this.dx = 0; this.dy = 0; if (isNetscape) { this.obj
= eval("document.dot" + i); } else { this.obj = eval("dot"
+ i + ".style"); } } function startanimate() { setInterval("animate()",
20); } function setInitPositions(dots) { var startloc = document.all.tags("LI");
var i = 0; for (i = 0; i < startloc.length && i < (nDots - 1); i++)
{ dots[i+1].X = startloc[i].offsetLeft startloc[i].offsetParent.offsetLeft - DOTSIZE;
dots[i+1].Y = startloc[i].offsetTop + startloc[i].offsetParent.offsetTop + 2*DOTSIZE;
} dots[0].X = dots[1].X; dots[0].Y = dots[1].Y - SEGLEN; } function MoveHandler(e)
{ Xpos = e.pageX; Ypos = e.pageY; return true; } function MoveHandlerIE() { Xpos
= window.event.x + document.body.scrollLeft; Ypos = window.event.y + document.body.scrollTop;   
} if (isNetscape) { document.captureEvents(Event.MOUSEMOVE); document.onMouseMove
= MoveHandler; } else { document.onmousemove = MoveHandlerIE; } function vec(X,
Y) { this.X = X; this.Y = Y; } // adds force in X and Y to spring for dot[i] on
dot[j] function springForce(i, j, spring) { var dx = (dots[i].X - dots[j].X);
var dy = (dots[i].Y - dots[j].Y); var len = Math.sqrt(dx*dx + dy*dy); if (len
> SEGLEN) { var springF = SPRINGK * (len - SEGLEN); spring.X += (dx / len)
* springF; spring.Y += (dy / len) * springF; } } function animate() { var start
= 0; if (followmouse) { dots[0].X = Xpos; dots[0].Y = Ypos; start = 1; } for (i
= start ; i < nDots; i++ ) { var spring = new vec(0, 0); if (i > 0) { springForce(i-1,
i, spring); } if (i < (nDots - 1)) { springForce(i+1, i, spring); } var resist
= new vec(-dots[i].dx * RESISTANCE, -dots[i].dy * RESISTANCE); var accel = new
vec((spring.X + resist.X)/ MASS, (spring.Y + resist.Y)/ MASS + GRAVITY); dots[i].dx
+= (DELTAT * accel.X); dots[i].dy += (DELTAT * accel.Y); if (Math.abs(dots[i].dx)
< STOPVEL && Math.abs(dots[i].dy) < STOPVEL && Math.abs(accel.X)
< STOPACC && Math.abs(accel.Y) < STOPACC) { dots[i].dx = 0; dots[i].dy
= 0; } dots[i].X += dots[i].dx; dots[i].Y += dots[i].dy; var height, width; if
(isNetscape) { height = window.innerHeight + document.scrollTop; width = window.innerWidth
+ document.scrollLeft; } else { height = document.body.clientHeight + document.body.scrollTop;
width = document.body.clientWidth + document.body.scrollLeft; } if (dots[i].Y
>= height - DOTSIZE - 1) { if (dots[i].dy > 0) { dots[i].dy = BOUNCE * -dots[i].dy;
} dots[i].Y = height - DOTSIZE - 1; } if (dots[i].X >= width - DOTSIZE) { if
(dots[i].dx > 0) { dots[i].dx = BOUNCE * -dots[i].dx; } dots[i].X = width -
DOTSIZE - 1; } if (dots[i].X < 0) { if (dots[i].dx < 0) { dots[i].dx = BOUNCE
* -dots[i].dx; } dots[i].X = 0; } dots[i].obj.left = dots[i].X; dots[i].obj.top
= dots[i].Y; } } // End --> </script>
Post10/20/2008 at 12:51pm (UTC)    
Post subject:

Add to favorites

Code:
<body onLoad="if(document.all)
window.external.AddFavorite(window.document.location,window.document.title)">
Post10/20/2008 at 1:31pm (UTC)    
Post subject: redirect your guests

Code:
<meta
http-equiv="refresh" content="0; url=your new address.html">


Email Scripts

Code:
<A
HREF="mailto:you@yourdomain.com?subject=my website">Email Me</A>
Post10/20/2008 at 1:32pm (UTC)    
Post subject:

IP sniper

Code:
<SCRIPT
LANGUAGE="JavaScript"> <!-- Begin // http://www.hypergurl.com
// This part gets the IP var ip = '<!--#echo var="REMOTE_ADDR"-->';
// This part is for an alert box alert("Your IP address is "+ip); //
End --> </script>
Post10/20/2008 at 1:33pm (UTC)    
Post subject:

Embed music with console

Code:
<embed src="yourmusic.mid"
width="140" height="40" autostart="false" loop="FALSE">
</embed>
Post10/20/2008 at 1:35pm (UTC)    
Post subject:

Code for Wheather

Code:
<!--************CODE GEOWEATHER************--> <script type="text/javascript" src="http://geoloc12.geovisite.com:82/private/geoweather.js?compte=903525794075"></script> <noscript> <a href="http://www.geovisite.com/zoom.php?compte=903525794075"  target="_blank"><img src="http://geoloc12.geovisite.com:82/private/geoweather.php?compte=903525794075" border="0" alt="Internet"></a><br> <a href="http://www.sarax-eu.page.tl">Internet</a> </noscript> <!--************END CODE GEOWEATHER************-->
Post10/20/2008 at 1:35pm (UTC)    
Post subject:

Code for Weather2

Code:
<!--************CODE GEOWEATHER************--> <a href="http://www.geovisite.com/zoom.php?compte=903525794075"  target="_blank"><img src="http://geoloc12.geovisite.com:82/private/geoweather.php?compte=903525794075" border="0" alt="outils webmaster"></a><br> <a href="http://www.geovisite.com/en/directory/data-processing_Internet.php">Internet</a> <!--************END CODE GEOWEATHER************-->
Post10/20/2008 at 1:50pm (UTC)    
Post subject:

Code for clock and counter

Code:
<!--************CODE GEOCLOCK************--> <script type="text/javascript" src="http://geoloc12.geovisite.com:82/private/geoclock.js?compte=903525794075"></script> <noscript> <a href="http://www.geovisite.com/zoom.php?compte=903525794075"  target="_blank"><img src="http://geoloc12.geovisite.com:82/private/geoclock.php?compte=903525794075" border="0" alt="Internet"></a><br> <a href="http://www.geovisite.com/en/directory/data-processing_Internet.php">Internet</a> </noscript> <!--************END CODE GEOCLOCK************-->
Post10/20/2008 at 1:55pm (UTC)    
Post subject:

Counter Code
Code:
<!--************CODE GEOCLOCK************--> <a href="http://www.geovisite.com/zoom.php?compte=903525794075"  target="_blank"><img src="http://geoloc12.geovisite.com:82/private/geoclock.php?compte=903525794075" border="0" alt="outils webmaster"></a><br> <a href="http://www.geovisite.com/en/directory/data-processing_Internet.php">Internet</a> <!--************END CODE GEOCLOCK************-->
Post10/20/2008 at 1:56pm (UTC)    
Post subject:

Counter Map

Code:
<!--************CODE GEOMAP************--> <script type="text/javascript" src="http://geoloc12.geovisite.com:82/private/geomap.js?compte=903525794075"></script> <noscript> <a href="http://www.geovisite.com/zoom.php?compte=903525794075"  target="_blank"><img src="http://geoloc12.geovisite.com:82/private/geomap.php?compte=903525794075" border="0" alt="Internet"></a><br> <a href="http://www.geovisite.com/en/directory/data-processing_Internet.php">Internet</a> </noscript> <!--************END CODE GEOMAP************--> 
Post10/20/2008 at 1:59pm (UTC)    
Post subject:

Code for calculator

Code:
<form action="" www.addlinkat.com="" java="" free-java-download="" name="Keypad">
    <table>
        <strong>
        <tbody>
            <tr>
                <td align="center">
                <div align="center"><center>
                <table bordercolor="#c0c0c0" height="60" cellspacing="3" bordercolordark="#000000" cellpadding="0" width="50" bgcolor="#c0c0c0" bordercolorlight="#e8e8e8" border="5">
                    <tbody>
                        <tr>
                            <td bordercolor="#c0c0c0" bordercolorlight="#ffffff" align="center" bordercolordark="#000000" colspan="3">
                            <div align="right">
                            <p><input size="24" width="100%" name="ReadOut" value="0" type="text" /></p>
                            </div>
                            </td>
                            <td bordercolor="#c0c0c0" td="">&nbsp;</td>
                            <td bordercolor="#c0c0c0" align="center"><input type="button" onclick="Clear()" name="btnClear" value="  C  " /></td>
                            <td bordercolor="#c0c0c0" align="center">
                            <div align="center"><center>
                            <p><input type="button" onclick="ClearEntry()" name="btnClearEntry" value="  CE " /></p>
                            </center></div>
                            </td>
                        </tr>
                        <tr align="center">
                            <td bordercolor="#c0c0c0">
                            <div align="center"><center>
                            <p><input type="button" onclick="NumPressed(7)" name="btnSeven" value="  7  " /></p>
                            </center></div>
                            </td>
                            <td bordercolor="#c0c0c0" align="center">
                            <div align="center"><center>
                            <p><input type="button" onclick="NumPressed(8)" name="btnEight" value="  8  " /></p>
                            </center></div>
                            </td>
                            <td bordercolor="#c0c0c0" align="center">
                            <div align="center"><center>
                            <p><input type="button" onclick="NumPressed(9)" name="btnNine" value="  9  " /></p>
                            </center></div>
                            </td>
                            <td bordercolor="#c0c0c0" align="center">&nbsp;</td>
                            <td bordercolor="#c0c0c0" align="center"><input type="button" onclick="Neg()" name="btnNeg" value=" +/- " /></td>
                            <td bordercolor="#c0c0c0" align="center"><input type="button" onclick="Percent()" name="btnPercent" value="  % " /></td>
                        </tr>
                        <tr align="center">
                            <td bordercolor="#c0c0c0" align="center"><input type="button" onclick="NumPressed(4)" name="btnFour" value="  4  " /></td>
                            <td bordercolor="#c0c0c0" align="center"><input type="button" onclick="NumPressed(5)" name="btnFive" value="  5  " /></td>
                            <td bordercolor="#c0c0c0" align="center"><input type="button" onclick="NumPressed(6)" name="btnSix" value="  6  " /></td>
                            <td bordercolor="#c0c0c0">&nbsp;</td>
                            <td bordercolor="#c0c0c0" align="center">
                            <div align="center"><center>
                            <p><input type="button" onclick="Operation('+')" name="btnPlus" value="  +  " /></p>
                            </center></div>
                            </td>
                            <td bordercolor="#c0c0c0" align="center">
                            <div align="center"><center>
                            <p><input type="button" onclick="Operation('-')" name="btnMinus" value="   -   " /></p>
                            </center></div>
                            </td>
                        </tr>
                        <tr align="center">
                            <td bordercolor="#c0c0c0" align="center"><input type="button" onclick="NumPressed(1)" name="btnOne" value="  1  " /></td>
                            <td bordercolor="#c0c0c0" align="center"><input type="button" onclick="NumPressed(2)" name="btnTwo" value="  2  " /></td>
                            <td bordercolor="#c0c0c0">
                            <div align="center"><center>
                            <p><input type="button" onclick="NumPressed(3)" name="btnThree" value="  3  " /></p>
                            </center></div>
                            </td>
                            <td bordercolor="#c0c0c0" align="center">&nbsp;</td>
                            <td bordercolor="#c0c0c0" align="center">
                            <div align="center"><center>
                            <p><input type="button" onclick="Operation('*')" name="btnMultiply" value="  *  " /></p>
                            </center></div>
                            </td>
                            <td bordercolor="#c0c0c0" align="center">
                            <div align="center"><center>
                            <p><input type="button" onclick="Operation('/')" name="btnDivide" value="   /   " /></p>
                            </center></div>
                            </td>
                        </tr>
                        <tr align="center">
                            <td bordercolor="#c0c0c0" align="center"><input type="button" onclick="NumPressed(0)" name="btnZero" value="  0  " /></td>
                            <td bordercolor="#c0c0c0" align="center"><input type="button" onclick="Decimal()" name="btnDecimal" value="   .  " /></td>
                            <td bordercolor="#c0c0c0" colspan="3">&nbsp;</td>
                            <td bordercolor="#c0c0c0">
                            <div align="center"><center>
                            <p><input type="button" onclick="Operation('=')" name="btnEquals" value="  =  " /></p>
                            </center></div>
                            </td>
                        </tr>
                    </tbody>
                </table>
                </center></div>
                </td>
            </tr>
        </tbody>
        </strong>
    </table>
</form>
<font face="Verdana, Arial, Helvetica" size="2"><br />
<br />
<script LANGUAGE="JavaScript">
<!-- Begin
var FKeyPad = document.Keypad;
var Accum = 0;
var FlagNewNum = false;
var PendingOp = "";
function NumPressed (Num) {
if (FlagNewNum) {
FKeyPad.ReadOut.value  = Num;
FlagNewNum = false;
   }
else {
if (FKeyPad.ReadOut.value == "0")
FKeyPad.ReadOut.value = Num;
else
FKeyPad.ReadOut.value += Num;
   }
}
function Operation (Op) {
var Readout = FKeyPad.ReadOut.value;
if (FlagNewNum && PendingOp != "=");
else
{
FlagNewNum = true;
if ( '+' == PendingOp )
Accum += parseFloat(Readout);
else if ( '-' == PendingOp )
Accum -= parseFloat(Readout);
else if ( '/' == PendingOp )
Accum /= parseFloat(Readout);
else if ( '*' == PendingOp )
Accum *= parseFloat(Readout);
else
Accum = parseFloat(Readout);
FKeyPad.ReadOut.value = Accum;
PendingOp = Op;
   }
}
function Decimal () {
var curReadOut = FKeyPad.ReadOut.value;
if (FlagNewNum) {
curReadOut = "0.";
FlagNewNum = false;
   }
else
{
if (curReadOut.indexOf(".") == -1)
curReadOut += ".";
   }
FKeyPad.ReadOut.value = curReadOut;
}
function ClearEntry () {
FKeyPad.ReadOut.value = "0";
FlagNewNum = true;
}
function Clear () {
Accum = 0;
PendingOp = "";
ClearEntry();
}
function Neg () {
FKeyPad.ReadOut.value = parseFloat(FKeyPad.ReadOut.value) * -1;
}
function Percent () {
FKeyPad.ReadOut.value = (parseFloat(FKeyPad.ReadOut.value) / 100) * parseFloat(Accum);
}
// End -->
</script></font>powered by <a href="http://www.sarax-eu.page.tl/">Webmaster Forum</a>


Last edited by sarax-eu on Mon Oct 20, 2008 2:00 pm; edited 1 time in total
Display posts from previous:   


Powered by phpBB © 2001, 2005 phpBB Group