PWG 2 Ayudas y Mundo PHP

Nuevas plantillas






.:PWG 2:. Ayudas web

Javascript3

haciendo click en texto visualizara una imagen;

Código:
<form name="dynamicselector">
<table border="0" width="100%" cellspacing="0" cellpadding="0" height="178" summary="">
<tr>
<td width="35%" valign="top" align="left">
<select name="dynamicselector2" size="4" onChange="generateimage(this.options[this.selectedIndex].value)">

<option value="URL IMAGEN">TEXTO</option>
<option value="URL IMAGEN">TEXTO</option>
<option value="URL IMAGEN">TEXTO</option>
<option value="URL IMAGEN">TEXTO</option>
<option value="URL IMAGEN">TEXTO</option>
</select>
<script>

/*
Dynamic Image selector Script-
© Dynamic Drive (www.dynamicdrive.com)
For full source code, installation instructions,
100's more DHTML scripts, and Terms Of
Use, visit dynamicdrive.com
*/

function generateimage(which){
if (document.all){
dynamic3.innerHTML='<center>Loading image...</center>';
dynamic3.innerHTML='<img src="'+which+'">';
}
else if (document.layers){
document.dynamic1.document.dynamic2.document.write('<img src="'+which+'">');
document.dynamic1.document.dynamic2.document.close();
}
else
alert('You need NS 4 or IE 4 to view the images!');
}
</script>
</td>
<td width="65%" valign="top" align="left"><ilayer id="dynamic1" width="100%" height="178"><layer id="dynamic2" width="100%" height="178"><div id="dynamic3"></div></layer></ilayer></td>
</tr>
</table>
</form>


Solo introduzcan la url de la imagen donde lo indica
y el teto que deseen que aparezca donde lo indica
y lo colocan donde deseen que aparezca.

asi se veria:



Abrir ventana con efecto de corredera

bueno con este codigo que les dejo podran poner un link de texto
el cual al picar en el la ventana se abrira de forma corredera:

Código:
<script LANGUAGE="JavaScript">
function janelanimada(endereco) {
var velocidadev = 15;
var topo = 0;
var esquerda = 0;
var velocidadeh = 15;
if (document.all) {
var tamlar = window.screen.availHeight - topo;
var tamjan = window.screen.availWidth - esquerda;
var tamanho = window.open("","","left=" + esquerda + ",top=" + topo + ",width=1,height=1,scrollbars=yes");
for (sizeheight = 1; sizeheight < tamlar; sizeheight += velocidadev) {
tamanho.resizeTo("1",sizeheight );}
for (sizewidth = 1; sizewidth < tamjan; sizewidth += velocidadeh) {
tamanho.resizeTo(sizewidth+6,sizeheight );}
tamanho.location = endereco;}
else
window.location = endereco;}
</script>
<p><a href="URL DEL SITE" onClick="janelanimada('URL DEL SITE');return false;">AQUI TEXTO QUE APARECERA</a><br>


Solo coloquen la url del site donde lo indica
y el texto que deseen que aparezca en su web.

burbujas que salen del puntero:

bueno con este codigo saldran burbujas de su puntero:

Código:
<script language="JavaScript">
<!-- Under Water Mouse Script by
kurt.grigg@virgin.net

Image0=new Image();
Image0.src="http://i33.tinypic.com/j9agqg.gif";
Amount=20;

