Showing posts with label JavaScript free codes. Show all posts
Showing posts with label JavaScript free codes. Show all posts
<html>
<!-- ABOUT THIS SCRIPT: You may use images of variable sizes, and they'll appear fine in Internet Explorer. However, in Netscape the images may be distorted.  If you'd like your slideshow to be crossbrowser compatible, then use all images of the same size.

---------------------------------------------------------------------------------------
INSTRUCTIONS:
1.  First upload your photos to your web host server.
2.  Edit "Picture Name" and "filename.jpg" in the code below for your photos.
3.  You may add additional photos by simply copying and pasting more lines below it and changing the image number to the next number.
4.  Copy the script below and paste it into the <BODY> </BODY> section of your page HTML exactly where you'd like the slideshow to appear.

--------------------------------------------------------------------------------------

-->

<SCRIPT LANGUAGE="JavaScript">
theimage = new Array();

theimage[0]=["", "https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh_hNGEMlrEOcCxET6Y_nqn4SD7c37Irl28aniLk_8G4GdsFVDovQybt9TM1hHk7n5L34FWhRmtuAk4ekV5JBFOsEBkhX8f8D-orqbOQnPMu9fXKYyurLZiKSWr0UlE2GfU9-kkAY97law/s128/nc.JPG"];
theimage[1]=["", "https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhwtBnFeS_MoS8cD39G75zP3ESfL5rxyBcmkOY86LIu-HD8jTAMYmvQ7ScIefPIZiKtmICvIAO3PBXVW1QcXwgnezMr2psr52J46YmBljLAsGPYeYWe4zauWGfMEVPfWotpVIlp8cMIwQA/s128/AnugrahNarayanSinha.jpg"];
theimage[2]=["", "https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi7vkckuogUqLP_Y83udziavouEdRMD6Bkxu6jf0hlVzfOiiDsggkE6UgHiXsRKcQmiN9UnCS5hpAw7_n-dLc8RnDMYjUZRiYN4vDyqeuXWD-itMOXz2qo_-xLyqK9o_ifvgZeKiErlKP8/s128/Bihar_Kesari_Sri_Babu_&_Bihar_Vibhuti_Anugrah_Babu.jpg"];
theimage[3]=["", "https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjxi2v28cQSbuA2hSOIHg-zIezW1ZG30mUg-i0bZW8ztCVvEbb7zV1aH2boq67iUcvU1mRxclMljfpHF9Z8VmE1B-jE7ev3V1ld0hAGUwXciYqYXfoDx4mtfaeMuVJYPB2-DdL9P0SXpNA/s128/Dr.Rajendra.Prasad.jpg"];
theimage[4]=["", "https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgsnqBYccEHZnFahlNQFZq0Ohej-VX9I69fqwuZnIafS74BlJZAWEPsbRjC1umlllLDmcaGLn_QAzcaosCA5EKYozHpOe-Lgn3AWJTo0L_sfObtDLHiXSp46Ncte5PEchLCtaBwEIi0bHk/s128/Jayaprakash.jpg"];
theimage[5]=["", "https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj8SjvaA36NT1pVd3D_SoMxxHOOoN0m_jlwf6LIzzBIOkaqbABKNqGFcLaxloQiNJG982MzdcHgJounLCHKaE5CScNb979lc2qzRYS4HlABT0UepQVi8kX0dzOTVRXNuDIiWY35V4LYZOs/s128/jayaprakashnarayan.jpg"];
theimage[6]=["", "https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhvYHvBNFUgvad4YJTeuMAyvFjUcNh_yUID9sspC9BV9GQbLAIUKNpMDD-qMcA0VBXN3ek_MJLEOXm2Igu6xBmyIxHQohGj_-Xv1dQRBh6zs_KadjZKbFPbjvoar9CTRr3W8E6Lr0X8p1Q/s128/JP_SK_rally.jpg"];
theimage[6]=["", "https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgbpLqDHqrKxVFxYInHyecBHaIby2QDWPShi0J11z5JAykNCZzsURrc2kxcQVAMqrwUA0f8saAOumhh8Njt5qRMjtVTu4b6oZ5ptUZHsEzJ-RGX_Wufmcx0sDSbvWiF_f8tcqT91S23hkM/s128/Mangal_pandey.jpg"];
theimage[6]=["", "https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEizEv_7c2PJR_UQewZgDQa2b7g5eBY4yUs0EEqWBc1FPgrUDnvgY1EeiRUeBBOxtnxy4Sp9C6yFwq3BL0-1BJAgTfOg7utcOGt6DeKYN-kYUACI-raDL71Z66NwRjtWROSlS-MN6xZYdfE/s128/Sri%20Krishna%20Sinha.jpg"];
theimage[6]=["", "https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg8slHRyK4L11mSclBuZ92iCJsGfLwRg4dDEm_p7XkyJO90ENCJrKEqiyXGzXZAS0nrY1HCwkUBgbtOczSzhCsMyj5ufRMDFBxpX0oe9mP9RXOmX15Rwrn4HnZtaJ1k7yItdQ1TjbmWvps/s128/amitabh%20bachchan.jpeg"];
theimage[6]=["", "https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj35FOS2TqPtuMYHQ2AHZ9TC0sHkBy-CHDRbncG5lpKsRneNcdLPTuA9UKY-ruFfhNDz7wMdxsqWneKj4dwZgwiBpupxMMx0SfNKrrXL0ukCGaTxp58ul2FG8JK63rd2yYThnjwPuCP0ec/s128/shabana_azmi.jpg"];
theimage[6]=["", "https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhHn9hQeNCpdhTOgJ287IL6m7oFIAkimpRVUL7Uzu0XV3WSUXcN2Es9v1d3ChRrrqXv8bZzkY-VcVc9Y2NsIN8PlgXD_xvQHBZQG1r5WXKTYrStLT-1pguvqWP-7NlbL2YKxZMPe3vdLSI/s128/Padma_Khanna.jpg"];
theimage[6]=["", "http://lh5.ggpht.com/_uG1qrPyN2yg/TBH21dXS86I/AAAAAAAAAEc/OykRDnw-x_w/s128/amitabh%20bachchan.jpeg"];
theimage[6]=["", "https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhGa6YjTrrA8k-zseIt6h8EzFoVnohsNptLzm9wNbeQgqt_HUReXHVaXezcVX5zGxtj15Dp1oVN9OGvikLGCUH1BiTCiaG_FOwRKVjjjMEcmYDy3NGUlcE3zl_fmG2aQmnRFr9qHbNn1Jk/s128/spinning_globe_logo.gif"];

