HTML tutorijali,Java skripte,Hack fajlovi......

ADMINISTRATOR
Učlanjen(a)
10.05.1971
Poruka
54.332
EFEKAT RUZE U MISU

Mozete postaviti u vasem htlm fajlu da pomeranjem misa za vama ide cvet ruze koji se otvara i zatvara.To mozete uraditi tako sto iskopirate java skriptu u vas body deo html fajla.Skripta glasi ovako.....

PHP:
<SCRIPT type="text/javascript">
/*
Blooming Flower Cursor Trail
Visit http://www.rainbow.arch.scriptmania.com/scripts/
*/

var trailimage=["http://rainbow.arch.scriptmania.com/scripts/roseopen.gif", 40, 40] // image, width, height
var ofsm=[5,-10]

if (document.getElementById || document.all)
document.write('<div id="trailimageid" style="position:absolute;visibility:visible;left:0px;top:0px;width:1px;height:1px"><img src="'+trailimage[0]+'" border="0" width="'+trailimage[1]+'px" height="'+trailimage[2]+'px"></div>')

function gettrailobj(){
if (document.getElementById)
return document.getElementById("trailimageid").style
else if (document.all)
return document.all.trailimagid.style
}

function truebody(){
return (!window.opera && document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body
}

function followmouse(e){
var xcoord=ofsm[0]
var ycoord=ofsm[1]
if (typeof e != "undefined"){
xcoord+=e.pageX
ycoord+=e.pageY
}
else if (typeof window.event !="undefined"){
xcoord+=truebody().scrollLeft+event.clientX
ycoord+=truebody().scrollTop+event.clientY
}
var docwidth=document.all? truebody().scrollLeft+truebody().clientWidth : pageXOffset+window.innerWidth-15
var docheight=document.all? Math.max(truebody().scrollHeight, truebody().clientHeight) : Math.max(document.body.offsetHeight, window.innerHeight)
if (xcoord+trailimage[1]+3>docwidth || ycoord+trailimage[2]> docheight)
gettrailobj().display="none"
else 
gettrailobj().display=""
gettrailobj().left=xcoord+"px"
gettrailobj().top=ycoord+"px"
}

document.onmousemove=followmouse

</SCRIPT>

Na crnoj pozadini recimo ovaj efekat bi izgledao ovako.......


snap201107082355.jpg
 
ADMINISTRATOR
Učlanjen(a)
10.05.1971
Poruka
54.332
ANALOGNI SAT EFEKAT U MISU

Meni jako drag efekat koji prilikom pomeranja misa pomerai sat koji ide za njim.Inace preveden je sat na nas jezik i meri tacno vreme kao i datum,mesec,godinu.Mozete ovaj efekat postaviti tako sto cete kopirati java skriptu koja je iz dva dela i to u okviru head dela html fajla kopiracete sledecu skriptu....

PHP:
<style type="text/css">
<!--
/*Do not Alter these. Set for alignment*/
.css1{
position:absolute;top:0px;left:0px;
width:16px;height:16px;
font-family:Arial,sans-serif;
font-size:16px;
text-align:center;
font-weight:bold;
}
.css2{
position:absolute;top:0px;left:0px;
width:10px;height:10px;
font-family:Arial,sans-serif;
font-size:10px;
text-align:center;
}
//-->
</style>

Takodjeje potrebno i kopirati drugi deo skripte u body html delu bas kako je data skripta i to.....

PHP:
<BODY><HTML>
<SCRIPT LANGUAGE="JavaScript">
<!-- Mouse Follow Clock 3 from Rainbow Arch -->
<!-- This script and many more from : -->
<!-- http://rainbow.arch.scriptmania.com -->

<!-- Mouse Follow Clock 3 from http://rainbow.arch.scriptmania.com
//Hide from older browsers 
if (document.getElementById&&!document.layers){

//Clock colours
dCol='#00ff00';//date colour.
fCol='#ffffff';//face colour.
sCol='#ffffff';//seconds colour.
mCol='#00ff00';//minutes colour.
hCol='#00ff00';//hours colour.

//Controls
del=0.6;  //Follow mouse speed.
ref=40;   //Run speed (timeout).

//Alter nothing below! Alignments will be lost!
var ieType=(typeof window.innerWidth != 'number');
var docComp=(document.compatMode);
var docMod=(docComp && docComp.indexOf("CSS") != -1);
var ieRef=(ieType && docMod)
?document.documentElement:document.body;
theDays=new Array("NEDELJA","PONEDELJAK","UTORAK","SREDA","CETVRTAK","PETAK","SUBOTA");
theMonths=new Array("JANUAR","FEBRUAR","MART","APRIL","MAJ","JUN","JUL","AUGUST","SEPTEMBAR","OCTOBAR","NOVEMBAR","DECEMBAR");
date=new Date();
day=date.getDate();
year=date.getYear();
if (year < 2000) year=year+1900; 
tmpdate=" "+theDays[date.getDay()]+" "+day+" "+theMonths[date.getMonth()]+" "+year;
D=tmpdate.split("");
N='3 4 5 6 7 8 9 10 11 12 1 2';
N=N.split(" ");
F=N.length;
H='...';
H=H.split("");
M='....';
M=M.split("");
S='.....';
S=S.split("");
siz=40;
eqf=360/F;
eqd=360/D.length;
han=siz/5.5;
ofy=-7;
ofx=-3;
ofst=70;
tmr=null;
vis=true;
mouseY=0;
mouseX=0;
dy=new Array();
dx=new Array();
zy=new Array();
zx=new Array();
tmps=new Array();
tmpm=new Array(); 
tmph=new Array();
tmpf=new Array(); 
tmpd=new Array();
var sum=parseInt(D.length+F+H.length+M.length+S.length)+1;
for (i=0; i < sum; i++){
dy[i]=0;
dx[i]=0;
zy[i]=0;
zx[i]=0;
}

algn=new Array();
for (i=0; i < D.length; i++){
algn[i]=(parseInt(D[i]) || D[i]==0)?10:9;
document.write('<div id="_date'+i+'" class="css2" style="font-size:'+algn[i]+'px;color:'+dCol+'">'+D[i]+'<\/div>');
tmpd[i]=document.getElementById("_date"+i).style;
}
for (i=0; i < F; i++){
document.write('<div id="_face'+i+'" class="css2" style="color:'+fCol+'">'+N[i]+'<\/div>');
tmpf[i]=document.getElementById("_face"+i).style; 
}
for (i=0; i < H.length; i++){
document.write('<div id="_hours'+i+'" class="css1" style="color:'+hCol+'">'+H[i]+'<\/div>');
tmph[i]=document.getElementById("_hours"+i).style;
}
for (i=0; i < M.length; i++){
document.write('<div id="_minutes'+i+'" class="css1" style="color:'+mCol+'">'+M[i]+'<\/div>');
tmpm[i]=document.getElementById("_minutes"+i).style; 
}
for (i=0; i < S.length; i++){
document.write('<div id="_seconds'+i+'" class="css1" style="color:'+sCol+'">'+S[i]+'<\/div>');
tmps[i]=document.getElementById("_seconds"+i).style;         
}

function onoff(){
if (vis){ 
 vis=false;
 document.getElementById("control").value="Clock On";
 }
else{ 
 vis=true;
 document.getElementById("control").value="Clock Off";
 Delay();
 }
kill();
}

function kill(){
if (vis) 
 document.onmousemove=mouse;
else 
 document.onmousemove=null;
} 

function mouse(e){
var msy = (!ieType)?window.pageYOffset:0;
if (!e) e = window.event;    
 if (typeof e.pageY == 'number'){
  mouseY = e.pageY + ofst - msy;
  mouseX = e.pageX + ofst;
 }
 else{
  mouseY = e.clientY + ofst - msy;
  mouseX = e.clientX + ofst;
 }
if (!vis) kill();
}
document.onmousemove=mouse;

function winDims(){
winH=(ieType)?ieRef.clientHeight:window.innerHeight; 
winW=(ieType)?ieRef.clientWidth:window.innerWidth;
}
winDims();
window.onresize=new Function("winDims()");

function ClockAndAssign(){
time = new Date();
secs = time.getSeconds();
sec = Math.PI * (secs-15) / 30;
mins = time.getMinutes();
min = Math.PI * (mins-15) / 30;
hrs = time.getHours();
hr = Math.PI * (hrs-3) / 6 + Math.PI * parseInt(time.getMinutes()) / 360;

for (i=0; i < S.length; i++){
 tmps[i].top=dy[D.length+F+H.length+M.length+i]+ofy+(i*han)*Math.sin(sec)+scrollY+"px";
 tmps[i].left=dx[D.length+F+H.length+M.length+i]+ofx+(i*han)*Math.cos(sec)+"px";
 }
for (i=0; i < M.length; i++){
 tmpm[i].top=dy[D.length+F+H.length+i]+ofy+(i*han)*Math.sin(min)+scrollY+"px";
 tmpm[i].left=dx[D.length+F+H.length+i]+ofx+(i*han)*Math.cos(min)+"px";
 }
for (i=0; i < H.length; i++){
 tmph[i].top=dy[D.length+F+i]+ofy+(i*han)*Math.sin(hr)+scrollY+"px";
 tmph[i].left=dx[D.length+F+i]+ofx+(i*han)*Math.cos(hr)+"px";
 }
for (i=0; i < F; i++){
 tmpf[i].top=dy[D.length+i]+siz*Math.sin(i*eqf*Math.PI/180)+scrollY+"px";
 tmpf[i].left=dx[D.length+i]+siz*Math.cos(i*eqf*Math.PI/180)+"px";
 }
for (i=0; i < D.length; i++){
 tmpd[i].top=dy[i]+siz*1.5*Math.sin(-sec+i*eqd*Math.PI/180)+scrollY+"px";
 tmpd[i].left=dx[i]+siz*1.5*Math.cos(-sec+i*eqd*Math.PI/180)+"px";
 }
if (!vis)clearTimeout(tmr);
}

buffW=(ieType)?80:90;
function Delay(){
scrollY=(ieType)?ieRef.scrollTop:window.pageYOffset;
if (!vis){
 dy[0]=-100;
 dx[0]=-100;
}
else{
 zy[0]=Math.round(dy[0]+=((mouseY)-dy[0])*del);
 zx[0]=Math.round(dx[0]+=((mouseX)-dx[0])*del);
}
for (i=1; i < sum; i++){
 if (!vis){
  dy[i]=-100;
  dx[i]=-100;
 }
 else{
  zy[i]=Math.round(dy[i]+=(zy[i-1]-dy[i])*del);
  zx[i]=Math.round(dx[i]+=(zx[i-1]-dx[i])*del);
 }
if (dy[i-1] >= winH-80) dy[i-1]=winH-80;
if (dx[i-1] >= winW-buffW) dx[i-1]=winW-buffW;
}

tmr=setTimeout('Delay()',ref);
ClockAndAssign();
}
window.onload=Delay;
}
//-->
</script>
</BODY></HTML>

To bi otprilike izgledalo ovako..........



snap201107090005.jpg
 
ADMINISTRATOR
Učlanjen(a)
10.05.1971
Poruka
54.332
FIKSNI ANALOGNI SAT

Mozete postaviti u vasem htlm fajlu lep analogni sat koji meri vreme.Jednostavno samo treba kopirati java skriptu u vas head html fajla.Skripta analognog sata izgleda ovako......

PHP:
<SCRIPT LANGUAGE="JavaScript">

// Bottom Right Clock from Rainbow Arch
// This script and many more from :
// http://rainbow.arch.scriptmania.com

fCol='FFFFFF'; //face colour.
sCol='FF0000'; //seconds colour.
mCol='00FFFF'; //minutes colour.
hCol='00FFFF'; //hours colour.

Ybase=35; //Clock height.
Xbase=35; //Clock width.

// Alter nothing below! Alignments will be lost!

H='...';
H=H.split('');
M='....';
M=M.split('');
S='.....';
S=S.split('');
NS4=(document.layers);
NS6=(document.getElementById&&!document.all);
IE4=(document.all);
Ypos=0;
Xpos=0;
dots=12;
Split=360/dots;
if (NS6){
for (i=1; i < dots+1; i++){
document.write('<div id="n6Digits'+i+'" style="position:absolute;top:0px;left:0px;width:30px;height:30px;font-family:Arial;font-size:10px;color:#'+fCol+';text-align:center;padding-top:10px">'+i+'</div>');
}
for (i=0; i < M.length; i++){
document.write('<div id="Ny'+i+'" style="position:absolute;top:0px;left:0px;width:2px;height:2px;font-size:2px;background:#'+mCol+'"></div>');
}
for (i=0; i < H.length; i++){
document.write('<div id="Nz'+i+'" style="position:absolute;top:0px;left:0px;width:2px;height:2px;font-size:2px;background:#'+hCol+'"></div>');
}
for (i=0; i < S.length; i++){
document.write('<div id="Nx'+i+'" style="position:absolute;top:0px;left:0px;width:2px;height:2px;font-size:2px;background:#'+sCol+'"></div>');
}
}
if (NS4){
dgts='1 2 3 4 5 6 7 8 9 10 11 12';
dgts=dgts.split(' ')
for (i=0; i < dots; i++){
document.write('<PeelLayer name=nsDigits'+i+' top=0 left=0 height=30 width=30><center><font face=Arial size=1 color='+fCol+'>'+dgts[i]+'</font></center></PeelLayer>');
}
for (i=0; i < M.length; i++){
document.write('<PeelLayer name=ny'+i+' top=0 left=0 bgcolor='+mCol+' clip="0,0,2,2"></PeelLayer>');
}
for (i=0; i < H.length; i++){
document.write('<PeelLayer name=nz'+i+' top=0 left=0 bgcolor='+hCol+' clip="0,0,2,2"></PeelLayer>');
}
for (i=0; i < S.length; i++){
document.write('<PeelLayer name=nx'+i+' top=0 left=0 bgcolor='+sCol+' clip="0,0,2,2"></PeelLayer>');
}
}
if (IE4){
document.write('<div style="position:absolute;top:0px;left:0px"><div style="position:relative">');
for (i=1; i < dots+1; i++){
document.write('<div id="ieDigits" style="position:absolute;top:0px;left:0px;width:30px;height:30px;font-family:Arial;font-size:10px;color:'+fCol+';text-align:center;padding-top:10px">'+i+'</div>');
}
document.write('</div></div>')
document.write('<div style="position:absolute;top:0px;left:0px"><div style="position:relative">');
for (i=0; i < M.length; i++){
document.write('<div id=y style="position:absolute;width:2px;height:2px;font-size:2px;background:'+mCol+'"></div>');
}
document.write('</div></div>')
document.write('<div style="position:absolute;top:0px;left:0px"><div style="position:relative">');
for (i=0; i < H.length; i++){
document.write('<div id=z style="position:absolute;width:2px;height:2px;font-size:2px;background:'+hCol+'"></div>');
}
document.write('</div></div>')
document.write('<div style="position:absolute;top:0px;left:0px"><div style="position:relative">');
for (i=0; i < S.length; i++){
document.write('<div id=x style="position:absolute;width:2px;height:2px;font-size:2px;background:'+sCol+'"></div>');
}
document.write('</div></div>')
}

function clock(){
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.57 + Math.PI * hr/6 + Math.PI*parseInt(time.getMinutes())/360;

if (NS6){
Ypos=window.pageYOffset+window.innerHeight-Ybase-25;
Xpos=window.pageXOffset+window.innerWidth-Xbase-30;
for (i=1; i < dots+1; i++){
 document.getElementById("n6Digits"+i).style.top=Ypos-15+Ybase*Math.sin(-1.56 +i *Split*Math.PI/180)
 document.getElementById("n6Digits"+i).style.left=Xpos-15+Xbase*Math.cos(-1.56 +i*Split*Math.PI/180)
 }
for (i=0; i < S.length; i++){
 document.getElementById("Nx"+i).style.top=Ypos+i*Ybase/4.1*Math.sin(sec);
 document.getElementById("Nx"+i).style.left=Xpos+i*Xbase/4.1*Math.cos(sec);
 }
for (i=0; i < M.length; i++){
 document.getElementById("Ny"+i).style.top=Ypos+i*Ybase/4.1*Math.sin(min);
 document.getElementById("Ny"+i).style.left=Xpos+i*Xbase/4.1*Math.cos(min);
 }
for (i=0; i < H.length; i++){
 document.getElementById("Nz"+i).style.top=Ypos+i*Ybase/4.1*Math.sin(hrs);
 document.getElementById("Nz"+i).style.left=Xpos+i*Xbase/4.1*Math.cos(hrs);
 }
}
if (NS4){
Ypos=window.pageYOffset+window.innerHeight-Ybase-20;
Xpos=window.pageXOffset+window.innerWidth-Xbase-30;
for (i=0; i < dots; ++i){
 document.layers["nsDigits"+i].top=Ypos-5+Ybase*Math.sin(-1.045 +i*Split*Math.PI/180)
 document.layers["nsDigits"+i].left=Xpos-15+Xbase*Math.cos(-1.045 +i*Split*Math.PI/180)
 }
for (i=0; i < S.length; i++){
 document.layers["nx"+i].top=Ypos+i*Ybase/4.1*Math.sin(sec);
 document.layers["nx"+i].left=Xpos+i*Xbase/4.1*Math.cos(sec);
 }
for (i=0; i < M.length; i++){
 document.layers["ny"+i].top=Ypos+i*Ybase/4.1*Math.sin(min);
 document.layers["ny"+i].left=Xpos+i*Xbase/4.1*Math.cos(min);
 }
for (i=0; i < H.length; i++){
 document.layers["nz"+i].top=Ypos+i*Ybase/4.1*Math.sin(hrs);
 document.layers["nz"+i].left=Xpos+i*Xbase/4.1*Math.cos(hrs);
 }
}

if (IE4){
Ypos=document.body.scrollTop+window.document.body.clientHeight-Ybase-20;
Xpos=document.body.scrollLeft+window.document.body.clientWidth-Xbase-20;
for (i=0; i < dots; ++i){
 ieDigits[i].style.pixelTop=Ypos-15+Ybase*Math.sin(-1.045 +i *Split*Math.PI/180)
 ieDigits[i].style.pixelLeft=Xpos-15+Xbase*Math.cos(-1.045 +i *Split*Math.PI/180)
 }
for (i=0; i < S.length; i++){
 x[i].style.pixelTop =Ypos+i*Ybase/4.1*Math.sin(sec);
 x[i].style.pixelLeft=Xpos+i*Xbase/4.1*Math.cos(sec);
 }
for (i=0; i < M.length; i++){
 y[i].style.pixelTop =Ypos+i*Ybase/4.1*Math.sin(min);
 y[i].style.pixelLeft=Xpos+i*Xbase/4.1*Math.cos(min);
 }
for (i=0; i < H.length; i++){
 z[i].style.pixelTop =Ypos+i*Ybase/4.1*Math.sin(hrs);
 z[i].style.pixelLeft=Xpos+i*Xbase/4.1*Math.cos(hrs);
 }
}
setTimeout('clock()',100);
}
clock();
//-->
</SCRIPT>

Mozete podesiti u okviru same skripte u kom delu html prozora zelite postaviti sat.To bi recimo izgledalo ovako.....



snap201107090018.jpg
 
ADMINISTRATOR
Učlanjen(a)
10.05.1971
Poruka
54.332
SAT SA VREMENSKIM ZONAMA

Analogni sat sa vremenom u raznim vremenskim zonama koje imate u padajucem meniju (postavio sam i Srbiju) mozete jednostavno ubaciti u vas html fajl ako zelite.Potrebno je da java skriptu koja se sastoji iz dva dela iskopirate i to u okviru head dela sledecu java skriptu.....

PHP:
<style>

body { background-color: black; }
p { background-color: gray; }
h2 { background-color: red; }
ul { background-image: url(pics/cssT/smallPic.jpg);
     background-repeat: repeat-y;
     color: green;
 }

</style>

A zatim potrebno je i kopirati u okviru body dela vaseg html fajla i sledecu java skriptu.....

PHP:
<body bgcolor="#004080" text="#FFFFFF" onLoad="setTimeout('ClockAndAssign()',1000)">

<!-- Insert this after <BODY> tag -->

<div id="OffSet" style="position:absolute;width:60px;height:20px">

<!-- start removable world time part -->

<form name="where">
<select name="city" size="1" width="100" style="font-family:Arial;font-size:12px;width:100" onchange="lcl(this);nsixampm()"> 
<option value="" selected>Srbija</option>
<option value="0">London GMT</option> 
<option value="1">Rome</option>
<option value="2">Cairo</option>  
<option value="3">Moscow</option>
<option value="5">Karachi</option>
<option value="7">Bangkok</option>
<option value="8">Hong Kong</option>
<option value="9">Tokyo</option> 
<option value="10">Sydney</option>
<option value="12">Fiji</option>
<option value="-10">Hawaii</option>
<option value="-8">San Francisco</option> 
<option value="-7">Arizona</option>
<option value="-6">Chicargo</option>
<option value="-5">New York</option>
<option value="-3">Buenos Aires</option>
</select>
</form>
<!-- /end removable world time -->

</div>
<script language="JavaScript">
<!-- hide the script from old browsers --
ns=(document.layers);
ns6=(document.getElementById&&!document.all);
ie=(document.all);

/*Alter clock here!********************
Try to view in Netscape 4 & Explorer when 
manually positioning the clock. There are 
slight differences. N6 is same as IE!
Top=(ns)? Netscape 4 : N6/IE ;
Left=(ns)? Netscape 4 : N6/IE ;
******************************************/

Top=(ns)?90:92;
Left=(ns)?67:60;
Scroll=false;     //true or false. Top and Left void if true!
civCol='#ffff00'; //12 colour.
dotCol='#00ffff'; //dot colour.
hCol='#00ff00';   //hours colour.
mCol='#00cc00';   //minutes colour.
sCol='#ff0080';   //seconds colour.
ampmCol='#006090';//am-pm colour.

//**Alter nothing below! Alignments will be lost!**
h=3;
m=4;
s=5;
civ='1 2 3 4 5 6 7 8 9 10 11 12';
civ=civ.split(' ');
n=civ.length;
ClockHeight=30;
ClockWidth=30;
f12="<font face='Arial' size=1 color="+civCol+">";
e=360/n;
HandHeight=ClockHeight/4;
HandWidth=ClockWidth/4;
y=0;
x=0;
zone=0;
isitlocal=true;
ampm='';
n6timer=null;
if (!ns)
document.write("<div id='disp' style='position:absolute;width:50px;height:20px;text-align:center'></div>");
else
document.write("<layer name='disp' top=0 left=0 width=50 height=20></layer>");
for (i=0; i < n; i++){
if (!ns)
document.write('<div id="Civ'+i+'" style="position:absolute;width:15px;height:15px;text-align:center;color:#0000dd">'+f12+civ[i]+'</font></div>');
else
document.write('<layer name="Civ'+i+'" width=15 height=15><center>'+f12+civ[i]+'</font></center></layer>');
}
for (i=0; i < n; i++){
if (!ns)
document.write('<div id="D'+i+'" style="position:absolute;width:3px;height:3px;font-size:3px;background:'+dotCol+'"></div>');
else
document.write('<layer name="D'+i+'" bgcolor='+dotCol+' width=2 height=2></layer>');
}
for (i=0; i < h; i++){
if (!ns)
document.write('<div id="H'+i+'" style="position:absolute;width:3px;height:3px;font-size:2px;background:'+hCol+'"></div>');
else
document.write('<layer name="H'+i+'" bgcolor='+hCol+' width=2 height=2></layer>');
}
for (i=0; i < m; i++){
if (!ns)
document.write('<div id="M'+i+'" style="position:absolute;width:3px;height:3px;font-size:2px;background:'+mCol+'"></div>');
else
document.write('<layer name="M'+i+'" bgcolor='+mCol+' width=2 height=2></layer>');
}
for (i=0; i < s; i++){
if (!ns)
document.write('<div id="S'+i+'" style="position:absolute;width:3px;height:3px;font-size:2px;background:'+sCol+'"></div>');
else
document.write('<layer name="S'+i+'" bgcolor='+sCol+' width=2 height=2></layer>');
}

function lcl(z){
zone=z.options[z.selectedIndex].value;
isitlocal=(z.options[0].selected)?true:false;
clearTimeout(n6timer);
}
var _d=(ns||ie)?'document.':'document.getElementById("';
var _a=(ns||ns6)?'':'all.';
var _n6r=(ns6)?'")':'';
var _s=(ns)?'':'.style';
var Dsp=eval(_d+_a+"disp"+_n6r+_s);
var O=eval(_d+_a+"OffSet"+_n6r+_s);
function ClockAndAssign(){
now=new Date();
ofst=now.getTimezoneOffset()/60;
secs=now.getSeconds();
sec=-1.57+Math.PI*secs/30;
mins=now.getMinutes();
min=-1.57+Math.PI*mins/30;
hr=(isitlocal)?now.getHours():(now.getHours() + parseInt(ofst)) + parseInt(zone);
hrs=-1.575+Math.PI*hr/6+Math.PI*parseInt(now.getMinutes())/360;
if (hr < 0) hr+=24;
if (hr > 23) hr-=24;
ampm = (hr > 11)?"PM":"AM";
statusampm = ampm.toLowerCase();

hr2 = hr;
if (hr2 == 0) hr2=12;
(hr2 < 13)?hr2:hr2 %= 12;


var Q1=hr2+':'+((mins < 10)?"0"+mins:mins)+':'+((secs < 10)?"0"+secs:secs)+' '+statusampm;
var Q2=((hr < 10)?"0"+hr:hr)+':'+((mins < 10)?"0"+mins:mins)+':'+((secs < 10)?"0"+secs:secs);
sy=(ie)?document.body.scrollTop+window.document.body.clientHeight-ClockHeight*2:window.pageYOffset+window.innerHeight-ClockHeight*2;
sx=(ie)?document.body.scrollLeft+window.document.body.clientWidth-ClockWidth*2:window.pageXOffset+window.innerWidth-ClockWidth*3;
y=(Scroll)?sy:Top;
x=(Scroll)?sx:Left;
Dsp.top=y-17;
Dsp.left=x-24;
O.top=y-80;
O.left=(ns)?x-57:x-49;
for (i=0; i < s; i++){var d1=eval(_d+_a+"S"+i+_n6r+_s);d1.top=y+(i*HandHeight)*Math.sin(sec);d1.left=x+(i*HandWidth)*Math.cos(sec)}
for (i=0; i < m; i++){var d2=eval(_d+_a+"M"+i+_n6r+_s);d2.top=y+(i*HandHeight)*Math.sin(min);d2.left=x+(i*HandWidth)*Math.cos(min)}
for (i=0; i < h; i++){var d3=eval(_d+_a+"H"+i+_n6r+_s);d3.top=y+(i*HandHeight)*Math.sin(hrs);d3.left=x+(i*HandWidth)*Math.cos(hrs)}
for (i=0; i < n; i++){var d4=eval(_d+_a+"D"+i+_n6r+_s);d4.top=y+ ClockHeight*Math.sin(-1.0471+i*e*Math.PI/180);d4.left=x+ ClockWidth*Math.cos(-1.0471+i*e*Math.PI/180)}
for (i=0; i < n; i++){var d5=eval(_d+_a+"Civ"+i+_n6r+_s);d5.top=y-6+ClockHeight*1.4*Math.sin(-1.0471+i*e*Math.PI/180);d5.left=x-6+ClockWidth*1.4*Math.cos(-1.0471+i*e*Math.PI/180)}
if (ie)disp.innerHTML="<font face='Arial' size='6' color='"+ampmCol+"'>"+ampm+"</font>";
if (ns){
 Dsp.document.write("<font face='Arial' size='6' color='"+ampmCol+"'>"+ampm+"</font>");
 Dsp.document.close();
 }

//***status=Q1 is 24hr. ***** status=Q2 is 12hr. ***

window.status=Q1+'   '+Q2
setTimeout('ClockAndAssign()',100);
}
//**N6 AM/PM flashes when included above. Make slower?
function nsixampm(){
 if (ns6){
 document.getElementById("disp").innerHTML="<font face='Arial' size='6' color='"+ampmCol+"'>"+ampm+"</font>";
 n6timer=setTimeout('nsixampm()',10000);
 }
}
if (ns6)nsixampm();
window.onresize=function(){
if(ns){window.location.reload()}
}
//-->
</script>

To bi na primer izgledalo ovako........



snap201107090026.jpg
 
ADMINISTRATOR
Učlanjen(a)
10.05.1971
Poruka
54.332
DUGME SAT

U okviru vaseg html fajla mozete ako zelite i postaviti sat koji meri vreme u obliku dugmeta.To cete jednostavno uraditi tako sto cete iskopirati java skriptu u okviru body dela vaseg html fajla.Skropta izgleda ovako......

PHP:
<SCRIPT LANGUAGE="JavaScript">

<!-- Paste this code into the BODY of your HTML document  -->
<!-- This script from http://www.rainbow.arch.scriptmania.com -->

<!-- Begin
day = new Date();
miVisit = day.getTime();
function clock() {
dayTwo = new Date();
hrNow = dayTwo.getHours();
mnNow = dayTwo.getMinutes();    
scNow = dayTwo.getSeconds();
miNow = dayTwo.getTime();
if (hrNow == 0) {
hour = 12;
ap = " AM";
} else if(hrNow <= 11) {
ap = " AM";
hour = hrNow;
} else if(hrNow == 12) {
ap = " PM";
hour = 12;
} else if (hrNow >= 13) {
hour = (hrNow - 12);
ap = " PM";
}
if (hrNow >= 13) {
hour = hrNow - 12;
}
if (mnNow <= 9) {
min = "0" + mnNow;
}
else (min = mnNow)
if (scNow <= 9) {
secs = "0" + scNow;
} else {
secs = scNow;
}
time = hour + ":" + min + ":" + secs + ap;
document.form.button.value = time;
self.status = time;
setTimeout('clock()', 1000);
}
function timeInfo() {
milliSince = miNow;
milliNow = miNow - miVisit;
secsVisit = Math.round(milliNow / 1000);
minsVisit = Math.round((milliNow / 1000) / 60);
alert("There have been " + milliSince + " milliseconds since midnight, January 1, 1970.  "
+ "You have spent " + milliNow + " of those milliseconds on this page.  "
+ ".... About " + minsVisit + " minutes, and "
+ secsVisit + " seconds.");
}
document.write("<form name=\"form\">"
+ "<input type=button value=\"Click for info!\""
+ " name=button onClick=\"timeInfo()\"></form>");
onError = null;
clock();
// End -->
</SCRIPT>

To bi recimo bilo ovako a mozete po zelji u okviru same skripte odrediti u kom delu prozora zelite i postaviti ovaj sat.....


snap201107090101.jpg
 
ADMINISTRATOR
Učlanjen(a)
10.05.1971
Poruka
54.332
SLEPI MIS 1

Mozete postaviti i efekat slepih miseva u vas html fajl ako to i zelite.jednostavno potrebno je samo iskopirati java skriptu u okviru vaseg head dela html fajla.Skripta inace izgleda ovako....
PHP:
<script language="JavaScript1.2">
<!--
  /**
  ** Bats - Halloween -  JavaScript 
  ** This script and many more are free at
  ** http://rainbow.arch.scriptmania.com/scripts/
  */
Bat=new Image();

//////////CONFIGURE THE BATs SCRIPT HERE//////////////////

Bat.src="http://rainbow.arch.scriptmania.com/scripts/bat_1.gif";  // Specify path to your bat image
amount=20;  // Number of Bats, minimum must be 3
dismissafter=500;  // Seconds after which Bats should disappear, in seconds
step=0.3;  // Animation speed (smaller is slower)

//////////DO NOT EDIT PAST THIS LINE//////////////////

Xpos=700;  //Bats x coordinates, in pixel
Ypos=200;  //Bats y coordinates, in pixel

var ns6=document.getElementById&&!document.all
bats=new Array(3)
if (document.layers){
for (i=0; i < amount; i++) 
{document.write("<layer name=n"+i+" left=0 top=-50><a href='http://rainbow.arch.scriptmania.com'><img src='"+Bat.src+"' name='nsi' width=69 height=60 border=0></a></layer>")}
}
else if (document.all||ns6){
document.write('<div id="out" style="position:absolute;top:0;left:0"><div id="in" style="position:relative">');
for (i=0; i < amount; i++){
if (document.all)
document.write('<a href="http://rainbow.arch.scriptmania.com"><img src="'+Bat.src+'" id="msieBats" style="position:absolute;top:-50;left:0" border=0></a>')
else
document.write('<a href="http://rainbow.arch.scriptmania.com"><img src="'+Bat.src+'" id="ns6Bats'+i+'" width=69 height=60 style="position:absolute;top:-50;left:0" border=0></a>')
}
document.write('</div></div>');
}

yBase=xBase=currStep=a_count=0;
b_count=1;
c_count=2;
d_count=3;
move=1;
if (document.layers||ns6){
yBase=window.innerHeight/3;
xBase=window.innerWidth/6;
if (document.layers)
window.captureEvents(Event.MOUSEMOVE);

}
if (document.all){
yBase = window.document.body.offsetHeight/3;
xBase = window.document.body.offsetWidth/6;
}

function dismissBat(){
clearInterval(flyBat)
if (document.layers){
for (i2=0; i2 < amount; i2++){
document.layers['n'+i2].visibility="hide"
}
}
else if (document.all)
document.all.out.style.visibility="hidden"
else if (ns6)
document.getElementById("out").style.visibility="hidden"
}

if (document.layers){
for (i=0; i < amount; i++)
document.layers['n'+i].document.images['nsi'].src=Bat.src
}
else if (document.all){
for (i=0; i < amount; i++)
document.all.msieBats[i].src=Bat.src
}
else if (ns6){
for (i=0; i < amount; i++)
document.getElementById("ns6Bats"+i).src=Bat.src
}

function Animate(){
a_count+=move;
b_count+=move;
c_count+=move;
currStep+=step;
if (a_count >= bats.length) a_count=0;
if (b_count >= bats.length) b_count=0;
if (c_count >= bats.length) c_count=0;
if (document.layers){
for (i=0; i < amount; i++) {
  var NewL="n"+i
  document.layers[NewL].top = Ypos+yBase*Math.sin(((currStep)+i*3.7)/4)*Math.cos((currStep+i*35)/10)
  document.layers[NewL].left =Xpos+xBase*Math.cos(((currStep)+i*3.7)/4)*Math.cos((currStep+i*35)/62)
  }
}

if (document.all){
for (i=0; i < amount; i++){
  document.all.msieBats[i].style.pixelTop = Ypos+yBase*Math.sin(((currStep)+i*3.7)/4)*Math.cos((currStep+i*35)/10)
  document.all.msieBats[i].style.pixelLeft =Xpos+xBase*Math.cos(((currStep)+i*3.7)/4)*Math.cos((currStep+i*35)/62)
 }
}

if (ns6){
for (i=0; i < amount; i++){
  document.getElementById("ns6Bats"+i).style.top = Ypos+yBase*Math.sin(((currStep)+i*3.7)/4)*Math.cos((currStep+i*35)/10)
  document.getElementById("ns6Bats"+i).style.left =Xpos+xBase*Math.cos(((currStep)+i*3.7)/4)*Math.cos((currStep+i*35)/62)
 }
}

}
flyBat=setInterval('Animate()',30);
setTimeout("dismissBat()",dismissafter*1000)
//-->
</script>

Mozete u okviru same skripte podesiti i broj slepih miseva koji lete kao i njihovu gustinu......To bi na primer izgledalo ovako.....



snap201107090102.jpg
 
ADMINISTRATOR
Učlanjen(a)
10.05.1971
Poruka
54.332
SLEPI MIS 2

Mozete postaviti i efekat slepih miseva u vas html fajl ako to i zelite.jednostavno potrebno je samo iskopirati java skriptu u okviru vaseg head dela html fajla.Skripta inace izgleda ovako....

PHP:
<script language="JavaScript1.2">
<!--
  /**
  ** Bats - Halloween -  JavaScript 
  ** This script and many more are free at
  ** http://rainbow.arch.scriptmania.com/scripts/
  */
Bat=new Image();

//////////CONFIGURE THE BATs SCRIPT HERE//////////////////

Bat.src="http://rainbow.arch.scriptmania.com/scripts/bat_2.gif";  // Specify path to your bat image
amount=20;  // Number of Bats, minimum must be 3
dismissafter=500;  // Seconds after which Bats should disappear, in seconds
step=0.3;  // Animation speed (smaller is slower)

//////////DO NOT EDIT PAST THIS LINE//////////////////

Xpos=700;  //Bats x coordinates, in pixel
Ypos=200;  //Bats y coordinates, in pixel

var ns6=document.getElementById&&!document.all
bats=new Array(3)
if (document.layers){
for (i=0; i < amount; i++) 
{document.write("<layer name=n"+i+" left=0 top=-50><a href='http://rainbow.arch.scriptmania.com'><img src='"+Bat.src+"' name='nsi' width=69 height=60 border=0></a></layer>")}
}
else if (document.all||ns6){
document.write('<div id="out" style="position:absolute;top:0;left:0"><div id="in" style="position:relative">');
for (i=0; i < amount; i++){
if (document.all)
document.write('<a href="http://rainbow.arch.scriptmania.com"><img src="'+Bat.src+'" id="msieBats" style="position:absolute;top:-50;left:0" border=0></a>')
else
document.write('<a href="http://rainbow.arch.scriptmania.com"><img src="'+Bat.src+'" id="ns6Bats'+i+'" width=69 height=60 style="position:absolute;top:-50;left:0" border=0></a>')
}
document.write('</div></div>');
}

yBase=xBase=currStep=a_count=0;
b_count=1;
c_count=2;
d_count=3;
move=1;
if (document.layers||ns6){
yBase=window.innerHeight/3;
xBase=window.innerWidth/6;
if (document.layers)
window.captureEvents(Event.MOUSEMOVE);

}
if (document.all){
yBase = window.document.body.offsetHeight/3;
xBase = window.document.body.offsetWidth/6;
}

function dismissBat(){
clearInterval(flyBat)
if (document.layers){
for (i2=0; i2 < amount; i2++){
document.layers['n'+i2].visibility="hide"
}
}
else if (document.all)
document.all.out.style.visibility="hidden"
else if (ns6)
document.getElementById("out").style.visibility="hidden"
}

if (document.layers){
for (i=0; i < amount; i++)
document.layers['n'+i].document.images['nsi'].src=Bat.src
}
else if (document.all){
for (i=0; i < amount; i++)
document.all.msieBats[i].src=Bat.src
}
else if (ns6){
for (i=0; i < amount; i++)
document.getElementById("ns6Bats"+i).src=Bat.src
}

function Animate(){
a_count+=move;
b_count+=move;
c_count+=move;
currStep+=step;
if (a_count >= bats.length) a_count=0;
if (b_count >= bats.length) b_count=0;
if (c_count >= bats.length) c_count=0;
if (document.layers){
for (i=0; i < amount; i++) {
  var NewL="n"+i
  document.layers[NewL].top = Ypos+yBase*Math.sin(((currStep)+i*3.7)/4)*Math.cos((currStep+i*35)/10)
  document.layers[NewL].left =Xpos+xBase*Math.cos(((currStep)+i*3.7)/4)*Math.cos((currStep+i*35)/62)
  }
}

if (document.all){
for (i=0; i < amount; i++){
  document.all.msieBats[i].style.pixelTop = Ypos+yBase*Math.sin(((currStep)+i*3.7)/4)*Math.cos((currStep+i*35)/10)
  document.all.msieBats[i].style.pixelLeft =Xpos+xBase*Math.cos(((currStep)+i*3.7)/4)*Math.cos((currStep+i*35)/62)
 }
}

if (ns6){
for (i=0; i < amount; i++){
  document.getElementById("ns6Bats"+i).style.top = Ypos+yBase*Math.sin(((currStep)+i*3.7)/4)*Math.cos((currStep+i*35)/10)
  document.getElementById("ns6Bats"+i).style.left =Xpos+xBase*Math.cos(((currStep)+i*3.7)/4)*Math.cos((currStep+i*35)/62)
 }
}

}
flyBat=setInterval('Animate()',30);
setTimeout("dismissBat()",dismissafter*1000)
//-->
</script>

Mozete u okviru same skripte podesiti i broj slepih miseva koji lete kao i njihovu gustinu......To bi na primer izgledalo ovako.....malo su krupniji od predhodnih.....



snap201107090110.jpg
 
ADMINISTRATOR
Učlanjen(a)
10.05.1971
Poruka
54.332
SLEPI MIS 3

Mozete postaviti i efekat slepih miseva u vas html fajl ako to i zelite.jednostavno potrebno je samo iskopirati java skriptu u okviru vaseg head dela html fajla.Skripta inace izgleda ovako....

PHP:
<script language="JavaScript1.2">
<!--
  /**
  ** Bats - Halloween -  JavaScript 
  ** This script and many more are free at
  ** http://rainbow.arch.scriptmania.com/scripts/
  */
Bat=new Image();

//////////CONFIGURE THE BATs SCRIPT HERE//////////////////

Bat.src="http://rainbow.arch.scriptmania.com/scripts/bat_3.gif";  // Specify path to your bat image
amount=20;  // Number of Bats, minimum must be 3
dismissafter=500;  // Seconds after which Bats should disappear, in seconds
step=0.3;  // Animation speed (smaller is slower)

//////////DO NOT EDIT PAST THIS LINE//////////////////

Xpos=700;  //Bats x coordinates, in pixel
Ypos=200;  //Bats y coordinates, in pixel

var ns6=document.getElementById&&!document.all
bats=new Array(3)
if (document.layers){
for (i=0; i < amount; i++) 
{document.write("<layer name=n"+i+" left=0 top=-50><a href='http://rainbow.arch.scriptmania.com'><img src='"+Bat.src+"' name='nsi' width=69 height=60 border=0></a></layer>")}
}
else if (document.all||ns6){
document.write('<div id="out" style="position:absolute;top:0;left:0"><div id="in" style="position:relative">');
for (i=0; i < amount; i++){
if (document.all)
document.write('<a href="http://rainbow.arch.scriptmania.com"><img src="'+Bat.src+'" id="msieBats" style="position:absolute;top:-50;left:0" border=0></a>')
else
document.write('<a href="http://rainbow.arch.scriptmania.com"><img src="'+Bat.src+'" id="ns6Bats'+i+'" width=69 height=60 style="position:absolute;top:-50;left:0" border=0></a>')
}
document.write('</div></div>');
}

yBase=xBase=currStep=a_count=0;
b_count=1;
c_count=2;
d_count=3;
move=1;
if (document.layers||ns6){
yBase=window.innerHeight/3;
xBase=window.innerWidth/6;
if (document.layers)
window.captureEvents(Event.MOUSEMOVE);

}
if (document.all){
yBase = window.document.body.offsetHeight/3;
xBase = window.document.body.offsetWidth/6;
}

function dismissBat(){
clearInterval(flyBat)
if (document.layers){
for (i2=0; i2 < amount; i2++){
document.layers['n'+i2].visibility="hide"
}
}
else if (document.all)
document.all.out.style.visibility="hidden"
else if (ns6)
document.getElementById("out").style.visibility="hidden"
}

if (document.layers){
for (i=0; i < amount; i++)
document.layers['n'+i].document.images['nsi'].src=Bat.src
}
else if (document.all){
for (i=0; i < amount; i++)
document.all.msieBats[i].src=Bat.src
}
else if (ns6){
for (i=0; i < amount; i++)
document.getElementById("ns6Bats"+i).src=Bat.src
}

function Animate(){
a_count+=move;
b_count+=move;
c_count+=move;
currStep+=step;
if (a_count >= bats.length) a_count=0;
if (b_count >= bats.length) b_count=0;
if (c_count >= bats.length) c_count=0;
if (document.layers){
for (i=0; i < amount; i++) {
  var NewL="n"+i
  document.layers[NewL].top = Ypos+yBase*Math.sin(((currStep)+i*3.7)/4)*Math.cos((currStep+i*35)/10)
  document.layers[NewL].left =Xpos+xBase*Math.cos(((currStep)+i*3.7)/4)*Math.cos((currStep+i*35)/62)
  }
}

if (document.all){
for (i=0; i < amount; i++){
  document.all.msieBats[i].style.pixelTop = Ypos+yBase*Math.sin(((currStep)+i*3.7)/4)*Math.cos((currStep+i*35)/10)
  document.all.msieBats[i].style.pixelLeft =Xpos+xBase*Math.cos(((currStep)+i*3.7)/4)*Math.cos((currStep+i*35)/62)
 }
}

if (ns6){
for (i=0; i < amount; i++){
  document.getElementById("ns6Bats"+i).style.top = Ypos+yBase*Math.sin(((currStep)+i*3.7)/4)*Math.cos((currStep+i*35)/10)
  document.getElementById("ns6Bats"+i).style.left =Xpos+xBase*Math.cos(((currStep)+i*3.7)/4)*Math.cos((currStep+i*35)/62)
 }
}

}
flyBat=setInterval('Animate()',30);
setTimeout("dismissBat()",dismissafter*1000)
//-->
</script>

Mozete u okviru same skripte podesiti i broj slepih miseva koji lete kao i njihovu gustinu......To bi na primer izgledalo ovako.....na crnoj pozadini



snap201107090114.jpg
 
ADMINISTRATOR
Učlanjen(a)
10.05.1971
Poruka
54.332
SNEG

Mozete postaviti i efekat padanja snega (krupnih pahulja) u vas html fajl ako to i zelite.jednostavno potrebno je samo iskopirati java skriptu u okviru vaseg bodydela html fajla.Skripta inace izgleda ovako....

PHP:
<SCRIPT type="text/javascript">
/*
Float Down Snow - Drifter - JavaScript
Visit www.rainbow.arch.scriptmania.com/scripts/
  for this script and many more
*/

// **** Changed to Snow image float down from text letter ****

// Set the number of snowflakes (more than 30 - 40 not recommended)
var snowmax=12

// Set the colors for the snow. Add as many colors as you like
var snowcolor=new Array("#aaaacc","#ddddFF","#ccccDD","#ffffff","#ffc0cb")

// Set the fonts, that create the snowflakes. Add as many fonts as you like
var snowtype=new Array("Arial Black","Arial Narrow","Times","Comic Sans MS")

// **** CHANGE YOUR IMAGE HERE ****

// Set the letter that creates your snowflake (recommended: * )
var snowletter=" <img src=http://rainbow.arch.scriptmania.com/scripts/bg/snowflake.gif> "

// Set the speed of sinking (recommended values range from 0.3 to 2)
var sinkspeed=0.6

// Set the maximal-size of your snowflaxes
var snowmaxsize=40

// Set the minimal-size of your snowflaxes
var snowminsize=20

// Set the snowing-zone
// Set 1 for all-over-snowing, set 2 for left-side-snowing
// Set 3 for center-snowing, set 4 for right-side-snowing
var snowingzone=1

///////////////////////////////////////////////////////////////////////////
// CONFIGURATION ENDS HERE
///////////////////////////////////////////////////////////////////////////


// Do not edit below this line
var snow=new Array()
var marginbottom
var marginright
var timer
var i_snow=0
var x_mv=new Array();
var crds=new Array();
var lftrght=new Array();
var browserinfos=navigator.userAgent
var ie5=document.all&&document.getElementById&&!browserinfos.match(/Opera/)
var ns6=document.getElementById&&!document.all
var opera=browserinfos.match(/Opera/)
var browserok=ie5||ns6||opera

function randommaker(range) {
    rand=Math.floor(range*Math.random())
    return rand
}

function initsnow() {
    if (ie5 || opera) {
      marginbottom = document.body.clientHeight+(document.body.clientHeight*(1/8))
      marginright = document.body.clientWidth-20
   }
   else if (ns6) {
      marginbottom = window.innerHeight+(window.innerHeight*(1/10))
      marginright = window.innerWidth-20
   }

    var snowsizerange=snowmaxsize-snowminsize
    for (i=0;i<=snowmax;i++) {
        crds[i] = 0;
        lftrght[i] = Math.random()*15;
        x_mv[i] = 0.03 + Math.random()/10;
        snow[i]=document.getElementById("s"+i)
        snow[i].style.fontFamily=snowtype[randommaker(snowtype.length)]
        snow[i].size=randommaker(snowsizerange)+snowminsize
        snow[i].style.fontSize=snow[i].size
        snow[i].style.color=snowcolor[randommaker(snowcolor.length)]
        snow[i].sink=sinkspeed*snow[i].size/5
        if (snowingzone==1) {snow[i].posx=randommaker(marginright-snow[i].size)}
        if (snowingzone==2) {snow[i].posx=randommaker(marginright/2-snow[i].size)}
        if (snowingzone==3) {snow[i].posx=randommaker(marginright/2-snow[i].size)+marginright/4}
        if (snowingzone==4) {snow[i].posx=randommaker(marginright/2-snow[i].size)+marginright/2}
        snow[i].posy=randommaker(2*marginbottom-marginbottom-2*snow[i].size)
        snow[i].style.left=snow[i].posx
        snow[i].style.top=snow[i].posy
    }
    movesnow()
}

function movesnow() {
    for (i=0;i<=snowmax;i++) {
        crds[i] += x_mv[i];
        snow[i].posy+=snow[i].sink
        snow[i].style.left=snow[i].posx+lftrght[i]*Math.sin(crds[i]);
        snow[i].style.top=snow[i].posy

        if (snow[i].posy>=marginbottom-2*snow[i].size || parseInt(snow[i].style.left)>(marginright-3*lftrght[i])){
            if (snowingzone==1) {snow[i].posx=randommaker(marginright-snow[i].size)}
            if (snowingzone==2) {snow[i].posx=randommaker(marginright/2-snow[i].size)}
            if (snowingzone==3) {snow[i].posx=randommaker(marginright/2-snow[i].size)+marginright/4}
            if (snowingzone==4) {snow[i].posx=randommaker(marginright/2-snow[i].size)+marginright/2}
            snow[i].posy=0
        }
    }
    var timer=setTimeout("movesnow()",50)
}

for (i=0;i<=snowmax;i++) {
    document.write("<span id='s"+i+"' style='position:absolute;top:-"+snowmaxsize+"'>"+snowletter+"</span>")
}
if (browserok) {
    window.onload=initsnow
}
</script>

Inace to bi recimo na crnoj pozadini izgledalo ovako......



snap201107090120.jpg
 
ADMINISTRATOR
Učlanjen(a)
10.05.1971
Poruka
54.332
VATROMET

Mozete postaviti i efekat vatrometa u vas html fajl ako to i zelite.jednostavno potrebno je samo iskopirati java skriptu u okviru vaseg bodydela html fajla.Skripta inace izgleda ovako....

PHP:
<SCRIPT TYPE="text/javascript">
<!-- Fireworks Display
<!-- This script and many more from -->
<!-- http://rainbow.arch.scriptmania.com -->

if(!window.fireworks) fireworks=new Object();

if(!fireworks.createLayer)
{

var ns4 = document.layers;
var ie4 = document.all;
fireworks.objNo=0;

fireworks.getObjId = function(){return "fireworks_obj" + fireworks.objNo++;};

fireworks.createLayer = function(theHtml)
{
    var layerId = fireworks.getObjId();

    document.write(ns4 ? "<LAYER  NAME='"+layerId+"'>"+theHtml+"</LAYER>" : 
                   "<DIV id='"+layerId+"' style='position:absolute'>"+theHtml+"</DIV>" );

    var el =     document.getElementById    ? document.getElementById(layerId) :
            document.all         ? document.all[layerId] :
                              document.layers[layerId];

    if(ns4)
        el.style=el;

    return el;
}
fireworks.fxLayer = function(theHtml)
{
    if(theHtml == null) return;
    this.el = fireworks.createLayer(theHtml);
}
var proto = fireworks.fxLayer.prototype

proto.moveTo     = function(x,y){this.el.style.left = x;this.el.style.top=y;}
proto.setBgColor = function(color) { this.el.style.backgroundColor = color; } 
proto.clip       = function(x1,y1, x2,y2){ this.el.style.clip="rect("+y1+" "+x2+" "+y2+" "+x1+")"; }
if(ns4){
    proto.clip = function(x1,y1, x2,y2){
        this.el.style.clip.top     =y1;this.el.style.clip.left    =x1;
        this.el.style.clip.bottom=y2;this.el.style.clip.right    =x2;
    }
    proto.setBgColor=function(color) { this.el.bgColor = color; }
}
if(window.opera)
    proto.setBgColor = function(color) { this.el.style.color = color==null?'transparent':color; }

if(window.innerWidth)
{
    gX=function(){return innerWidth;};
    gY=function(){return innerHeight;};
}
else
{
    gX=function(){return document.body.clientWidth;};
    gY=function(){return document.body.clientHeight;};
}
fireworks.fxLayer2 = function(theHtml)
{
    this.superC = fireworks.fxLayer;
    this.superC(theHtml + "C");
}
fireworks.fxLayer2.prototype = new fireworks.fxLayer;
}
fireworks.Spark = function(x, y)
{
    this.superC = fireworks.fxLayer;
    this.superC("*");

    this.dx     = Math.random() * 4 - 2;
    this.dy    = Math.random() * 4 - 2;
    this.ay    = .09;
    this.x    = x;
    this.y    = y;
    this.type = 0;
}
fireworks.Spark.prototype = new fireworks.fxLayer;

fireworks.Spark.prototype.fire0 = function()
{
    var a = Math.random() * 6.294;
    var s = Math.random() * 2;
    if(Math.random() >.6) s = 2;
    this.dx = s*Math.sin(a);
    this.dy = s*Math.cos(a) - 2;
}
fireworks.Spark.prototype.fire1 = function()
{
    var a = Math.random() * 6.294;
    var s = Math.random() * 2;
    this.dx = s*Math.sin(a);
    this.dy = s*Math.cos(a) - 2;
}
fireworks.Spark.prototype.fire2 = function()
{
    var a = Math.random() * 6.294;
    var s = 2;
    this.dx = s*Math.sin(a);
    this.dy = s*Math.cos(a) - 2;
}
fireworks.Spark.prototype.fire3 = function()
{
    var a = Math.random() * 6.294;
    var s = a - Math.random();
    this.dx = s*Math.sin(a);
    this.dy = s*Math.cos(a) - 2;
}
fireworks.Spark.prototype.fire4 = function()
{
    var a = Math.random() * 6.294;
    var s = (Math.random() > 0.5) ? 2 : 1;
    if(s==1)this.setBgColor("#FFFFFF");
    s -= Math.random()/4;
    this.dx = s*Math.sin(a);
    this.dy = s*Math.cos(a) - 2;
}
fireworks.Spark.prototype.fire = function(sx, sy, fw, cl)
{
    this.setBgColor(cl);

    if(fw == 1)
        this.fire1();
    else if(fw == 2)
        this.fire2();
    else if(fw == 3)
        this.fire3();
    else if(fw == 4)
        this.fire4();
    else
        this.fire0();

    this.x    = sx;
    this.y    = sy;
    this.moveTo(sx, sy);
}
fireworks.Spark.prototype.animate = function(step)
{
    this.dy += this.ay;
    this.x += this.dx;
    this.y += this.dy;
    this.moveTo(this.x, this.y);
}
fireworks.Firework = function(numSparks)
{
    window[ this.id = fireworks.getObjId() ] = this;

    this.sparkle = new Array();
    for(i=0 ; i<numSparks; i++)
    {
        this.sparkle[i]=new fireworks.Spark(-10, -10);
        this.sparkle[i].clip(0,0,3,3);
        this.sparkle[i].setBgColor("#00FF00");
    }
    this.step = 0;
    this.timerId = -1;
    this.x = 0;
    this.y = 0;
    this.dx = 0;
    this.dy = 0;
    this.ay = 0.2;
    this.state = "Off";
}
fireworks.Firework.prototype.explode = function()
{
    var fw = Math.floor(Math.random() * 5);

    for(i=0 ; i<this.sparkle.length ; i++)
    {
        this.sparkle[i].fire(this.x, this.y, fw, this.color);
        this.sparkle[i].dx += this.dx;
        this.sparkle[i].dy += this.dy;
    }
}
fireworks.Firework.prototype.getMaxDy = function()
{
    var ydiff = gY() - 30;
    var dy    = 1;
    var dist  = 0;
    var ay    = this.ay;
    while(dist<ydiff)
    {
        dist += dy;
        dy+=ay;
    }
    return -dy;
}
fireworks.Firework.prototype.animate = function()
{
    if(this.state=="Off")
    {
        var colors = new Array("#FF0000", "#00FF00", "#0000FF", "#FFFF00", "#FFFFFF", "#FF00FF");
        this.color = colors[Math.floor(Math.random()*colors.length)];

        this.step = 0;
        this.x = gX()/2;
        this.y = gY()-10;
        this.dy = this.getMaxDy();
        this.dx = Math.random()*-8 + 4;
        this.dy += Math.random()*3;
        for(i=0 ; i<this.sparkle.length ; i++)
            this.sparkle[i].moveTo(-10,-10);
        this.sparkle[0].setBgColor(this.color);
        this.state = "Move";
    }
    else if(this.state=="Move")
    {
        this.x += this.dx;
        this.y += this.dy;
        this.dy += this.ay;
        this.sparkle[0].moveTo(this.x,this.y);
        if(this.dy > 1)
        {
            this.state="Bang"
            this.explode();
        }
    }
    else
    {
        if(this.step > 40)
            this.state="Off";

        this.step++;

        for(i=0 ; i<this.sparkle.length ; i++)
            this.sparkle[i].animate(this.step);
    }
}
fireworks.Firework.prototype.start = function()
{
    if(this.timerId == -1)
    {
        this.state = "Off";
        this.timerId = setInterval("window."+this.id+".animate()", 30);
    }
}
fireworks.Firework.prototype.stop = function()
{
    if(this.timerId != -1)
    {
        clearInterval(this.timerId);
        for(i=0 ; i<this.sparkle.length ; i++)
            this.sparkle[i].moveTo(-10,-10);
        this.timerId = -1;
        this.step = 0;
    }
}
fireworks.DisplayStart = function()
{
    if(fireworks.DisplayLoad)fireworks.DisplayLoad();
    Display1.start();
    Display2.start();
    Display3.start();
}
Display1 = new fireworks.Firework(30);
Display2 = new fireworks.Firework(30);
Display3 = new fireworks.Firework(30);
fireworks.DisplayLoad=window.onload;
window.onload=fireworks.DisplayStart;
// -->
</SCRIPT>

To bi recimo naprimer na crnoj pozadini izgledalo ovako........



snap201107090122.jpg
 
Natrag
Top