Ymouse=-50;
Xmouse=-50;
Ypos=new Array();
Xpos=new Array();
Speed=new Array();
rate=new Array();
grow=new Array();
Step=new Array();
Cstep=new Array();
nsSize=new Array();
ns=(document.layers)?1:0;
WinHeight=(document.layers)?window.innerHeight:window.document.body.clientHeight;
(document.layers)?window.captureEvents(Event.MOUSEMOVE):0;
function Mouse(evnt){
 Ymouse=(document.layers)?evnt.pageY-20:event.y-20;
 Xmouse=(document.layers)?evnt.pageX:event.x;
}
(document.layers)?window.onMouseMove=Mouse:document.onmousemove=Mouse;
for (i=0; i < Amount; i++){                                                               
 Ypos[i]=Math.random()*WinHeight-Ymouse;
 Xpos[i]=Xmouse;
 Speed[i]=Math.random()*10+1;
 Cstep[i]=0;
 Step[i]=Math.random()*0.1+0.05;
 grow[i]=4;
 nsSize[i]=Math.random()*15+5;
 rate[i]=Math.random()*0.5+0.1;
}
if (ns){
for (i = 0; i < Amount; i++){
document.write("<LAYER NAME='sn"+i+"' LEFT=0 TOP=0><img src="+Image0.src+" name='N' width="+nsSize[i]+" height="+nsSize[i]+"></LAYER>");
}
}
else{
document.write('<div style="position:absolute;top:0px;left:0px"><div style="position:relative">');
for (i = 0; i < Amount; i++){
document.write('<img id="si" src="'+Image0.src+'" style="position:absolute;top:0px;left:0px;filter:alpha(opacity=90)">');
}
document.write('</div></div>');
}
function MouseBubbles(){
var hscrll=(document.layers)?window.pageYOffset:document.body.scrollTop;
var wscrll=(document.layers)?window.pageXOffset:document.body.scrollLeft;
for (i=0; i < Amount; i++){
sy = Speed[i]*Math.sin(270*Math.PI/180);
sx = Speed[i]*Math.cos(Cstep[i]*5);
Ypos[i]+=sy;
Xpos[i]+=sx;
if (Ypos[i] < -40){
Ypos[i]=Ymouse;
Xpos[i]=Xmouse;
Speed[i]= 6+Math.random()*3;
grow[i]=4;
nsSize[i]=Math.random()*15+5;
}
if (ns){
document.layers['sn'+i].left=Xpos[i]+wscrll;
document.layers['sn'+i].top=Ypos[i]+hscrll;
}
else{
si[i].style.pixelLeft=Xpos[i]+wscrll;
si[i].style.pixelTop=Ypos[i]+hscrll;
si[i].style.width=grow[i];
si[i].style.height=grow[i];
}
grow[i]+=rate[i];
Cstep[i]+=Step[i];
if (grow[i] > 24) grow[i]=25;
}
setTimeout('MouseBubbles()',10);
}
MouseBubbles();
//-->
</script>


bueno aqui les dejo una imagen de como se veria:



pongan el codigo en texto por debajo de la pagina y listo.




CODIGOS

Texto en forma de montaña rusa.
Ejemplo:
http://www.cyberiapc.com/aascripter/samples/TextEffects/sub1.htm

Funciona en:



Código:
<script>

/*
Roller Coaster Script-
By Website Abstraction
Over 200+ free scripts here!
*/

var fs=1
var direction="right"
function rollertext(whichone){
var thetext=whichone
for (i=0;i<thetext.length;i++){
document.write(thetext.charAt(i).fontsize(fs))

if (fs<7&&direction=="right")
fs++
else if (fs==7){
direction="left"
fs--
}
else if (fs==1){
direction="right"
fs++
}
else if (fs>1&&direction=="left")
fs--

}
}
//Change below text to your won
rollertext("Life is like a roller coaster ride. Hang on tight!")
</script>


Texto marquesina dentro de un formulario
Ejemplo:
http://www.cyberiapc.com/aascripter/samples/TextEffects/sub7.htm

Funciona en:



este dentro de las etiquetas <HEAD> Y </HEAD>
Código:
<script language="JavaScript">
<!-- Hide the script from non-JavaScript browsers --
// This script was found at the JavaScript Place. http://www.javaplace.co.uk
var timerID = null;
var timerRunning = false;
var id,pause=0,position=0;

function ticker() {
        var i,k,msg=" Your important and interesting messages go here .......... ";
        k=(75/msg.length)+1;
        for(i=0;i<=k;i++) msg+=" "+msg;
        document.form2.ticker.value=msg.substring(position,position+100);
        if(position++==38) position=0;
        id=setTimeout("ticker()",1000/10); }

function action() {
        if(!pause) {
                clearTimeout(id);
                pause=1; }
        else {
                ticker();
                pause=0; } }
// --End hiding script from non-JavaScript browsers -->
</script>


y Este dentro de las etiquetas <BODY> Y </BODY>
Código:
<BODY onLoad="ticker ()">

<CENTER><H3>Ticker Tape scrolling message
demo</H3></CENTER>

<P>
<FORM NAME="form2">
<INPUT TYPE="text" name="ticker" size="82">
</FORM>
<P>
Back to the <A HREF="index.html">index</A> page