playspeed=600;
dotrans=1;  
transtype='blendTrans'; 
transattributes='duration=1,transition=23'; 
randomorder=1;
playdiffernce=500; 
autostart=0;
preloadslides=1;
function makeRandom() {
tempimage = new Array();
for(p=0;p<theimage.length;p++){
for(p1=0;p1>-1;p1) {tempNum = Math.floor(Math.random()*theimage.length)
if(!tempimage[tempNum]){tempimage[tempNum]=theimage[p];break}}}
for(p=0;p<theimage.length;p++)theimage[p]=tempimage[p]}
if(randomorder==1)makeRandom()

function preloadSlide() {for(k=0;k<til;k++) {theimage[k][1]=new Image().src=theimage[k][1];}}

window.onload=function(){
if(window.preloadslides)preloadSlide();if(window.autostart)slidePlay();}

window.onresize=function(){
if(document.layers)this.location=this.location;}
</SCRIPT>


<FORM NAME="slideshow">
<DIV ALIGN="CENTER">
<TABLE border=0 CELLPADDING=0 CELLSPACING=0 BGCOLOR="black">
<TR>
<TD ALIGN=CENTER>
<div align="center">
  <center>
<TABLE border=0 CELLPADDING=10 CELLSPACING=1 style="border: 1 solid #008080">
<TR>
    <TD ALIGN=CENTER BGCOLOR="#0099CC" colspan="5" style="border: 1 solid #000000"><font
      face="Verdana,Arial,Helvetica" size="2"><b>My Photo
      Slideshow</b></font></TD>
</TR>
<TR>
    <TD ALIGN=CENTER BGCOLOR="#FFFFFF" colspan="5" width="250" height="270" style="border: 1 solid #000000"><A HREF="#" onmouseover="this.href=theimage[i][2];return false"><SCRIPT>document.write('<IMG NAME="slideimage"  STYLE="filter:'+transtype+'('+transattributes+');" SRC="'+theimage[0][1]+'" BORDER=0>')</SCRIPT></A></TD>
</TR>
<TR>
    <TD ALIGN=CENTER BGCOLOR="#0099CC" colspan="5" style="border: 1 solid #000000"><SCRIPT>
for (y=0;y<theimage.length;y++) {document.slideshow.theimages[y]=new Option(theimage[y][0])}</SCRIPT>
    </TD>
</TR>
<TR>
    <TD ALIGN=CENTER BGCOLOR="#0099CC" style="border: 1 solid #000000"><b><font
      color="#000000"><a
      HREF="javascript:slideImage(0);" onfocus="this.blur()"><font
      face="Verdana,Arial,Helvetica" size="2" color="#000000">&lt;&lt;</font></a><font
      face="Verdana,Arial,Helvetica" size="2" color="#000000"><SCRIPT>imgStop=new Image().src='../beta/slideshow/b4.jpg';</SCRIPT></font></font></b></TD>
    <TD ALIGN=CENTER BGCOLOR="#0099CC" style="border: 1 solid #000000"><a
      href="javascript:slideImage(0);"><b><font face="Verdana,Arial,Helvetica"
      size="2" color="#000000">&lt;</font></b></a></TD>
    <TD ALIGN=CENTER BGCOLOR="#0099CC" style="border: 1 solid #000000"><a
      href="javascript:slidePlay();"><b><font face="Verdana,Arial,Helvetica"
      size="2" color="#000000">Play/Stop</font></b></a></TD>
    <TD ALIGN=CENTER BGCOLOR="#0099CC" style="border: 1 solid #000000"><a
      href="javascript:slideImage(i+1);"><b><font face="Verdana,Arial,Helvetica"
      size="2" color="#000000">&gt;</font></b></a></TD>
    <TD ALIGN=CENTER BGCOLOR="#0099CC" style="border: 1 solid #000000"><a
      HREF="javascript:slideImage(theimage.length-1);" onfocus="this.blur()"><b><font
      face="Verdana,Arial,Helvetica" size="2" color="#000000">&gt;&gt;</font></b></a></TD>
</TR>
</TABLE>
  </center>
</div>
</TD>
</TR>
</TABLE>
</FORM>

<SCRIPT>
with(document){i=0,play=0,di=images,dl=links,form=slideshow,til=theimage.length}

