Drop Down Menu By Java Script

Drop Down Menu By Java Script

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Untitled Document</title>
</head>

<body>
<style type="text/css">
ul.menu {list-style:none; margin:0; padding:0;font:11px Verdana,Arial;}
ul.menu * {margin:0; padding:0}
ul.menu a {display:block; color:#000; text-decoration:none}
ul.menu li {position:relative; float:left; margin:0px}
ul.menu ul {position:absolute; top:35px; left:0;width:170px; background:#d1d1d1;  display:none;opacity:0; list-style:none}
ul.menu ul li {position:relative; border:0px; width:170px; margin:0}
ul.menu ul li a {display:block; color:#FFFFFF; padding-left:5px;border-bottom:#CCCCCC  solid 1px; padding-top:9px;height:28px;}
ul.menu ul li a:hover { background-color:#666666; padding-left:8px;}
ul.menu ul ul {left:148px; top:-1px}
ul.menu .menulink { border:0px; font-weight:bold; color:#FFFFFF; text-align:center; padding-top:9px; background-color:#666666; height:26px; width:111px}
ul.menu .menulink:hover, ul.menu .menuhover { background-color:#000000; padding-top:7px;  height:28px;}
ul.menu .sub {background:#d1d1d1}


</style>
<script language="javascript">
var menu=function(){
var t=15,z=50,s=6,a;
function dd(n){this.n=n; this.h=[]; this.c=[]}
dd.prototype.init=function(p,c){
a=c; var w=document.getElementById(p), s=w.getElementsByTagName('ul'), l=s.length, i=0;
for(i;i<l;i++){
var h=s[i].parentNode; this.h[i]=h; this.c[i]=s[i];
h.onmouseover=new Function(this.n+'.st('+i+',true)');
h.onmouseout=new Function(this.n+'.st('+i+')');
}
}
dd.prototype.st=function(x,f){
var c=this.c[x], h=this.h[x], p=h.getElementsByTagName('a')[0];
clearInterval(c.t); c.style.overflow='hidden';
if(f){
p.className+=' '+a;
if(!c.mh){c.style.display='block'; c.style.height=''; c.mh=c.offsetHeight; c.style.height=0}
if(c.mh==c.offsetHeight){c.style.overflow='visible'}
else{c.style.zIndex=z; z++; c.t=setInterval(function(){sl(c,1)},t)}
}else{p.className=p.className.replace(a,''); c.t=setInterval(function(){sl(c,-1)},t)}
}
function sl(c,f){
var h=c.offsetHeight;
if((h<=0&&f!=1)||(h>=c.mh&&f==1)){
if(f==1){c.style.filter=''; c.style.opacity=1; c.style.overflow='visible'}
clearInterval(c.t); return
}
var d=(f==1)?Math.ceil((c.mh-h)/s):Math.ceil(h/s), o=h/c.mh;
c.style.opacity=o; c.style.filter='alpha(opacity='+(o*100)+')';
c.style.height=h+(d*f)+'px'
}
return{dd:dd}
}();

</script>
<ul class="menu" id="menu">
               <li><a href="#" class="menulink">Menu 1</a>
               <ul>
               <li><a href="#">Menu 1.1</a></li>
               <li><a href="#">Menu 1.2</a></li>
               <li><a href="#">Menu 1.3</a></li>
               </ul>
               </li>
                
               <li><a href="#" class="menulink">Menu 2</a>
               <ul>
               <li><a href="#">Menu 2.1</a></li>
               <li><a href="#">Menu 2.2&nbsp;&nbsp;&nbsp;&nbsp; ></a>
<ul>
<li><a href="#">Menu 2.2.1</a></li>
<li><a href="#">Menu 2.2.2</a></li>
<li><a href="#">Menu 2.2.3</a></li>
                </ul>
</li>
               <li><a href="#">Menu 2.3</a></li>
               </ul>
               </li>
                
               <li><a href="#" class="menulink">Menu 3</a></li>
</ul>

                  <script type="text/javascript">
               var menu=new menu.dd("menu");
               menu.init("menu","menuhover");
                </script>

</body>
</html>


Click To Viev Demo

"I Love U" Animation by Java Script

"I Love U" Animation by Java Script



<html>
<body bgcolor="#000000" onLoad="arrange()">
<SCRIPT LANGUAGE="JavaScript">
//script by mymekailbiswas.com@gmail.com//
<!-- Begin
Imageq= new Array('bublove.gif','bub.gif');
Amount = 30;
Ypos = new Array();
Xpos = new Array();
Speed = new Array();
rate = new Array();
grow = new Array();
Step = new Array();
Cstep = new Array();
nsSize = new Array();
ydisten=0
xdisten=0
function arrange(){
var t=window.document.body.clientHeight;
var tt=window.document.body.clientWidth;
ydisten=tt-250
xdisten=t-20
intro_pict_img_cc.style.top=160
intro_pict_img_cc.style.left=tt/2
love_outer.style.left=(tt-460)/2+10
love_outer.style.top=200
start_l=230
start_t=-10
creat_o();
}

for (i = 0; i < Amount; i++) {
Ypos[i]=0
Xpos[i]=0
Speed[i] = Math.random()*4+1;
Cstep[i] = 0;
Step[i] = Math.random()*0.1+0.05;
grow[i] = 8;
rate[i] = Math.random()*0.5+0.1;
}

// This script by mekailbiswas
Imageq= new Array('http://1.bp.blogspot.com/_MQ06HQhYDVM/
TPKwQFIKrkI/AAAAAAAAACw/2vpr1FPym5o/s1600/love34.gif',
'http://1.bp.blogspot.com/_MQ06HQhYDVM/TPKwQFIKrkI/
AAAAAAAAACw/2vpr1FPym5o/s1600/love34.gif');
colours=new Array('ff0000','00ff00','3366ff','ff00ff',
'ffa500','ffffff')
am=30
hh=210
var as=0
step = 0.03;
currStep = 0;
logoWidth = 50;
logoHeight = hh;
TrigSplit =360/ am;
var ll=40;
var ll2=0;
var as=0

document.write('<div id="intro_pict_img_cc" style="position:absolute;top:600;
left:300;BACKGROUND: #ffffff">');
document.write('<img id="intro_pict_img" src=hh.png style="position:absolute;
height:100;width:99;top:-110px;left:-40px;filter:alpha(opacity=0)">');

for(i=0;i<am;i++)
{
mmk=Imageq[Math.floor(Math.random()*Imageq.length)];
document.write('<img id="vv2" src='+mmk+' style="position:absolute;
height:20;width:20;top:0px;left:0px">');
}
document.write('<div id="intro_pict_img_cc2" style="position:absolute;width:460;
height:200;top:-150;left:-220;BACKGROUND:#000000;filter:alpha(opacity=100)"></div>');

document.write('</div>');


function aa(){


for (i = 0; i < am; i++) {
var C=colours[Math.round(Math.random()*colours.length)]
vv2[i].style.filter="glow(color="+C+", strength=3)"
var tamp=-150 * Math.sin(currStep + i * 360/am  * Math.PI /180);
if(tamp>0){
vv2[i].style.top=150 * Math.sin(currStep + i
* 360/am  * Math.PI / 180);}else{
vv2[i].style.top=0;}
vv2[i].style.left =hh * Math.cos(currStep + i * 360/am  * Math.PI / 180);
}
currStep -= step;
setTimeout('aa()',35);
}


list_image=new Array('http://lh4.ggpht.com/_MQ06HQhYDVM/
TPK05z8yq-I/AAAAAAAAADA/oLsCGqQi20o/s128/hh3.png',
'http://lh6.ggpht.com/_MQ06HQhYDVM/TPK056vEnrI/
AAAAAAAAADE/KgCte0US_MY/s128/hh4.png',
'http://lh5.ggpht.com/_MQ06HQhYDVM/TPK06Jeq7FI/
AAAAAAAAADI/ywf1SY5P5aM/s128/hh.png')
var image_cont=0;
var fad_img_val=0

function IE(){
if(fad_img_val<100){
intro_pict_img.filters[0].opacity=fad_img_val;
fad_img_val++;
setTimeout("IE()",3);
}else{IEE();}

}

function IEE(){
if(fad_img_val>-10){
intro_pict_img.filters[0].opacity=fad_img_val;
fad_img_val=fad_img_val-1;
setTimeout("IEE()",3);
}else{
image_cont++;
if(image_cont<list_image.length){
intro_pict_img.src=list_image[image_cont];}else{image_cont=-1;}
IE();}

}

//-->



<!--
// This script by mekailbiswas
top_p=new Array('10','10','10','10','10','30','50','70','90','110','130','130',
'130','130','130','130','38','22','22','12','12','8','8','12','13','28','28','46',
'46','64','64','81','81','97','97','110','110','125','125','135','135','10','10','10',
'10','10','10','30','50','70','90','110','125','130','30','50','70','90','110','125',
'130','160','160','160','160','160','160','160','160','160','160','160','160','160',
'160','160','160','160','160','160','160','160','160');
left_p=new Array('10','30','50','70','90','50','50','50','50','50','50','10','30',
'50','70','90','200','190','210','226','174','244','156','263','137','127','272',
'125','273','130','270','138','262','148','252','162','238','174','226','190','210',
'310','330','350','390','410','430','330','330','330','330','330','340','360','410',
'410','410','410','410','400','380','10','30','50','70','90','110','130','150','170',
'190','210','230','250','270','290','310','330','350','370','390','410','430');

vbv=0

start_left=200
start_top=38
target_left=400;
target_top=500;
move_step=5;
rot_left=new Array()
rot_top=new Array()
rot_left_stop=0
rot_top_stop=0
rot_left_count=0
rot_top_count=0

document.write('<div id="love_outer" style="position:absolute;top:100;left:100;
 width:463; height:189;filter:alpha(opacity=100)">');
for(k=0;k<left_p.length;k++){
document.write('<img id="love_img" src='+mmk+' style="position:absolute;height:20;
width:20;top:-120px;left:-120"/>');
}
document.write('</div>');


function creat_road(){
left_temp=start_left;
top_temp=start_top;

left_disten=(target_left-start_left)
if(left_disten<0){left_disten=left_disten/-1}
top_disten=(target_top-start_top)
if(top_disten<0){top_disten=top_disten/-1}



for(i=0;i<left_disten/move_step;i++){
if(start_left<target_left){
left_temp=left_temp+move_step;}
else{
left_temp=left_temp-move_step;
}
rot_left[i]=left_temp
rot_left_stop=i;
}

for(i=0;i<top_disten/move_step;i++){
if(start_top<target_top){
top_temp=top_temp+move_step;}
else{
top_temp=top_temp-move_step;
}
rot_top[i]=top_temp;
rot_top_stop=i;
}
if(start_left+move_step==target_left){rot_left[0]=target_left;rot_left_stop=1;}
if(start_top+move_step==target_top){rot_top[0]=target_top;rot_top_stop=1;}
move_onrod();
}

function creat_o(){
if(vbv<top_p.length){
target_left=left_p[vbv]
target_top=top_p[vbv]
creat_road();
}else{setTimeout('IE()', 2000);fad_img();setTimeout('aa()', 500)}
}

function move_onrod(){
if(rot_left_count<rot_left_stop){love_img[vbv].style.left=rot_left[rot_left_count];rot_left_count++;}
if(rot_top_count<rot_top_stop){love_img[vbv].style.top=rot_top[rot_top_count];rot_top_count++;}
if(rot_left_count<rot_left_stop || rot_top_count<rot_top_stop){
setTimeout("move_onrod()",10);}
else{
love_img[vbv].style.left=target_left;
love_img[vbv].style.top=target_top;
rot_left_count=0;rot_top_count=0;vbv++
setTimeout("creat_o()",30);}

}
var fad_img_val2=100
function fad_img(){
if(fad_img_val2>-10){
document.getElementById("intro_pict_img_cc2").filters[0].opacity=fad_img_val2;

fad_img_val2=fad_img_val2-1
setTimeout("fad_img()",105);
}
}
</script>

</body>
</html>



Click To Viev Demo

Lighting Animation By Java Script

Lighting Animation By Java Script


<script language="Javascript">
<!--
// This script by mekailbiswas
text="_"//simply write your massage
colours=new Array('ff0000','00ff00','3366ff','ff00ff','ffa500','ffffff')
am=200
var as=0
step = 0.03;
currStep = 0;
logoWidth = 160;
logoHeight = -160;
TrigSplit =200/ am;
var ll=0;
var ll2=1;

document.write('<div style="position:absolute;top:10;left:400">ds</div>');
var ss=window.document.body.clientWidth/2-50;

document.write('<div id="si" style="position:absolute;top:10;left:'+ss+'">');
for(i=0;i<am;i++)
{
document.write('<div id="t" style="position:absolute;top:0px;left:0px;font-size:13">+</div>');
}
document.write('</div>');
var axa=0
function aa(){
var siz=Math.round(Math.random()*30);
var C=Math.round(Math.random()*30);
if(ll<200){
ll++;
axa=ll
}

else
{
axa=axa-1
if(axa<1){
ll=0
ll2++}}
var bbg=ll2*5
if(bbg>360){ll2=0}
for (i = 0; i < am; i++) {
var siii=Math.round(Math.random()*10);
var Col=colours[Math.round(Math.random()*colours.length)];
if(am>200){axa=0}
t[i].style.color=Col
t[i].style.top =axa*Math.sin(currStep + i * TrigSplit* Math.PI / bbg);
t[i].style.left =axa*Math.tan(currStep + i * TrigSplit* Math.PI /120)
t[i].style.fontSize=siii*3
}
currStep -= step;

if (as==am-1){
as=0;
}
else
{
as++
}
setTimeout('aa()',12);
}
aa();

//-->
</script>
<body bgcolor="#000000">

Click To Viev Demo

Email Validetion By Javascript

Email Validetion By Javascript


<html>
<Script language="javascript">
function chack(){
text=T1.value;
var step=0
if(text.length==0){alert("Enter Email Id");}else{
for(i=0;i<text.length;i++){
if(step==0){
if(text.substring(i,i+1)=="@"){step=1;}}
else if(step==1){if(text.substring(i,i+1)=="."){step=2;}}
}


if(step==2){}else{alert("Invalid E-mail Id")}
}
}
</script>
<font size="5">Enter E-Mail Id-</font><input type="text" id="T1" size="25">
<input onclick=chack(); type="submit" value="Submit" name="B1"></p>

</html>

Click To Viev Demo

Matrix Animation By Java Script

  This script create animation like Matrix 

<script language="Javascript">
<!--
// This script by mekailbiswas
text="1234567890123456780"//simply write your massage
colours=new Array('ff0000','00ff00','3366ff','ff00ff','ffa500','ffffff')
co=new Array('#33CC33','#00FF00')
amaunt=text.length
f_size=10
NS6=(document.getElementById&&!document.all);
L=null;
var j=1

for(i=0;i<amaunt;i++){
document.write('<div id=sa style="position:absolute;top:10;left:'+i*f_size+'">');
for(j=0;j<amaunt;j++){document.write('<div id="tex'+i+j+'" style="position:absolute;top:'+j*f_size+';font-size:'+f_size+';color:#33CC33">'+text.substring(j,j+1)+'</div>');}
document.write('</div>');
}

function matrix(){
for(k=0;k<amaunt;k++){
var s=co[Math.floor(Math.random()*co.length)];
if(j<amaunt){
L=document.getElementById("tex"+k+j)
var f=Math.round(Math.random()*amaunt);
L.innerText=text.substring(f,f+1)
L.style.color=s
}
}
j++;
if(j>amaunt){j=0}
setTimeout("matrix()",5);
}
matrix();
</script>
<body bgcolor="#000000">