Presentacion de Imagenes cambiandolas con un boton
Ejemplo:
http://www.cyberiapc.com/aascripter/samples/ImageSound/sub3.htm


Funciona en:



Código:
<table border="0" cellpadding="0">
  <caption><strong>Air Show Photos</strong></caption>
  <tr>
    <td width="100%"><img src="plane1.gif" width="300" height="240" name="photoslider"></td>
  </tr>
  <tr>
    <td width="100%"><form method="POST" name="rotater">
      <div align="center"><center><p><script language="JavaScript1.1">
var photos=new Array()
var which=0

/*Change the below variables to reference your own images. You may have as many images in the slider as you wish*/
photos[0]="plane1.gif"
photos[1]="plane2.gif"
photos[2]="plane3.gif"
photos[3]="plane4.gif"
photos[4]="plane5.gif"


function backward(){
if (which>0){
window.status=''
which--
document.images.photoslider.src=photos[which]
}
}

function forward(){
if (which<photos.length-1){
which++
document.images.photoslider.src=photos[which]
}
else window.status='End of gallery'
}
</script><input type="button" value="&lt;&lt;Back" name="B2"
      onClick="backward()"> <input type="button" value="Next&gt;&gt;" name="B1"
      onClick="forward()"><br>
      <a href="#" onClick="which=1;backward();return false"><small>Start Over</small></a></p>
      </center></div>
    </form>
    </td>
  </tr>
</table>


Imagen aleatoria de fondo al cargar la pagina
Ejemplo:
http://www.cyberiapc.com/aascripter/samples/ImageSound/sub1.htm


Funciona en:



Código:
<script>

/*Random Background Image-
By Website Abstraction (www.wsabstract.com)
More free JavaScripts here!
*/

var backgr1="../clip/backgr4.jpg"
var backgr2="../clip/backgr17.jpg"
var backgr3="../clip/backgr13.jpg"

var cur=Math.round(6*Math.random())
if (cur<=1)
backgr=backgr1
else if (cur<=4)
backgr=backgr2
else
backgr=backgr3
document.write('<body background="'+backgr+'" bgcolor="#FFFFFF">')
</script>


Seleccion de imagen con un formilario deslisante

Ejemplo:
http://www.cyberiapc.com/aascripter/samples/ImageSound/sub6.htm


Funciona en:



entre las etiquetas <HEAD> Y </HEAD>
Código:
<script language="javascript">
<!--

/*Combo Box Image Selector:
By Website Abstraction (www.wsabstract.com)
Over 200+ free JavaScript here!
*/

function showimage()
{
if (!document.images)
return
document.images.pictures.src=
document.mygallery.picture.options[document.mygallery.picture.selectedIndex].value
}
//-->
</script>


Entre las etiquetas <BODY> Y </BODY>
Código:
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="100%"><form name="mygallery"><p><select
name="picture" size="1" onChange="showimage()">
<option selected value="me.gif">Picture of me</option>
<option value="myaunt.gif">Picture of my aunt</option>
<option value="brother.gif">Picture of my brother</option>
</select></p>
</form>
</td>
</tr>
<tr>
<td width="100%"><p align="center"><img src="me.gif" name="pictures" width="99"
height="100"></td>
</tr>
</table>


Scroll de ventana asia avajo
Ejemplo:
http://www.cyberiapc.com/aascripter/samples/Browser/sub1.htm


Funciona en:



Entre las etiquietas <BODY> Y </BODY>
Código:
<script language="JavaScript1.2">

/*
Top-Down scrolling window Script-
© Dynamic Drive (www.dynamicdrive.com)
For full source code, installation instructions,
100's more free DHTML scripts, and Terms Of
Use, visit dynamicdrive.com
*/

//change 1 to another integer to alter the scroll speed. Greater is faster
var speed=1
var currentpos=0,alt=1,curpos1=0,curpos2=-1
function initialize(){
startit()
}
function scrollwindow(){
if (document.all)
temp=document.body.scrollTop
else
temp=window.pageYOffset
if (alt==0)
alt=1
else
alt=0
if (alt==0)
curpos1=temp
else
curpos2=temp
if (curpos1!=curpos2){
if (document.all)
currentpos=document.body.scrollTop+speed
else
currentpos=window.pageYOffset+speed
window.scroll(0,currentpos)
}
else{
currentpos=0
window.scroll(0,currentpos)
}
}
function startit(){
setInterval("scrollwindow()",10)
}
window.onload=initialize
</script>