function slideImage(num) {
i=num%til;if(i<0)i=til-1;
if(document.all&&dotrans==1)eval('di.slideimage.filters.'+transtype+'.apply()')
di.slideimage.src=theimage[i][1];
if(document.all&&dotrans==1)eval('di.slideimage.filters.'+transtype+'.play()')
if(form.theimages)form.theimages.selectedIndex = i;
if(form.slidebox)form.slidebox.value = theimage[i][0];
if(form.slidecount)form.slidecount.value = "Image "+(i+1)+" of "+til;
if(form.slidespeed)doSpeed(0);}

function slidePlay() {
if (!window.playing) {
slidePlaying(i+1);
if(form.play)form.play.value="   Stop   ";}
else {playing=clearTimeout(playing);
if(form.play)form.play.value="   Play   ";}
if(di.imgPlay){setTimeout('di.imgPlay.src="'+imgStop+'"',1);imgStop=di.imgPlay.src}}

function slidePlaying(num) {
playing=setTimeout('slidePlaying(i+1);slideImage(i+1);', playspeed);}

slideImage(0);
</SCRIPT>


</html>

 
This information is brought you by free codes only blog
For more JavaScript and HTML code click here.

Text in status bar SAMPLE - 4

<html>

<!-- Text in status bar SAMPLE - 4 -->
<!--   DESCRIPTION:  This will make your text bounce in the status bar of the browser.

    INSTRUCTIONS:  Place this script in the HEAD tags of your webpage.  Then place the text you want to be bounced in the area that

says, "YOUR MESSAGE HERE". 

    FUNCTIONALITY: Works in both Netscape & IE.
-->

<script language="javascript" type="text/javascript">
//Modified by CoffeeCup Software
//This code is Copyright CoffeeCup Software
//all rights reserved. License is granted to a single user to
//reuse this code on a personal or business Web Site.



var yourtext = "* PUT YOUR MESSAGE HERE! *";
var wedge1="                        ";
var wedge2="                        ";
var message1=wedge1+yourtext+wedge2;
var dir = "lside";
var speed = 50;

function bouncey() {

    if (dir == "lside") {
        message2=message1.substring(2,message1.length)+"  ";
        window.status=message2;
        setTimeout("bouncey();",speed);
        message1=message2;

        if (message1.substring(0,1) == "*") {
            dir="rside";
        }
    }

    else {
        message2="  "+message1.substring(0,message1.length-2);
        window.status=message2;
        setTimeout("bouncey();",speed);
        message1=message2;
        if (message1.substring(message1.length-1,message1.length) == "*") {
            dir="lside";
        }
    }
}

// -- End Hiding Here -->
</SCRIPT>

<body onLoad="bouncey()">


</html>

Text in status bar SAMPLE - 3

<html>

<!-- Text in status bar SAMPLE - 3 -->

<!-- Start of Typing Text Script -->
<!-- one letter at a time in the Status bar -->
<!-- Instructions: Just put this script anywhere on your webpage and you will have the typewriter effect on your messages displayed in the tatus bar.
  
     To change the speed of your banner increase or decrease the value for 'var speed'.
  
     (P.S.: decreasing this value increases the speed of your banner.)
     To change the pause between each message change the value for 'var pause'. (Note:  increase value to increase pause.)
-->
<!-- Script supplied with CoffeeCup HTML Editor -->

  
<script language="javascript" type="text/javascript">

var speed = 130
var pause = 1003
var timerID = null
var texttype = false
var ar = new Array()

ar[0] = "I love Javascript message 1"
ar[1] = "I love my india message 2!"
ar[2] = "I love HTML message 1"

var msgnow = 0
var offset = 0

function stopBanner() {
        if (texttype)
                clearTimeout(timerID)
        texttype = false
}

function startBanner() {
        stopBanner()
        showBanner()
}

function showBanner() {
        var text = ar[msgnow]

        if (offset < text.length) {
                if (text.charAt(offset) == " ")
                        offset++                      

                var partialMessage = text.substring(0, offset + 1)
                window.status = partialMessage
                offset++
                timerID = setTimeout("showBanner()", speed)
                texttype = true
        } else {
                offset = 0
                msgnow++
                if (msgnow == ar.length)
                        msgnow = 0

                timerID = setTimeout("showBanner()", pause)
                texttype = true
        }
}

</SCRIPT>
</HEAD>
<BODY onLoad="startBanner()">
</BODY>
</HTML>
<!-- END OF SCRIPT -->
<!/SCRIPT>


</html>

Text in status bar SAMPLE - 2

<!-- Text in status bar SAMPLE - 2 -->

<!-- Start of Typing Text Script -->
<!-- This types one letter at a time in the Status bar -->
<!-- Instructions: Just put this script anywhere on your webpage
    and you will have the typewriter effect on your messages
    displayed in the status bar. 
   
    To change the speed of your banner increase or decrease the
    value for 'var speed'.
    (Note: decreasing this value increases the speed of your banner.)
   
    To change the pause between each message change the value
    for 'var pause'. 
    (Note:  increase value to increase pause.)
-->
<!-- Script supplied with CoffeeCup HTML Editor -->

<script language="javascript" type="text/javascript">

var speed = 100
var pause = 1000
var timerID = null
var texttype = false
var ar = new Array()

ar[0] = "This is the Typing Text Javascript"
ar[1] = "CoffeeCup Software is cool!"
ar[2] = "El HTML Editor++ es muy bueno!"

var msgnow = 0
var offset = 0

function stopBanner() {
        if (texttype)
                clearTimeout(timerID)
        texttype = false
}

function startBanner() {
        stopBanner()
        showBanner()
}

function showBanner() {
        var text = ar[msgnow]

        if (offset < text.length) {
                if (text.charAt(offset) == " ")
                        offset++                       

                var partialMessage = text.substring(0, offset + 1)
                window.status = partialMessage
                offset++
                timerID = setTimeout("showBanner()", speed)
                texttype = true
        } else {
                offset = 0
                msgnow++
                if (msgnow == ar.length)
                        msgnow = 0

                timerID = setTimeout("showBanner()", pause)
                texttype = true
        }
}

</SCRIPT>
</HEAD>
<BODY onLoad="startBanner()">
</BODY>
</HTML>
<!-- END OF SCRIPT -->
<!/SCRIPT>

Moving internet explorer window

<!-- Moving internet explorer window -->
 <!-- START CODE Powered javascript code by WWW.javakhafan.7p.COM-->

<meta http-equiv="Content-Language" content="en-us">
<script language="Javascript" type="text/javascript">
<!-- Begin
function shake(n) {
if (parent.moveBy) {
for (i = 10; i > 0; i--) {
for (j = n; j > 0; j--) {

parent.moveBy(-i,0);
parent.moveBy(0,-i);
parent.moveBy(-i,0);
parent.moveBy(0,i);
parent.moveBy(i,0);
parent.moveBy(0,-i);
parent.moveBy(-i,0);
parent.moveBy(0,i);
parent.moveBy(i,0);
parent.moveBy(0,-i);
parent.moveBy(-i,0);
parent.moveBy(0,-i);
parent.moveBy(i,0);
parent.moveBy(0,i);
parent.moveBy(i,0);
parent.moveBy(0,i);
         }
      }
   }


}
//  End -->

<!--
shake(1);
//-->
 </SCRIPT>

Automatically maximize WEBPAGE window

<!-- START OF Window Auto Maximize DHTML -->


<!-- SUMMARY BRIEF

    This code will automatically maximize the
    browser window when the page is loaded.

-->


<!-- Put this code inside of your <HEAD> tag. -->


<script language="Javascript" type="text/javascript">
<!--

top.window.moveTo(0,0);
if (document.all) {
top.window.resizeTo(screen.availWidth,screen.availHeight);
}
else if (document.layers||document.getElementById) {
if (top.window.outerHeight<screen.availHeight||top.window.outerWidth<screen.availWidth){
top.window.outerHeight = screen.availHeight;
top.window.outerWidth = screen.availWidth;
}
}

//-->
</script>

Text around mouse pointer

<!-- Texts around mouse -->

<!-- START OF Mouse Cursor Text Trailer DHTML -->


<!-- SUMMARY BRIEF

    This DHTML script will make a text message follow
    your cursor around the screen. You can change the
    message to say whatever you want.

    You can change the font face, color and size in
    the .trailersytle tag below. You can change the message
    in the javascript below that. Just look for the
    comment that says "Insert your personal message below."

-->


<!-- Put this portion of the script inside of your <HEAD> tag -->


<style>
.trailerstyle {
    position: absolute;
    visibility: visible;
    top: -50px;
    font-size: 12px;
    font-family: Arial,Helvetica,Verdana;
          font-weight: bold;
    color: #000000;
}
</style>

<script>
<!--

var x,y
var step=20
var flag=0

// Insert your personal message below.
// Important: Do NOT remove the space at the end of the sentence!!!

var message=" YOUR TEXT MESSAGE HERE "
message=message.split("")

var xpos=new Array()
for (i=0;i<=message.length-1;i++) {
    xpos[i]=-50
}

var ypos=new Array()
for (i=0;i<=message.length-1;i++) {
    ypos[i]=-50
}

function handlerMM(e){
    x = (document.layers) ? e.pageX : document.body.scrollLeft+event.clientX
    y = (document.layers) ? e.pageY : document.body.scrollTop+event.clientY
    flag=1
}

function mousetrailer() {
    if (flag==1 && document.all) {
        for (i=message.length-1; i>=1; i--) {
               xpos[i]=xpos[i-1]+step
            ypos[i]=ypos[i-1]
        }
        xpos[0]=x+step
        ypos[0]=y
   
        for (i=0; i<message.length-1; i++) {
            var thisspan = eval("span"+(i)+".style")
            thisspan.posLeft=xpos[i]
            thisspan.posTop=ypos[i]
        }
    }
   
    else if (flag==1 && document.layers) {
        for (i=message.length-1; i>=1; i--) {
               xpos[i]=xpos[i-1]+step
            ypos[i]=ypos[i-1]
        }
        xpos[0]=x+step
        ypos[0]=y
   
        for (i=0; i<message.length-1; i++) {
            var thisspan = eval("document.span"+i)
            thisspan.left=xpos[i]
            thisspan.top=ypos[i]
        }
    }
        var timer=setTimeout("mousetrailer()",30)
}

//-->
</script>


<!-- Put this code inside of your <BODY> tag. -->


<script>
<!--

for (i=0;i<=message.length-1;i++) {
    document.write("<span id='span"+i+"' class='trailerstyle'>")
    document.write(message[i])
    document.write("</span>")
}

if (document.layers){
    document.captureEvents(Event.MOUSEMOVE);
}
document.onmousemove = handlerMM;

//-->
</script>


<!-- Lastly, insert the following into the <BODY> tag, itself, just like the example that follows. -->


<body onLoad="mousetrailer()" style="width:100%;overflow-x:hidden;overflow-y:scroll">