Mini venta que corre por toda la pantalla (con pagina personalisable)
Ejemplo:
http://www.cyberiapc.com/aascripter/samples/Browser/sub14.htm


Funciona en:



Entre las etiquetas <HEAD> Y </HEAD>
Código:
<Script Language="JavaScript1.2">
<!-- Hiding

/*      Java Script by Lefteris Haritou 5/05/1997
        http://www.geocities.com/SiliconValley/7096
        Please do not remove the above credit !
        No copyrights, but just be fair
*/
var x=0;
var y=0;
var plus=1;

function start(){
nw=window.open("","wd","scrolbar=0,toolbar=0,status=0");
window.nw.resizeTo(200,100);
window.nw.moveTo(0,0)
nw.document.open();
nw.document.writeln('<HTML><BODY onBlur="self.focus()" Bgcolor="#FFFFF0"><CENTER><BR><font face="Arial" color="#0000FF" size=4>Cool New Features Of Netscape 4</font></CENTER></BODY></HTML>');
nw.document.close();
gvar();
}

function earthquake(){
window.nw.moveBy(x,y);
gvar();
}

function gvar(){
if (plus==1){
if (x<35){
x+=1;
window.setTimeout("earthquake()",200);
}
else{
if (y<29){
y+=1;
window.setTimeout("earthquake()",200);
}
else{
plus=0;
x=0;
y=0;
gvar();
}
}
}
else{
if (x>-35){
x-=1;
window.setTimeout("earthquake()",200);
}
else{
if (y>-29){
y-=1;
window.setTimeout("earthquake()",200);
}
else{
fine();
}
}
}
}



function gvarm(){
if (y>0){
y-=1;
window.setTimeout("earthquake()",200);
}
else{
if (x>0){
x-=1;
window.setTimeout("earthquake()",200);
}
else{
fine();
}
}
}


function fine(){
alert("Demo presented to you by Lefteris Haritou n http://www.geocities.com/~lef");
nw.close();
clearTimeout();
}

// Done Hiding -->

</Script>


Entre las Etiquetas <BODY> Y </BODY>
Código:
<CENTER>
<Form>
<Input type="button" Value="Begin" onclick="start()">
</Form>
</CENTER>


Efecto de texto 3D (no imagen)
Ejemplo:
http://www.cyberiapc.com/aascripter/samples/TextEffects/sub9.htm


Funciona en:




Código:
<!----------------- PLEASE ATTACH THIS IF USED -------------->
<meta name=author
content="Raul R. Edwards">
<meta name=copyright
content="Software Angel, Inc. (c) April 1, 1999"> <meta license=GNU
content="GNU General Public License Version 1.2
as published by the Free Software Foundation"
<!----------------------------------------------------------->
<style>
body { background:silver; font-family:Arrus BT,Garamond,Times New
Roman; }
div { position:absolute; }
</style>

<title>Emboss & 3D Letters</title>
<head>

<body>

Written by<br>

<style>
a { text-decoration: none; color:maroon; vlink:maroon; alink:red;}
a:hover {color: red }
.info { font-family:Times New Roman; positon:relative;}
.light { top:-1; left:-1; color:white;}
.shade { top:+1; left:+1; color:pink; }
.fill { top:0; left:0; color:red; } </style>

<div class="info">
<div class="light">
<i>Software Angel, Inc.</i>
</div>
<div class="shade">
<i>Software Angel, Inc.</i>
</div>
<div class="fill">
<i>
<a href="mailto:rre@scs.howard.edu"
onmouseover="status='Software Angel, Inc. &copy 1999'; return true;"
onmouseout="status='Emboss & 3D Letters'; return true;">
Software Angel, Inc.</a>
</i>
</div>


</div>
<br><br><br>

<!--- Example #1 --->
<style>
.shade1 { top:+5; left:+5; color:black; }
.fill1 { top:0; left:0; color:red; }
</style>
<div class=Example1>

<div class="shade1">
<center><h1>Shadow</h1></center>
</div>
<div class="fill1">
<center><h1>Shadow</h1></center>
</div>

</div>

<br><br><br>