<!-- END OF Mouse Cursor Text Trailer DHTML -->

Combo box of links

<!-- Combo box of links -->
<HMLT>
<!-- This script opens a separate window for the locations you give it.
Pages are neat but pictures make a cool photo album. Change the
attributes that read menubar=0,toolbar=0, etc... and Width & Height
to meet your needs.  Make sure you place the URL's you want to go
to and their names below.-->

<script language="JavaScript">
<!-- Hide the script from old browsers --
function surfto(form)
{
  var myindex=form.dest.selectedIndex
  window.open(form.dest.options[myindex].value,"main","menubar=1,toolbar=0,location=0,directories=0,status=1,copyhistory=0,width=235,height=235");
}
//-->
</SCRIPT>
<CENTER>
<FORM NAME="myform">
  <SELECT NAME="dest" SIZE=1>
    <OPTION VALUE="http://bhojpuriduniya.wordpress.com/">Bhojpuriduniya
    <OPTION VALUE="http://mybhojpuriduniya.blogspot.com/">myBhojpuriduniya
    <OPTION VALUE="http://freecodesonly.blogspot.com/">freecodesonly
  </SELECT>
<P>
<INPUT TYPE="BUTTON" VALUE="Go  !" onClick="surfto(this.form)">
</FORM>
</CENTER>



</html>

A nice effect comes text form a side of the page

<!-- A nice effect comes text form a side of the page -->
<html>

<script>
//set style for NS4 to ''
if (document.layers)
var ns4def=''
</script>

<h2 id="flyin" style="position:relative;left:-400;font-style:italic" style=&{ns4def};><font face="Arial">Welcome to our Homepage!</font></h2>


<script language="JavaScript1.2">




if (document.getElementById||document.all)
var crossheader=document.getElementById? document.getElementById("flyin").style : document.all.flyin.style

function animatein(){
if (parseInt(crossheader.left)<0)
crossheader.left=parseInt(crossheader.left)+20
else{
crossheader.left=0
crossheader.fontStyle="normal"
clearInterval(start)
}
}

if (document.getElementById||document.all)
start=setInterval("animatein()",50)


</script>

<p>

</HTML>

Random color changer

<!--Random color changer -->
<script type="text/javascript">

// Select fade-effect below:
// Set 1 if the background may fade from dark to medium
// Set 2 if the background may fade from light to medium
// Set 3 if the background may fade from very dark to very light light
// Set 4 if the background may fade from light to very light
// Set 5 if the background may fade from dark to very dark
var fade_effect=3

// What type of gradient should be applied Internet Explorer 5x or higher?
// Set "none" or "horizontal" or "vertical"
var gradient_effect="horizontal"

// Speed higher=slower
var speed=60

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

var browserinfos=navigator.userAgent
var ie4=document.all&&!document.getElementById
var ie5=document.all&&document.getElementById&&!browserinfos.match(/Opera/)
var ns4=document.layers
var ns6=document.getElementById&&!document.all
var opera=browserinfos.match(/Opera/) 
var browserok=ie4||ie5||ns4||ns6||opera

if (fade_effect==1) {
    var darkmax=1
    var lightmax=127
}
if (fade_effect==2) {
    var darkmax=127
    var lightmax=254
}
if (fade_effect==3) {
    var darkmax=1
    var lightmax=254
}
if (fade_effect==4) {
    var darkmax=190
    var lightmax=254
}
if (fade_effect==5) {
    var darkmax=1
    var lightmax=80
}
var hexc = new Array('0','1','2','3','4','5','6','7','8','9','A','B','C','D','E','F')

var newred
var newgreen
var newblue
var oldred
var oldgreen
var oldblue

var redcol_1
var redcol_2
var greencol_1
var greencol_2
var bluecol_1
var bluecol_2
var oldcolor
var newcolor
var firsttime=true

var stepred=1
var stepgreen=1
var stepblue=1

function setrandomcolor() {
    var range=(lightmax-darkmax)
    if (firsttime) {
        newred=Math.ceil(range*Math.random())+darkmax
        newgreen=Math.ceil(range*Math.random())+darkmax
        newblue=Math.ceil(range*Math.random())+darkmax
        firsttime=false
    }
   
    oldred=Math.ceil(range*Math.random())+darkmax
    oldgreen=Math.ceil(range*Math.random())+darkmax
    oldblue=Math.ceil(range*Math.random())+darkmax
   
    stepred=newred-oldred
    if (oldred>newred) {stepred=1}
    else if (oldred<newred) {stepred=-1}
    else {stepred=0}
   
    stepgreen=newgreen-oldgreen
    if (oldgreen>newgreen) {stepgreen=1}
    else if (oldgreen<newgreen) {stepgreen=-1}
    else {stepgreen=0}
   
    stepblue=newblue-oldblue
    if (oldblue>newblue) {stepblue=1}
    else if (oldblue<newblue) {stepblue=-1}
    else {stepblue=0}
    fadebg()
}