<!--- Example #2 --->
<style>
.light2 { top:-1; left:-2; color:white; }
.shade2 { top:+1; left:+2; color:black; }
.fill2 { top:0; left:0; color:silver; } </style>
<div class=Example2>
<div class="light2">
<center><h1>Emboss Background Example</h1></center>
</div>
<div class="shade2">
<center><h1>Emboss Background Example</h1></center>
</div>
<div class="fill2">
<center><h1>Emboss Background Example</h1></center>
</div>
</div>

<br><br><br>

<!--- Example #3 --->
<style>
.light3 { top:-2; left:-2; color:white; }
.shade3 { top:+2; left:+2; color:lightblue; }
.fill3 { top:0; left:0; color:blue; } </style>
<div class=Example3>
<div class="light3">
<center><h1>Emboss Color Example</h1></center>
</div>
<div class="shade3">
<center><h1>Emboss Color Example</h1></center>
</div>
<div class="fill3">
<center><h1>Emboss Color Example</h1></center>
</div>
</div>

<br><br><br>

<!--- Example #4 --->
<style>
.light4 { top:-2; left:-2; color:yellow; }
.shade4 { top:+2; left:+2; color:yellow; }
.fill4 { top:0; left:0; color:darkgreen; } </style>
<div class=Example4>
<div class="light4">
<center><h1>Color Highlight Example</h1></center>
</div>
<div class="shade4">
<center><h1>Color Highlight Example</h1></center>
</div>
<div class="fill4">
<center><h1>Color Highlight Example</h1></center>
</div>
</div>


Texto en grande que salta por toda la pantalla
Ejemplo:
http://www.cyberiapc.com/aascripter/samples/TextEffects/sub12.htm

Funciona en:


entre las etiquetas <BODY> Y </BODY>
Código:
<style type="text/css">

#supertext {
position:absolute;
left:0;
top:0;
visibility:hide;
visibility:hidden;

}

</style>


<script language="JavaScript1.2">

/*
Bouncy message script- By Dynamicdrive.com
Code based on Lloyd Hassell's, at http://www.dynamicdrive.com/dynamicindex4/bounceimage.htm
For full source, TOS, and 100s DTHML scripts, visit http://dynamicdrive.com
*/

//Configure the below three variables

//1) Set message to display (HTML accepted)
var thecontent='<h2><font color="#0000FF">Welcome to Dynamic Drive!</font></h2>'
//2) Set delay after which message should be hidden, in miliseconds ('' makes it incessantly visible on the screen)
var hidetimer='';
//3) Set speed of animation (1-50), where larger is faster
var BallSpeed = 20;



///NO NEED TO EDIT BELOW THIS LINE///////////

var contentWidth;
var contentHeight;
var maxBallSpeed = 50;


var xMax;
var yMax;
var xPos = 0;
var yPos = 0;
var xDir = 'right';
var yDir = 'down';
var superballRunning = true;
var tempBallSpeed;
var currentBallSrc;
var newXDir;
var newYDir;

function initializeBall() {
   if (document.all) {
      xMax = document.body.clientWidth
      yMax = document.body.clientHeight
      document.all("supertext").style.visibility = "visible";
      contentWidth=supertext.offsetWidth
      contentHeight=supertext.offsetHeight
      }
   else if (document.layers) {
      xMax = window.innerWidth;
      yMax = window.innerHeight;
      contentWidth=document.supertext.document.width
      contentHeight=document.supertext.document.height
      document.layers["supertext"].visibility = "show";
      }
   setTimeout('moveBall()',400);
   if (hidetimer!='')
   setTimeout("hidetext()",hidetimer)
   }

function moveBall() {
   if (superballRunning == true) {
      calculatePosition();
      if (document.all) {
         document.all("supertext").style.left = xPos + document.body.scrollLeft;
         document.all("supertext").style.top = yPos + document.body.scrollTop;
         }
      else if (document.layers) {
         document.layers["supertext"].left = xPos + pageXOffset;
         document.layers["supertext"].top = yPos + pageYOffset;
         }
      animatetext=setTimeout('moveBall()',20);
      }
   }