function fadebg() {
    if (newred==oldred) {stepred=0}
    if (newgreen==oldgreen) {stepgreen=0}
    if (newblue==oldblue) {stepblue=0}
    newred+=stepred
    newgreen+=stepgreen
    newblue+=stepblue
   
    if (stepred!=0 || stepgreen!=0 || stepblue!=0) {
          redcol_1 = hexc[Math.floor(newred/16)];
         redcol_2 = hexc[newred%16];
         greencol_1 = hexc[Math.floor(newgreen/16)];
          greencol_2 = hexc[newgreen%16];
          bluecol_1 = hexc[Math.floor(newblue/16)];
          bluecol_2 = hexc[newblue%16];
          newcolor="#"+redcol_1+redcol_2+greencol_1+greencol_2+bluecol_1+bluecol_2
        if (ie5 && gradient_effect!="none") {
            if (gradient_effect=="horizontal") {gradient_effect=1}
            if (gradient_effect=="vertical") {gradient_effect=0}
              greencol_1 = hexc[Math.floor(newred/16)];
             greencol_2 = hexc[newred%16];
             bluecol_1 = hexc[Math.floor(newgreen/16)];
              bluecol_2 = hexc[newgreen%16];
              redcol_1 = hexc[Math.floor(newblue/16)];
              redcol_2 = hexc[newblue%16];
            var newcolorCompl="#"+redcol_1+redcol_2+greencol_1+greencol_2+bluecol_1+bluecol_2
            document.body.style.filter=
"progid:DXImageTransform.Microsoft.Gradient(startColorstr="+newcolorCompl+", endColorstr="+newcolor+" GradientType="+gradient_effect+")"
        }
        else {
              document.bgColor=newcolor
        }
        var timer=setTimeout("fadebg()",speed);
    }
      else {
          clearTimeout(timer)
        newred=oldred
        newgreen=oldgreen
        newblue=oldblue
        oldcolor=newcolor
        setrandomcolor()
      }
}

if (browserok) {
    window.onload=setrandomcolor
}
</script>

Music on web ( Mid, Mp3, Wma )

<!-- Music on web ( Mid, Mp3, Wma )  -->
<embed "1" TYPE="application/x-mplayer2" SRC="http://kkrcity.com/1.mp3" autostart="true" WIDTH="120" HEIGHT="50"></embed></p>

How to make menus in Java

<!--How to make menus in Java -->
<!-- START OF Drop Down DHTML -->

<!-- SUMMARY BRIEFS
    This DHTML script will create a drop down link box out of
    an ordinary link.  VERY COOL!!!!

    The top portion of this script goes above the <BODY> tag.
    The second portion goes where you want the drop down link
    box to be.
-->




<style>
<!--
#wrapper{
position:relative;
height:30px
}

#wrapper2{
position:absolute
}

#coffeemenu03{
filter:revealTrans(Duration=1.5,Transition=12)
visibility:hide
}


-->
</style></HEAD>

<BODY>

<ilayer id="coffeemenu01" height=35px>
<layer id="coffeemenu02" visibility=show>
<span id="wrapper">
<span id="wrapper2" onClick="dropit2();event.cancelBubble=true;return false">
<font face="Verdana"><b><a href="notthisbrowser.html">Click Here To Navigate</a></b></font>
</span>
</span>
</layer>
</ilayer>

<script language="JavaScript1.2">


var enableeffect=true

var selection=new Array()
selection[0]='<font face="ARIAL BLACK"><a href="http://freecodesonly.blogspot.com/">Order Our Stuff</a><br>'
selection[1]='<a href="http://freecodesonly.blogspot.com/">Contact Us via E-mail</a><br>'
selection[2]='<a href="http://freecodesonly.blogspot.com/">Help With Our Items</a><br>'
selection[3]='<a href="http://mybhojpuriduniya.blogspot.com/">Bhojpuri Duniya</a><br>'
selection[4]='<a href="http://freecodesonly.blogspot.com/">Services We Offer</a><br></font>'

if (document.layers)
document.coffeemenu01.document.coffeemenu02.visibility='show'

function dropit2(){
if (document.all){
coffeemenu03.style.left=document.body.scrollLeft+event.clientX-event.offsetX
coffeemenu03.style.top=document.body.scrollTop+event.clientY-event.offsetY+18
if (coffeemenu03.style.visibility=="hidden"){
if (enableeffect)
coffeemenu03.filters.revealTrans.apply()
coffeemenu03.style.visibility="visible"
if (enableeffect)
coffeemenu03.filters.revealTrans.play()
}
else{
hidemenu()
}
}
}

function dropit(e){
if (document.coffeemenu03.visibility=="hide")
document.coffeemenu03.visibility="show"
else
document.coffeemenu03.visibility="hide"
document.coffeemenu03.left=e.pageX-e.layerX
document.coffeemenu03.top=e.pageY-e.layerY+19
return false
}

function hidemenu(){
if (enableeffect)
coffeemenu03.filters.revealTrans.stop()
coffeemenu03.style.visibility="hidden"
}

function hidemenu2(){
document.coffeemenu03.visibility="hide"
}

if (document.layers){
document.coffeemenu01.document.coffeemenu02.captureEvents(Event.CLICK)
document.coffeemenu01.document.coffeemenu02.onclick=dropit
}
else if (document.all)
document.body.onclick=hidemenu

</script>

<div id="coffeemenu03" style="position:absolute;left:0;top:0;layer-background-color:#C0C0C0;background-color:#C0C0C0;width:200;visibility:hidden;border:2px solid black;padding:0px">
<script language="JavaScript1.2">
if (document.all)
coffeemenu03.style.padding='4px'
for (i=0;i<selection.length;i++)
document.write(selection[i])
</script>
</div>

<script language="JavaScript1.2">
if (document.layers){
document.coffeemenu03.captureEvents(Event.CLICK)
document.coffeemenu03.onclick=hidemenu2
}
</script>

<!-- END OF Drop Down DHTML -->