function calculatePosition() {
   if (xDir == "right") {
      if (xPos > (xMax - contentWidth - BallSpeed)) {
         xDir = "left";
         }
      }
   else if (xDir == "left") {
      if (xPos < (0 + BallSpeed)) {
         xDir = "right";
         }
      }
   if (yDir == "down") {
      if (yPos > (yMax - contentHeight - BallSpeed)) {
         yDir = "up";
         }
      }
   else if (yDir == "up") {
      if (yPos < (0 + BallSpeed)) {
         yDir = "down";
         }
      }
   if (xDir == "right") {
      xPos = xPos + BallSpeed;
      }
   else if (xDir == "left") {
      xPos = xPos - BallSpeed;
      }
   else {
      xPos = xPos;
      }
   if (yDir == "down") {
      yPos = yPos + BallSpeed;
      }
   else if (yDir == "up") {
      yPos = yPos - BallSpeed;
      }
   else {
      yPos = yPos;
      }
   }

function hidetext(){
if (document.all)
supertext.style.visibility="hidden"
else if (document.layers)
document.supertext.visibility="hide"
clearTimeout(animatetext)
}

if (document.all||document.layers){
document.write('<span id="supertext"><nobr>'+thecontent+'</nobr></span>')
window.onload = initializeBall;
window.onresize = new Function("window.location.reload()");
}

</script>


Efecto texto en desvanesimiento con scroll (muy bueno)
Ejemplo:
http://www.cyberiapc.com/aascripter/samples/TextEffects/sub15.htm

Funciona en:


entre las etiquetas <HEAD> Y </HEAD>
Código:
<style TYPE="text/css">
   <!--
   .TextScrollStyle {
      visibility:hidden;
      font-family:Verdana;
      font-weight:bold;
      text-align:center;
      padding:0;
      margin:0;
      width:100%;
      overflow:hidden;
   }

   -->
   </style>
<script language="JavaScript1.2">

/*
Dynamic Fader Script (updated: 00/08/05)
Created and submitted by Nicholas Poh (hwinmain@yahoo.com) to
Dynamicdrive.com
Key modifications by Dynamic Drive for stability/ efficiency in NS
For full source code, usage terms, and 100s more scripts, visit
http://dynamicdrive.com
*/

//1) Configure messages:
      var TS_message = new Array();
             TS_message[0] = '<div align="left">Hello there</div>';
          TS_message[1] = '<div align="left">Wow... hope you
like it!</div>';
      TS_message[2] = '<div align="left">Script downloaded from
<A HREF="http://www.cyberiapc.com">CyberiaPC.com</A></div>';

//2) Configure fader width and colors:
             var TS_scrollwidth=400      //configure fader width
      var TS_colorFG = 0x000000;   // Text color
      var TS_colorBG = 0xFFFFFF;  //bgColor

             // uncomment any value you wanted to change
      //var TS_ymax    = 50;      
   // How many pixel to move
      //var TS_ystep   = 1;      
   // 1 or -1 only (Scroll direction)
      //var TS_speed   = 2;      
   // The smaller the value the faster
      //var TS_pause   = 100;      
   // Pause time(milisecond) between messages
      var TS_fadestep= 20;      
   // Steps to fade in and out

             if (document.all)
             