Add your web to Bookmark

<!--Add your web to Bookmark -->
       
                <html>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1256">
<meta http-equiv="Content-Language" content="en-us">
<meta name="GENERATOR" content="Microsoft FrontPage 6.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<title></title>
</head>

<body>

<!-- START OF Add Bookmark in IE DHTML -->

<!-- SUMMARY BRIEF

    This code will allow you to put a link on your
    page that, when clicked, will add a URL to the
    user's Favorites.

    NOTE: This will only work for IE users. It will
    NOT work for users using Netscape.

    You can change the bookmark link and text in the
    var bookmarkurl and var bookmarktitle attributes
    below.

    You can change the text of the actual link in the
    <A HREF> code that you will place for your link
    to appear in your page. It is located at the
    bottom of this page.

-->

<!-- Put this code inside of your <HEAD> tag. -->


<script language="JavaScript1.2">
<!--

var bookmarkurl="http://freecodesonly.blogspot.com/"
var bookmarktitle="-=[ Java Web Site ]=-"

function ccaddbookmark() {
    if (document.all)
    window.external.AddFavorite(bookmarkurl,bookmarktitle)
}

//-->
</script>


<!-- Put this code into your page wherever you want the link to be. -->


<a href="javascript:ccaddbookmark()" target="_self">
<font size="1" face="Arial">[ Add Webloger to your Favorites ]</font>
</a>


<!-- END OF Add Bookmark in IE DHTML -->

Information about visitor's browser

<!--Information about visitor's browser -->
            <html>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1256">
<meta http-equiv="Content-Language" content="en-us">
<meta name="GENERATOR" content="Microsoft FrontPage 6.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<title></title>
</head>

<body>

<!-- Start of Browser ID JavaScript-->
<!-- This Script allows the visitor to click on the buttons to display their browser's info -->
<!-- Instructions: Just put the beginning of this script between your pages open and closing
    head tags and the later part in the body where you want it displayed in your page.  -->
<!-- Script supplied with CoffeeCup HTML Editor -->
<!--             www.coffeecup.com              -->
<head><script>
 <!--
 function CC_getBrowserName()   {  
         document.forms[0].elements[0].value =navigator.appName;    
 }

 function CC_getBrowserVersion()   {  
         document.forms[0].elements[0].value =  navigator.appVersion;    
 }

 function CC_getBrowserCodeName()   {  
         document.forms[0].elements[0].value = navigator.appCodeName;    
 }

 function CC_getBrowserUserAgent()   {  
         document.forms[0].elements[0].value =  navigator.userAgent;    
 }

 function CC_getBrowserNameVersion()   {  
         document.forms[0].elements[0].value = navigator.appName + " " + navigator.appVersion;    
 }

 // -->
 </script>
 </head>
 <center>

<center>
 <form NAME="detect">
 <input TYPE="text" NAME="browser" SIZE="26" MAXLENGTH="40" VALUE="Browser Detection"><br>
 <br><br>Choose a button to reveal your browser's self image.<br>
 <input TYPE="button" VALUE="appName" onClick="CC_getBrowserName()">
 <input TYPE="button" VALUE="appVersion" onClick="CC_getBrowserVersion()">
 <input TYPE="button" VALUE="appCodeName" onClick="CC_getBrowserCodeName()">
 <input TYPE="button" VALUE="userAgent" onClick="CC_getBrowserUserAgent()">
 <input TYPE="button" VALUE="appName / appVersion" onClick="CC_getBrowserNameVersion()"><br><br><br>
 </form>
 </center><p>   
<!-- End of Browser ID JavaScript-->

Prevent from right click No copying!

<!--Prevent from right click -->
<!-- Right Click - Prevent Script Use this link to help prevent users from stealing your code !-->

<script language="JavaScript">
function right(e) {
if (navigator.appName == 'Netscape' &&
(e.which == 3 || e.which == 2))
return false;
else if (navigator.appName == 'Microsoft Internet Explorer' &&
(event.button == 2 || event.button == 3)) {
alert("Please don't steal my stuff!!!");
return false;
}
return true;
}
document.onmousedown=right;
if (document.layers) window.captureEvents(Event.MOUSEDOWN);
window.onmousedown=right;
</script>
<!--This is a sample of changing texts in a text. -->
<!-- A Script that types in a box that looks like notepad very cool

       The speed of the typing can be adjusted by raising
       or lowering the number in the setTimeout function.
-->

<script language="JavaScript">

function makeArray()
{
  this.length = makeArray.arguments.length
  for (var i = 0; i < this.length; i++)
  this[i+1] = makeArray.arguments[i]
}

var fArray = new makeArray;
fArray[0]="Message 1 goes here. "
fArray[1]="Message 2 goes here. "
fArray[2]="Message 3 goes here. "
fArray[3]="Message 4 goes here. "

var x = 1;
var y = 0;
var msg1 = fArray[y];

function newsFeed()
{
  if (x==msg1.length+1)
  {
    for (var z=0; z < 7000; z++);
    y+=1;
    if (y > 3) y=0;
    document.form1.news2.value=' ';
    msg1 = fArray[y];
    x=0;
  }
  document.form1.news2.value=msg1.substring(0,x); 
  x+=1;
  setTimeout("newsFeed() ",1);
}
</script>

<body bgcolor=teal link=goldenrod onLoad="newsFeed()">

<form name="form1">
<textarea wrap=physical rows=10 cols=25 name="news2">
</form>
</body>

Create Drop down link