document.write('<style>#containerarea{width:'+TS_scrollwidth+'}</style
>')
</script>


Entre las etiquetas <BODY> Y </BODY>
Código:
<DIV id="containerarea">
<SCRIPT LANGUAGE="JavaScript1.2" SRC="textfader.js"></SCRIPT>
</DIV>

Relosj que sigue al cursor

bueno con este codigo que les dejo tendran un reloj que les
sigue a todas parte marcando hora dia y año

Funciona en:


Código:
<///Traducido y modificado por www.creatupropiaweb.com///><SCRIPT language=JavaScript>
dCol='0000FF';//date colour.
fCol='FF00FF';//face colour.
sCol='00CC00';//seconds colour.
mCol='FF0000';//minutes colour.
hCol='FF0000';//hours colour.
ClockHeight=30;
ClockWidth=30;
ClockFromMouseY=0;
ClockFromMouseX=100;

//Alter nothing below! Alignments will be lost!

d=new Array("DOMINGO","LUNES","MARTES","MIERCOLES","JUEVES","VIERNES","SABADO");
m=new Array("ENERO","FEBRERO","MARZO","ABRIL","MAYO","JUNIO","JULIO","AGOSTO","SEPTIEMBRE","OCTUBRE","NOVIEMBRE","DICIEMBRE");
date=new Date();
day=date.getDate();
year=date.getYear();
if (year < 2000) year=year+1900;
TodaysDate=" "+d[date.getDay()]+" "+day+" "+m[date.getMonth()]+" "+year;
D=TodaysDate.split('');
H='...';
H=H.split('');
M='....';
M=M.split('');
S='.....';
S=S.split('');
Face='1 2 3 4 5 6 7 8 9 10 11 12';
font='Arial';
size=1;
speed=0.6;
ns=(document.layers);
ie=(document.all);
Face=Face.split(' ');
n=Face.length;
a=size*10;
ymouse=0;
xmouse=0;
scrll=0;
props="<font face="+font+" size="+size+" color="+fCol+"><B>";
props2="<font face="+font+" size="+size+" color="+dCol+"><B>";
Split=360/n;
Dsplit=360/D.length;
HandHeight=ClockHeight/4.5
HandWidth=ClockWidth/4.5
HandY=-7;
HandX=-2.5;
scrll=0;
step=0.06;
currStep=0;
y=new Array();x=new Array();Y=new Array();X=new Array();
for (i=0; i < n; i++){y[i]=0;x[i]=0;Y[i]=0;X[i]=0}
Dy=new Array();Dx=new Array();DY=new Array();DX=new Array();
for (i=0; i < D.length; i++){Dy[i]=0;Dx[i]=0;DY[i]=0;DX[i]=0}
if (ns){
for (i=0; i < D.length; i++)
document.write('<layer name="nsDate'+i+'" top=0 left=0 height='+a+' width='+a+'><center>'+props2+D[i]+'</font></center></layer>');
for (i=0; i < n; i++)
document.write('<layer name="nsFace'+i+'" top=0 left=0 height='+a+' width='+a+'><center>'+props+Face[i]+'</font></center></layer>');
for (i=0; i < S.length; i++)
document.write('<layer name=nsSeconds'+i+' top=0 left=0 width=15 height=15><font face=Arial size=3 color='+sCol+'><center><b>'+S[i]+'</b></center></font></layer>');
for (i=0; i < M.length; i++)
document.write('<layer name=nsMinutes'+i+' top=0 left=0 width=15 height=15><font face=Arial size=3 color='+mCol+'><center><b>'+M[i]+'</b></center></font></layer>');
for (i=0; i < H.length; i++)
document.write('<layer name=nsHours'+i+' top=0 left=0 width=15 height=15><font face=Arial size=3 color='+hCol+'><center><b>'+H[i]+'</b></center></font></layer>');
}
if (ie){
document.write('<div id="Od" style="position:absolute;top:0px;left:0px"><div style="position:relative">');
for (i=0; i < D.length; i++)
document.write('<div id="ieDate" style="position:absolute;top:0px;left:0;height:'+a+';width:'+a+';text-align:center">'+props2+D[i]+'</B></font></div>');
document.write('</div></div>');
document.write('<div id="Of" style="position:absolute;top:0px;left:0px"><div style="position:relative">');
for (i=0; i < n; i++)
document.write('<div id="ieFace" style="position:absolute;top:0px;left:0;height:'+a+';width:'+a+';text-align:center">'+props+Face[i]+'</B></font></div>');
document.write('</div></div>');
document.write('<div id="Oh" style="position:absolute;top:0px;left:0px"><div style="position:relative">');
for (i=0; i < H.length; i++)
document.write('<div id="ieHours" style="position:absolute;width:16px;height:16px;font-family:Arial;font-size:16px;color:'+hCol+';text-align:center;font-weight:bold">'+H[i]+'</div>');
document.write('</div></div>');
document.write('<div id="Om" style="position:absolute;top:0px;left:0px"><div style="position:relative">');
for (i=0; i < M.length; i++)
document.write('<div id="ieMinutes" style="position:absolute;width:16px;height:16px;font-family:Arial;font-size:16px;color:'+mCol+';text-align:center;font-weight:bold">'+M[i]+'</div>');
document.write('</div></div>')
document.write('<div id="Os" style="position:absolute;top:0px;left:0px"><div style="position:relative">');
for (i=0; i < S.length; i++)
document.write('<div id="ieSeconds" style="position:absolute;width:16px;height:16px;font-family:Arial;font-size:16px;color:'+sCol+';text-align:center;font-weight:bold">'+S[i]+'</div>');
document.write('</div></div>')
}
(ns)?window.captureEvents(Event.MOUSEMOVE):0;
function Mouse(evnt){
ymouse = (ns)?evnt.pageY+ClockFromMouseY-(window.pageYOffset):event.y+ClockFromMouseY;
xmouse = (ns)?evnt.pageX+ClockFromMouseX:event.x+ClockFromMouseX;
}
(ns)?window.onMouseMove=Mouse:document.onmousemove=Mouse;
function ClockAndAssign(){
time = new Date ();
secs = time.getSeconds();
sec = -1.57 + Math.PI * secs/30;
mins = time.getMinutes();
min = -1.57 + Math.PI * mins/30;
hr = time.getHours();
hrs = -1.575 + Math.PI * hr/6+Math.PI*parseInt(time.getMinutes())/360;
if (ie){
Od.style.top=window.document.body.scrollTop;
Of.style.top=window.document.body.scrollTop;
Oh.style.top=window.document.body.scrollTop;
Om.style.top=window.document.body.scrollTop;
Os.style.top=window.document.body.scrollTop;
}
for (i=0; i < n; i++){
 var F=(ns)?document.layers['nsFace'+i]:ieFace[i].style;
 F.top=y[i] + ClockHeight*Math.sin(-1.0471 + i*Split*Math.PI/180)+scrll;
 F.left=x[i] + ClockWidth*Math.cos(-1.0471 + i*Split*Math.PI/180);
 }
for (i=0; i < H.length; i++){
 var HL=(ns)?document.layers['nsHours'+i]:ieHours[i].style;
 HL.top=y[i]+HandY+(i*HandHeight)*Math.sin(hrs)+scrll;
 HL.left=x[i]+HandX+(i*HandWidth)*Math.cos(hrs);
 }
for (i=0; i < M.length; i++){
 var ML=(ns)?document.layers['nsMinutes'+i]:ieMinutes[i].style;
 ML.top=y[i]+HandY+(i*HandHeight)*Math.sin(min)+scrll;
 ML.left=x[i]+HandX+(i*HandWidth)*Math.cos(min);
 }
for (i=0; i < S.length; i++){
 var SL=(ns)?document.layers['nsSeconds'+i]:ieSeconds[i].style;
 SL.top=y[i]+HandY+(i*HandHeight)*Math.sin(sec)+scrll;
 SL.left=x[i]+HandX+(i*HandWidth)*Math.cos(sec);
 }
for (i=0; i < D.length; i++){
 var DL=(ns)?document.layers['nsDate'+i]:ieDate[i].style;
 DL.top=Dy[i] + ClockHeight*1.5*Math.sin(currStep+i*Dsplit*Math.PI/180)+scrll;
 DL.left=Dx[i] + ClockWidth*1.5*Math.cos(currStep+i*Dsplit*Math.PI/180);
 }
currStep-=step;
}
function Delay(){
scrll=(ns)?window.pageYOffset:0;
Dy[0]=Math.round(DY[0]+=((ymouse)-DY[0])*speed);
Dx[0]=Math.round(DX[0]+=((xmouse)-DX[0])*speed);
for (i=1; i < D.length; i++){
Dy[i]=Math.round(DY[i]+=(Dy[i-1]-DY[i])*speed);
Dx[i]=Math.round(DX[i]+=(Dx[i-1]-DX[i])*speed);
}
y[0]=Math.round(Y[0]+=((ymouse)-Y[0])*speed);
x[0]=Math.round(X[0]+=((xmouse)-X[0])*speed);
for (i=1; i < n; i++){
y[i]=Math.round(Y[i]+=(y[i-1]-Y[i])*speed);
x[i]=Math.round(X[i]+=(x[i-1]-X[i])*speed);
}
ClockAndAssign();
setTimeout('Delay()',20);
}
if (ns||ie)window.onload=Delay;
</SCRIPT>



 

Votanos


    Ratingsweb

Web Recomendadas

http://img696.imageshack.us/img696/2554/13843126178347474815345.jpg

Ultimos usuario Registrados

  • Rammstein-Cf
  • axtrix
  • thehard
  • brian
  • flama111
  • iGnaCi0

Leyenda

  • : No Funciona
  • : Nuevo
  • : Reparando

Buscanos en...




Este sitio web fue creado de forma gratuita con PaginaWebGratis.es. ¿Quieres también tu sitio web propio?
Registrarse gratis