<!--Create Drop down link -->
<!-- Start Of Drop Down Links Script -->
<!-- Consolidate a bunch of links to a simple drop down menu -->
<!-- Instructions: Just put this in your page where you want to display links. -->
<!-- Script supplied with CoffeeCup HTML Editor -->
<!--            www.webloger.5u.com             -->
<script language="JavaScript">

function CC_go(form) {var myindex=form.dest.selectedIndex
window.open(form.dest.options[myindex].value, target="_parent", "toolbar=yes,scrollbars=yes,location=yes"); }

</script>

<form name="CC_LinkForm">
<select name="dest" SIZE=1>
<option selected value="">Places to go
<option value="http://www.webloger.5u.com/">Webloger Website
<option value="http://home.cnet.com/">CNET
<option value="http://www.tucows.com">Tucows
</select>
<P>
<input type="button" value="Link Me!" onClick="CC_go(this.form)">
</form>

<!-- End Of Drop Down Links Script -->

Link without click

<!--Link without click -->
<!--   DESCRIPTION:  This will make the browser jump to the
page of your choice once the user puts the mouse over the link.

    INSTRUCTIONS:  Place this code in your webpage.  Use the
model given to modify your own links.  Can be used with an Image
or simply use text.

    FUNCTIONALITY:  Works in both Netscape & IE.

//Modified by CoffeeCup Software
//This code is Copyright (c) 1997 CoffeeCup Software
//all rights reserved. License is granted to a single user to
//reuse this code on a personal or business Web Site.

-->
<CENTER>
<a href="http://www.webloger.5u.com/" target=main onmouseover="window.open
 ('http://www.javascriptfreecode.com/');" style="text-decoration: none"><FONT SIZE=7 FACE=ARIAL COLOR=#804000>www.javascriptfreecode.com</FONT></a></CENTER><P>

This shows the time of so many cities in the world in digital way

 <!--This shows the time of so many cities in the world in digital way -->
<html>

<head>
<meta http-equiv="Content-Language" content="en-us">
<meta name="GENERATOR" content="Microsoft FrontPage 6.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<meta http-equiv="Content-Type" content="text/html; charset=windows-1256">
<title>New Page 2</title>
</head>

<body>

<table border="0" width="200" cellspacing="0" cellpadding="3">
<form name="where">
  <tr>
    <td width="100%">
<select name="city" size="1" onchange="updateclock(this);">
<option value="" selected>Local time</option>
<option value="0">London GMT</option>
<option value="1">Rome</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="-5">New York</option>
<option value="-3">Buenos Aires</option>
</select>

</td>
  </tr>
  <tr>
    <td width="100%">
<script language="JavaScript">

/*
Drop Down World Clock- By Learn iran (http://www.webloger.5u.com)
Portions of code by Kurt @ http://www.webloger.5u.com/
This credit notice must stay intact
*/

if (document.all||document.getElementById)
document.write('<span id="worldclock" style="font:bold 16px Arial;"></span><br>')

zone=0;
isitlocal=true;
ampm='';

function updateclock(z){
zone=z.options[z.selectedIndex].value;
isitlocal=(z.options[0].selected)?true:false;
}

function WorldClock(){
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;
if (hr2<10) hr2="0"+hr2

var finaltime=hr2+':'+((mins < 10)?"0"+mins:mins)+':'+((secs < 10)?"0"+secs:secs)+' '+statusampm;
if (document.all)
worldclock.innerHTML=finaltime
else if (document.getElementById)
document.getElementById("worldclock").innerHTML=finaltime
else if (document.layers){
document.worldclockns.document.worldclockns2.document.write(finaltime)
document.worldclockns.document.worldclockns2.document.close()
}


setTimeout('WorldClock()',1000);
}

window.onload=WorldClock
//-->
</script>

<!--Place holder for NS4 only-->
<ilayer id="worldclockns" width=100% height=35><layer id="worldclockns2" width=100% height=35 left=0 top=0 style="font:bold 16px Arial;"></layer></ilayer>

<p>

<font face="arial" size="-2">This free script provided by
<a href="http://www.javascriptfreecode.com/">java site</a></font>
</td>
</form>
  </tr>
</table>

</body>

</html>

This is a way to show merlin the toy of the windows in your website

<!-- This is a way to show merlin the toy of the windows in your website -->
<OBJECT id=wolfi classid=CLSID:D45FD31B-5C6E-11D1-9EC1-00C04FD7081F>></OBJECT>
<SCRIPT language=JavaScript type=text/javascript>
function LoadLocalAgent(CharID, CharACS) {
LoadReq = wolfi.Characters.Load(CharID, CharACS);

return(true);

}

var MerlinID;

var MerlinACS;

wolfi.Connected = true;
MerlinLoaded = LoadLocalAgent(MerlinID, MerlinACS);

Merlin = wolfi.Characters.Character(MerlinID);
Merlin.Show();
Merlin.Play("Surprised");
Merlin.speak("hi dear");
Merlin.MoveTo (350,250);
Merlin.Play("Surprised");
Merlin.Play("GetAttention");
Merlin.Play("Blink"); Merlin.Play("Blink");

Merlin.speak("   Welcome to <#user#> ");

Merlin.Play("Blink"); Merlin.Play("Confused");

Merlin.speak("i hope enjoy to this website");

Merlin.speak("created by webloger.5u.com");

Merlin.Play('GestureLeft');
Merlin.Play("Blink")
Merlin.Hide();
</SCRIPT>