You are on page 1of 316

2 level combo box

<form name="dynamiccombo">
<select name="stage2" size="1" onChange="displaysub()">
<option value="#">This is a place Holder text </option>
<option value="#">This is a Place Holder text </option>
<option value="#">This is a Place Holder text </option>
<option value="#">This is a Place Holder text </option>
</select>
<input type="button" name="test" value="Go!"
onClick="gothere()">
</form>
<script>
<!-//2-level combo box script- by javascriptkit.com
//Visit JavaScript Kit (http://www.agencija027.com) for script
//Credit must stay intact for use
//STEP 1 of 2: DEFINE the main category links below
//EXTEND array as needed following the laid out structure
//BE sure to preserve the first line, as it's used to display main title
var category=new Array()
category[0]=new Option("SELECT A CATEGORY ", "") //THIS LINE RESERVED TO
CONTAIN COMBO TITLE
category[1]=new Option("Webmaster sites", "combo1")
category[2]=new Option("News sites", "combo2")
category[3]=new Option("Entertainment", "combo3")
//STEP 2 of 2: DEFINE the sub category links below
//EXTEND array as needed following the laid out structure
//BE sure to preserve the LAST line, as it's used to display submain title
var combo1=new Array()
combo1[0]=new Option("JavaScript Kit","http://www.agencija027.com ")
combo1[1]=new Option("Dynamic Drive"," http://www.agencija027.com ")
combo1[2]=new Option("Freewarejava.com"," http://www.agencija027.com ")
combo1[3]=new Option("Free Web Templates"," http://www.agencija027.com ")
combo1[4]=new Option("Web Monkey"," http://www.agencija027.com ")
combo1[5]=new Option("BACK TO CATEGORIES","") //THIS LINE RESERVED TO
CONTAIN COMBO SUBTITLE
var combo2=new Array()
combo2[0]=new Option("CNN","http://www.cnn.com")
combo2[1]=new Option("MSNBC","http://www.msnbc.com")
combo2[2]=new Option("BBC News","http://news.bbc.co.uk")
combo2[3]=new Option("ABC News","http://www.abcnews.com")

combo2[4]=new Option("BACK TO CATEGORIES","") //THIS LINE RESERVED TO


CONTAIN COMBO SUBTITLE
var combo3=new Array()
combo3[0]=new Option("Hollywood.com","http://www.hollywood.com")
combo3[1]=new Option("MTV","http://www.mtv.com")
combo3[2]=new Option("ETOnline","http://etonline.com")
combo3[3]=new Option("BACK TO CATEGORIES","") //THIS LINE RESERVED TO
CONTAIN COMBO SUBTITLE
var curlevel=1
var cacheobj=document.dynamiccombo.stage2
function populate(x){
for (m=cacheobj.options.length-1;m>0;m--)
cacheobj.options[m]=null
selectedarray=eval(x)
for (i=0;i<selectedarray.length;i++)
cacheobj.options[i]=new Option(selectedarray[i].text,selectedarray[i].value)
cacheobj.options[0].selected=true
}
function displaysub(){
if (curlevel==1){
populate(cacheobj.options[cacheobj.selectedIndex].value)
curlevel=2
}
else
gothere()
}
function gothere(){
if (curlevel==2){
if (cacheobj.selectedIndex==cacheobj.options.length-1){
curlevel=1
populate(category)
}
else
location=cacheobj.options[cacheobj.selectedIndex].value
}
}
//SHOW categories by default
populate(category)
//-->
</script>

<p align="center"><font face="arial" size="-2">This free script provided by</font><br>


<font face="arial, helvetica" size="-2"><a href="http://javascriptkit.com">JavaScript
Kit</a></font></p>

Combodescrip1
<center>
<form name="combowithtext">
<select name="example" size="1" onChange="showtext()">
<option value="http://www.agencija027.com/o_nama.htm">Agencija 027</option>
<option value="http://www.agencija027.com/zanimljivo.htm">Zabava</option>
<option value="http://www.agencija027.com/kontakt.htm">Kontakt</option>
</select>
<input type="button" value="Go!"
onClick="gothere()"><br>
<textarea rows=5 cols=21 wrap="virtual" name="text"></textarea>
<script language="javascript">
<!-/*
Combo box with description creditBy JavaScript Kit (www.javascriptkit.com)
Over 200+ free script here!
*/
var shortcut=document.combowithtext
var descriptions=new Array()
//extend this list if neccessary to accomodate more selections
descriptions[0]="Vidite cime se bavi agencija!!"
descriptions[1]="Zabavite se malo (chat, forum, slike, sport, vesti )."
descriptions[2]="Pogledajte kontakt!."
shortcut.text.value=descriptions[shortcut.example.selectedIndex]
function gothere(){
location=shortcut.example.options[shortcut.example.selectedIndex].value
}
function showtext(){
shortcut.text.value=descriptions[shortcut.example.selectedIndex]
}
//-->
</script>
</form>
</center>
<p align="center"><font face="arial" size="-2">This free script provided by</font><br>
<font face="arial, helvetica" size="-2"><a href="http://javascriptkit.com">JavaScript
Kit</a></font></p>

Combodescript2
<form name="combowithtext">
<select name="example" size="1" onChange="showtext()">
<option value="http://www.agencija027.com/chat.htm">chat</option>
<option value="http://agencija027.20.forumer.com">forum</option>
<option value="http://www.agencija027.mojblog.com">blog</option>
<option value="http://www.agencija027.com/oglasi.htm">oglasi</option>
<option value="http://www.agencija027.com/slike.htm">slike</option>
<option value="http://www.agencija027.com/modeli.htm">modeli</option>
<option value="http://www.agencija027.com/sport.htm">sport</option>
<option value="http://www.agencija027.com/vesti.htm">vesti</option>
<option value="http://www.agencija027.com/igrice.htm">igrice</option>
</select>
<input type="button" value="Napred!"
onClick="gothere()">
<script language="javascript">
<!-/*
Combo box with description creditBy JavaScript Kit (www.javascriptkit.com)
Over 200+ free script here!
*/
var shortcut=document.combowithtext
var descriptions=new Array()
//extend this list if neccessary to accomodate more selections
descriptions[0]="CHAT"
descriptions[1]="FORUM"
descriptions[2]="BLOG"
descriptions[3]="OGLASI"
descriptions[4]="SLIKE"
descriptions[5]="MODELI"
descriptions[6]="SPORT"
descriptions[7]="VESTI"
descriptions[8]="IGRICE"
function gothere(){
location=shortcut.example.options[shortcut.example.selectedIndex].value
}
function showtext(){
window.status=descriptions[shortcut.example.selectedIndex]
}
//-->
</script>

</form>
<p align="center"><font face="arial" size="-2">This free script provided by</font><br>
<font face="arial, helvetica" size="-2"><a href="http://www.agencija027.com">agencija
027</a></font></p>

Dhtml combo
Example:
Developer Sites
Technology Related Sites
Directions
Step 1: Add the following code to the <head> section of your page:

It references two external files and an image. Download them below (right click, and select
"save as"):
dhtmlcombo.css
dhtmlcombo.js
Single image used:
Step 2: Add the below sample HTML to your page, which illustrates two DHTML select
menus:
More Information
As mentioned, this script will transform your regular SELECT menus into a DHTML Menu
instead. If you look at the code of Step 2, you'll see how it works exactly:
<!-- 1st example -->
<select id="webmaster" title="Developer Sites">
<option value="http://www.javascriptkit.com">JavaScript Kit</option>
<option value="http://www.php.net">PHP.net</option>
<option value="http://www.codingforums.com">Coding Forums</option>
<option value="http://www.dynamicdrive.com">Dynamic Drive</option>
<option value="http://www.cssdrive.com">CSS Drive</option>
<option value="http://www.dynamicdrive.com/forums/">CSS Menus and codes</option>

</select>
<script type="text/javascript">
//dhtmlselect("id_of_select_menu", "optional_width_of_select_box_px",
"optional_width_of_drop_down_menu_px")
dhtmlselect("webmaster")
</script>
The first portion is just your regular SELECT menu HTML with various options and urls
defined (via the "value" attribute). To transform it into a DHTML menu, just call the
JavaScript function:
dhtmlselect("webmaster")
immediately following the SELECT menu to replace it, where the ID of the menu is passed in
as its parameter. You should call this function immediately following the HTML code, so the
DHTML menu position on the page is identical to the original SELECT menu's.
Styling the DHTML Select Menu
To customize the look of the DHTML select menu, just modify the values inside
dhtmlcombo.css. However, for each menu on your page, you can individually change the
menu's width from the default. This is done by using two optional parameters when calling
the dhtmlselect() function:
dhtmlselect("webmaster", "150px", "200px")
This causes the main box to be "150px", and the drop down menu that appears onMouseover
to be "200px" for this particular DHTML select menu.

Step 1
<link rel="stylesheet" type="text/css" href="dhtmlcombo.css" />
<script type="text/javascript" src="dhtmlcombo.js">
/***********************************************
* DHTML Select Menu- by JavaScript Kit (www.javascriptkit.com)
* Menu interface credits: http://www.dynamicdrive.com/style/csslibrary/item/glossy-verticalmenu/
* This notice must stay intact for usage
* Visit JavaScript Kit at http://www.javascriptkit.com/ for this script and 100s more
***********************************************/
</script>

Step 2
<form>
<!-- 1st example -->
<select id="webmaster" title="Developer Sites">
<option value="http://www.javascriptkit.com">JavaScript Kit</option>
<option value="http://www.php.net">PHP.net</option>
<option value="http://www.codingforums.com">Coding Forums</option>
<option value="http://www.dynamicdrive.com">Dynamic Drive</option>
<option value="http://www.cssdrive.com">CSS Drive</option>
<option value="http://www.dynamicdrive.com/style/">CSS Menus/ codes</option>
</select>
<script type="text/javascript">
//dhtmlselect("id_of_select_menu", "optional_width_of_select_box_px",
"optional_width_of_drop_down_menu_px")
dhtmlselect("webmaster")
</script>
<!-- 2nd example -->
<select id="network" title="Technology Related Sites">
<option value="http://www.digg.com">Digg.com</option>
<option value="http://www.news.com">CNET Technology News</option>
<option value="http://www.slashdot.com">SlashDot</option>
<option value="http://www.theregister.co.uk/">The Register</option>
</select>
<script type="text/javascript">
//dhtmlselect("id_of_select_menu", "optional_width_of_select_box_px",
"optional_width_of_drop_down_menu_px")
dhtmlselect("network", "190px", "200px")
</script>
</form>

Double combo
<form name="doublecombo">
<p><select name="example" size="1" onChange="redirect(this.options.selectedIndex)">
<option>Technology Sites</option>
<option>News Sites</option>
<option>Search Engines</option>
</select>
<select name="stage2" size="1">
<option value="http://javascriptkit.com">JavaScript Kit</option>
<option value="http://www.news.com">News.com</option>
<option value="http://www.wired.com">Wired News</option>
</select>
<input type="button" name="test" value="Go!"
onClick="go()">
</p>
<script>
<!-/*
Double Combo Script Credit
By JavaScript Kit (www.javascriptkit.com)
Over 200+ free JavaScripts here!
*/
var groups=document.doublecombo.example.options.length
var group=new Array(groups)
for (i=0; i<groups; i++)
group[i]=new Array()
group[0][0]=new Option("JavaScript Kit","http://javascriptkit.com")
group[0][1]=new Option("News.com","http://www.news.com")
group[0][2]=new Option("Wired News","http://www.wired.com")
group[1][0]=new Option("CNN","http://www.cnn.com")

group[1][1]=new Option("ABC News","http://www.abcnews.com")


group[2][0]=new Option("Hotbot","http://www.hotbot.com")
group[2][1]=new Option("Infoseek","http://www.infoseek.com")
group[2][2]=new Option("Excite","http://www.excite.com")
group[2][3]=new Option("Lycos","http://www.lycos.com")
var temp=document.doublecombo.stage2
function redirect(x){
for (m=temp.options.length-1;m>0;m--)
temp.options[m]=null
for (i=0;i<group[x].length;i++){
temp.options[i]=new Option(group[x][i].text,group[x][i].value)
}
temp.options[0].selected=true
}
function go(){
location=temp.options[temp.selectedIndex].value
}
//-->
</script>
</form>
<p align="center"><font face="arial" size="-2">This free script provided by</font><br>
<font face="arial, helvetica" size="-2"><a href="http://javascriptkit.com">JavaScript
Kit</a></font></p>

Double combo 2
<script language="JavaScript">
<!-//Double Combo Box with Description Code- by Randall Wald (http://www.rwald.com)
//Visit JavaScript Kit (http://javascriptkit.com) for script
//Credit must stay intact for use
var num_of_cats = 4; // This is the number of categories, including the first, blank, category.
var open_in_newwindow=1; //Set 1 to open links in new window, 0 for no.
var option_array = new Array(num_of_cats);
option_array[0] = new Array("Izaberite kategoriju"); // This is the first (blank) category. Don't
mess with it.
option_array[1] = new Array("-- Biraj --",
"Marketing",
"Modeli",
"Nekretnine");
option_array[2] = new Array("-- Biraj --",
"Chat",
"Forum");
option_array[3] = new Array("-- Biraj --",
"Slike",
"Oglasi");
var text_array = new Array(num_of_cats);
text_array[0] = new Array("Dobro dosli na sajt Agencije 027."); // These are general
instructions. Change them if you want, or keep them if you don't.
text_array[1] = new Array("Agencija se bavi marketingom, pormetom nekretnina,
promocijama ", // Note that the first entry here is a general description of this category.

After than, they're descriptions of each link. Make sure that you don't put the first link first;
the general description must be first.
"Izrada sajtova kvalitetno i jeftino!.",
"Postanite I Vi model! Ispunite sebi zelju!.",
"Ukoliko prodajete ili kupujete stan, kucu, lokal, plac, njivu, sumu .");
text_array[2] = new Array("Zabavite se na nasem forumu, chatu, blogu .",
"Preko 200 chat soba! Pogledajte i caskajte!?",
"Postanite saradnici na nasem forumu!.");
text_array[3] = new Array("Pogledajte slike, oglase, vesti ",
"Vidite slike Prokuplja, Nisa, Leskovca, Zitoradja, Merosine, Blaca, Kursumlije, Pirota ",
"Od igle do lokomotive! Licni, Poslovni, Besplatni ");
var url_array = new Array(num_of_cats);
url_array[0] = new Array("#"); // The first category. This should have no items other than "#".
url_array[1] = new Array("#", // The second category; the first "real" category. Note the initial
#. That is the category which says "Please select a link." It doesn't need a URL. Start putting
the other URL's in after that first line.
"http://www.agencija027.com/marketing.htm/",
"http://www.agencija027.com/modeli.htm/",
"http://www.agencija027.com/nekretnine.htm/");
url_array[2] = new Array("#",
"http://www.agencija027.com/chat.htm/",
"http://agencija027.20.forumer.com/");
url_array[3] = new Array("#",
"http://www.agencija027.com/slike.htm/",
"http://www.agencija027.com/oglasi.htm/");
function switch_select()
{
for (loop = window.document.form_1.select_2.options.length-1; loop > 0; loop--)
{
window.document.form_1.select_2.options[loop] = null;
}
for (loop = 0; loop < option_array[window.document.form_1.select_1.selectedIndex].length;
loop++)
{
window.document.form_1.select_2.options[loop] = new
Option(option_array[window.document.form_1.select_1.selectedIndex][loop]);
}
window.document.form_1.select_2.selectedIndex = 0;
}

function switch_text()
{
window.document.form_1.textarea_1.value =
text_array[window.document.form_1.select_1.selectedIndex]
[window.document.form_1.select_2.selectedIndex];
}
function box()
{
if (window.document.form_1.select_2.selectedIndex == 0)
{
alert("Where do you think you're going?");
} else {
if (open_in_newwindow==1)
window.open(url_array[window.document.form_1.select_1.selectedIndex]
[window.document.form_1.select_2.selectedIndex],"_blank");
else
window.location=url_array[window.document.form_1.select_1.selectedIndex]
[window.document.form_1.select_2.selectedIndex]
}
}
function set_orig()
{
window.document.form_1.select_1.selectedIndex = 0;
window.document.form_1.select_2.selectedIndex = 0;
}
window.onload=set_orig
// -->
</script>
<form name="form_1" onSubmit="return false;">
<textarea WRAP="virtual" name="textarea_1" rows=6 cols=60>www.agencija027.com
+381 63 427 577.</textarea><br> <!-- This should be the same as the general instructions in
the above code. -->
<select name="select_1" onChange="switch_select(); switch_text();">
<option>-- Kategorije --</option>
<option>Agencija 027</option>
<option>Zabava</option>
<option>Korisno</option>
</select>
<select name="select_2" onChange="switch_text();">
<option>Izaberite kategoriju</option>
<option> </option>

<option> </option>
</select>
<input type="submit" onClick="box();" value="Napred!">
</form>
<p align="center"><font face="arial" size="-2">This free script provided by</font><br>
<font face="arial, helvetica" size="-2"><a href="http://javascriptkit.com">JavaScript
Kit</a></font></p>

Dynamic combo
<form name="dynamiccombo">
<select name="stage2" size="1">
<option value="#">This is a Place Holder</option>
<option value="#">This is a Place Holder</option>
<option value="#">This is a Place Holder</option>
</select>
<input type="button" name="test" value="Go!"
onClick="gothere()">
</form>
<script>
<!-//Dynamic combo box script- by javascriptkit.com
//Visit JavaScript Kit (http://javascriptkit.com) for script
//Credit must stay intact for use
//DEFINE the group of links for display in the combo
//EXTEND each array and its elements as needed
//BE sure to follow the pattern revealed below
var combo1=new Array()
combo1[0]=new Option("JavaScript Kit","http://javascriptkit.com")
combo1[1]=new Option("Dynamic Drive","http://www.dynamicdrive.com")
combo1[2]=new Option("Freewarejava.com","http://www.freewarejava.com")
combo1[3]=new Option("Free Web Templates","http://www.freewebtemplates.com")
combo1[4]=new Option("Web Monkey","http://www.webmonkey.com")
var combo2=new Array()
combo2[0]=new Option("CNN","http://www.cnn.com")
combo2[1]=new Option("MSNBC","http://www.msnbc.com")
combo2[2]=new Option("BBC News","http://news.bbc.co.uk")
combo2[3]=new Option("ABC News","http://www.abcnews.com")
var combo3=new Array()
combo3[0]=new Option("Hollywood.com","http://www.hollywood.com")
combo3[1]=new Option("MTV","http://www.mtv.com")
combo3[2]=new Option("ETOnline","http://etonline.com")
var cacheobj=document.dynamiccombo.stage2
function populate(x){
for (m=cacheobj.options.length-1;m>0;m--)
cacheobj.options[m]=null
selectedarray=eval(x)

for (i=0;i<selectedarray.length;i++)
cacheobj.options[i]=new Option(selectedarray[i].text,selectedarray[i].value)
cacheobj.options[0].selected=true
}
function gothere(){
location=cacheobj.options[cacheobj.selectedIndex].value
}
//SHOW first combo by default
populate(combo1)
//-->
</script>
<!--SET up your links, and pass in the name of the group (ie: combo1) you wish to display for
the link in question-->
<a href="javascript:populate(combo1)">Webmaster sites</a> | <a
href="javascript:populate(combo2)">News sites</a> | <a
href="javascript:populate(combo3)">Entertainment</a>

Multiple dynamic
<script language="JavaScript" type="text/javascript">
<!-/*
*** Multiple dynamic combo boxes
*** by Mirko Elviro, 9 Mar 2005
*** Script featured and available on JavaScript Kit (http://www.javascriptkit.com)
***
***Please do not remove this comment
*/
// This script supports an unlimited number of linked combo boxed
// Their id must be "combo_0", "combo_1", "combo_2" etc.
// Here you have to put the data that will fill the combo boxes
// ie. data_2_1 will be the first option in the second combo box
// when the first combo box has the second option selected
// first combo box
data_1 = new Option("1", "$");
data_2 = new Option("2", "$$");
// second combo box
data_1_1 = new Option("11", "-");
data_1_2 = new Option("12", "-");
data_2_1 = new Option("21", "--");
data_2_2 = new Option("22", "--");
data_2_3 = new Option("23", "--");
data_2_4 = new Option("24", "--");
data_2_5 = new Option("25", "--");
// third combo box
data_1_1_1 = new Option("111", "*");
data_1_1_2 = new Option("112", "*");
data_1_1_3 = new Option("113", "*");
data_1_2_1 = new Option("121", "*");
data_1_2_2 = new Option("122", "*");
data_1_2_3 = new Option("123", "*");
data_1_2_4 = new Option("124", "*");
data_2_1_1 = new Option("211", "**");
data_2_1_2 = new Option("212", "**");
data_2_2_1 = new Option("221", "**");
data_2_2_2 = new Option("222", "**");

data_2_3_1 = new Option("231", "***");


data_2_3_2 = new Option("232", "***");
// fourth combo box
data_2_2_1_1 = new Option("2211","%")
data_2_2_1_2 = new Option("2212","%%")
// other parameters
displaywhenempty=""
valuewhenempty=-1
displaywhennotempty="-select-"
valuewhennotempty=0
function change(currentbox) {
numb = currentbox.id.split("_");
currentbox = numb[1];
i=parseInt(currentbox)+1
// I empty all combo boxes following the current one
while ((eval("typeof(document.getElementById(\"combo_"+i+"\"))!='undefined'")) &&
(document.getElementById("combo_"+i)!=null)) {
son = document.getElementById("combo_"+i);
// I empty all options except the first one (it isn't allowed)
for (m=son.options.length-1;m>0;m--) son.options[m]=null;
// I reset the first option
son.options[0]=new Option(displaywhenempty,valuewhenempty)
i=i+1
}
// now I create the string with the "base" name ("stringa"), ie. "data_1_0"
// to which I'll add _0,_1,_2,_3 etc to obtain the name of the combo box to fill
stringa='data'
i=0
while ((eval("typeof(document.getElementById(\"combo_"+i+"\"))!='undefined'")) &&
(document.getElementById("combo_"+i)!=null)) {
eval("stringa=stringa+'_'+document.getElementById(\"combo_"+i+"\").selectedIndex")
if (i==currentbox) break;
i=i+1
}

// filling the "son" combo (if exists)


following=parseInt(currentbox)+1
if ((eval("typeof(document.getElementById(\"combo_"+following+"\"))!='undefined'"))
&&
(document.getElementById("combo_"+following)!=null)) {
son = document.getElementById("combo_"+following);
stringa=stringa+"_"
i=0
while ((eval("typeof("+stringa+i+")!='undefined'")) || (i==0)) {
// if there are no options, I empty the first option of the "son" combo
// otherwise I put "-select-" in it
if ((i==0) && eval("typeof("+stringa+"0)=='undefined'"))
if (eval("typeof("+stringa+"1)=='undefined'"))
eval("son.options[0]=new Option(displaywhenempty,valuewhenempty)")
else
eval("son.options[0]=new
Option(displaywhennotempty,valuewhennotempty)")
else
eval("son.options["+i+"]=new Option("+stringa+i+".text,"+stringa+i+".value)")
i=i+1
}
//son.focus()
i=1
combostatus=''
cstatus=stringa.split("_")
while (cstatus[i]!=null) {
combostatus=combostatus+cstatus[i]
i=i+1
}
return combostatus;
}
}
//-->
</script>
<form>
<select name="combo0" id="combo_0" onChange="change(this);" style="width:200px;">
<option value="value1">-select-</option>
<option value="value2">1</option>
<option value="value3">2</option>
</select>
<BR><BR>
<select name="combo1" id="combo_1" onChange="change(this)" style="width:200px;">
<option value="value1"> </option>

</select>
<BR><BR>
<select name="combo2" id="combo_2" onChange="change(this);" style="width:200px;">
<option value="value1"> </option>
</select>
<BR><BR>
<select name="combo3" id="combo_3" onChange="change(this);" style="width:200px;">
<option value="value1"> </option>
</select>
</form>

Triple combo
<FORM name="isc">
<table border="0" cellspacing="0" cellpadding="0">
<tr align="center">
<td nowrap height="11"> &nbsp;
<select name="example" size="1" onChange="redirect(this.options.selectedIndex)">
<option selected>---Select1-------------</option>
<option>Webmaster Sites</option>
<option>News Sites</option>
</select>
<select name="stage2" size="1" onChange="redirect1(this.options.selectedIndex)">
<option value=" " selected> </option>
<option value=" " selected>---Select2--------------</option>
<option value=" " selected>---Select2--------------</option>
</select>
<select name="stage3" size="1" onChange="redirect2(this.options.selectedIndex)">
<option value=" " selected> </option>
<option value=" " selected>---Select3----------------</option>
<option value=" " selected>---Select3----------------</option>
</select>
<script>
<!-/*
Triple Combo Script Credit
By Hamid Cheheltani/ JavaScript Kit (http://www.javascriptkit.com)
Visit http://javascriptkit.com for this and over 400+ other scripts
*/
var groups=document.isc.example.options.length
var group=new Array(groups)
for (i=0; i<groups; i++)
group[i]=new Array()
group[0][0]=new Option("---Select2---"," ");
group[1][0]=new Option("Now Select This One"," ");
group[1][1]=new Option("JavaScript","47");
group[1][2]=new Option("DHTML","46");
group[1][3]=new Option("CGI","45");
group[2][0]=new Option("Now Select This One"," ");
group[2][1]=new Option("General News","115");
group[2][2]=new Option("Technology News","116");

var temp=document.isc.stage2
function redirect(x){
for (m=temp.options.length-1;m>0;m--)
temp.options[m]=null
for (i=0;i<group[x].length;i++){
temp.options[i]=new Option(group[x][i].text,group[x][i].value)
}
temp.options[0].selected=true
redirect1(0)
}

var secondGroups=document.isc.stage2.options.length
var secondGroup=new Array(groups)
for (i=0; i<groups; i++) {
secondGroup[i]=new Array(group[i].length)
for (j=0; j<group[i].length; j++) {
secondGroup[i][j]=new Array() }}
secondGroup[0][0][0]=new Option("---Select 3---"," ");
secondGroup[1][0][0]=new Option("---Select 3---"," ");
secondGroup[1][1][0]=new Option("Now Select This One"," ");
secondGroup[1][1][1]=new Option("JavaScript Kit","http://javascriptkit.com");
secondGroup[1][1][2]=new Option("JavaScript for the non
programmer","http://webteacher.com/javascript/");
secondGroup[1][1][3]=new Option("Java-Scripts.net","http://java-scripts.net");
secondGroup[1][2][0]=new Option("Now Select This One"," ");
secondGroup[1][2][1]=new Option("Dynamic Drive","http://www.dynamicdrive.com");
secondGroup[1][2][2]=new Option("Beginner\'s Guide to
DHTML","http://www.geocities.com/ResearchTriangle/Facility/4490/");
secondGroup[1][2][3]=new Option("Web Coder","http://webcoder.com/");
secondGroup[1][3][0]=new Option("Now Select This One"," ");
secondGroup[1][3][1]=new Option("CGI Resources","http://www.cgi-resources.com");
secondGroup[1][3][2]=new Option("Ada\'s Intro to CGI","http://adashimar.hypermart.net/");
secondGroup[2][0][0]=new Option("---Select 3---"," ");
secondGroup[2][1][0]=new Option("Now Select This One"," ");
secondGroup[2][1][1]=new Option("CNN","http://www.cnn.com");
secondGroup[2][1][2]=new Option("MSNBC","http://www.msnbc.com");
secondGroup[2][1][3]=new Option("ABC News","http://www.abcnews.com");
secondGroup[2][2][0]=new Option("Now Select A Page"," ");
secondGroup[2][2][1]=new Option("News.com","http://www.news.com");
secondGroup[2][2][2]=new Option("Wired","http://www.wired.com");

var temp1=document.isc.stage3
function redirect1(y){
for (m=temp1.options.length-1;m>0;m--)
temp1.options[m]=null
for (i=0;i<secondGroup[document.isc.example.options.selectedIndex][y].length;i++){
temp1.options[i]=new Option(secondGroup[document.isc.example.options.selectedIndex][y]
[i].text,secondGroup[document.isc.example.options.selectedIndex][y][i].value)
}
temp1.options[0].selected=true
}
function redirect2(z){
window.location=temp1[z].value
}
//-->
</script>
</td>
</tr>
</table>
</FORM>

Cool css menu

<style type="text/css">
#coolmenu{
border: 1px solid black;
width: 170px;
background-color: #E6E6E6;
}
#coolmenu a{
font: bold 13px Verdana;
padding: 2px;
padding-left: 4px;
display: block;
width: 100%;
color: black;
text-decoration: none;
border-bottom: 1px solid black;
}
html>body #coolmenu a{
width: auto;
}
#coolmenu a:hover{
background-color: black;
color: white;
}
#tabledescription{
width: 100%;
height: 3em;
padding: 2px;
filter:alpha(opacity=0);
-moz-opacity:0;
}
</style>
<script type="text/javascript">
// Cool CSS Menu- By JavaScriptKit.com (http://www.javascriptkit.com)
// For this and over 400+ free scripts, visit JavaScript Kit- http://www.javascriptkit.com/
// Fading routine based on Dynamic Drive script:
http://www.dynamicdrive.com/dynamicindex4/highlightgrad.htm
// This notice must stay intact for use
var baseopacity=0
function showtext(thetext){

if (!document.getElementById)
return
textcontainerobj=document.getElementById("tabledescription")
browserdetect=textcontainerobj.filters? "ie" : typeof
textcontainerobj.style.MozOpacity=="string"? "mozilla" : ""
instantset(baseopacity)
document.getElementById("tabledescription").innerHTML=thetext
highlighting=setInterval("gradualfade(textcontainerobj)",50)
}
function hidetext(){
cleartimer()
instantset(baseopacity)
}
function instantset(degree){
if (browserdetect=="mozilla")
textcontainerobj.style.MozOpacity=degree/100
else if (browserdetect=="ie")
textcontainerobj.filters.alpha.opacity=degree
else if (document.getElementById && baseopacity==0)
document.getElementById("tabledescription").innerHTML=""
}
function cleartimer(){
if (window.highlighting) clearInterval(highlighting)
}
function gradualfade(cur2){
if (browserdetect=="mozilla" && cur2.style.MozOpacity<1)
cur2.style.MozOpacity=Math.min(parseFloat(cur2.style.MozOpacity)+0.2, 0.99)
else if (browserdetect=="ie" && cur2.filters.alpha.opacity<100)
cur2.filters.alpha.opacity+=20
else if (window.highlighting)
clearInterval(highlighting)
}
</script>
<div id="coolmenu">
<a href="http://www.javascriptkit.com" onMouseover="showtext('JavaScript tutorials and
scripts!')" onMouseout="hidetext()">JavaScript Kit</a>
<a href="http://www.javascriptkit.com/cutpastejava.shtml" onMouseover="showtext('300+
free JavaScripts')" onMouseout="hidetext()">Free JavaScripts</a>
<a href="http://www.javascriptkit.com/jsref/" onMouseover="showtext('Comprehensive
JavaScript Reference')" onMouseout="hidetext()">JavaScript Reference</a>
<a href="http://www.codingforums.com" onMouseover="showtext('Web coding and
development forums!')" onMouseout="hidetext()">Coding Forums</a>
<a href="http://www.dynamicdrive.com" onMouseover="showtext('Award winning DHTML
and JavaScripts')" onMouseout="hidetext()">Dynamic Drive</a>
<div id="tabledescription"></div>

</div>

Css horizontal list menu

* CSS Horizontal List Menu- by JavaScript Kit (www.javascriptkit.com)


* Menu interface credits: http://www.dynamicdrive.com/style/csslibrary/item/glossy-verticalmenu/
* This notice must stay intact for usage
* Visit JavaScript Kit at http://www.javascriptkit.com/ for this script and 100s more
***********************************************/
</script>
<div class="horizontalcssmenu">
<ul id="cssmenu1">
<li style="border-left: 1px solid #202020;"><a
href="http://www.javascriptkit.com/">Home</a></li>
<li><a href="http://www.javascriptkit.com/cutpastejava.shtml" >Free JS</a></li>
<li><a href="http://www.javascriptkit.com/">JS Tutorials</a></li>
<li><a href="#">References</a>
<ul>
<li><a href="http://www.javascriptkit.com/jsref/">JS Reference</a></li>
<li><a href="http://www.javascriptkit.com/domref/">DOM Reference</a></li>
<li><a href="http://www.javascriptkit.com/dhtmltutors/cssreference.shtml">CSS
Reference</a></li>
</ul>
</li>
<li><a href="http://www.javascriptkit.com/howto/">web Tutorials</a></li>
<li><a href="#">Resources</a>
<ul>
<li><a href="http://www.dynamicdrive.com">Dynamic HTML</a></li>
<li><a href="http://www.codingforums.com">Coding Forums</a></li>
<li><a href="http://www.cssdrive.com">CSS Drive</a></li>
<li><a href="http://www.dynamicdrive.com/style/">CSS Library</a></li>
<li><a href="http://tools.dynamicdrive.com/imageoptimizer/">Image Optimizer</a></li>
<li><a href="http://tools.dynamicdrive.com/favicon/">Favicon Generator</a></li>
</ul>
</li>
</ul>
<br style="clear: left;" />
</div>
<p id="iepara">Rest of content here</p>

Display time of last visit


<script type="text/javascript">
/***********************************************
* Display time of last visit script- by Agencija027.com
* This notice MUST stay intact for use
* Visit JavaScript Kit at http://www.agencija027.com/ for this script and more
***********************************************/
var lastvisit=new Object()
lastvisit.firstvisitmsg="This is your first visit to this page. Welcome!" //Change first visit
message here
lastvisit.subsequentvisitmsg="Welcome back visitor! Your last visit was on
<b>[displaydate]</b>" //Change subsequent visit message here
lastvisit.getCookie=function(Name){ //get cookie value
var re=new RegExp(Name+"=[^;]+", "i"); //construct RE to search for target name/value pair
if (document.cookie.match(re)) //if cookie found
return document.cookie.match(re)[0].split("=")[1] //return its value
return ""
}
lastvisit.setCookie=function(name, value, days){ //set cookei value
var expireDate = new Date()
//set "expstring" to either future or past date, to set or delete cookie, respectively
var expstring=expireDate.setDate(expireDate.getDate()+parseInt(days))
document.cookie = name+"="+value+"; expires="+expireDate.toGMTString()+"; path=/";
}
lastvisit.showmessage=function(){
if (lastvisit.getCookie("visitcounter")==""){ //if first visit
lastvisit.setCookie("visitcounter", 2, 730) //set "visitcounter" to 2 and for 730 days (2 years)
document.write(lastvisit.firstvisitmsg)
}
else
document.write(lastvisit.subsequentvisitmsg.replace("\[displaydate\]", new
Date().toLocaleString()))
}
lastvisit.showmessage()
</script>

Personal counter
<style>
.counter{
background-color:black;
color:yellow;
font-weight:bold;
}
</style>
<SCRIPT>
//Personal Counter- by Jaafar Bin Yusof, Singapore (jaafar66@yahoo.com)
//Modified by JavaScript Kit (http://javascriptkit.com)
//Visit http://javascriptkit.com for this script
expireDate = new Date
expireDate.setMonth(expireDate.getMonth()+6)
jcount = eval(cookieVal("jaafarCounter"))
jcount++
document.cookie = "jaafarCounter="+jcount+";expires=" + expireDate.toGMTString()
function cookieVal(cookieName) {
thisCookie = document.cookie.split("; ")
for (i=0; i<thisCookie.length; i++){
if (cookieName == thisCookie[i].split("=")[0]){
return thisCookie[i].split("=")[1]
}
}
return 0
}
function page_counter(){
for (i=0;i<(7-jcount.toString().length);i++)
document.write('<span class="counter">0</span>')
for (y=0;y<(jcount.toString().length);y++)
document.write('<span class="counter">'+jcount.toString().charAt(y)+'</span>')
}
</SCRIPT>
You have visited this page
<SCRIPT>
page_counter(jcount);
</SCRIPT>
times.

Pokazuje koliko je puta ulazio na sajt


<SCRIPT LANGUAGE="JavaScript">
function getCookieVal (offset) {
var endstr = document.cookie.indexOf (";", offset);
if (endstr == -1)
endstr = document.cookie.length;
return unescape(document.cookie.substring(offset, endstr));
}
function GetCookie (name) {
var arg = name + "=";
var alen = arg.length;
var clen = document.cookie.length;
var i = 0;
while (i < clen) {
var j = i + alen;
if (document.cookie.substring(i, j) == arg)
return getCookieVal (j);
i = document.cookie.indexOf(" ", i) + 1;
if (i == 0)
break;
}
return null;
}
function SetCookie (name, value) {
var argv = SetCookie.arguments;
var argc = SetCookie.arguments.length;
var expires = (2 < argc) ? argv[2] : null;
var path = (3 < argc) ? argv[3] : null;
var domain = (4 < argc) ? argv[4] : null;
var secure = (5 < argc) ? argv[5] : false;
document.cookie = name + "=" + escape (value) +
((expires == null) ? "" : ("; expires=" + expires.toGMTString())) +
((path == null) ? "" : ("; path=" + path)) +
((domain == null) ? "" : ("; domain=" + domain)) +
((secure == true) ? "; secure" : "");
}
function DisplayInfo() {
var expdate = new Date();
var visit;
expdate.setTime(expdate.getTime() + (24 * 60 * 60 * 1000 * 365));
if(!(visit = GetCookie("visit")))
visit = 0;
visit++;
SetCookie("visit", visit, expdate, "/", null, false);
var message;
if(visit == 1)
message="
Welcome to my page!";
if(visit== 2)

message="
I see you came back !";
if(visit == 3)
message="
Oh, it's you again!";
if(visit == 4)
message="
You must be curious!";
if(visit == 5)
message=" You're practically a regular!";
if(visit == 6)
message="
You need a hobby!";
if(visit == 7)
message="
Nothing better to do?";
if(visit == 8)
message="
Don't you ever sleep?";
if(visit == 9)
message="
Get a life!!!";
if(visit >= 10)
message=" Rent is due on the 1st of the month!";
alert("\n"+"Your browser has visited this page
\n"
+"
"+visit+"\n"
+"
time(s)."+"\n"+"\n"
+message);
}
function ResetCounts() {
var expdate = new Date();
expdate.setTime(expdate.getTime() + (24 * 60 * 60 * 1000 * 365));
visit = 0;
SetCookie("visit", visit, expdate , "/", null, false);
history.go(0);
}
window.onload=DisplayInfo
</Script>
<FORM>
<CENTER>
<INPUT NAME="update" TYPE="BUTTON" VALUE="Revisit Page"
OnClick="history.go(0)">
<INPUT NAME="reset" TYPE="BUTTON" VALUE="Reset Counter"
OnClick="ResetCounts()">
</CENTER>
</FORM>

Da upise svoje ime za ulazak na sajt


<script>
<!-// Copyright (c) 1996-1997 Tomer Shiran. All rights reserved.
// Permission given to use the script provided that this notice remains as is.
// Additional scripts can be found at http://www.geocities.com/~yehuda/
// Boolean variable specified if alert should be displayed if cookie exceeds 4KB
var caution = false
// name - name of the cookie
// value - value of the cookie
// [expires] - expiration date of the cookie (defaults to end of current session)
// [path] - path for which the cookie is valid (defaults to path of calling document)
// [domain] - domain for which the cookie is valid (defaults to domain of calling document)
// [secure] - Boolean value indicating if the cookie transmission requires a secure transmission
// * an argument defaults when it is assigned null as a placeholder
// * a null placeholder is not required for trailing omitted arguments
function setCookie(name, value, expires, path, domain, secure) {
var curCookie = name + "=" + escape(value) +
((expires) ? "; expires=" + expires.toGMTString() : "") +
((path) ? "; path=" + path : "") +
((domain) ? "; domain=" + domain : "") +
((secure) ? "; secure" : "")
if (!caution || (name + "=" + escape(value)).length <= 4000)
document.cookie = curCookie
else
if (confirm("Cookie exceeds 4KB and will be cut!"))
document.cookie = curCookie
}
// name - name of the desired cookie
// * return string containing value of specified cookie or null if cookie does not exist
function getCookie(name) {
var prefix = name + "="
var cookieStartIndex = document.cookie.indexOf(prefix)
if (cookieStartIndex == -1)
return null
var cookieEndIndex = document.cookie.indexOf(";", cookieStartIndex + prefix.length)
if (cookieEndIndex == -1)
cookieEndIndex = document.cookie.length
return unescape(document.cookie.substring(cookieStartIndex + prefix.length,
cookieEndIndex))
}
// name - name of the cookie
// [path] - path of the cookie (must be same as path used to create cookie)

// [domain] - domain of the cookie (must be same as domain used to create cookie)
// * path and domain default if assigned null or omitted if no explicit argument proceeds
function deleteCookie(name, path, domain) {
if (getCookie(name)) {
document.cookie = name + "=" +
((path) ? "; path=" + path : "") +
((domain) ? "; domain=" + domain : "") +
"; expires=Thu, 01-Jan-70 00:00:01 GMT"
}
}
// date - any instance of the Date object
// * you should hand all instances of the Date object to this function for "repairs"
// * this function is taken from Chapter 14, "Time and Date in JavaScript", in "Learn
Advanced JavaScript Programming"
function fixDate(date) {
var base = new Date(0)
var skew = base.getTime()
if (skew > 0)
date.setTime(date.getTime() - skew)
}
var now = new Date()
fixDate(now)
now.setTime(now.getTime() + 31 * 24 * 60 * 60 * 1000)
var name = getCookie("name")
if (!name)
name = prompt("Please enter your name:", "Marko Markovic")
setCookie("name", name, now)
document.write("Hello " + name + "!")
//-->
</script>

Counter
<script>
/*
Counter script
By JavaScript Kit (http://javascriptkit.com)
Over 400+ free scripts here!
Above notice MUST stay entact for use
*/
function fakecounter(){
//decrease/increase counter value (depending on perceived popularity of your site!)
var decrease_increase=-50000
var counterdate=new Date()
var currenthits=counterdate.getTime().toString()
currenthits=parseInt(currenthits.substring(2,currenthits.length-4))+decrease_increase
document.write("You are visitor # <b>"+currenthits+"</b> to my site!")
}
fakecounter()
</script>

Google internal site search cript 2

<script type="text/javascript">
// Google Internal Site Search script II- By JavaScriptKit.com (http://www.agencija027.com)
// For this and over 400+ free scripts, visit JavaScript Kit- http://www.agencija027.com/
// This notice must stay intact for use
function Gsitesearch(curobj){
var domainroot=curobj.domainroot[curobj.domainroot.selectedIndex].value
curobj.q.value="site:"+domainroot+" "+curobj.qfront.value
}
</script>
<form action="http://www.google.com/search" method="get" onSubmit="Gsitesearch(this)">
<p>
<input name="q" type="hidden" />
<input name="qfront" type="text" style="width: 180px" /> <input type="submit"
value="Search" /><br />
Search:
<select name="domainroot">
<option value="www.agencija027.com" selected="1">JavaScript Kit</option>
<option value="www.agencija027.com">Dynamic Drive</option>
<option value="www.agencija027.com">FreewareJava.com</option>
</select>
</p>
</form>

Alta vista, yahoo search

MNOGO DOBAR

<script language="JavaScript">
<!-//
// Script by Jari Aarniala [www.mbnet.fi/~foo -- foo@mbnet.fi]
//
// This script makes it easy to choose with which search engine
// you`d like to search the net. You may use this if you keep this
// text here...
//
function startSearch(){
searchString = document.searchForm.searchText.value;
if(searchString != ""){
searchEngine = document.searchForm.whichEngine.selectedIndex + 1;
finalSearchString = "";
if(searchEngine == 1){
finalSearchString = "http://www.altavista.digital.com/cgi-bin/query?
pg=q&what=web&fmt=.&q=" + searchString;
}
if(searchEngine == 2){
finalSearchString = "http://av.yahoo.com/bin/query?p=" + searchString + "&hc=0&hs=0";
}
if(searchEngine == 3){
finalSearchString = "http://www.excite.com/search.gw?trace=a&search=" + searchString;
}
if(searchEngine == 4){
finalSearchString = "http://www.hotbot.com/?SW=web&SM=MC&MT=" + searchString +
"&DC=10&DE=2&RG=NA&_v=2&act.search.x=89&act.search.y=7";
}
if(searchEngine == 5){
finalSearchString = "http://www.infoseek.com/Titles?qt=" + searchString +
"&col=WW&sv=IS&lk=noframes&nh=10";
}
if(searchEngine == 6){
finalSearchString = "http://www.lycos.com/cgi-bin/pursuit?adv=%26adv
%3B&cat=lycos&matchmode=and&query=" + searchString + "&x=45&y=11";
}
if(searchEngine == 7){
finalSearchString = "http://netfind.aol.com/search.gw?search=" + searchString +
"&c=web&lk=excite_netfind_us&src=1";
}
location.href = finalSearchString;
}
}

// -->
</script>
<basefont face="Verdana, Arial, sans-serif">
<form name="searchForm">
<table width=320 border cellpadding=3 cellspacing=2 bgcolor=444444>
<tr>
<td bgcolor=lightblue><font size=1 face="Verdana, Arial, sans-serif">Search for:<br>
<td bgcolor=lightblue><font size=1 face="Verdana, Arial, sans-serif">Search from:
<td bgcolor=lightblue>&nbsp;
<tr>
<td bgcolor=navajowhite><input style="background: dddddd" name="searchText"
type="text">
<td bgcolor=navajowhite>
<select style="background: dddddd" name="whichEngine">
<option selected>Altavista
<option>Yahoo!
<option>Excite
<option>Hotbot
<option>Infoseek
<option>Lycos
<option>AOL Netfind
</select>
<td bgcolor=navajowhite><input type="button" value="Send" onClick="startSearch()">
</select>
</table>
</form>

GOOGLE YAHOO MNS SEARCH MNOOOOOOOGO DOBAR

<form name="jksearch" action="http://www.google.com/search" method="get"


onSubmit="jksitesearch(this)">
<p>Pretrazivac Agencija 027:<br />
<input id="hiddenquery" type="hidden" name="q" />
<input name="qfront" type="text" style="width: 200px" value="navigator object" /> <input
type="submit" value="Search" /><br />
<div style="font: bold 11px Verdana;">Google:<input name="se" type="radio" checked>
Yahoo:<input name="se" type="radio"> MSN:<input name="se" type="radio">
</div>
<script type="text/javascript">
// All-in-one Internal Site Search script- By JavaScriptKit.com (http://www.javascriptkit.com)
// For this and over 400+ free scripts, visit JavaScript Kit- http://www.javascriptkit.com/
// This notice must stay intact for use
//Enter domain of site to search.
var domainroot="www.agencija027.com"
var searchaction=[ //form action for the 3 search engines
"http://www.google.com/search",
"http://search.yahoo.com/search",
"http://search.msn.com/results.aspx"
]
var queryfieldname=["q","p","q"] //name of hidden query form for the 3 search engines
function switchaction(cur, index){
cur.form.action=searchaction[index]
document.getElementById("hiddenquery").name=queryfieldname[index]
}
function jksitesearch(curobj){
for (i=0; i< document.jksearch.se.length; i++){ //loop through radio to see which is checked
if (document.jksearch.se[i].checked==true)
switchaction(document.jksearch.se[i], i)
}
document.getElementById("hiddenquery").value="site:"+domainroot+" "+curobj.qfront.value
}
</script>
</p>
</form>
<p style="font: normal 11px Arial">This free script provided by<br />
<a href="http://www.javascriptkit.com">JavaScript Kit</a></p>

CLICK BANNER ENTICER SCRIPT

<script>
/*
Click banner enticer script
By JavaScript Kit (http://javascriptkit.com)
Over 200+ free scripts here!
*/
var entices=new Array()
entices[0]="Marketing!"
entices[1]="Nekretnine!"
entices[2]="Turizam"
entices[3]="Modeli!"
entices[4]="Hostess"
entices[5]="Knjigovodstvo!"
//extend this list as desired
function generate_entices(toggle){
if (toggle==1)
window.status=entices[Math.round(Math.random()*(entices.length-1))]
else
window.status=''
}
</script>
<a href="http://www.agencija027.com" onMouseover="generate_entices(1);return true"
onMouseout="generate_entices(0)"><img
src="../../sponsors/jpad4.gif" width="466" height="58" border="0"></a>

BACKGROUND MUSIC SCRIPT

<script>
<!-/*
Background music script
By JavaScript Kit (http://javascriptkit.com)
Over 400+ free scripts here!
*/
//specify FULL path to midi
var musicsrc="http://www.agencija027.com/badams.mid"
if (navigator.appName=="Microsoft Internet Explorer")
document.write('<bgsound src='+'"'+musicsrc+'"'+' loop="infinite">')
else
document.write('<embed src=\"'+musicsrc+'\" hidden="true" border="0" width="20"
height="20" autostart="true" loop="true">')
//-->
</script>

Different background image according to time of day

<script language="JavaScript">
<!-- Hide From Old Browsers
/* 1996-98 JavaScript written by Steve Thompson @ http://www.w8r.com --- e-mail:
thompson@w8r.com or myclone@hotmail.com --- This simple script changes the background
image four times a day -- It can be altered to include other page attributes such as text colors
and individual page items such as on the example page - Use freely but keep this entire credit
line intact. */
day=new Date()

//..get the date

x=day.getHours()

//..get the hour

if(x>=0 && x<4) {


document.write('<body background="put your first image file name here such as 1.jpg">')
} else
if(x>=4 && x<12) {
document.write('<body background="put your second image file name here such as
2.jpg">')
} else
if(x>=12 && x<18) {
document.write('<body background="put your third image file name here such as 3.jpg">')
} else
if (x>=18 && x<24) {
document.write('<body background="put your last image file name here such as 4.jpg">')
}
<!-- End Hiding -->
</script>

Image Selector using selection list

STEP 1
<script language="javascript">
<!-- Image Selector
// Cameron Gregory - cameron@bloke.com
// http://www.bloke.com
// http://www.bloke.com/javascript/Selector/
//
// ChangeLog
//
// Wed Jul 10 11:29:51 EDT 1996
// Added -1 check on array
// Wed Jul 10 06:25:30 EDT 1996
// merged pulldown and selector into one.
//
// Wed Jul 10 06:03:05 EDT 1996
// 3.0b5a hosed something! Stopped using Image objects
// and just stored in array.
//
// Usage:
// Selector(width,height,images)
// SelectorLong(width,height,boxHeight,images)
// SelectorLongNames(width,height,boxHeight,images,names)
// PullDownSelector(width,height,images)
// PullDownSelectorNames(width,height,images,names)
//
// width, height
is image size (-1,-1) if you don't want to specify
// boxHeight
is the height of the select box
// images
is space or comma separated file list
// names
is corresponding name array (comma separated)
function selectImage(f)
{
if (document.flipForm.which.selectedIndex >= 0)
document.flipForm.flip.src = imageSet[document.flipForm.which.selectedIndex];
}
function SelectorLongNames(width,height,listHeight,images,names)
{
/* si: start index
** i: current index
** ei: end index
** cc: current count
*/
si = 0;
ci=0;
cc=0;
imageSet = new Array();
ei = images.length;
for (i=1;i<ei;i++) {

if (images.charAt(i) == ' ' || images.charAt(i) == ',') {


imageSet[cc] = images.substring(si,i);
cc++;
si=i+1;
}
}
currentFlip = 0;
si = 0;
ci=0;
cc=0;
nameSet = new Array();
ei = names.length;
for (i=1;i<ei;i++) {
if (names.charAt(i) == ',') {
nameSet[cc] = names.substring(si,i);
cc++;
si=i+1;
}
}
currentFlip = 0;
// should check nameSet.length == imageSet.length
document.writeln("<FORM name=flipForm>");
document.writeln("<table border=0><tr><td>");
document.write("<img name='flip'");
if (width >0)
document.write("width="+width);
if (height >0)
document.write(" height=" +height);
document.writeln(" src=" +imageSet[0]+ ">");
document.writeln("</td><td>");
document.write("<Select");
if (listHeight > 0)
document.write(" size="+listHeight);
document.write(" name='which' onChange='selectImage(this.form)'>");
for (i=0;i<imageSet.length;i++)
if (i<nameSet.length)
document.write("<OPTION value="+i+">"+nameSet[i]);
else
document.write("<OPTION value="+i+">"+imageSet[i]);
document.writeln("</SELECT>");
document.writeln("</FORM>");
document.writeln("</td></tr></table>");
}

function SelectorLong(width,height,listHeight,images)
{
SelectorLongNames(width,height,listHeight,images,",");
}
function PullDownSelector(width,height,images)
{
SelectorLongNames(width,height,-1,images,",")
}
function PullDownSelectorNames(width,height,images,names)
{
SelectorLongNames(width,height,-1,images,names)
}
// use -1 -1 if you don't know the width and height for the image
function Selector(width,height,images)
{
listHeight=5;
SelectorLong(width,height,listHeight,images);
}
// End Script -->
</script>

Step 2: Insert the below into the <body> section where you want the selector to appear:

<script language="javascript">
Selector(152,136,"dog2-small.gif condo-view-small.gif hiking1-small.gif hiking2-small.gif
malanda-small.gif snowball-small.gif snowcamping-small.gif spider1-small.gif spider3small.gif ");
</script>
<p align="center"><font face="arial" size="-2">This free script provided by</font><br>
<font face="arial, helvetica" size="-2"><a href="http://javascriptkit.com">JavaScript
Kit</a></font></p>

onMouseover/onClick sound effect


Directions:
Step 1: Add the following to the <head> section of your page:
<script LANGUAGE="JavaScript"><!-// Preload and play audio files with event handler (MouseOver sound)
// designed by JavaScript Archive, (c)1999
// Get more free javascripts at http://jsarchive.8m.com
var aySound = new Array();
// Below: source for sound files to be preloaded
aySound[0] = "laser.wav";
// DO NOT edit below this line
document.write('<BGSOUND ID="auIEContainer">')
IE = (navigator.appVersion.indexOf("MSIE")!=-1 && document.all)? 1:0;
NS = (navigator.appName=="Netscape" && navigator.plugins["LiveAudio"])? 1:0;
ver4 = IE||NS? 1:0;
onload=auPreload;
function auPreload() {
if (!ver4) return;
if (NS) auEmb = new Layer(0,window);
else {
Str = "<DIV ID='auEmb' STYLE='position:absolute;'></DIV>";
document.body.insertAdjacentHTML("BeforeEnd",Str);
}
var Str = '';
for (i=0;i<aySound.length;i++)
Str += "<EMBED SRC='"+aySound[i]+"' AUTOSTART='FALSE' HIDDEN='TRUE'>"
if (IE) auEmb.innerHTML = Str;
else {
auEmb.document.open();
auEmb.document.write(Str);
auEmb.document.close();
}
auCon = IE? document.all.auIEContainer:auEmb;
auCon.control = auCtrl;
}
function auCtrl(whSound,play) {
if (IE) this.src = play? aySound[whSound]:'';
else eval("this.document.embeds[whSound]." + (play? "play()":"stop()"))
}
function playSound(whSound) { if (window.auCon) auCon.control(whSound,true); }
function stopSound(whSound) { if (window.auCon) auCon.control(whSound,false); }

//-->
</script>

Step 2: Edit the aySound array to preload the sound files.


aySound[0]="YourSoundFile.wav";
aySound[1]="AnotherSoundFile.wav";
aySound[2]="EvenAnotherOne.wav";
.
.
as many sound files as one wants.
Important! Please make sure the sound files exist, or else errors will occur.
Step 3: Finally, play the sound files with an event handler.
With a link:
- onMouseOver/onMouseOut sound:
<A HREF="YourPage.html" onMouseOver="playSound(0)"
onMouseOut="stopSound(0)">Move mouse over to play sound</A>
- onClick sound:
<A HREF="javascript:playSound(0);">Click here to play sound</A>
-With a button:
<INPUT TYPE="BUTTON" VALUE="Click me!" onClick="playSound(0)">
Note: playSound(0) plays the audio file of aySound[0]; playSound(1) will play aySound[1],
etc.

Pop-up image viewer script

Step 1: Simply paste the below code into the <body> section of your page:

<SCRIPT language="JavaScript">
/*
Script posted and featured on JavaScript Kit
http://javascriptkit.com
*/
function display_image(form) {
selectionname = form.imagename.options[form.imagename.selectedIndex].text;
selection = form.imagename.options[form.imagename.selectedIndex].value;
PreView = window.open("", "Preview",
"toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=0,copyhistor
y=0,width=200,height=255");
PreView.document.open();
PreView.document.write("<HTML><HEAD>");
PreView.document.write("<TITLE>Preview</TITLE>");
PreView.document.write("</HEAD><BODY BGCOLOR=FFFFFF TEXT=000000>");
PreView.document.write("<FORM><CENTER><B><FONT SIZE=+1>" +
selectionname + "</FONT></B><HR>");
PreView.document.write("<IMG HSPACE=0 VSPACE=0 " +
"SRC='" + selection + "'>");
PreView.document.write("<HR><FORM><INPUT TYPE='button' VALUE='Close' " +
"onClick='window.close()'></FORM>");
PreView.document.write("</CENTER>");
PreView.document.write("</BODY></HTML>");
PreView.document.close();
}
</SCRIPT>
<FORM>
<select NAME="imagename" onChange="display_image(this.form)">
<option value="http://www.javascriptkit.com/abstract.gif" SELECTED>Image 1
<option value="http://www.javascriptkit.com/day.gif">Image 2
<option value="http://www.javascriptkit.com/night.gif">Image 3
</select>
</FORM>

RANDOM BACKGROUND MUSIC


<script>
<!-//By George Chiang (http://www.abstract.simplenet.com) More JavaScripts here!
var sound1="sting.mid"
var sound2="badams.mid"
var sound3="beatles.mid"
var x=Math.random()*10
if (x<=3) x=sound1
else if (x<=6) x=sound2
else
x=sound3
if (navigator.appName=="Microsoft Internet Explorer")
document.write('<bgsound src='+'"'+x+'"'+' loop="infinite">')
else
document.write('<embed src='+'"'+x+'"'+'hidden="true" border="0" width="20" height="20"
autostart="true" loop="true">')
//-->
</script>

RANDOM BACKG.MUSIC PLAYER 2


<script>
<!-//By JavaScript Kit (http://www.javascriptkit.com) More JavaScripts here!
var sound1="beatles.mid"
var sound2="badams.mid"
var sound3="aliciak.mid"
var sound4="sting.mid"
var sound5="zeljkoj.mid"
var x=Math.round(Math.random()*4)
if (x==0) x=sound1
else if (x==1) x=sound2
else if (x==2) x=sound3
else if (x==3) x=sound4
else x=sound5
if (navigator.appName=="Microsoft Internet Explorer")
document.write('<bgsound src='+'"'+x+'"'+' loop="infinite">')
else
document.write('<embed src='+'"'+x+'"'+'hidden="true" border="0" width="20" height="20"
autostart="true" loop="true">')
//-->
</script>

RANDOM BACKG.MUSIC PLAYER 3


<script>
<!-//By George Chiang (http://www.javascriptkit.com) More JavaScripts here!
var sound1="first.mid"
var sound2="second.mid"
var sound3="third.mid"
var sound4="fourth.mid"
var sound5="fifth.mid"
var sound6="sixth.mid"
var sound7="seventh.mid"
var sound8="eighth.mid"
var sound9="ninth.mid"
var sound10="tenth.mid"
var x=Math.round(Math.random()*9)
if (x==0) x=sound1
else if (x==1) x=sound2
else if (x==2) x=sound3
else if (x==3) x=sound4
else if (x==4) x=sound5
else if (x==5) x=sound6
else if (x==6) x=sound7
else if (x==7) x=sound8
else if (x==8) x=sound9
else x=sound10
if (navigator.appName=="Microsoft Internet Explorer")
document.write('<bgsound src='+'"'+x+'"'+' loop="infinite">')
else
document.write('<embed src='+'"'+x+'"'+'hidden="true" border="0" width="20" height="20"
autostart="true" loop="true">')
//-->
</script>

RANDOM BANNER SCRIPT

<SCRIPT>
<!-- written by The Omega
// http://members.xoom.com/the_omega/
// the_omega@geocities.com
// You must leave these comments in to use the script
// (hey, I wrote it. Let me have a little credit!)

// put info for randomly selected banners here, as in the examples


gfx0="banner1.gif";
lnk0="page1.html";
alt0="Alt code 1";
txt0="Tagline 1";
gfx1="banner2.gif";
lnk1="page2.html";
alt1="Alt code 2";
txt1="Tagline 2";
gfx2="banner3.gif";
lnk2="page3.html";
alt2="Alt code 3";
txt2="Tagline 3";
len=3; // change to equal number of banners

today=new Date();
today=today.getTime()/10;
rnd=today%len;

document.writeln('<A HREF="'+eval("lnk"+rnd)+'"><IMG SRC="'+eval("gfx"+rnd)+'"


ALT="'+eval("alt"+rnd)+'"><BR>'+eval("txt"+rnd)+'</A>');
//-->
</SCRIPT>

RANDOM IMAGE SCRIPT

<script language="JavaScript">
<!-/*
Random Image Script- By JavaScript Kit (http://www.javascriptkit.com)
Over 400+ free JavaScripts here!
Keep this notice intact please
*/
function random_imglink(){
var myimages=new Array()
//specify random images below. You can have as many as you wish
myimages[1]="image1.gif"
myimages[2]="image2.gif"
myimages[3]="image3.gif"
myimages[4]="image4.gif"
myimages[5]="image5.gif"
myimages[6]="image6.gif"
var ry=Math.floor(Math.random()*myimages.length)
if (ry==0)
ry=1
document.write('<img src="'+myimages[ry]+'" border=0>')
}
random_imglink()
//-->
</script>

RANDOM IMAGE LINK

<script language="JavaScript">
<!-/*
Random Image Link Script- By JavaScript Kit(http://www.javascriptkit.com)
Over 200+ free JavaScripts here!
Updated: 00/04/25
*/
function random_imglink(){
var myimages=new Array()
//specify random images below. You can have as many as you wish
myimages[1]="image1.gif"
myimages[2]="image2.gif"
myimages[3]="image3.gif"
myimages[4]="image4.gif"
myimages[5]="image5.gif"
myimages[6]="image6.gif"
//specify corresponding links below
var imagelinks=new Array()
imagelinks[1]="http://www.javascriptkit.com"
imagelinks[2]="http://www.netscape.com"
imagelinks[3]="http://www.microsoft.com"
imagelinks[4]="http://www.dynamicdrive.com"
imagelinks[5]="http://www.freewarejava.com"
imagelinks[6]="http://www.cnn.com"
var ry=Math.floor(Math.random()*myimages.length)
if (ry==0)
ry=1
document.write('<a href='+'"'+imagelinks[ry]+'"'+'><img src="'+myimages[ry]+'"
border=0></a>')
}
random_imglink()
//-->
</script>

3-way image slideshow

Step 1: Copy the below into the <HEAD> of your page:


<SCRIPT LANGUAGE="JavaScript">
<!-- Begin
//3-way slideshow- by Suzanne Arnold (http://jandr.com/, suzanne@mail.jandr.com)
//Script featured on JavaScript Kit (http://javascriptkit.com)
//Credit must stay intact
var Onerotate_delay = 2000; // delay in milliseconds (5000 = 5 secs)
Onecurrent = 0;
var OneLinks = new Array(3);
OneLinks[0] = "http://www.freewarejava.com";
OneLinks[1] = "http://www.javascriptkit.com";
OneLinks[2] = "http://www.dynamicdrive.com";
function Onenext() {
if (document.Oneslideform.Oneslide[Onecurrent+1]) {
document.images.Oneshow.src = document.Oneslideform.Oneslide[Onecurrent+1].value;
document.Oneslideform.Oneslide.selectedIndex = ++Onecurrent;
}
else Onefirst();
}
function Oneprevious() {
if (Onecurrent-1 >= 0) {
document.images.Oneshow.src = document.Oneslideform.Oneslide[Onecurrent-1].value;
document.Oneslideform.Oneslide.selectedIndex = --Onecurrent;
}
else Onelast();
}
function Onefirst() {
Onecurrent = 0;
document.images.Oneshow.src = document.Oneslideform.Oneslide[0].value;
document.Oneslideform.Oneslide.selectedIndex = 0;
}
function Onelast() {
Onecurrent = document.Oneslideform.Oneslide.length-1;
document.images.Oneshow.src = document.Oneslideform.Oneslide[Onecurrent].value;
document.Oneslideform.Oneslide.selectedIndex = Onecurrent;
}
function Oneap(text) {
document.Oneslideform.Oneslidebutton.value = (text == "Stop") ? "Start" : "Stop";
Onerotate();
}
function Onechange() {
Onecurrent = document.Oneslideform.Oneslide.selectedIndex;
document.images.Oneshow.src = document.Oneslideform.Oneslide[Onecurrent].value;
}
function Onerotate() {

if (document.Oneslideform.Oneslidebutton.value == "Stop") {
Onecurrent = (Onecurrent == document.Oneslideform.Oneslide.length-1) ? 0 : Onecurrent+1;
document.images.Oneshow.src = document.Oneslideform.Oneslide[Onecurrent].value;
document.Oneslideform.Oneslide.selectedIndex = Onecurrent;
window.setTimeout("Onerotate()", Onerotate_delay);
}
}
function Onetransport(){
window.location=OneLinks[Onecurrent]
}
// End -->
</SCRIPT>
Step 2: Where you wish the slideshow to appear inside the BODY, add the following:
<TABLE border="0" cellspacing="0" cellpadding="0">
<TR>
<TD>
<form name="Oneslideform" >
<DIV align="center">
<TABLE width="150" border="1" cellspacing="0" cellpadding="4"
bordercolor="#330099">
<TR>
<TD bgcolor="#330099">
<DIV align="center"><B><FONT color="#FFFFFF">Image
Slideshow</FONT></B></DIV>
</TD>
</TR>
<TR>
<TD bgcolor="#FFFFFF">
<DIV align="center"><A href="javascript:Onetransport()"><IMG
src="slideimage1.gif" width="90" height="90" name="Oneshow" border="0"></A></DIV>
</TD>
</TR>
<TR>
<TD bgcolor="#330099">
<DIV align="center">
<SELECT name="Oneslide" onChange="Onechange();">
<OPTION value="slideimage1.gif" selected>Image 1</OPTION>
<OPTION value="slideimage2.gif">Image 2</OPTION>
<OPTION value="slideimage3.gif">Image 3</OPTION>
</SELECT>
</DIV>
</TD>
</TR>
<TR>
<TD bgcolor="#330099">
<DIV align="center">
<INPUT type=button onClick="Oneprevious();" value="<<" title="Previous">

<INPUT type=button name="Oneslidebutton" onClick="Oneap(this.value);"


value="Start" title="AutoPlay">
<INPUT type=button onClick="Onenext();" value=">>" title="Next">
</DIV>
</TD>
</TR>
</TABLE>
</DIV>
</form>
</TD>
</TR>
</TABLE>

Flexible Image Slideshow

<script type="text/javascript">
// Flexible Image Slideshow- By JavaScriptKit.com (http://www.javascriptkit.com)
// For this and over 400+ free scripts, visit JavaScript Kit- http://www.javascriptkit.com/
// This notice must stay intact for use
var ultimateshow=new Array()
//ultimateshow[x]=["path to image", "OPTIONAL link for image", "OPTIONAL link target"]
ultimateshow[0]=['dinosour.gif', '', '']
ultimateshow[1]=['crow.gif', 'http://www.dynamicdrive.com', '_new']
ultimateshow[2]=['pig.gif', 'http://www.codingforums.com', '']
//configure the below 3 variables to set the dimension/background color of the slideshow
var slidewidth="300px" //set to width of LARGEST image in your slideshow
var slideheight="261px" //set to height of LARGEST iamge in your slideshow
var slidecycles="3" //number of cycles before slideshow stops (ie: "2" or "continous")
var randomorder="no" //randomize the order in which images are displayed? "yes" or "no"
var preloadimages="yes" //preload images? "yes" or "no"
var slidebgcolor='white'
//configure the below variable to determine the delay between image rotations (in
miliseconds)
var slidedelay=3000
////Do not edit pass this line////////////////
var ie=document.all
var dom=document.getElementById
var curcycle=0
if (preloadimages=="yes"){
for (i=0;i<ultimateshow.length;i++){
var cacheimage=new Image()
cacheimage.src=ultimateshow[i][0]
}
}
var currentslide=0
function randomize(targetarray){
ultimateshowCopy=new Array()
var the_one
var z=0
while (z<targetarray.length){
the_one=Math.floor(Math.random()*targetarray.length)
if (targetarray[the_one]!="_selected!"){
ultimateshowCopy[z]=targetarray[the_one]

targetarray[the_one]="_selected!"
z++
}
}
}
if (randomorder=="yes")
randomize(ultimateshow)
else
ultimateshowCopy=ultimateshow
function rotateimages(){
curcycle=(currentslide==0)? curcycle+1 : curcycle
ultcontainer='<center>'
if (ultimateshowCopy[currentslide][1]!="")
ultcontainer+='<a href="'+ultimateshowCopy[currentslide][1]+'"
target="'+ultimateshowCopy[currentslide][2]+'">'
ultcontainer+='<img src="'+ultimateshowCopy[currentslide][0]+'" border="0">'
if (ultimateshowCopy[currentslide][1]!="")
ultcontainer+='</a>'
ultcontainer+='</center>'
if (ie||dom)
crossrotateobj.innerHTML=ultcontainer
if (currentslide==ultimateshow.length-1) currentslide=0
else currentslide++
if (curcycle==parseInt(slidecycles) && currentslide==0)
return
setTimeout("rotateimages()",slidedelay)
}
if (ie||dom)
document.write('<div id="slidedom" style="width:'+slidewidth+';height:'+slideheight+';
background-color:'+slidebgcolor+'"></div>')
function start_slider(){
crossrotateobj=dom? document.getElementById("slidedom") : document.all.slidedom
rotateimages()
}
if (ie||dom)
window.onload=start_slider
</script>

OnMouseover Slideshow
Step 1: Add the below to the <head> section of your page:

<script>
/*Rollover effect on different image scriptBy JavaScript Kit (http://javascriptkit.com)
Over 200+ free scripts here!
*/
function changeimage(towhat,url){
if (document.images){
document.images.targetimage.src=towhat.src
gotolink=url
}
}
function warp(){
window.location=gotolink
}
</script>
<script language="JavaScript1.1">
var myimages=new Array()
var gotolink="#"
function preloadimages(){
for (i=0;i<preloadimages.arguments.length;i++){
myimages[i]=new Image()
myimages[i].src=preloadimages.arguments[i]
}
}
preloadimages("plane1.gif","plane2.gif","plane3.gif","plane4.gif","plane5.gif")
</script>

In the last line of the above code, input the names of all of the images you wish be used in the
rollover effect:
preloadimages("plane1.gif","plane2.gif","plane3.gif","plane4.gif","plane5.gif")
Step 2: Insert the below HTML code to your web page where you wish the initial rollover
image to be positioned:
<a href="javascript:warp()"><img src="plane0.gif" name="targetimage" border=0></a>

Step 3: Finally, you now need associate the rollover effect script with certain text or image
links that will trigger the rollover effect when the mouse is moved over them (in the above
demo, "Plane 1", "Plane 2" etc). Insert the below onMouseover event handler inside the <a>
tag of these links, like below:
<a href="b2.htm" onMouseover="changeimage(myimages[0],this.href)">Plane 1</a>
where "0" inside the variable myimages[0] indicates that when the mouse moves over this
link, the rollover image should be substituted with the first image defined in the function
preloadimages() of Step 1. For each link, you'll need to change "0" to another integer, with the
integer representing the position of the image you wish the rollover image to change to, again,
as defined in function preloadimages(). If you'll totally confused at this point (I'll admit, even
I am now!), the below are the HTML codes I used to construct the above demo. Examine it to
see what I mean:
<script>
"
//myimages[0] would refer to "plane1.gif", myimages[1] would refer to "plane2.gif" etc
preloadimages("plane1.gif","plane2.gif","plane3.gif","plane4.gif","plane5.gif")
</script>
<a href="b2.htm" onMouseover="changeimage(myimages[0],this.href)">Plane 1</a>
<a href="f15.htm" onMouseover="changeimage(myimages[1],this.href)">Plane 2</a>
<a href="su27.htm" onMouseover="changeimage(myimages[2],this.href)">Plane 3</a>
<a href="jet.htm" onMouseover="changeimage(myimages[3],this.href)">Plane 4</a>
<a href="boeing.htm" onMouseover="changeimage(myimages[4],this.href)">Plane 5</a>
There you have it!

PHOTO SLIDER

<table border="0" cellpadding="0">


<caption><strong>Air Show Photos</strong></caption>
<tr>
<td width="100%"><img src="plane1.gif" width="300" height="240"
name="photoslider"></td>
</tr>
<tr>
<td width="100%"><form method="POST" name="rotater">
<div align="center"><center><p><script language="JavaScript1.1">
var photos=new Array()
var which=0
/*Change the below variables to reference your own images. You may have as many images
in the slider as you wish*/
photos[0]="plane1.gif"
photos[1]="plane2.gif"
photos[2]="plane3.gif"
photos[3]="plane4.gif"
photos[4]="plane5.gif"
function backward(){
if (which>0){
window.status=''
which-document.images.photoslider.src=photos[which]
}
}
function forward(){
if (which<photos.length-1){
which++
document.images.photoslider.src=photos[which]
}
else window.status='End of gallery'
}
</script><input type="button" value="&lt;&lt;Back" name="B2"
onClick="backward()"> <input type="button" value="Next&gt;&gt;" name="B1"
onClick="forward()"><br>
<a href="#" onClick="which=1;backward();return false"><small>Start
Over</small></a></p>
</center></div>
</form>
</td>
</tr>
</table>

RANDOM IMAGE SLIDESHOW


<script language="javascript">
/*
Random image slideshow- By Tyler Clarke (tyler@ihatecoffee.com)
For this script and more, visit http://www.javascriptkit.com
*/
var delay=1000 //set delay in miliseconds
var curindex=0
var randomimages=new Array()
randomimages[0]="1.jpg"
randomimages[1]="5.jpg"
randomimages[2]="2.jpg"
randomimages[3]="4.jpg"
randomimages[4]="3.jpg"
randomimages[5]="6.jpg"
var preload=new Array()
for (n=0;n<randomimages.length;n++)
{
preload[n]=new Image()
preload[n].src=randomimages[n]
}
document.write('<img name="defaultimage"
src="'+randomimages[Math.floor(Math.random()*(randomimages.length))]+'">')
function rotateimage()
{
if (curindex==(tempindex=Math.floor(Math.random()*(randomimages.length)))){
curindex=curindex==0? 1 : curindex-1
}
else
curindex=tempindex
document.images.defaultimage.src=randomimages[curindex]
}
setInterval("rotateimage()",delay)
</script>

FORM BOX TOOLTIP

<script>
<!-/*
Form Box Tool Tip script: By JavaScript Kit (www.javascriptkit.com) More free scripts here
*/
function showtip(tip){
document.tool.tip.value=tip
}
//-->
</script>
<table border="0" width="100%" cellspacing="0" cellpadding="0">
<tr>
<td width="100%"><p align="center"><strong><font face="Arial" size="3"><a
href="../javaindex.htm" onMouseover="showtip('Click here to learn JavaScript!')"
onMouseout="showtip('')">JavaScript Tutorials</a> | </font><font
face="Arial"><a href="../howto/webbuild.htm" onMouseover="showtip('Wanna learn
general web building!')" onMouseout="showtip('')">Web building tutorials</a> | </font><font
face="Arial" size="3"><a href="../cutpastejava.htm" onMouseover="showtip('Get free
JavaScripts here!')" onMouseout="showtip('')">Free JavaScripts</a> </font></strong></td>
</tr>
<tr>
<td width="100%"><form name="tool">
<div align="center"><center><p><input type="text" name="tip"
size="69"></p>
</center></div>
</form>
</td>
</tr>
</table>

ROLLOWER CHECKBOX LINK

<form name="rolloverbox">
<p><input type="checkbox" name="boxes" value="ON"><a href="http://javascriptkit.com"
onMouseover="rollovercheck(0)" onMouseout="rolloutcheck(0)">Home</a><br>
<input type="checkbox" name="boxes" value="ON"><a
href="http://javascriptkit.com/javaindex.htm" onMouseover="rollovercheck(1)"
onMouseout="rolloutcheck(1)">JavaScript Tutorials</a><br>
<input type="checkbox" name="boxes" value="ON"><a
href="http://javascriptkit.com/cutpastejava.htm" onMouseover="rollovercheck(2)"
onMouseout="rolloutcheck(2)">Free JavaScripts</a><br>
<input type="checkbox" name="boxes" value="ON"><a
href="http://javascriptkit.com/java/javafront.htm" onMouseover="rollovercheck(3)"
onMouseout="rolloutcheck(3)">Free Java Applets</a><br>
<input type="checkbox" name="boxes" value="ON"><a
href="http://javascriptkit.com/howto/webbuild.htm" onMouseover="rollovercheck(4)"
onMouseout="rolloutcheck(4)">Web Tutorials</a><br>
<input type="checkbox" name="boxes" value="ON"><a
href="http://javascriptkit.com/frontpage.htm" onMouseover="rollovercheck(5)"
onMouseout="rolloutcheck(5)">FrontPage tutorials</a></p>
</form>
<script>
/*Rollover check box link credit
By JavaScript Kit (www.javascriptkit.com)
Over 200+ free scripts here!
*/
var thebox=document.rolloverbox
function rollovercheck(whichbox){
thebox.boxes[whichbox].checked=true
}
function rolloutcheck(whichbox){
thebox.boxes[whichbox].checked=false
}
</script>

Rotating link button


Step 1: Paste the below into the <head> section of your page:

<SCRIPT LANGUAGE="JavaScript">
<!-- begin
// please help yourself to this code.
var startTime =null;
var timerID =null;
var initial =new Date();
var pos
=0;
var menuItem =null;
function initArray() {
this.length = initArray.arguments.length
for (var i = 0; i < this.length; i++)
{
this[i+1] = initArray.arguments[i]
}
}
function parsemenuItem(data,num) {
for(var i=0;i<data.length;i++) {
if(data.substring(i,i+1)=="|") break;
}
if (num==0) return(data.substring(0,i));
else return(data.substring(i+1,data.length));
}
function startTimer() {
initial = new Date();
startTime=initial.getTime();
stopTimer();
menuItem = new initArray("Netscape|http://www.netscape.com",
"Microsoft|http://www.microsoft.com",
"IBM|http://www.ibm.com",
"Yahoo|http://www.yahoo.com",
"Excite|http://www.excite.com",
"Hotbot|http://www.hotbot.com",
"GrapeJam|http://www.grapejam.com",
"Email|mailto:rzeitel@mars.superlink.net"
);
showTimer();
}
function stopTimer() {
timerID=null;
menuItem=null;
//clearTimeout(timerID);
}
function showTimer() {
pos= (pos == menuItem.length) ? 1 : pos + 1;

document.forms[0].elements[0].value=parsemenuItem(menuItem[pos],0);
timerID=window.setTimeout('showTimer()',1000);
}
function goToUrl() {
//parent.welcome.location=parsemenuItem(menuItem[pos],1);
this.location=parsemenuItem(menuItem[pos],1);
return (false);
}
// end -->
</SCRIPT>

Step 2: Paste the below into the <body> section of your page:

<CENTER><FORM>
<INPUT TYPE="button" VALUE=" WHERE TO? " NAME="goTo"
onClick="window.goToUrl()">
</FORM></CENTER>

Step 3: Add the following to the <body> tag itself, like this:
<BODY onLoad="window.startTimer()">

Login and Password script

<script language="javascript">
<!--//
/*This Script allows people to enter by using a form that asks for a
UserID and Password*/
function pasuser(form) {
if (form.id.value=="JavaScript") {
if (form.pass.value=="Kit") {
location="page2.html"
} else {
alert("Invalid Password")
}
} else { alert("Invalid UserID")
}
}
//-->
</script>
<center>
<table bgcolor="white" cellpadding="12" border="1">
<tr><td colspan="2"><center><h1><i><b>Login
Area</b></i></h1></center></td></tr>
<tr><td><h1><i><b>UserID:</b></i></h1></td><td><form name="login"><input
name="id" type="text"></td></tr>
<tr><td><h1><i><b>Password:</b></i></h1></td><td><input name="pass"
type="password"></td></tr>
<tr><td><center><input type="button" value="Login"
onClick="pasuser(this.form)"></center></td><td><center><br><input
type="Reset"></form></td></tr></table></center>

Message Encrypter
<SCRIPT LANGUAGE="JavaScript">

<!-// By PATRICK CLINGER (pat_clinger@hotmail.com)


// Web Site: http://www.proboards.com/
// Script featured on JavaScript Kit (http://javascriptkit.com)
// Over 400+ free scripts: javascriptkit.com<br>
var letters = 'ghijklabvwxyzABCDEFef)_+|<>?:mnQRSTU~!@#$
%^VWXYZ`1234567opGHIJKLu./;'+"'"+'[]MNOP890-='+'\\'+'&*("{},cdqrst '+"\n";var split
= letters.split("");var num = '';var c = '';var encrypted = '';function encrypt(it){var b = '0';var
chars = it.split("");while(b<it.length)
{c = '0';while(c<letters.length){if(split[c] ==
chars[b]){if(c == "0") { c = ""; }if(eval(c+10) >= letters.length){num = eval(10(letters.length-c));encrypted += split[num];}else{num = eval(c+10);encrypted +=
split[num];}}c++;}b++;}document.forms[0].data.value = encrypted;encrypted = '';}function
decrypt(it){var b = '0';var chars = it.split("");while(b<it.length){c = '0';while(c<letters.length)
{if(split[c] == chars[b]){if(c == "0") { c = ""; }if(eval(c-10) < 0){num = eval(letters.length(10-c));encrypted += split[num];}else{num = eval(c-10);encrypted += split[num];}}c++;}b+
+;}document.forms[0].data.value = encrypted;encrypted = '';}
// -->
</SCRIPT>
<FORM>
<TEXTAREA ROWS="9" COLS="60" NAME="data"
wrap="virtual"></TEXTAREA><BR>
<INPUT TYPE="BUTTON" VALUE="Encrypt"
onClick="encrypt(document.forms[0].data.value)">
<INPUT TYPE="BUTTON" VALUE="Decrypt"
onClick="decrypt(document.forms[0].data.value)">
</FORM>

POST IT NOTE POJAVLJIVANJE NOVOG PROZORA OBAVESTENJA


<style>
<!--

/*Post-it note script- by agencija027.com


Visit JavaScript Kit (http://www.agencija027.com) for script
Credit must stay intact for use*/
#postit{
position:absolute;
width:250;
padding:5px;
background-color:lightyellow;
border:1px solid black;
visibility:hidden;
z-index:100;
cursor:hand;
}
-->
</style>

Cursor Trail

Step 1: Insert the below into the <HEAD> section of your page:

<style type="text/css">
BODY {overflow: scroll; overflow-x: hidden;}
</style>

Step 2: Insert the below into the <BODY> section of your page:

<script language="JavaScript1.2">
<!-/*
Submitted by Marcin Wojtowicz [one_spook@hotmail.com]
Featured on JavaScript Kit (http://javascriptkit.com)
For this and over 400+ free scripts, visit http://javascriptkit.com
*/
var trailLength = 8 // The length of trail (8 by default; put more for longer "tail")
var path = "cursor.gif" // URL of your image
// do NOT modify anything beyond this point
var isIE = false,isNav = false,range = "all.",style = ".style",i,d = 0
var topPix = ".pixelTop",leftPix = ".pixelLeft",images,storage
if (document.layers) { // browser sniffer
isNav = true,range = "layers.",style = "",topPix = ".top",leftPix = ".left"
} else if (document.all) {
isIE = true
}
function initTrail() { // prepares the script
images = new Array() // prepare the image array
for (i = 0; i < parseInt(trailLength); i++) {
images[i] = new Image()
images[i].src = path
}
storage = new Array() // prepare the storage for the coordinates
for (i = 0; i < images.length*3; i++) {
storage[i] = 0
}
for (i = 0; i < images.length; i++) { // make divs for IE and layers for Navigator
(isIE) ? document.write('<div id="obj' + i + '" style="position: absolute; zIndex: 100; height: 0; width: 0"><img src="' + images[i].src + '"></div>') :
document.write('<layer name="obj' + i + '" width="0" height="0" z-index="100"><img src="'
+ images[i].src + '"></layer>')

}
trail()
}
function trail() { // trailing function
for (i = 0; i < images.length; i++) { // for every div/layer
eval("document." + range + "obj" + i + style + topPix + "=" + storage[d]) // the
Y-coordinate
eval("document." + range + "obj" + i + style + leftPix + "=" + storage[d+1]) //
the X-coordinate
d = d+2
}
for (i = storage.length; i >= 2; i--) { // save the coordinate for the div/layer that's
behind
storage[i] = storage[i-2]
}
d = 0 // reset for future use
var timer = setTimeout("trail()",10) // call recursively
}
function processEvent(e) { // catches and processes the mousemove event
if (isIE) { // for IE
storage[0] = window.event.y+document.body.scrollTop+10
storage[1] = window.event.x+document.body.scrollLeft+10
} else { // for Navigator
storage[0] = e.pageY+12
storage[1] = e.pageX+12
}
}
if (isNav) {
document.captureEvents(Event.MOUSEMOVE) // Defines what events to capture for
Navigator
}
if (isIE || isNav) { // initiates the script
initTrail()
document.onmousemove = processEvent // start capturing
}
//-->
</script>

Simple Image Trail

<script type="text/javascript">
/*
Simple Image Trail script- By JavaScriptKit.com
Visit http://www.javascriptkit.com for this script and more
This notice must stay intact
*/
var trailimage=["test.gif", 100, 99] //image path, plus width and height
var offsetfrommouse=[10,-20] //image x,y offsets from cursor position in pixels. Enter 0,0 for
no offset
var displayduration=0 //duration in seconds image should remain visible. 0 for always.
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 hidetrail(){
gettrailobj().visibility="hidden"
document.onmousemove=""
}
function followmouse(e){
var xcoord=offsetfrommouse[0]
var ycoord=offsetfrommouse[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
if (displayduration>0)
setTimeout("hidetrail()", displayduration*1000)
</script>
<p align="left"><font face="arial" size="-2">This free script provided by<br>
<a href="http://javascriptkit.com">JavaScript Kit</a></font></p>

Sparkler COURSOR

Step 1: Insert the below into the <HEAD> section of your page:
<STYLE TYPE="text/css">
<!-BODY{
overflow:scroll;
overflow-x:hidden;
}
.s1
{
position : absolute;
font-size : 10pt;
color : blue;
visibility: hidden;
}
.s2
{
position : absolute;
font-size : 18pt;
color : red;
visibility : hidden;
}
.s3
{
position : absolute;
font-size : 14pt;
color : gold;
visibility : hidden;
}
.s4
{
position : absolute;
font-size : 12pt;
color : lime;
visibility : hidden;
}
//-->
</STYLE>

Step 2: Insert the below into the <BODY> section of your page:

<DIV ID="div1" CLASS="s1">*</DIV>


<DIV ID="div2" CLASS="s2">*</DIV>
<DIV ID="div3" CLASS="s3">*</DIV>
<DIV ID="div4" CLASS="s4">*</DIV>
<p align="center"><font face="arial" size="-2">This free script provided by</font><br>
<font face="arial, helvetica" size="-2"><a href="http://javascriptkit.com">JavaScript
Kit</a></font></p>
<SCRIPT LANGUAGE="javascript" TYPE="text/javascript">
/*
Script by Mike McGrath- http://website.lineone.net/~mike_mcgrath
Featured on JavaScript Kit (http://javascriptkit.com)
For this and over 400+ free scripts, visit http://javascriptkit.com
*/
var nav = (document.layers);
var tmr = null;
var spd = 50;
var x = 0;
var x_offset = 5;
var y = 0;
var y_offset = 15;
if(nav) document.captureEvents(Event.MOUSEMOVE);
document.onmousemove = get_mouse;
function get_mouse(e)
{
x = (nav) ? e.pageX : event.clientX+document.body.scrollLeft;
y = (nav) ? e.pageY : event.clientY+document.body.scrollTop;
x += x_offset;
y += y_offset;
beam(1);
}
function beam(n)
{
if(n<5)
{
if(nav)
{
eval("document.div"+n+".top="+y);
eval("document.div"+n+".left="+x);
eval("document.div"+n+".visibility='visible'");
}
else
{

eval("div"+n+".style.top="+y);
eval("div"+n+".style.left="+x);
eval("div"+n+".style.visibility='visible'");
}
n++;
tmr=setTimeout("beam("+n+")",spd);
}
else
{
clearTimeout(tmr);
fade(4);
}
}
function fade(n)
{
if(n>0)
{
if(nav)eval("document.div"+n+".visibility='hidden'");
else eval("div"+n+".style.visibility='hidden'");
n--;
tmr=setTimeout("fade("+n+")",spd);
}
else clearTimeout(tmr);
}
// -->
</SCRIPT>

Swirling cursor trail

Step 1: Insert the below into the <BODY> section of your page, immediately following the
<body> tag itself:
<script LANGUAGE="JavaScript">
/*
Swirling cursor trail (By Ozone, http://ozone.com)
Featured on JavaScript Kit free JavaScripts with bug fix for IE (http://javascriptkit.com)
For full source code to this script, visit http://javascriptkit.com
*/
window.onerror=null;
netscape = (document.layers) ? 1:0;
goodIE = (document.all) ? 1:0;
document.onmousemove=MoveHandler;
var gotthere = 0;
var count = 0;
var ietopcorner=''
var ieleftcorner=''
toplocation = new Array( 0,30,57,80,101,125,80,80,101,125,80,0 );
temptoplocation = new Array( 50,100,100,150,150,200,200,100,150,150,200,200,0 );
leftlocation = new Array( 0,292,318,181,181,217,263,318,181,181,217,263,-96 );
templeftlocation = new Array( 0,0,260,390,420,550,680,390,420,550,680,0 );
difftop = new Array( 0,0,0,0,0,0,0,0,0,0,0,0 );
diffleft = new Array( 0,0,0,0,0,0,0,0,0,0,0,0 );
questtop = -13;
questleft2 = -96;
if (netscape) {
document.body=new Object()
document.body.scrollTop=''
document.body.scrollLeft=''
window.captureEvents(Event.MOUSEMOVE);
window.onMouseMove = MoveHandler;
var layerstart = "document.";
var layerleft = ".left";
var layertop = ".top";
var layerstyle = "";
var windowWidth = window.innerWidth;
var windowHeight = window.innerHeight; }
else if (goodIE) {
ietopcorner=document.body.scrollTop
ieleftcorner=document.body.scrollLeft
layerstart = "document.all.";
layerleft = ".left";
layertop = ".top";
layerstyle = ".style";
windowWidth=600;
windowHeight=400; }

// end error trapping


var Ypos2 = 72;
var Xpos2 = 72;
function MoveHandler(e) {
if (netscape || goodIE) {
Xpos2 = (netscape)?e.pageX:event.x
Ypos2 = (netscape)?e.pageY:event.y
Xorigin = Xpos2;
Yorigin = Ypos2;
if (Ypos2 > windowHeight/2) {
if (Xpos2 > windowWidth/2) { direction = 1;}
else { direction = -1;} }
else {
if (Xpos2 > windowWidth/2) { direction = -1;}
else { direction = 1;} }
}}
function startthedots() {
if (goodIE) {
windowWidth=document.body.clientWidth;
windowHeight=document.body.clientHeight; }
Xorigin = 204;
Yorigin = 147;
spin();run(); }
var OrbitSize = 200;
count=1; delay=100; direction = -1;
Count = new Array ( 0, .63, 1.26, 1.89, 2.52, 3.15, 3.78, 4.41, 5.04, 5.67 );
Xpoint = new Array ( 0, .63, 1.26, 1.89, 2.52, 3.15, 3.78, 4.41, 5.04, 5.67 );
Ypoint = new Array ( 0, .63, 1.26, 1.89, 2.52, 3.15, 3.78, 4.41, 5.04, 5.67 );
var speed = -0.06;
var offset = 1;
function spin() {
for ( j = 0 ; j <= 9 ; j++ ) {
Count[j] = Count[j] + (speed*direction);
Xpoint[j] = Xorigin + ((OrbitSize*Math.sin(Count[j])*offset));
Ypoint[j] = Yorigin + (OrbitSize*Math.cos(Count[j])); }
setTimeout('spin()',3); }
function run() {
count++;
for ( j = 0 ; j <= 9 ; j++ ) {
difftop[j] = Ypoint[j] - temptoplocation[j];
diffleft[j] = Xpoint[j] - templeftlocation[j];
diff = 30;
temptoplocation[j] = temptoplocation[j] + difftop[j]/diff;
templeftlocation[j] = templeftlocation[j] + diffleft[j]/diff;
eval(layerstart+"a"+j+layerstyle+layerleft+" =
document.body.scrollLeft+templeftlocation["+j+"]");

eval(layerstart+"a"+j+layerstyle+layertop+" =
document.body.scrollTop+temptoplocation["+j+"]"); }
setTimeout('run()', 25) }
badIE = 0;
browserName = navigator.appName.substring(0,8);
browserVer = parseFloat(navigator.appVersion);
macintosh = navigator.userAgent.indexOf("Mac");
if (browserName == "Microsof") {
if (macintosh != -1) { badIE = 1; }
if (browserVer < 4) { badIE = 1; }
}
</script>
<style TYPE="text/css">
<!-#a0 {position:absolute; left:-24; top:-24; width:9; height:25;clip:rect(0 9 9 0);z-index:2000;}
#a1 {position:absolute; left:96; top:-24; width:9; height:25;clip:rect(0 9 9 0);z-index:2000;}
#a2 {position:absolute; left:216; top:-24; width:9; height:25;clip:rect(0 9 9 0);z-index:2000;}
#a3 {position:absolute; left:338; top:-24; width:9; height:25;clip:rect(0 9 9 0);z-index:2000;}
#a4 {position:absolute; left:460; top:-24; width:9; height:25;clip:rect(0 9 9 0);z-index:2000;}
#a5 {position:absolute; left:640; top:-24; width:9; height:25;clip:rect(0 9 9 0);z-index:2000;}
#a6 {position:absolute; left:-24; top:-24; width:9; height:25;clip:rect(0 9 9 0);z-index:2000;}
#a7 {position:absolute; left:200; top:-24; width:9; height:25;clip:rect(0 9 9 0);z-index:2000;}
#a8 {position:absolute; left:300; top:-24; width:9; height:25;clip:rect(0 9 9 0);z-index:2000;}
#a9 {position:absolute; left:600; top:-24; width:9; height:25;clip:rect(0 9 9 0);z-index:2000;}
// -->
</style>

<div ID="a0" align="center"><img src="swirl.gif" height="9" width="9"></div>


<div ID="a1" align="center"><img src="swirl.gif" height="9" width="9"></div>
<div ID="a2" align="center"><img src="swirl.gif" height="9" width="9"></div>
<div ID="a3" align="center"><img src="swirl.gif" height="9" width="9"></div>
<div ID="a4" align="center"><img src="swirl.gif" height="9" width="9"></div>
<div ID="a5" align="center"><img src="swirl.gif" height="9" width="9"></div>
<div ID="a6" align="center"><img src="swirl.gif" height="9" width="9"></div>
<div ID="a7" align="center"><img src="swirl.gif" height="9" width="9"></div>
<div ID="a8" align="center"><img src="swirl.gif" height="9" width="9"></div>
<div ID="a9" align="center"><img src="swirl.gif" height="9" width="9"></div>

Step 2: Add the following BODY onload event handler into the BODY tag, like this:

<body onLoad="startthedots()">

Disco pozadina
<script language="JavaScript">

<!-//you can assign the initial color of the background here


r=255;
g=255;
b=255;
flag=0;
t=new Array;
o=new Array;
d=new Array;
function hex(a,c)
{
t[a]=Math.floor(c/16)
o[a]=c%16
switch (t[a])
{
case 10:
t[a]='A';
break;
case 11:
t[a]='B';
break;
case 12:
t[a]='C';
break;
case 13:
t[a]='D';
break;
case 14:
t[a]='E';
break;
case 15:
t[a]='F';
break;
default:
break;
}
switch (o[a])
{
case 10:
o[a]='A';
break;
case 11:
o[a]='B';
break;
case 12:
o[a]='C';
break;
case 13:
o[a]='D';

break;
case 14:
o[a]='E';
break;
case 15:
o[a]='F';
break;
default:
break;
}
}
function ran(a,c)
{
if ((Math.random()>2/3||c==0)&&c<255)
{
c++
d[a]=2;
}
else
{
if ((Math.random()<=1/2||c==255)&&c>0)
{
c-d[a]=1;
}
else d[a]=0;
}
return c
}
function do_it(a,c)
{
if ((d[a]==2&&c<255)||c==0)
{
c++
d[a]=2
}
else
if ((d[a]==1&&c>0)||c==255)
{
c--;
d[a]=1;
}
if (a==3)
{
if (d[1]==0&&d[2]==0&&d[3]==0)
flag=1
}
return c
}

function disco()
{
if (flag==0)
{
r=ran(1, r);
g=ran(2, g);
b=ran(3, b);
hex(1,r)
hex(2,g)
hex(3,b)
document.bgColor="#"+t[1]+o[1]+t[2]+o[2]+t[3]+o[3]
flag=50
}
else
{
r=do_it(1, r)
g=do_it(2,g)
b=do_it(3,b)
hex(1,r)
hex(2,g)
hex(3,b)
document.bgColor="#"+t[1]+o[1]+t[2]+o[2]+t[3]+o[3]
flag-}
if (document.all)
setTimeout('disco()',50)
}
//-->
</script>
<body onload="disco()">

Sat digital

<span id=tick2>
</span>
<script>
<!-/*By JavaScript Kit
http://javascriptkit.com
Credit MUST stay intact for use
*/
function show2(){
if (!document.all&&!document.getElementById)
return
thelement=document.getElementById? document.getElementById("tick2"):
document.all.tick2
var Digital=new Date()
var hours=Digital.getHours()
var minutes=Digital.getMinutes()
var seconds=Digital.getSeconds()
var dn="PM"
if (hours<12)
dn="AM"
if (hours>12)
hours=hours-12
if (hours==0)
hours=12
if (minutes<=9)
minutes="0"+minutes
if (seconds<=9)
seconds="0"+seconds
var ctime=hours+":"+minutes+":"+seconds+" "+dn
thelement.innerHTML="<b style='font-size:14;color:blue;'>"+ctime+"</b>"
setTimeout("show2()",1000)
}
window.onload=show2
//-->
</script>

Form mailimg
<?php
/* (c) copyright 2004, HIOX INDIA
/* This is a free tool provided by hioxidia.com */

*/

/* visit us at http://www.hscripts.com
?>

*/

<html>
<head>
</head>
<?php
include 'color.php';
$sname = "http://".$_SERVER['SERVER_NAME'];
?>
<body topmargin=0 leftmargin=0 marginwidth=0 marginheight=0 bgcolor=<?
echo($BODYCOLOR); ?>
style="font-family: arial,verdana,san-serif; margin:0px;">
<table border=0 width=80% height=100% align=center border=0 cellspacing=0
cellpadding=0
STYLE="color: <? echo($fontcol); ?>;" bgcolor=<? echo($BOXCOLOR); ?>>
<tr width=100% background="./images/bg.jpg">
<td width=100% background="./images/bg.jpg" align="center">
<div style="border: 2px groove #888888; border-left: 0px; border-right: 0px;"><br>
<font style="font-size: 18px; color: <? echo($HEADCOLOR); ?>; font-weight: bold;">
<a href="<? echo($sname);?>" style="color: <? echo($HEADCOLOR); ?>; textdecoration:none;"><? echo($sitename); ?></a> MAIL Page</font>
<br><br></div>
</td></tr>
<script language=javascript>
function check()
{
var feed = document.sds.feedback.value;
var nname = document.sds.name.value;
if(feed == "" || nname == "")
{
alert("Please fill required fields marked * ");
return false;
}
return true;
}
</script>
<tr width=100% >
<td width=100% align="center">
<br><br>

<div align="center">
<form name=sds action="mailer.php" METHOD="POST" onsubmit="return check()">
<table cellpadding=4 cellspacing=0 border=0>
<tr><td><font color=<? echo($FONTCOLOR); ?>><i>To: </i></font></td><td><input
type="text" name="to" size=27
readonly value="<? echo($email); ?>"></td></tr>
<tr><td><font color=<? echo($FONTCOLOR); ?>><i>Name: *
</i></font></td><td><input type="text" name="name" size=27></td></tr>
<tr><td><font color=<? echo($FONTCOLOR); ?>><i>Email:</i></font></td><td><input
type="text" name="from" size=27></td></tr>
<tr><td><font color=<? echo($FONTCOLOR); ?
>><i>Website:</i></font><br><br></td><td><input type="text" name="website"
size=29><br><br></td></tr>
<tr><td colspan=2><font color=<? echo($FONTCOLOR);?> ><b>Message: *
</b></font><br>
<textarea name="feedback" rows=13 cols=55 wrap=physical></textarea>
</td></tr>
<tr><td colspan=2 align=right><input type="submit" value="Send"></td></tr>
</table>
</form>
</div>
</td>
</tr>
<tr width=100% background="./images/bg.jpg">
<td background="./images/bg.jpg">
<div align=center STYLE="font-family: sans-serif; margin-left: 1.5cm; margin-right: 1cm;
font-size: 18px; color: <?php echo($FONTCOLOR);?>" >
Please use this form to mail us.<br>
<br>
<div align=right STYLE="font-size: 12px; color: #dadada;">
<a href="http://www.hscripts.com" style="text-decoration:none; color: #dadada;">provided
by &nbsp;&nbsp;<b>&copy; hscripts.com</b></a>
</div>
</td>
</tr>
</table>
</body>
</html>

counter383876.asp
<%
Set fs = CreateObject("Scripting.FileSystemObject")
Wfile=server.mappath("\") & "\cgi-bin\counter383876.txt"

on error resume next


Set a = fs.OpenTextFile(Wfile)
hits = Clng(a.ReadLine)
hits = hits + 1
a.close
if error then
hits = 1
end if
Set a = fs.CreateTextFile(Wfile,True)
a.WriteLine(hits)
a.Close
%>

Number of hits: <% =hits %>

form.html

Example code

<FORM ACTION="saveinfo.asp" METHOD=post>


<!-- Your fields here -->
<INPUT TYPE=submit value="Submit">
</FORM>

saveinfo.asp
<%
Set fs = CreateObject("Scripting.FileSystemObject")
Folderpath=server.mappath("\") & "/cgi-bin/messages235302"
Wcounter=Folderpath &"/counter.txt"
Set fs = CreateObject("Scripting.FileSystemObject")
if fs.FolderExists(Folderpath) then
Set a = fs.OpenTextFile(Wcounter)
hits = Clng(a.ReadLine)
hits = hits + 1
a.close
else
Set a = fs.CreateFolder(Folderpath)
hits=1
end if
Set a = fs.CreateTextFile(Wcounter,True)
a.WriteLine(hits)
a.Close
Set fs=nothing
Set fs = CreateObject("Scripting.FileSystemObject")
Set a = fs.CreateTextFile(Folderpath & "\" & hits & ".txt")
For Each x In Request.Form
a.WriteLine(x &": " & Request.Form(x))
Next
a.Close
Set a=nothing
Set fs=nothing
%>
Thanks for providing the requested information<BR>
I will contact you very soon.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35

Lines 2-18. In case the folder where information will be saved does not exits, it will
be create. The counter file will be also create. If they already exits, the counter will be
open, the content read to a variable named "hits", and increased by one.
Lines 20-23. the value for variable h"hits" will be save in "counter.txt" file in our
folder.
Lines 25-32, information provided per input field will be saved to a file. The name of
the file will be composed by the variable hits (a number) and ".txt"
Lines 34-35. Write here your response.
o The response may be a text, as in this example,

o
o

You may redirect the visitor to a different page. The code will be this one:
<% response.redirect("http://www.mysite.com") %>
You may include as a response page the content in a page within your site
<!--#include virtual="/myresponse.html" -->

I
In order to access the information saved to files we may use the script bellow. That way we
will be able to access the information from all visitors in an unique page. Access to
information is password protected (Name and password to access the information are shown
in line two. If the name and password are not correct the form will be send (Subroutine
"Sendform ()"), and in case they are correct the info is send (Subroutine "Sendinfo ()").
getinfo.asp Try !
<%
if request.form("name")="Peter" and request.form("password")="yes" then
Sendinfo ()
else
Sendform ()
end if
%>
<%
Sub Sendform() %>
<FORM ACTION="getinfo.asp" METHOD=post>
Name: <input type=text name=name><br>
Password: <input type=password name=password><br>
<INPUT TYPE=submit value="Submit">
</FORM>
<% End Sub %>

<%
Sub Sendinfo()
FolderToCheck = server.mappath("\") & "/cgi-bin/messages235302"
Dim fs, f, f1, fc, s
Set fs = CreateObject("Scripting.FileSystemObject")
Set f = fs.GetFolder(FolderToCheck)
Set fc = f.Files

For Each f1 in fc
Wfile=f1.name
Response.write("<hr><b>" & Wfile & "/" & "</b><p>")
FiletoCheck=FolderToCheck & Wfile
Set a=fs.OpenTextFile(FiletoCheck)
theinfo=a.ReadAll
Response.write("<pre>" & Theinfo & "</pre>")
Next

Response.write("<hr>Script provided by <a href=http://www.asptutorial.info>asptutorial.info</a>")


End sub
%>

On request we have create a new script which allows to delete messages after reading
them
To get the script, choose a name and a password, and you will get the new version of the
script in the response page. The name of the resulting script and location in your site is not
limited.
Choose name
Choose password

Submit

Get your personalized poll/quiz/vote script:

Example poll

Example form (obtained with data in


the form)

Question:
Do you like copy and paste scripts?

Response 1:
Response 2:

Yes
No

Do you like copy and paste scripts?


Yes

Response 3:

No

Submit

Response 4:
Response 5:
Response 6:
Response 7:

Response page

Response 8:
Response 9:
Response 10:
Responses in one line
lines
Center

No center

Submit

GetremoteURL.asp
<%

Do you like copy and paste scripts?


Yes 9260(86%)
Responses in separated No 1499(13%)

' Intruduce the url you want to visit


GotothisURL = "http://www.asptutorial.info"
' Create the xml object
Set GetConnection = CreateObject("Microsoft.XMLHTTP")
' Conect to specified URL
GetConnection.Open "get", GotothisURL, False
GetConnection.Send
' ResponsePage is the response we will get when visiting GotothisURL
ResponsePage = GetConnection.responseText
' We will write
Response.write (ResponsePage)
Set GetConnection = Nothing
%>
In the example avobe we may use a URL like http://www.asptutorial.info?
name=Joe&lastname=Zarzandi. The example above will work with get method. You may
try http://www.google.asp?q=asp to search for asp in google search engine (unfortunatelly is
not legal to do so without visiting their site unless we used the method shown in the script
bellow).
In the example above we have request for all content of the response page, but it is possible to
request only headers (check code in bold in the script), but we may request only for specific
headers. You will need to change line 12 in the script:
ResponsePage = GetConnection.getallResponseHeaders
The response page will be something similar to this:
Server: Microsoft-IIS/5.0 Date: Thu, 31 Apr 2002 14:25:20 GMT MicrosoftOfficeWebServer: 5.0_Pub
Connection: keep-alive Connection:
Keep-Alive Content-Length: 11063 Content-Type: text/html Cache-control: private

We may also request for specific parts of the information included in the headers (check a
regular :
To request for Server:
ResponsePage = GetConnection.getResponseHeader("Server")
To request for Date:
ResponsePage = GetConnection.getResponseHeader("Date")
To request for Content Length:
ResponsePage = GetConnection.getResponseHeader("Content-Length")
...

In the example bellow we have add some code to avoid error messages when url is not
available, so that we will get a alternative text (line 17)
GetremoteURL.asp
<%
' Intruduce the url you want to visit
GotothisURL = "http://www.asptutorial.info"
' Create the xml object
Set GetConnection = CreateObject("Microsoft.XMLHTTP")
' Conect to specified URL
GetConnection.Open "get", GotothisURL, False
on error resume next
GetConnection.Send
' ResponsePage is the response we will get when visiting GotothisURL
ResponsePage = GetConnection.responseText
' We will write
if ResponsePage="" then
Response.write("The page is not available")
else
Response.write(ResponsePage)
end if
Set GetConnection = Nothing
%>

Googlesearch.asp

Get code here

<html><head><title> Search</title></head>
<body bgcolor=ffffff>
<%
if request.querystring="" then
sendform()
else
sendform()
' You must ask Google for a key
key = "00000000000000000000000000000000000"
' The URL where the script is located
URL = "http://www.agencija027.com/"
SoapText = "<?xml version='1.0' encoding='UTF-8'?><SOAP-ENV:Envelope xmlns:SOAPENV='http://schemas.xmlsoap.org/soap/envelope/'
xmlns:xsi='http://www.w3.org/1999/XMLSchema-instance'
xmlns:xsd='http://www.w3.org/1999/XMLSchema'><SOAPENV:Body><ns1:doGoogleSearch xmlns:ns1='urn:GoogleSearch' SOAPENV:encodingStyle='http://schemas.xmlsoap.org/soap/encoding/'><key xsi:type='xsd:string'>"
& key &"</key><q xsi:type='xsd:string'>" & request.querystring("keywords") & "</q><start
xsi:type='xsd:int'>" & request.querystring("h") & "</start><maxResults
xsi:type='xsd:int'>10</maxResults><filter xsi:type='xsd:boolean'>true</filter><restrict
xsi:type='xsd:string'></restrict><safeSearch xsi:type='xsd:boolean'>false</safeSearch><lr
xsi:type='xsd:string'></lr> <ie xsi:type='xsd:string'>latin1</ie><oe
xsi:type='xsd:string'>latin1</oe></ns1:doGoogleSearch></SOAP-ENV:Body></SOAPENV:Envelope>"
Googleurl = "http://api.google.com/search/beta2"
Set objXML = CreateObject("Microsoft.XMLHTTP")
objXML.open "POST",Googleurl,"False"
objXML.setRequestHeader "Man", "POST"+" "+Googleurl+" HTTP/1.1"
objXML.setRequestHeader "MessageType", "CALL"
objXML.setRequestHeader "Content-Type", "text/xml"
objXML.send SoapText
ResponsePage = objXML.responseText
Set objXML = Nothing
ResponsePage=Replace(ResponsePage," xsi:type=" & CHR(34) & "xsd:string" & CHR(34),"")
ResponsePage=Replace(ResponsePage,"&lt;b&gt;","")
ResponsePage=Replace(ResponsePage,"&lt;/b&gt;","")
ResponsePage=Replace(ResponsePage,"&lt;br&gt;","<br>")

EstimatedResults=left(ResponsePage,inStr(ResponsePage,"</estimatedTotalResultsCount>")1)
EstimatedResults=right(EstimatedResults,len (EstimatedResults)inStr(EstimatedResults,"<estimatedTotalResultsCount")-46)
Response.write ("Estimated results for <b>" & q & "</b>: " & EstimatedResults & " &nbsp;
<A href=" & request.servervariables("URL") & "?keywords=" &
request.querystring("keywords") & "&h=" & request.querystring("h"))+10 & "><font
size=2>next 10</font></a><HR>")
public namearray
namearray=split (ResponsePage,"<item xsi:type=" & CHR(34) & "ns1:ResultElement" &
CHR(34) & ">")
max=ubound(namearray)-1
for i=1 to max
theurl=left(namearray(i),inStr(namearray(i),"</URL>")-1)
theurl=right(theurl,len (theurl)-instr(theurl,"<URL>")-4)
thetitle=left(namearray(i),inStr(namearray(i),"</title>")-1)
thetitle=right(thetitle,len (thetitle)-inStr(thetitle,"<title>")-6)
if thetitle="" then
thetitle="No Title"
end if
AA=inStr(namearray(i),"</snippet>")-1
thedescription=left(namearray(i),AA)
thedescription=right(thedescription,len (thedescription)-inStr(thedescription,"<snippet>")-8)
Searchresults=Searchresults & "<p><a href=" & theurl & ">" & thetitle & "</a><br>" &
thedescription & "<br><font size=2>" & theurl & "</font>"
next
Response.write(Searchresults)
end if
%>
<% Sub SendForm() %>
<form method=get action=<% =request.servervariables("URL") %>>
Find Keywords <input type=text name=keywords size=15>
<input type=hidden name=h value=0> <input type=submit value="Google Search">
</form>
<% end sub%>
<HR>

Script provided by <A HREF=http://www.asptutorial.info>AspTutorial.info</a>


</body></html>

Free Copy and Paste Guestbook (.asp)


Possible errors with this script

This guest book is an adaptation of Request info and save it to a file script, but in this
case the number input fields has been reduced to the needs in a guest book, and the
access to the information provided by users is not password protected. This is also a
copy and paste script, so in most cases, you will only need to copy the code in the
tables bellow to get it working in your server.
This script will create a subdirectory withing cgi-bin ("cgi-bin/guessbook"), a counter
("cgi-bin/guessbook/counter.txt") and each message leave in the guessbook will be
save to a text file within the same subdirectory in correlative order ("cgibin/guessbook/1.txt", "cgi-bin/guessbook/2.txt", "cgi-bin/guessbook/3.txt" etc).
You may try it here
First, we will need a form users will used to write messeges to the guessbook:

form.html
<a href=guestbook.asp>See guestbook</a><p>
<FORM ACTION="guestbook.asp" METHOD=post>
Your name<br>
<input type=text name=visitorsname size=25><br>
Your email<br>
<input type=text name=visitorsemail size=25><br>
Your message<br>
<textarea name=visitorsmessage rows=4 Cols=80>
</textarea><BR>
<INPUT TYPE=submit value="Post">
</FORM>

And we also need the script. In case a message is send to the guestbook, then it will be
save and the messages in the guest book will be shown. If we link to this page
(without using a form), then messages will be shown.

guestbook.asp get code


<%
Set fs = CreateObject("Scripting.FileSystemObject")
Folderpath=server.mappath("\") & "/cgi-bin/guestbook"

Wcounter=Folderpath &"/counter.txt"
if request.form<>"" then
Set fs = CreateObject("Scripting.FileSystemObject")
if fs.FolderExists(Folderpath) then
Set a = fs.OpenTextFile(Wcounter)
counter = Clng(a.ReadLine)
counter = counter + 1
a.close
else
Set a = fs.CreateFolder(Folderpath)
counter=1
end if
Set a = fs.CreateTextFile(Wcounter,True)
a.WriteLine(counter)
a.Close
Set fs=nothing
Set fs = CreateObject("Scripting.FileSystemObject")
Set a = fs.CreateTextFile(Folderpath & "\" & counter & ".txt")
a.WriteLine("<b><a HREF=mailto:" & Request.Form("visitorsname") & ">" &
Request.Form("visitorsname") & "</a></b>")
a.WriteLine(Request.Form("visitorsmessage"))
a.Close
Set a=nothing
Set fs=nothing
end if
Dim fs, f, f1, fc, s
Set fs = CreateObject("Scripting.FileSystemObject")
Set f = fs.GetFolder(Folderpath)
Set fc = f.Files
Response.Write ("<HTML><HEAD><TITLE>Guest book</TITLE></HEAD>")
Response.Write ("<BODY BGCOLOR=FFFFFF>")
Response.Write ("<TABLE BORDER=0 Width=100" & CHR(37) & ">")
Response.Write ("<TR><TD BGCOLOR=C0C0C0>")
Response.Write ("<FONT SIZE=5><B>Guest book: posted messages</B></FONT>")
Response.Write ("</TD></TR></TABLE>")
For Each f1 in fc
Wfile=f1.name
if Wfile<>"counter.txt" then
FiletoCheck=Folderpath & "/" & Wfile
Set a=fs.OpenTextFile(FiletoCheck)
Theinfo=a.ReadAll
Response.write("<pre>" & Theinfo & "</pre><hr>")
end if
Next
'to show last message in the top,
'remove previous 4 lines and write next 4 lines instead
' Theinfo="<pre>" &a.ReadAll & "</pre><hr>" & Theinfo
' end if
'Next
'Response.write(Theinfo)

Response.write("<div align=right><font size=2>Script provided by <a


href=http://www.asptutorial.info>asptutorial.info</a></font></div>")
Response.Write ("</BODY></HTML>")
%>

See guestbook or post a message


Your name
Your email
Your message (limited to 100 characters)

Post

On request we have create a script which allows to delete messages after reading
them
To get the script, choose a name and a password, and you will get the script in the
response page. The name of the resulting script and location in your site is not limited.
Choose name
Choose password

Submit

Form to mail form (.asp) Example 1 , Example 2 , Example 3


This tutorial uses Bamboo.SMTP mail component
If this component is not available in your server try
JMail.SMTP Mail component
If non of them are available contact your server administrator

Example 1
Would you like to get on your email all the information included in a form?

First of all you need a form, as for example the one in the table:

form.html
<FORM ACTION="formtomail.asp" METHOD=post>
<!-- Your fields here -->
<INPUT TYPE=submit value="Submit">
</FORM>

The Form Action must be directed to the ASP script bellow.


Second: you need the asp script (copy the information in the table to a text file
and save the file as "formtomail.asp" in your server).

formtomail.asp
<%
For Each x In Request.Form
message = message & x & ": " & Request.Form(x) & CHR(10)
Next
set smtp=Server.CreateObject("Bamboo.SMTP")
smtp.Server="mail.yourdomain.com"
smtp.Rcpt="youremail@yourdomain.com"
smtp.From="formtomail@yourdomain.com"
smtp.FromName="Joe Smith"
smtp.Subject="Response to my form"
smtp.Message = message
on error resume next
smtp.Send
if err then
response.Write err.Description
else
Response.redirect ("http:// redirect.com")
end if
set smtp = Nothing
%>

You need to customize the script:


You need to put your smtp sever name (for example: mail.yourdomain.com).
You may also write your IP address instead.
Change youremail@yourdomain.com, and write the email to which you want
the information to be send.
Instead of formtomail@yourdomain.com, write the email from which the
information is send.
In case you are asking to your visitor to write their email in the form (p.e.

using a field like this: <input type="text" name="email">, you may write
"request.for("email")" instead of "formtomail@yourdomain.com".That way
you will get un email from the person filling the form.
"Joe Smith" will be the name of the sender. You may write
"request.form("yourname")" if you are asking your visitors their name in a
specific field (p.e., <input type="text" name="yourname">.
"Response to my form" will be the subject of the email you will get.
This script will redirect the response to a different page. Whatever you want to
unswer to the person who has fill the form must be writen in a html page.
Write this url in the script (change "http:// redirect.com").

NOTE: You may have problems with this script in your server in case
"Bamboo.SMTP" instruction is not supported by your server. In that case you will
need a different script.

Mailing list subscription/unsubscription script

This script will add or remove emails to a list. It will not send emails. For this second porpouse you
may check this script

The script code bellow has been split in different parts, each one corresponding to a subroutine. After
each section of the script an explanation is provided.
You may try this example (emails provided will be remove regularly from the list)
Explanation of each part of the script is provided bellow.
The form asking for emails (included in the last subroutine of the script) may be place in a different
page (but it must point to the script).
This script will createa file in the server the first time an email is submit (at this moment is set up to
create the file at "/cgi-bin/subscribers.txt").

You may get a customized script after filling this form


Explanation:
The first time the page is visited the form will be send to the client.
If it is not the first time (request.form("email") or request.querystring has a value), depending on the
situation, the corresponding subroutines will be run. Options are three:
1. A new request for additon to the list
request.form("email")<>"" and request.form("action")="Subscribe"
2. A request to unsubscribe from the list
request.form("email")<>"" and request.form("action")="Unsubscribe"

3. A confirmation to add the email to the list.


request.querystring<>""
<%
sub GetrandomnamberandSavetoSession()
Randomize
session ("randonnumber")=INT(Rnd ()*1000000)
session ("email")=request.form("email")
end sub
%>
Explanation:

Random number is generate (lines 3-4)


Random number is stored in a session variable (line 4)
The email is stored in a session variable (line 5)

This random number will be send to the subscriber. It will be included in the url the subscriber must visit a
confirm the inclusion in the mailing list.
<%
Sub CheckEmailandSendEmail()
Wemail=request.form("email")
test1=instr(Wemail, "@")
test2=instr(Wemail, ".")
test3=len(Wemail)
test4=InStr (test1,Wemail,".",1)

' value must be >1


' value must be >4
' value must be >6
' value must be >test1+2

if test1<2 OR test2<5 OR test3<7 OR test4<test1+3 then


Responsetext="Your email is not valid<br>Please go back and write it correctly"
else
Sendmessage()
end if
End Sub
%>
Explanation:
It is check whether email provided is valid
If email is not valid, Responsetext variable is provided a appropiate value (you may change it)
If email is valid Sendmessage() subroutine will be run
Responsetext above may be change to meet your preferences. This variable will be used in the response page
which may be also customized in the corresponding subroutine.
<%
Sub Sendmessage()
message= "Dear Sir/madam," & CHR(10) & CHR(10)
message=message & "A request to join our mailing list has been get at mydomain.com. " & CHR(10)
message=message & "Please visit the following link to make efective you subscription to our mailing list." &
CHR(10) & CHR(10)
message=message & Request.servervariables("SERVER_NAME") & Request.servervariables("URL")
& "?" & session ("randonnumber") & CHR(10) & CHR(10)
message=message & "Take care" & CHR(10) & CHR(10)
message=message & "John Smith" & CHR(10)

set smtp=Server.CreateObject("Bamboo.SMTP")
smtp.Server="mail.yourdomain.com"
smtp.Rcpt=request.form("email")
smtp.From="webmaster@yourdomain.com"
smtp.FromName="John Smith"
smtp.Subject="Mailing list inclusion request"
smtp.Message = message
on error resume next
smtp.Send
if err then
response.Write("Internal server error")
response.end
end if

set smtp = Nothing


Responsetext="One more thing to do: you must visit the link you will get by email within next minutes in
order to confirm your inclusion in our mailing list.<p>This operation must be done suring this session,
otherway your information will be lost"
End Sub
%>
Explanation:

An email will be send to the user for verification.


The message is defined in the first part of the subroutine
Withing the message an url the user must visit is provided. This url is formed this way:
o Request.servervariables("SERVER_NAME") & Request.servervariables("URL") will
deffine the url as for example www.mydomain/mydir/myfile.asp. This code will allow as to
change the name or location of the script in our server withou changing the code of the
script
o "?" & session ("randonnumber") will add the random number generated in advance to
the url, so that it may be recornize by using Request.querystring
o The resulting url will be like this one: www.mydomain/mydir/myfile.asp?123456
You must change in the script some parameters (mail server, email address, your name, subject of the
message) and you may also change the complete body of the message in the first part of the subroutine.
Responsetext above may be change to meet your preferences. This variable will be used in the response page
which may be also customized in the corresponding subroutine.
<%
sub CheckrandonnumberandSaveEmailtoFile()
if Clng(request.querystring)=session ("randonnumber") then
SaveEmailtoFile()
else
Responsetext="We have no data related to your previous visit to this site<p>Probably your session has
espired, so we are unable to add your email to our mailing list<p>Please try to join our mailing list again, and
visit to the corresponding link as soon as possible, before the session is expired."
end if
end sub
%>
Explanation:
In case the subscriber confirms he wants to subscribe the mailing list he will click in the url send by
email to him. In this url is included the random number we generated before sending the email to the
subscriber, and this random number will be the value we may recover with the code
"Request.querystring". As this value is a string, it is transformed to a number with instruction
"Clng()" and it is compared with the random number stored at "session ("randonnumber")". If they
are the same number the email of the subscriber will be save to our file.
In case they are not the same number, the most probable reason may be the subscriber has responded
by clicking in the url send to him by email a bit late, so his session has expired and the value for
"session ("randonnumber")" is null. In this case "Responsetext" is set up.
Responsetext above may be change to meet your preferences. This variable will be used in the
response page which may be also customized in the corresponding subroutine.
<%
Sub SaveEmailtoFile()
email=session ("email")
email=lcase(email)

email="<" & email & ">"


Wfile=server.mappath("\") &"/cgi-bin/subscribers.txt"
Set fs = CreateObject("Scripting.FileSystemObject")
on error resume next
Set a = fs.OpenTextFile(Wfile)
allemails = a.ReadAll
a.close
if instr(allemails,email)>0 then
Responsetext="You are already a subscriber to this mailing list"
else
allemails= allemails & email
Set a = fs.CreateTextFile(Wfile,True)
a.Write(allemails)
a.Close
Responsetext="Your email has been added to our list successfully"
end if
end sub
%>
Explanation:
The email which was stored at session("email") is save to a variable named email, transformed to
lower case and added to it "<" and ">" in the first and last positions. Adding this characters in those
positions is very usefull, as it will allow us to better control the list (see subroutine bellow).
Then we will open the file where emails are stored and it will be checked whether the email is
already in the list. If so, the apropiate Responsetext is defined. If not, the email (including the
additional characters) will be added to the list.
In case "/cgi-bin/subscribers.txt" is not present in the server, it will be created when adding the first
email to the liost(it s not necessary to crate it in advance). T location the serverof the fila and its
named can be changed without problems.
The file where the emails are stored will look like this one:

<subscriber1@domain1.com><subscriber2@domain2.com><subscriber3@domain3.com>
<subscriber4@domain4.com><subscriber5@domain5.com><subscriber6@domain6.com>
<subscriber7@domain7.com>
After adding the email Responsetext is defined.
<%
Sub RemoveEmail()
email=lcase(request.form("email"))
email="<" & email & ">"
Wfile=server.mappath("\") &"/cgi-bin/subscribers.txt"
Set fs = CreateObject("Scripting.FileSystemObject")
on error resume next

Set a = fs.OpenTextFile(Wfile)
allemails = a.ReadAll
a.close
if error then
Responsetext="The mailing list is not available at the moment"
else
if instr(allemails,email)>0 then
allemails=replace(allemails,email,"")
Set a = fs.CreateTextFile(Wfile,True)
a.Write(allemails)
a.Close
Responsetext="Your email has been remove from our mailinglist"
else
Responsetext="Your email is not included in this mailing list"
end if
end if
end sub
%>
Explanation:
The email (which was stored in a session obhect) will suffer the same transformation as in the
previous subroutine.Then the file contain the list of emails is open and read (in case an error occurs
when trying to open the file a Responsetext is defined), I the email is included in the list it will be
deleted. If not the corresponding response will be set up.
When trying to delete the email (see subroutine bellow), this additional character added in first and
last position ("<> and "<") will prevent the script to delete aditional emails:
p.e. when deleting from the list "a@domain.com" we will avoit deleting "ana@domain.com"
(because we will delete "<a@domain.com>").
After deleteing the email the corresponding answer will be set up.
<% Sub SendResponse() %>
<html><head><title>Request to join mailing list</title></head>
<body bgcolor="#FFFFFF" text="#000000">

<% =Responsetext %>


</body></html>
<% End Sub %>
Explanation:
This subroutine is used to display our answer ae corresponding action and it may be totally
customized. Just keep "<% =Responsetext %>" within the code.
"Responsetext" is the piece of tee defined somewhereelse in the script depending on what action has
took place.
<% Sub SendForm() %>
<html><head><title>Request to join mailing list</title></head>
<body bgcolor="#FFFFFF" text="#000000">

<center>
Add your email to our mailing list
<FORM METHOD=POST ACTION="<% =Request.servervariables("URL") %>">
<BR>
Email address: &nbsp; <INPUT TYPE="text" NAME="email" Size="60" MAXLENGTH="128">
<BR><BR>
<input type=radio name="action" value="Subscribe" checked> Subscribe &nbsp;&nbsp;&nbsp;&nbsp;
<input type=radio name="action" value="Unsubscribe"> Unsubscribe<BR><BR>
<INPUT TYPE="SUBMIT" VALUE="Submit/Enviar"><INPUT TYPE="RESET" VALUE="Clear/Borrar">
</FORM>
</center>
</body></html>
<% End Sub %>
Explanation:
This subroutine is used to introduce the email o the user the first time he to the page.
The form may be place in different page as far as it points to the script.

Free For all Link Page (.asp)


Files needed

index.shtml (or index.asp)


this file will be the result of adding the content of the next three files:
head.txt
the html code of the first part of "index.shtml".
links.txt
the file containig all the links
tail.txt
the html code of the final part of "index.shtml".
addurl.asp
this files allows adding new files to the Free For All Link Page.
All files must be save to a directory named "Links".
You may customize the files head.txt and tail.txt to meet your needs.
Please, do not remove the link to my site from the system.
index.shtml
<!--#include virtual="/Links/head.txt" -->
<OL>
<!--#include virtual="/Links/links.txt" -->
</OL>
<HR>
<form method=post action="/Links/addurl.asp">
<CENTER>
Add a new link
<TABLE BORDER=0>
<tr>
<td>Title</td>
<td><input type=text size=45 name=title Maxlenth=100></td>
</tr>
<tr>
<td>URL</td>
<td><input type=text size=45 name=url Maxlenth=256 value="http://"></td>
</tr>
<tr>
<td>Description</td>
<td><input type=text size=45 name=description Maxlenth=256></td>
</tr>
</TABLE>
<input type=submit value=Submit>
</center>
</form>
<!--#include virtual="/Links/tail.txt" -->

head.txt
<html><head><title>Links Page</title>

</head>
<body bgcolor="#FFFFFF">
<center><BR>
<table BORDER=0 COLS=2 WIDTH="500"><tr><td ALIGN=CENTER BGCOLOR="#AAAAFF"
COLSPAN=2>
<font face="Times New Roman,Times" color="red" size=7><b><i>My Links
Page</i></b></font><br><font face="Times New Roman,Times" color="green" size=4><b><i>The
place to find the very new</i></b></font>
</td></tr>
<tr><td>
<HR>

tail.txt
<HR></TD></TR></TABLE>
<!-- Please do not remove next two lines -->
<table BORDER=0 WIDTH="500"><TR><TD ALIGN=RiGHT><FONT SIZE=1>This script
obtained from <A
HREF="http://www.submitside.com">Submitside.com</A>.</TD></TR></TABLE>
<!-- Thank you -->
</CENTER>
</BODY></HTML>

addurl.asp
<!--#include virtual="/Links/head.txt" -->
<%
aa=Request.Form("url")
bb=Request.Form ("title")
cc=Request.Form ("description")
newlink="<LI><A HREF=" & aa & ">" & bb & "</A><BR>" & cc
badhtml=0
if instr(aa,"<")>0 OR instr(bb,"<")>0 OR instr(cc,"<")>0 OR instr(aa,">")>0 OR instr(bb,">")>0 OR
instr(cc,">")>0 OR instr(aa,".")=0 then
badhtml=1
end if
if instr(aa,".")=0 OR aa="" OR bb="" OR cc="" OR len(aa)>256 OR len(bb)>100 OR len(cc)>256 OR
badhtml=1 then %>
<CENTER>Please go back and check your data<BR>Some data are incorrect</CENTER>
<% else %>
<%
dim thelink(50)
Wfile=Server.Mappath ("/") & "\Links\links.txt"
Set fs = CreateObject("Scripting.FileSystemObject")
Set thisfile = fs.OpenTextFile(Wfile)
registeredlink=0
for counter = 1 to 50

thelink (counter)=thisfile.readline
if instr (thelink (counter),aa)>0 then
registeredlink=1
end if
next
thisfile.Close
set thisfile=nothing
set fs=nothing
if registeredlink=0 then
Response.write ("<OL>")
Set fs = CreateObject("Scripting.FileSystemObject")
Set a = fs.CreateTextFile(Wfile,True)
for counter = 2 to 50
a.WriteLine(thelink (counter))
Response.write thelink (counter)
next
a.WriteLine(newlink)
a.Close
Response.write (newlink)
Response.write ("</OL><center><A HREF=/Links>Links Page</A></center>")
else
Response.write ("The link is already included in the list")
end if
%>
<% end if %>
<!--#include virtual="/Links/tail.txt" -->

links.txt (this file must contain 50 lines. In this case the first 49 lines are blank lines.
If there are less than 50 lines you will get an error when the script is running)

<LI><A HREF=http://www.submitside.com>Free promotion</A><BR>Free url submision to top


search engines. Webmaster: own your submission service.

Free Chat script (.asp)

Active server pages must be available in your server to use this script.
Create the following pages and save them to your server.
The system includes a form and a response file. Both may be customized.

Please do not remove the link to my site in "chatopinions.asp" file.

chat.html
<html>
<head><title>Chat</title></head>
<frameset rows="*,100">
<frame src="chatopinions.asp">
<frame src="chatform.asp">
</frameset>
</html>

chatopinions.asp
<html>
<head>
<META HTTP-EQUIV=refresh content="5;URL=chatopinions.asp"></head>
<body bgcolor=FFFFFF>
<center>
<table border=0 width=350>
<tr><td width=50>
<% =Application("A9") %></td><td width=300><% =Application("B9") %>
</td></tr><tr><td>
<% =Application("A8") %></td><td><% =Application("B8") %>
</td></tr><tr><td>
<% =Application("A7") %></td><td><% =Application("B7") %>
</td></tr><tr><td>
<% =Application("A6") %></td><td><% =Application("B6") %>
</td></tr><tr><td>
<% =Application("A5") %></td><td><% =Application("B5") %>
</td></tr><tr><td width=50>
<% =Application("A4") %></td><td><% =Application("B4") %>
</td></tr><tr><td>
<% =Application("A3") %></td><td><% =Application("B3") %>
</td></tr><tr><td>
<% =Application("A2") %></td><td><% =Application("B2") %>
</td></tr><tr><td>
<% =Application("A1") %></td><td><% =Application("B1") %>
</td></tr></table>
<table border=0 width=350>
<tr><td align=right>
Get your chat at <A HREF="http://www.asptutorial.info">Asptutorial.info</A>: free script.
</td></tr></table>
</center>
</body>
</html>

chatform.asp
<%
If Request.Form ("Opinion")="" then
ShowForm()
else

if Session("AA")="" then
NewUser()
GoAhead()
else
GoAhead()
end if
end if %>
<% Sub ShowForm() %>
<html><body bgcolor=FFFFFF>
<center>
<form method=post action=chatform.asp>
<table border=0><tr><td>
<% if Session("AA")="" then %>
Chose a name or nickname
<input type=text name=Name size=20><BR>
Type your opinion
<% else %>
<% =Session("AA") %>
<% end if %>
<input type=text size=60 name=Opinion value="<% =request.form("Opinion") %>"><BR>
<input type=submit value="Submit">
</td><tr></table>
</form>
</center>
</body>
</html>
<% End Sub %>
<% Sub GoAhead() %>
<%
BB=Request.form("Opinion")
BB=server.htmlencode(BB)
Application.Lock
Application("B1")=Application("B2")
Application("B2")=Application("B3")
Application("B3")=Application("B4")
Application("B4")=Application("B5")
Application("B5")=Application("B6")
Application("B6")=Application("B7")
Application("B7")=Application("B8")
Application("B8")=Application("B9")
Application("B9")=BB
Application("A1")=Application("A2")
Application("A2")=Application("A3")
Application("A3")=Application("A4")
Application("A4")=Application("A5")
Application("A5")=Application("A6")
Application("A6")=Application("A7")
Application("A7")=Application("A8")
Application("A8")=Application("A9")
Application("A9")=Session("AA")
Application.Unlock

%>
<html>
<head></head><body bgcolor=FFFFFF>
<center>
<form method=post action=chatform.asp>
<table border=0><tr><td>
<% =Session("AA") %> <input type=text size=60 name=Opinion>
<BR><input type=submit value="Submit">
</td></tr></table>
</form>
</center>
</body>
</html>
<% End Sub %>
<% Sub NewUser() %>
<%
AA=Request.form("Name")
AA=server.htmlencode(AA)
Session("AA")=AA
%>
<% End Sub %>

Free Active Servers Counter (.asp)

With this script we will be able to know and show in our pages the number of active
visitors in a given moment. The script has two parts: a file name global.asa (check
information on "global.asa" file in this tutorial), and a small code you must insert in
your pages to show the number of active users.
Just copy the code in the table to a text file and save it in the main directory of your
site ("/global.asa").
global.asa
<SCRIPT LANGUAGE="VBScript" RUNAT="Server">
Sub Application_OnStart
application("activevisitors")=0
End Sub
Sub Application_OnEnd
End Sub
Sub Session_OnStart
application.lock
application("activevisitors")=application("activevisitors")+1
application.unlock
End Sub
Sub Session_OnEnd
application.lock
application("activevisitors")=application("activevisitors")-1
application.unlock
End Sub
</SCRIPT>

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22

The first time a visitor gets to our pages, global.asa will be executed, and
consequently, application("activevisitors") in line 4 will get a value equal to "0".
Immediately (as a new session has started), in line 12, application("activevisitors")
will be increased by one. Each time a new visitor gets to our pages
application("activevisitors") will be increased by one, and identically, each time a
session is finished, this parameter will be reduce by one (line 18).
In case we want to show the number of visitors in our page, we must use this kind of
code :
index.asp
There are <% =application("activevisitors") %> active visitors.

Last visit

<script type="text/javascript">
/***********************************************
* Display time of last visit script- by JavaScriptKit.com
* This notice MUST stay intact for use
* Visit JavaScript Kit at http://www.javascriptkit.com/ for this script and more
***********************************************/
var lastvisit=new Object()
lastvisit.firstvisitmsg="This is your first visit to this page. Welcome!" //Change first visit message here
lastvisit.subsequentvisitmsg="Welcome back visitor! Your last visit was on <b>[displaydate]</b>" //Change subsequent visit
message here
lastvisit.getCookie=function(Name){ //get cookie value
var re=new RegExp(Name+"=[^;]+", "i"); //construct RE to search for target name/value pair
if (document.cookie.match(re)) //if cookie found
return document.cookie.match(re)[0].split("=")[1] //return its value
return ""
}
lastvisit.setCookie=function(name, value, days){ //set cookei value
var expireDate = new Date()
//set "expstring" to either future or past date, to set or delete cookie, respectively
var expstring=expireDate.setDate(expireDate.getDate()+parseInt(days))
document.cookie = name+"="+value+"; expires="+expireDate.toGMTString()+"; path=/";
}
lastvisit.showmessage=function(){
if (lastvisit.getCookie("visitcounter")==""){ //if first visit
lastvisit.setCookie("visitcounter", 2, 730) //set "visitcounter" to 2 and for 730 days (2 years)
document.write(lastvisit.firstvisitmsg)
}
else
document.write(lastvisit.subsequentvisitmsg.replace("\[displaydate\]", new Date().toLocaleString()))
}
lastvisit.showmessage()
</script>

Background music script


<script>

<!-/*
Background music script
By JavaScript Kit (http://javascriptkit.com)
Over 400+ free scripts here!
*/
//specify FULL path to midi
var musicsrc="http://www.yourdomain.com/allfor.mid"
if (navigator.appName=="Microsoft Internet Explorer")
document.write('<bgsound src='+'"'+musicsrc+'"'+' loop="infinite">')
else
document.write('<embed src=\"'+musicsrc+'\" hidden="true" border="0" width="20" height="20" autostart="true" loop="true">')
//-->
</script>

Jk popup image viewer


<script type="text/javascript">

// JK Pop up image viewer script- By JavaScriptKit.com


// Visit JavaScript Kit (http://javascriptkit.com)
// for free JavaScript tutorials and scripts
// This notice must stay intact for use
var popbackground="lightskyblue" //specify backcolor or background image for pop window
var windowtitle="Image Window" //pop window title
function detectexist(obj){
return (typeof obj !="undefined")
}
function jkpopimage(imgpath, popwidth, popheight, textdescription){
function getpos(){
leftpos=(detectexist(window.screenLeft))? screenLeft+document.body.clientWidth/2-popwidth/2 : detectexist(window.screenX)?
screenX+innerWidth/2-popwidth/2 : 0
toppos=(detectexist(window.screenTop))? screenTop+document.body.clientHeight/2-popheight/2 : detectexist(window.screenY)?
screenY+innerHeight/2-popheight/2 : 0
if (window.opera){
leftpos-=screenLeft
toppos-=screenTop
}
}
getpos()
var winattributes='width='+popwidth+',height='+popheight+',resizable=yes,left='+leftpos+',top='+toppos
var bodyattribute=(popbackground.indexOf(".")!=-1)? 'background="'+popbackground+'"' : 'bgcolor="'+popbackground+'"'
if (typeof jkpopwin=="undefined" || jkpopwin.closed)
jkpopwin=window.open("","",winattributes)
else{
//getpos() //uncomment these 2 lines if you wish subsequent popups to be centered too
//jkpopwin.moveTo(leftpos, toppos)
jkpopwin.resizeTo(popwidth, popheight+30)
}
jkpopwin.document.open()
jkpopwin.document.write('<html><title>'+windowtitle+'</title><body '+bodyattribute+'><img src="'+imgpath+'" style="marginbottom: 0.5em"><br>'+textdescription+'</body></html>')
jkpopwin.document.close()
jkpopwin.focus()
}
</script>
<a href="#" onClick="jkpopimage('food1.jpg', 325, 445, 'Breakfast is served.'); return false">
Breakfast pancakes</a>

Table of Contents
Select one of the links below to find the contents of that trail.
Getting Started
Writing Java Programs
Writing Applets
Creating a User Interface
Custom Networking and Security
To 1.1 -- And Beyond!
Writing Global Programs
Integrating Native Code and Java Programs
JavaBeans Tutorial
Java Security 1.1

Getting Started
o The "Hello World" Applet
The Anatomy of a Java Applet
Importing Classes and Packages
Defining an Applet Subclass
Implementing Applet Methods
Running an Applet
o The "Hello World" Application
The Anatomy of a Java Application
Comments in Java Code
Defining a Class
The main() Method
Using Classes and Objects
o Common Compiler and Interpreter Problems (and Their Solutions)
Writing Java Programs
o Object-Oriented Programming Concepts: A Primer
What Is an Object?
What Are Messages?
What Are Classes?
What Is Inheritance?
Where Can I Get More Information?
o The Nuts and Bolts of the Java Language
Run the Application
Variables and Data Types
Operators
Expressions
Control Flow Statements
Arrays and Strings
Other Features of the Character-Counting Application
The main() Method
Introducing Exceptions
The Standard Input and Output Streams
o Objects, Classes, and Interfaces

The Life Cycle of an Object


Creating Objects
Using Objects
Cleaning Up Unused Objects
Creating Classes
The Class Declaration
The Class Body
Declaring Member Variables
Implementing Methods
The Method Declaration
Passing Information into a Method
The Method Body
Controlling Access to Members of a Class
Instance and Class Members
Life Cycle Methods
Constructors
Writing a finalize Method
Subclasses, Superclasses, and Inheritance
Creating Subclasses
Overriding Methods
Writing Final Classes and Methods
Writing Abstract Classes and Methods
The Object Class
Creating and Using Interfaces
What Are Interfaces?
Defining an Interface
Implementing an Interface
Using an Interface as a Type
Creating and Using Packages
Roll Your Own Packages
Using the Classes and Interfaces from a Package
The Java Packages
The String and StringBuffer Classes
Why Two String Classes?
Creating Strings and StringBuffers
Accessor Methods
More Accessor Methods
Modifying StringBuffers
Converting Objects to Strings
Converting Strings to Numbers
Strings and the Java Compiler
Java Strings are First-Class Objects
Setting Program Attributes
Setting Up and Using Properties
Command Line Arguments
Conventions
Parsing Command Line Arguments
Using System Resources

Using the System Class


The Standard I/O Streams
System Properties
Forcing Finalization and Garbage Collection
Miscellaneous System Methods
Using System-Dependent Resources
Handling Errors Using Exceptions
What's an Exception and Why Do I Care?
Your First Encounter with Java Exceptions
Java's Catch or Specify Requirement
Dealing with Exceptions
The ListOfNumbers Example
Catching and Handling Exceptions
The try Block
The catch Block(s)
The finally Block
Putting It All Together
Specifying the Exceptions Thrown by a Method
How to Throw Exceptions
The throw Statement
The Throwable Class and Its Subclasses
Creating Your Own Exception Classes
Runtime Exceptions--The Controversy
Threads of Control
What Is a Thread?
A Simple Thread Example
Thread Attributes
Thread Body
The Clock Applet
Thread State
Thread Priority
Daemon Threads
Thread Group
The ThreadGroup Class
Multithreaded Programs
Synchronizing Threads
Monitors
Java Monitors Are Re-entrant
The notifyAll() and wait() Methods
Fairness, Starvation, and Deadlock
Deadlock and the Dining Philosophers
Summary
Input and Output Streams
Your First Encounter with I/O in Java
Overview of Input and Output Streams
Using Input and Output Streams
Using Streams to Implement Pipes
Using Streams to Read and Write Files

Using Streams to Read and Write Memory Locations


Using Streams to Concatenate Files
Working with Filtered Streams
Using DataInputStream and DataOutputStream
Writing Your Own Filtered Streams
Working with Random Access Files
Using Random Access Files
Writing Filters for Random Access Files
Writing Applets
o Overview of Applets
The Life Cycle of an Applet
Methods for Milestones
Methods for Drawing and Event Handling
Using UI Components
Threads in Applets
Examples
What Applets Can and Can't Do
Adding an Applet to an HTML Page
Summary
o Creating an Applet User Interface
Creating a GUI
Playing Sounds
Defining and Using Applet Parameters
Deciding Which Parameters to Support
Writing the Code to Support Parameters
Giving Information about Parameters
Reading System Properties
Displaying Short Status Strings
Displaying Diagnostics to the Standard Output
o Communicating with Other Programs
Sending Messages to Other Applets on the Same Page
Communicating with the Browser
Working with a Server-Side Application
A Simple Network Client Applet
Using a Server to Work Around Security Restrictions
o Understanding Applet Capabilities and Restrictions
Security Restrictions
Applet Capabilities
o Finishing an Applet
Before You Ship that Applet
The Perfectly Finished Applet
o Common Applet Problems (and Their Solutions)
Creating a User Interface
o Overview of the Java UI
AWT Components
Other AWT Classes
The Anatomy of a GUI-Based Program
Classes in the Example Program
The Component Hierarchy

Drawing
Event Handling
Using Components, the GUI Building Blocks
Using the AWT Components
General Rules for Using Components
How to Use Buttons
How to Use Canvases
How to Use Checkboxes
How to Use Choices
How to Use Dialogs
How to Use Frames
How to Use Labels
How to Use Lists
How to Use Menus
How to Use Panels
How to Use Scrollbars
How to Use TextAreas and TextFields
Details of the Component Architecture
Common Component Problems (and Their Solutions)
Laying Out Components within a Container
Using Layout Managers
General Rules for Using Layout Managers
How to Use BorderLayout
How to Use CardLayout
How to Use FlowLayout
How to Use GridLayout
How to Use GridBagLayout
Specifying Constraints
The Applet Example Explained
Creating a Custom Layout Manager
Doing Without a Layout Manager (Absolute Positioning)
Common Layout Problems (and Their Solutions)
Working with Graphics
Overview of AWT Graphics Support
Using Graphics Primitives
Drawing Simple Shapes
Working with Text
Using Images
Loading Images
Displaying Images
Manipulating Images
How to Use an Image Filter
How to Write an Image Filter
Performing Animation
Creating the Animation Loop
Animating Graphics
Eliminating Flashing
Overriding the update() Method

Double Buffering
Moving an Image Across the Screen
Displaying a Sequence of Images
Improving the Appearance and Performance of Image
Animation
Common Graphics Problems (and Their Solutions)
Custom Networking and Security
o Overview of Networking
Networking Basics
What You May Already Know About Networking in Java
o Working with URLs
What Is a URL?
Creating a URL
Parsing a URL
Reading Directly from a URL
Connecting to a URL
Reading from and Writing to a URLConnection
o All About Sockets
What Is a Socket?
Reading from and Writing to a Socket
Writing the Server Side of a Socket
o All About Datagrams
What Is a Datagram?
Writing a Datagram Client and Server
o Providing Your Own Security Manager
Introducing the Security Manager
Writing a Security Manager
Installing Your Security Manager
Deciding What SecurityManager Methods to Override
To 1.1 -- And Beyond!
o What's New in 1.1?
New Features in 1.1

Internationalization
Security and Signed Applets
AWT Enhancements
JavaBeans(tm)
JAR File Format
Networking Enhancements
I/O Enhancements
Math Package
Remote Method Invocation
Object Serialization
Reflection
Java Database Connectivity
Inner Classes
Java Native Interface
Performance Enhancements
Miscellaneous

How the 1.1 Release Affects Existing Trails


How the 1.1 Note Links Work

GUI Changes in 1.1 and Beyond


The New AWT Event Model
Introduction to the New AWT Event Model
Using Adapters and Inner Classes to Handle AWT Events
Handling Standard AWT Events
Events Generated by AWT Components
Writing an Action Listener
Writing an Adjustment Listener
Writing a Component Listener
Writing a Container Listener
Writing a Focus Listener
Writing an Item Listener
Writing a Key Listener
Writing a Mouse Listener
Writing a Mouse Motion Listener
Writing a Text Listener
Writing a Window Listener
Generating AWT Events
Summary of the AWT Event Model
Using the JFC "Swing" Release
[8/8: added "last updated" info]
Overview of the Swing Components
Getting Started with Swing
Running a Swing Applet
[8/8: Updated to reflect current shaky state. Improved
class path page a bit.]
Using Each Swing Component
General Rules for Using Swing Components
How to Use Bordered Panes
How to Use Buttons
How to Use Checkboxes
How to Use Labels
How to Use List Boxes
How to Use Menus
How to Use Panels
How to Use Popup Menus
How to Use Progress Bars
How to Use Radio Buttons
How to Use Scroll Bars
How to Use Scroll Panes
How to Use Separators
How to Use Sliders
How to Use Tabbed Panes
[8/8: Fixed this link]
How to Use Tables
How to Use Text

How to Use Tool Tips


How to Use Trees
Writing Lightweight Components Using the Swing Release
Writing Lightweight Components
Converting Programs to the 1.1 AWT API
Writing Global Programs
o Internationalization? Localization? Arg!
What is a Global Program?
Common Problems with Global Programs
The Global Features of the JDK
o Managing Data in Global Programs
Exploring AroundTheWorld
What Are Locales and How Do I Use Them?
Managing Locale-Sensitive Data
Loading Resource Bundles
Storing and Accessing Strings in Resource Bundles
Storing and Accessing Other Kinds of Objects in Resource
Bundles
Representing Dates and Times
How to Format Numbers, Dates and Times, and Messages
The Format Classes
How to Format Numbers
How to Format Dates and Times
How to Format Messages
o Internationalizing an Existing Program: Step by Step
Step 1: Identify the Locale-Sensitive Areas
Step 2: Isolate the Locale-Sensitive Data
Step 3: PENDING
o Collation and Text Boundaries
The Collation Demo
Collation Details
The Text Boundary Demo
Integrating Native Code and Java Programs
o Step By Step
Step 1: Write the Java Code
Step 2: Compile the Java Code
Step 3: Create the .h File
Step 4: Write the Native Method Implementation
Step 5: Create a Shared Library
Step 6: Run the Program
o Implementing Native Methods
Declaring Native Methods
Java Types in Native Methods
Accessing Java Strings in Native Methods
Working With Java Arrays in Native Methods
Calling Java Methods
Accessing Java Fields
Handling Java Errors from Native Methods
Local and Global References

Threads and Native Methods


Invoking the Java Virtual Machine
JNI Programming in C++
JavaBeans Tutorial
o Introducing Java Beans
Definition: What is a bean?
Reusable Software Components
Application Builder Tools
Basic Bean Concepts
Important Terms [PENDING]
o Java Beans Developer Toolkit
Java Beans API [PENDING]
Example programs [PENDING]
BeanBox [PENDING]
o Writing a Simple Bean
Creating a Bean
Adding Properties
Defining Events [PENDING]
Supporting Persistence [PENDING]
o Writing Advanced Beans
Bound Properties [PENDING]
Contstrained Properties [PENDING]
Customizing Beans [PENDING]
Using BeanInfo for Builder Tools [PENDING]

Packaging Beans for Distribution


Packaging a Bean [PENDING]
Building a Jar File [PENDING]
Accessing Jar File Resources [PENDING]
o Testing Your Beans
The BeanBox Application
Starting BeanBox
Purpose of BeanBox [PENDING]
Using Example Beans
Adding Your Bean to BeanBox [PENDING]
Modifying BeanBox Menus [PENDING]
o Java Beans Glossary
Terms and Definitions [PENDING]
Java Security 1.1
o Java Security API Overview
o Using the Security API to Generate and Verify a Signature
Step 1: Prepare Initial Program Structure
Step 2: Generate Public and Private Keys
Step 3: Sign the Data
Step 4: Verify the Signature
Step 5: Compile the Program
Step 6: Run the Program

Dancing stars cursor


<LAYER NAME="a0" LEFT=10 TOP=10 VISIBILITY=SHOW BGCOLOR="#FFFF00"
CLIP="0,0,3,3"></LAYER>
<LAYER NAME="a1" LEFT=10 TOP=10 VISIBILITY=SHOW BGCOLOR="#FFFF00"
CLIP="0,0,3,3"></LAYER>
<LAYER NAME="a2" LEFT=10 TOP=10 VISIBILITY=SHOW BGCOLOR="#FFFF00"
CLIP="0,0,3,3"></LAYER>
<LAYER NAME="a3" LEFT=10 TOP=10 VISIBILITY=SHOW BGCOLOR="#FFFF00"
CLIP="0,0,3,3"></LAYER>
<LAYER NAME="a4" LEFT=10 TOP=10 VISIBILITY=SHOW BGCOLOR="#FFFF00"
CLIP="0,0,3,3"></LAYER>
<LAYER NAME="a5" LEFT=10 TOP=10 VISIBILITY=SHOW BGCOLOR="#FFFF00"
CLIP="0,0,3,3"></LAYER>
<LAYER NAME="a6" LEFT=10 TOP=10 VISIBILITY=SHOW BGCOLOR="#FFFF00"
CLIP="0,0,3,3"></LAYER>
<script language="JavaScript">
<!-/*
Dancing Stars cursor (Submitted by Kurt at kurt.grigg@virgin.net)
Modified and permission granted to Dynamic Drive to feature script in archive
For full source, usage terms, and 100's more DHTML scripts, visit http://dynamicdrive.com
*/
if (document.all){
document.write('<div id="starsDiv" style="position:absolute;top:0px;left:0px">')
for (xy=0;xy<7;xy++)
document.write('<div
style="position:relative;width:3px;height:3px;background:#FFFF00;fontsize:2px;visibility:visible"></div>')
document.write('</div>')
}
if (document.layers)
{window.captureEvents(Event.MOUSEMOVE);}
var yBase = 200;

var xBase = 200;


var yAmpl = 10;
var yMax = 40;
var step = .2;
var ystep = .5;
var currStep = 0;
var tAmpl=1;
var Xpos = 1;
var Ypos = 1;
var i = 0;
var j = 0;
if (document.all)
{
function MoveHandler(){
Xpos = document.body.scrollLeft+event.x;
Ypos = document.body.scrollTop+event.y;
}
document.onmousemove = MoveHandler;
}
else if (document.layers)
{
function xMoveHandler(evnt){
Xpos = evnt.pageX;
Ypos = evnt.pageY;
}
window.onMouseMove = xMoveHandler;
}

function animateLogo() {
if (document.all)
{
yBase = window.document.body.offsetHeight/4;
xBase = window.document.body.offsetWidth/4;
}
else if (document.layers)
{
yBase = window.innerHeight/4 ;
xBase = window.innerWidth/4;
}
if (document.all)
{
var totaldivs=document.all.starsDiv.all.length
for ( i = 0 ; i < totaldivs ; i++ )
{
var tempdiv=document.all.starsDiv.all[i].style

tempdiv.top = Ypos + Math.cos((20*Math.sin(currStep/20))


+i*70)*yBase*(Math.sin(10+currStep/10)+0.2)*Math.cos((currStep + i*25)/10);
tempdiv.left = Xpos + Math.sin((20*Math.sin(currStep/20))
+i*70)*xBase*(Math.sin(10+currStep/10)+0.2)*Math.cos((currStep + i*25)/10);
}
}
else if (document.layers)
{
for ( j = 0 ; j < 7 ; j++ )
{
var templayer="a"+j
document.layers[templayer].top = Ypos + Math.cos((20*Math.sin(currStep/20))
+j*70)*yBase*(Math.sin(10+currStep/10)+0.2)*Math.cos((currStep + j*25)/10);
document.layers[templayer].left =Xpos + Math.sin((20*Math.sin(currStep/20))
+j*70)*xBase*(Math.sin(10+currStep/10)+0.2)*Math.cos((currStep + j*25)/10);
}
}
currStep += step;
setTimeout("animateLogo()", 15);
}
animateLogo();
// -->
</script>

Cursor trail text


<style>
.spanstyle {
position:absolute;
visibility:visible;
top:-50px;
font-size:10pt;
font-family:Verdana;
font-weight:bold;
color:black;
}
</style>
<script>
/*
Cursor Trailor Text- By Peter Gehrig (http://www.24fun.ch/)
Permission given to Dynamicdrive.com to feature script in it's archive.
For full source code, installation instructions, and 1000's more DHTML scripts,
visit http://dynamicdrive.com
*/
var x,y
var step=20
var flag=0
// Your snappy message. Important: the space at the end of the sentence!!!
var message="DYNAMIC DRIVE! "
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 makesnake() {
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("makesnake()",30)
}
</script>

Cursor trail 2
<SCRIPT language=JavaScript1.2>
<!-/*
Cursor Trailer II (By Kurt at kurt.grigg@virgin.net)
Modified and featured on Dynamicdrive.com
For full source, usage terms, and 100's more DHTML scripts, visit http://dynamicdrive.com
*/
var message='Dynamicdrive.com';
var messagecolor='#000000'
//Enter number of seconds for message to display (0=perpetual)
var dismissafter=0
///no need to edit below/////////
var amount=5,ypos=0,xpos=0,Ay=0,Ax=0,By=0,Bx=0,Cy=0,Cx=0,Dy=0,Dx=0,Ey=0,Ex=0;
if (document.layers){
for (i = 0; i < amount; i++)
{document.write('<layer name=ns'+i+' top=0 left=0><font face="Courier New" size=3
color='+messagecolor+'>'+message+'</font></layer>')}
window.captureEvents(Event.MOUSEMOVE);
function nsmouse(evnt){xpos = evnt.pageX;ypos = evnt.pageY;makefollow()}
}
else if (document.all){
document.write("<div id='outer' style='position:absolute;top:0px;left:0px'>");
document.write("<div id='inner' style='position:relative'>");
for (i = 0; i < amount; i++)
{document.write('<div id="text"'+i+' style="position:absolute;top:0px;left:0px;fontfamily:Courier New;font-size:16px;color:'+messagecolor+'">'+message+'</div>')}
document.write("</div>");
document.write("</div>");
function iemouse(){ypos = document.body.scrollTop + event.y;xpos =
document.body.scrollLeft + event.x;makefollow()}
}
function makefollow(){
if (document.layers){
document.layers["ns0"].top=ay;document.layers["ns0"].left=ax;
document.layers["ns1"].top=by;document.layers["ns1"].left=bx;
document.layers["ns2"].top=cy;document.layers["ns2"].left=cx;
document.layers["ns3"].top=Dy;document.layers["ns3"].left=Dx;

document.layers["ns4"].top=Ey;document.layers["ns4"].left=Ex;
}
else if (document.all){
outer.all.inner.all[0].style.pixelTop=ay;outer.all.inner.all[0].style.pixelLeft=ax;
outer.all.inner.all[1].style.pixelTop=by;outer.all.inner.all[1].style.pixelLeft=bx;
outer.all.inner.all[2].style.pixelTop=cy;outer.all.inner.all[2].style.pixelLeft=cx;
outer.all.inner.all[3].style.pixelTop=Dy;outer.all.inner.all[3].style.pixelLeft=Dx;
outer.all.inner.all[4].style.pixelTop=Ey;outer.all.inner.all[4].style.pixelLeft=Ex;
}
}
function move(){
if (dismissafter!=0)
setTimeout("hidetrail()",dismissafter*1000)
if (document.layers){window.onMouseMove = nsmouse}
else if (document.all){window.document.onmousemove = iemouse}
ey = Math.round(Ey+=((ypos+20)-Ey)*2/2);ex = Math.round(Ex+=((xpos+20)-Ex)*2/2);
dy = Math.round(Dy+=(ey - Dy)*2/4);dx = Math.round(Dx+=(ex - Dx)*2/4);
cy = Math.round(Cy+=(dy - Cy)*2/6);cx = Math.round(Cx+=(dx - Cx)*2/6);
by = Math.round(By+=(cy - By)*2/8);bx = Math.round(Bx+=(cx - Bx)*2/8);
ay = Math.round(Ay+= (by - Ay)*2/10);ax = Math.round(Ax+= (bx - Ax)*2/10);
makefollow();
jumpstart=setTimeout('move()',10);
}
function hidetrail(){
if (document.all){
for (i2=0;i2<amount;i2++){
outer.all.inner.all[i2].style.visibility="hidden"
clearTimeout(jumpstart)
}
}
else if (document.layers){
for (i2=0;i2<amount;i2++){
temp="ns"+i2
document.layers[temp].visibility="hide"
clearTimeout(jumpstart)
}
}
}
window.onload=move;
//-->
</SCRIPT>

Circling text trail


<SCRIPT LANGUAGE="JavaScript1.2">
<!--//
//Circling text trail- Tim Tilton
//Website: http://www.tempermedia.com/
//Visit http://www.dynamicdrive.com for this script and more
// your message here
var msg='Dynamic Drive!';
var font='Verdana,Arial';
var size=3; // up to seven
var color='#000000';
// This is not the rotation speed, its the reaction speed, keep low!
// Set this to 1 for just plain rotation w/out drag
var speed=.3;
// This is the rotation speed, set it negative if you want
// it to spin clockwise
var rotation=.2;
// Alter no variables past here!, unless you are good
//--------------------------------------------------var ns=(document.layers);
var ie=(document.all);
var msg=msg.split('');
var n=msg.length;
var a=size*15;
var currStep=0;
var ymouse=0;
var xmouse=0;
var scrll=0;
var props="<font face="+font+" size="+size+" color="+color+">";
if (ie)
window.pageYOffset=0
// writes the message

if (ns){
for (i=0; i < n; i++)
document.write('<layer name="nsmsg'+i+'" top=0 left=0 height='+a+'
width='+a+'><center>'+props+msg[i]+'</font></center></layer>');
}
if (ie){
document.write('<div id="outer"
style="position:absolute;top:0px;left:0px"><div style="position:relative">');
for (i=0; i < n; i++)
document.write('<div id="iemsg"
style="position:absolute;top:0px;left:0;height:'+a+';width:'+a+';text-align:center;fontweight:regular;cursor:default">'+props+msg[i]+'</font></div>');
document.write('</div></div>');
}
(ns)?window.captureEvents(Event.MOUSEMOVE):0;
function Mouse(evnt){
ymouse = (ns)?evnt.pageY+20-(window.pageYOffset):event.y; // y-position
xmouse = (ns)?evnt.pageX+20:event.x-20; // x-position
}
if (ns||ie)
(ns)?window.onMouseMove=Mouse:document.onmousemove=Mouse;
y=new Array();
x=new Array();
Y=new Array();
X=new Array();
for (i=0; i < n; i++){
y[i]=0;
x[i]=0;
Y[i]=0;
X[i]=0;
}
function makecircle(){ // rotation properties
if (ie) outer.style.top=document.body.scrollTop;
currStep-=rotation;
for (i=0; i < n; i++){ // makes the circle
var d=(ns)?document.layers['nsmsg'+i]:iemsg[i].style;
d.top=y[i]+a*Math.sin((currStep+i*1)/3.8)+window.pageYOffset-15;
d.left=x[i]+a*Math.cos((currStep+i*1)/3.8)*2; // remove *2 for just a plain
circle, not oval
}
}
function drag(){ // makes the resistance
scrll=(ns)?window.pageYOffset:0;
y[0]=Math.round(Y[0]+=((ymouse)-Y[0])*speed);
x[0]=Math.round(X[0]+=((xmouse)-X[0])*speed);
for (var i=1; i < n; i++){

y[i]=Math.round(Y[i]+=(y[i-1]-Y[i])*speed);
x[i]=Math.round(X[i]+=(x[i-1]-X[i])*speed);
}
makecircle();
// not rotation speed, leave at zero
setTimeout('drag()',10);
}
if (ns||ie)window.onload=drag;
// -->
</SCRIPT>

Magic wand coursor


<LAYER NAME="a0" LEFT=10 TOP=10 VISIBILITY=SHOW BGCOLOR="#ffffff"
CLIP="0,0,1,1"></LAYER>
<LAYER NAME="a1" LEFT=10 TOP=10 VISIBILITY=SHOW BGCOLOR="#fff000"
CLIP="0,0,1,1"></LAYER>
<LAYER NAME="a2" LEFT=10 TOP=10 VISIBILITY=SHOW BGCOLOR="#ffa000"
CLIP="0,0,1,1"></LAYER>
<LAYER NAME="a3" LEFT=10 TOP=10 VISIBILITY=SHOW BGCOLOR="#ff00ff"
CLIP="0,0,1,1"></LAYER>
<LAYER NAME="a4" LEFT=10 TOP=10 VISIBILITY=SHOW BGCOLOR="#00ff00"
CLIP="0,0,1,1"></LAYER>
<LAYER NAME="a5" LEFT=10 TOP=10 VISIBILITY=SHOW BGCOLOR="#FF00FF"
CLIP="0,0,1,1"></LAYER>
<LAYER NAME="a6" LEFT=10 TOP=10 VISIBILITY=SHOW BGCOLOR="#FF0000"
CLIP="0,0,1,1"></LAYER>
<LAYER NAME="a7" LEFT=10 TOP=10 VISIBILITY=SHOW BGCOLOR="#ffffff"
CLIP="0,0,2,2"></LAYER>
<LAYER NAME="a8" LEFT=10 TOP=10 VISIBILITY=SHOW BGCOLOR="#fff000"
CLIP="0,0,2,2"></LAYER>
<LAYER NAME="a9" LEFT=10 TOP=10 VISIBILITY=SHOW BGCOLOR="#ffa000"
CLIP="0,0,2,2"></LAYER>
<LAYER NAME="a10" LEFT=10 TOP=10 VISIBILITY=SHOW BGCOLOR="#ff00ff"
CLIP="0,0,2,2"></LAYER>
<LAYER NAME="a11" LEFT=10 TOP=10 VISIBILITY=SHOW BGCOLOR="#00ff00"
CLIP="0,0,2,2"></LAYER>
<LAYER NAME="a12" LEFT=10 TOP=10 VISIBILITY=SHOW BGCOLOR="#0000ff"
CLIP="0,0,2,2"></LAYER>
<LAYER NAME="a13" LEFT=10 TOP=10 VISIBILITY=SHOW BGCOLOR="#FF0000"
CLIP="0,0,3,3"></LAYER>
<script language="JavaScript">
/*
Magic Wand cursor (By Kurt at kurt.grigg@virgin.net)
Modified and permission granted to Dynamic Drive to feature script in archive
For full source, usage terms, and 100's more DHTML scripts, visit http://dynamicdrive.com
*/
if (document.all){
with (document){

write('<div id="starsDiv" style="position:absolute;top:0px;left:0px">')


write('<div style="position:relative;width:1px;height:1px;background:#ffffff;fontsize:1px;visibility:visible"></div>')
write('<div style="position:relative;width:1px;height:1px;background:#fff000;fontsize:1px;visibility:visible"></div>')
write('<div style="position:relative;width:1px;height:1px;background:#ffa000;fontsize:1px;visibility:visible"></div>')
write('<div style="position:relative;width:1px;height:1px;background:#ff00ff;fontsize:1px;visibility:visible"></div>')
write('<div style="position:relative;width:1px;height:1px;background:#00ff00;fontsize:1px;visibility:visible"></div>')
write('<div style="position:relative;width:1px;height:1px;background:#0000ff;fontsize:1px;visibility:visible"></div>')
write('<div style="position:relative;width:1px;height:1px;background:#FF0000;fontsize:1px;visibility:visible"></div>')
write('<div style="position:relative;width:2px;height:2px;background:#ffffff;fontsize:2px;visibility:visible"></div>')
write('<div style="position:relative;width:2px;height:2px;background:#fff000;fontsize:2px;visibility:visible"></div>')
write('<div style="position:relative;width:2px;height:2px;background:#ffa000;fontsize:2px;visibility:visible"></div>')
write('<div style="position:relative;width:2px;height:2px;background:#ff00ff;fontsize:2px;visibility:visible"></div>')
write('<div style="position:relative;width:2px;height:2px;background:#00ff00;fontsize:2px;visibility:visible"></div>')
write('<div style="position:relative;width:2px;height:2px;background:#0000ff;fontsize:2px;visibility:visible"></div>')
write('<div style="position:relative;width:3px;height:3px;background:#FF0000;fontsize:3px;visibility:visible"></div>')
write('</div>')
}
}
var Clrs=new Array(6)
Clrs[0]='ff0000';
Clrs[1]='00ff00';
Clrs[2]='000aff';
Clrs[3]='ff00ff';
Clrs[4]='fff000';
Clrs[5]='fffff0';

if (document.layers)
{window.captureEvents(Event.MOUSEMOVE);}
var yBase = 200;
var xBase = 200;
var step;
var currStep = 0;

var Xpos = 1;
var Ypos = 1;
if (document.all)
{
function MoveHandler(){
Xpos = document.body.scrollLeft+event.x;
Ypos = document.body.scrollTop+event.y;
}
document.onmousemove = MoveHandler;
}
else if (document.layers)
{
function xMoveHandler(evnt){
Xpos = evnt.pageX;
Ypos = evnt.pageY;
}
window.onMouseMove = xMoveHandler;
}
function animateLogo() {
if (document.all)
{
yBase = window.document.body.offsetHeight/4;
xBase = window.document.body.offsetWidth/4;
}
else if (document.layers)
{
yBase = window.innerHeight/4;
xBase = window.innerWidth/4;
}
if (document.all)
{
for ( i = 0 ; i < starsDiv.all.length ; i++ )
{step=3;
starsDiv.all[i].style.top = Ypos + yBase*Math.cos((currStep +
i*4)/12)*Math.cos(0.7+currStep/200);
starsDiv.all[i].style.left = Xpos + xBase*Math.sin((currStep +
i*3)/10)*Math.sin(8.2+currStep/400);
for (ai=0; ai < Clrs.length; ai++)
{
var c=Math.round(Math.random()*[ai]);
}
starsDiv.all[i].style.background=Clrs[c];
}
}
else if (document.layers)

{
for ( j = 0 ; j < 14 ; j++ ) //number of NS layers!
{step = 4;
var templayer="a"+j
document.layers[templayer].top = Ypos + yBase*Math.sin((currStep +
j*4)/12)*Math.cos(0.7+currStep/200);
document.layers[templayer].left = Xpos + xBase*Math.sin((currStep +
j*3)/10)*Math.sin(8.2+currStep/400);
for (aj=0; aj < Clrs.length; aj++)
{
var c=Math.round(Math.random()*[aj]);
}
document.layers[templayer].bgColor=Clrs[c];
}
}
currStep+= step;
setTimeout("animateLogo()", 10);
}
animateLogo();
// -->
</script>

Magic wand cursor 2


<LAYER NAME="a0" LEFT=10 TOP=10 VISIBILITY=SHOW BGCOLOR="#ffffff"
CLIP="0,0,1,1"></LAYER>
<LAYER NAME="a1" LEFT=10 TOP=10 VISIBILITY=SHOW BGCOLOR="#fff000"
CLIP="0,0,1,1"></LAYER>
<LAYER NAME="a2" LEFT=10 TOP=10 VISIBILITY=SHOW BGCOLOR="#ffa000"
CLIP="0,0,1,1"></LAYER>
<LAYER NAME="a3" LEFT=10 TOP=10 VISIBILITY=SHOW BGCOLOR="#ff00ff"
CLIP="0,0,1,1"></LAYER>
<LAYER NAME="a4" LEFT=10 TOP=10 VISIBILITY=SHOW BGCOLOR="#00ff00"
CLIP="0,0,1,1"></LAYER>
<LAYER NAME="a5" LEFT=10 TOP=10 VISIBILITY=SHOW BGCOLOR="#FF00FF"
CLIP="0,0,1,1"></LAYER>
<LAYER NAME="a6" LEFT=10 TOP=10 VISIBILITY=SHOW BGCOLOR="#FF0000"
CLIP="0,0,1,1"></LAYER>
<LAYER NAME="a7" LEFT=10 TOP=10 VISIBILITY=SHOW BGCOLOR="#ffffff"
CLIP="0,0,2,2"></LAYER>
<LAYER NAME="a8" LEFT=10 TOP=10 VISIBILITY=SHOW BGCOLOR="#fff000"
CLIP="0,0,2,2"></LAYER>
<LAYER NAME="a9" LEFT=10 TOP=10 VISIBILITY=SHOW BGCOLOR="#ffa000"
CLIP="0,0,2,2"></LAYER>
<LAYER NAME="a10" LEFT=10 TOP=10 VISIBILITY=SHOW BGCOLOR="#ff00ff"
CLIP="0,0,2,2"></LAYER>
<LAYER NAME="a11" LEFT=10 TOP=10 VISIBILITY=SHOW BGCOLOR="#00ff00"
CLIP="0,0,2,2"></LAYER>
<LAYER NAME="a12" LEFT=10 TOP=10 VISIBILITY=SHOW BGCOLOR="#0000ff"
CLIP="0,0,2,2"></LAYER>
<LAYER NAME="a13" LEFT=10 TOP=10 VISIBILITY=SHOW BGCOLOR="#FF0000"
CLIP="0,0,2,2"></LAYER>
<script language="JavaScript">
/*
Magic Wand cursor II (By Kurt at kurt.grigg@virgin.net)
Modified and permission granted to Dynamic Drive to feature script in archive
For full source, usage terms, and 100's more DHTML scripts, visit http://dynamicdrive.com
*/
if (document.all){
with (document){
write('<div id="starsDiv" style="position:absolute;top:0px;left:0px">')
write('<div style="position:relative;width:1px;height:1px;background:#ffffff;fontsize:1px;visibility:visible"></div>')

write('<div style="position:relative;width:1px;height:1px;background:#fff000;fontsize:1px;visibility:visible"></div>')
write('<div style="position:relative;width:1px;height:1px;background:#ffa000;fontsize:1px;visibility:visible"></div>')
write('<div style="position:relative;width:1px;height:1px;background:#ff00ff;fontsize:1px;visibility:visible"></div>')
write('<div style="position:relative;width:1px;height:1px;background:#00ff00;fontsize:1px;visibility:visible"></div>')
write('<div style="position:relative;width:1px;height:1px;background:#0000ff;fontsize:1px;visibility:visible"></div>')
write('<div style="position:relative;width:1px;height:1px;background:#FF0000;fontsize:1px;visibility:visible"></div>')
write('<div style="position:relative;width:2px;height:2px;background:#ffffff;fontsize:2px;visibility:visible"></div>')
write('<div style="position:relative;width:2px;height:2px;background:#fff000;fontsize:2px;visibility:visible"></div>')
write('<div style="position:relative;width:2px;height:2px;background:#ffa000;fontsize:2px;visibility:visible"></div>')
write('<div style="position:relative;width:2px;height:2px;background:#ff00ff;fontsize:2px;visibility:visible"></div>')
write('<div style="position:relative;width:2px;height:2px;background:#00ff00;fontsize:2px;visibility:visible"></div>')
write('<div style="position:relative;width:2px;height:2px;background:#0000ff;fontsize:2px;visibility:visible"></div>')
write('<div style="position:relative;width:3px;height:3px;background:#FF0000;fontsize:3px;visibility:visible"></div>')
write('</div>')
}
}
if (document.layers)
{window.captureEvents(Event.MOUSEMOVE);}
var yBase = 200;
var xBase = 200;
var step = 1;
var currStep = 0;
var Xpos = 1;
var Ypos = 1;
if (document.all)
{
function MoveHandler(){
Xpos = document.body.scrollLeft+event.x;
Ypos = document.body.scrollTop+event.y;
}
document.onmousemove = MoveHandler;
}
else if (document.layers)
{

function xMoveHandler(evnt){
Xpos = evnt.pageX;
Ypos = evnt.pageY;
}
window.onMouseMove = xMoveHandler;
}
function animateLogo() {
if (document.all)
{
yBase = window.document.body.offsetHeight/6;
xBase = window.document.body.offsetWidth/6;
}
else if (document.layers)
{
yBase = window.innerHeight/8;
xBase = window.innerWidth/8;
}
if (document.all)
{
for ( i = 0 ; i < starsDiv.all.length ; i++ )
{
starsDiv.all[i].style.top = Ypos + yBase*Math.sin((currStep +
i*4)/12)*Math.cos(400+currStep/200);
starsDiv.all[i].style.left = Xpos + xBase*Math.sin((currStep +
i*3)/10)*Math.sin(currStep/200);
}
}
else if (document.layers)
{
for ( j = 0 ; j < 14 ; j++ ) //number of NS layers!
{
var templayer="a"+j
document.layers[templayer].top = Ypos + yBase*Math.sin((currStep +
j*4)/12)*Math.cos(400+currStep/200);
document.layers[templayer].left = Xpos + xBase*Math.sin((currStep +
j*3)/10)*Math.sin(currStep/200);
}
}
currStep+= step;
setTimeout("animateLogo()", 10);
}
animateLogo();
</script>

Kissing trail
<style type="text/css">
<!-h1 {
color:#cc3333;
font-family:"Comic Sans MS",Helvetica;
}
h3 {
color:#993333;
font-family:"Comic Sans MS",Helvetica;
}
.kisser {
position:absolute;
top:0;
left:0;
visibility:hidden;
}
-->
</style>
<script language="JavaScript1.2" type="text/JavaScript">
<!-- cloak
//Kissing trail- By dij8 (dij8@dij8.com)
//Modified by Dynamic Drive for bug fixes
//Visit http://www.dynamicdrive.com for this script
kisserCount = 15 //maximum number of images on screen at one time
curKisser = 0 //the last image DIV to be displayed (used for timer)
kissDelay = 1000 //duration images stay on screen (in milliseconds)
kissSpacer = 50 //distance to move mouse b4 next heart appears
theimage = "lips_small.gif" //the 1st image to be displayed
theimage2 = "small_heart.gif" //the 2nd image to be displayed
//Browser checking and syntax variables
var docLayers = (document.layers) ? true:false;
var docId = (document.getElementById) ? true:false;
var docAll = (document.all) ? true:false;
var docbitK = (docLayers) ? "document.layers['":(docId) ? "document.getElementById('":
(docAll) ? "document.all['":"document."
var docbitendK = (docLayers) ? "']":(docId) ? "')":(docAll) ? "']":""

var stylebitK = (docLayers) ? "":".style"


var showbitK = (docLayers) ? "show":"visible"
var hidebitK = (docLayers) ? "hide":"hidden"
var ns6=document.getElementById&&!document.all
//Variables used in script
var posX, posY, lastX, lastY, kisserCount, curKisser, kissDelay, kissSpacer, theimage
lastX = 0
lastY = 0
//Collection of functions to get mouse position and place the images
function doKisser(e) {
posX = getMouseXPos(e)
posY = getMouseYPos(e)
if (posX>(lastX+kissSpacer)||posX<(lastX-kissSpacer)||posY>(lastY+kissSpacer)||
posY<(lastY-kissSpacer)) {
showKisser(posX,posY)
lastX = posX
lastY = posY
}
}
// Get the horizontal position of the mouse
function getMouseXPos(e) {
if (document.layers||ns6) {
return parseInt(e.pageX+10)
} else {
return (parseInt(event.clientX+10) + parseInt(document.body.scrollLeft))
}
}
// Get the vartical position of the mouse
function getMouseYPos(e) {
if (document.layers||ns6) {
return parseInt(e.pageY)
} else {
return (parseInt(event.clientY) + parseInt(document.body.scrollTop))
}
}
//Place the image and start timer so that it disappears after a period of time
function showKisser(x,y) {
var processedx=ns6? Math.min(x,window.innerWidth-75) : docAll?
Math.min(x,document.body.clientWidth-55) : x
if (curKisser >= kisserCount) {curKisser = 0}
eval(docbitK + "kisser" + curKisser + docbitendK + stylebitK + ".left = " + processedx)
eval(docbitK + "kisser" + curKisser + docbitendK + stylebitK + ".top = " + y)
eval(docbitK + "kisser" + curKisser + docbitendK + stylebitK + ".visibility = '" + showbitK
+ "'")
if (eval("typeof(kissDelay" + curKisser + ")")=="number") {
eval("clearTimeout(kissDelay" + curKisser + ")")
}
eval("kissDelay" + curKisser + " = setTimeout('hideKisser(" + curKisser + ")',kissDelay)")
curKisser += 1

}
//Make the image disappear
function hideKisser(knum) {
eval(docbitK + "kisser" + knum + docbitendK + stylebitK + ".visibility = '" + hidebitK + "'")
}
function kissbegin(){
//Let the browser know when the mouse moves
if (docLayers) {
document.captureEvents(Event.MOUSEMOVE)
document.onMouseMove = doKisser
} else {
document.onmousemove = doKisser
}
}
window.onload=kissbegin
// decloak -->
</script>

Elastic band trail


<STYLE>
v\:* {
BEHAVIOR: url(#default#VML)
}
</STYLE>
<SCRIPT language="JavaScript1.2">
//Elastic band trail
//By Elastic_Ouille_script@GHindoute.net
//Thanks to MP1515 <MP1515@aramette.net> for all Mathematical model
//TOS for script: http://www.dynamicdrive.com/dynamicindex13/tos.txt
//For this script and more, visit http://www.dynamicdrive.com
var stringcolor="black" //SPECIFY STRING COLOR
var ballsrc="http://www.mydomain.com/superball.gif" //SPECIFY URL TO BALL IMAGE
///No editing required below this line//////////////////////////
if (document.all&&window.print){
document.write('<IMG id=Om style="LEFT: -10px; POSITION: absolute"
src="'+ballsrc+'">')
ddx=0;ddy=0;PX=0;PY=0;xm=0;ym=0
OmW=Om.width/2;OmH=Om.height/2
}
function Ouille(){
x=Math.round(PX+=(ddx+=((xm-PX-ddx)*3)/100))
y=Math.round(PY+=(ddy+=((ym-PY-ddy)*3-300)/100))
Om.style.left=x-OmW
Om.style.top=y-OmH
elastoc.to=x+","+y
//elastoc.strokecolor="RGB("+x+","+(2*y)+",0)"
elastoc.strokecolor=stringcolor
setTimeout("Ouille()",1)
}
function momouse(){
xm=window.event.x+5
ym=window.event.y+document.body.scrollTop+15
elastoc.from=xm+","+ym
}
if(document.all&&window.print){

code="<v:line id=elastoc style='LEFT:0;POSITION:absolute;TOP:0'


strokeweight='1.5pt'></v:line>"} else {
code="<v:group style='LEFT:-10;WIDTH:100pt;POSITION:absolute;TOP:0;HEIGHT:100pt'
coordsize='21600,21600'><v:line id=elastoc
style='LEFT:0;WIDTH:100pt;POSITION:absolute;TOP:0;HEIGHT:100pt'
strokeweight='1.5pt'></v:line></v:group>"}
if(document.all&&window.print){
document.body.insertAdjacentHTML("afterBegin",code)
document.onmousemove=momouse
Ouille()
}
</SCRIPT>

Bookmark site script


script type="text/javascript">
/***********************************************
* Bookmark site script- Dynamic Drive DHTML code library (www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit Dynamic Drive at http://www.dynamicdrive.com/ for full source code
***********************************************/
/* Modified to support Opera */
function bookmarksite(title,url){
if (window.sidebar) // firefox
window.sidebar.addPanel(title, url, "");
else if(window.opera && window.print){ // opera
var elem = document.createElement('a');
elem.setAttribute('href',url);
elem.setAttribute('title',title);
elem.setAttribute('rel','sidebar');
elem.click();
}
else if(document.all)// ie
window.external.AddFavorite(url, title);
}
</script>

Tremblin message
<style>
.jc{
position:relative;
}
</style>
<script language="JavaScript1.2">
//Trembling message script- Dynamic Drive (www.dynamicdrive.com)
//For full source code, 100's more DHTML scripts, and TOS,
//visit http://www.dynamicdrive.com
var ns6=document.getElementById&&!document.all
var ie=document.all
var customcollect=new Array()
var i=0
function jiggleit(num){
if ((!document.all&&!document.getElementById)) return;
customcollect[num].style.left=(parseInt(customcollect[num].style.left)==-1)?
customcollect[num].style.left=1 : customcollect[num].style.left=-1
}
function init(){
if (ie){
while (eval("document.all.jiggle"+i)!=null){
customcollect[i]= eval("document.all.jiggle"+i)
i++
}
}
else if (ns6){
while (document.getElementById("jiggle"+i)!=null){
customcollect[i]= document.getElementById("jiggle"+i)
i++
}
}
if (customcollect.length==1)
setInterval("jiggleit(0)",80)
else if (customcollect.length>1)
for (y=0;y<customcollect.length;y++){
var tempvariable='setInterval("jiggleit('+y+')",'+'100)'
eval(tempvariable)

}
}
window.onload=init
</script>

Wave text

<Style type = "text/css">


.big { color: blue;
font-family: monotype corsiva;
font-size: 38pt;
font-weight: bold}
</style>
<script language = "JavaScript">
//Wave Text! by Spookdog (spookydog3@hotmail.com)
//Submitted to DynamicDrive.com
//For this script and more, visit http://www.dynamicdrive.com
<!--you can use this on your web page as long as the above stays in the script-->
var TimerID;
var updown = true;
var str = 1;
function start()
{
if (document.all)
TimerID = window.setInterval( "wave()", 100 );
}
function wave()
{
if ( str > 20 || str < 1 )
updown = !updown;
if ( updown )
str++;
else
str--;
wft.filters( "wave" ).phase = str * 20;
wft.filters( "wave" ).strength = str;

}
window.onload=start
</Script>
<div ID = "wft" Style = "width:600px; filter:wave(add=0, freq=4, light=0, phase=0,
strength=5)" class = "big">
Cenovnik Agencije 027</div>

Rainbow text
<STYLE>
<!-Rainbow Text- By Chris Rickard (chris.rickard@paccoast.com)
Submitted to Dynamicdrive.com
For this script, visit http://www.dynamicdrive.com
-->
.rainbow{ behavior:url(rainbow.htc) }
</STYLE>

Matrix text
<style type="text/css">
.matrix { font-family:Lucida Console, Courier, Monotype; font-size:10pt; text-align:center;
width:10px; padding:0px; margin:0px;}
</style>
<script type="text/javascript" language="JavaScript">
<!-var rows=11; // must be an odd number
var speed=50; // lower is faster
var reveal=2; // between 0 and 2 only. The higher, the faster the word appears
var effectalign="default" //enter "center" to center it.
/***********************************************
* The Matrix Text Effect- by Richard Womersley (http://www.mf2fm.co.uk/rv)
* This notice must stay intact for use
* Visit http://www.dynamicdrive.com/ for full source code
***********************************************/
var w3c=document.getElementById && !window.opera;;
var ie45=document.all && !window.opera;
var ma_tab, matemp, ma_bod, ma_row, x, y, columns, ma_txt, ma_cho;
var m_coch=new Array();
var m_copo=new Array();
window.onload=function() {
if (!w3c && !ie45) return
var matrix=(w3c)?document.getElementById("matrix"):document.all["matrix"];
ma_txt=(w3c)?matrix.firstChild.nodeValue:matrix.innerHTML;
ma_txt=" "+ma_txt+" ";
columns=ma_txt.length;
if (w3c) {
while (matrix.childNodes.length) matrix.removeChild(matrix.childNodes[0]);
ma_tab=document.createElement("table");
ma_tab.setAttribute("border", 0);
ma_tab.setAttribute("align", effectalign);
ma_tab.style.backgroundColor="#000000";
ma_bod=document.createElement("tbody");
for (x=0; x<rows; x++) {
ma_row=document.createElement("tr");
for (y=0; y<columns; y++) {
matemp=document.createElement("td");
matemp.setAttribute("id", "Mx"+x+"y"+y);
matemp.className="matrix";
matemp.appendChild(document.createTextNode(String.fromCharCode(160)));

ma_row.appendChild(matemp);
}
ma_bod.appendChild(ma_row);
}
ma_tab.appendChild(ma_bod);
matrix.appendChild(ma_tab);
} else {
ma_tab='<ta'+'ble align="'+effectalign+'" border="0" style="background-color:#000000">';
for (var x=0; x<rows; x++) {
ma_tab+='<t'+'r>';
for (var y=0; y<columns; y++) {
ma_tab+='<t'+'d class="matrix" id="Mx'+x+'y'+y+'">&nbsp;</'+'td>';
}
ma_tab+='</'+'tr>';
}
ma_tab+='</'+'table>';
matrix.innerHTML=ma_tab;
}
ma_cho=ma_txt;
for (x=0; x<columns; x++) {
ma_cho+=String.fromCharCode(32+Math.floor(Math.random()*94));
m_copo[x]=0;
}
ma_bod=setInterval("mytricks()", speed);
}
function mytricks() {
x=0;
for (y=0; y<columns; y++) {
x=x+(m_copo[y]==100);
ma_row=m_copo[y]%100;
if (ma_row && m_copo[y]<100) {
if (ma_row<rows+1) {
if (w3c) {
matemp=document.getElementById("Mx"+(ma_row-1)+"y"+y);
matemp.firstChild.nodeValue=m_coch[y];
}
else {
matemp=document.all["Mx"+(ma_row-1)+"y"+y];
matemp.innerHTML=m_coch[y];
}
matemp.style.color="#33ff66";
matemp.style.fontWeight="bold";
}
if (ma_row>1 && ma_row<rows+2) {
matemp=(w3c)?document.getElementById("Mx"+(ma_row2)+"y"+y):document.all["Mx"+(ma_row-2)+"y"+y];
matemp.style.fontWeight="normal";
matemp.style.color="#00ff00";
}

if (ma_row>2) {
matemp=(w3c)?document.getElementById("Mx"+(ma_row3)+"y"+y):document.all["Mx"+(ma_row-3)+"y"+y];
matemp.style.color="#009900";
}
if (ma_row<Math.floor(rows/2)+1) m_copo[y]++;
else if (ma_row==Math.floor(rows/2)+1 && m_coch[y]==ma_txt.charAt(y)) zoomer(y);
else if (ma_row<rows+2) m_copo[y]++;
else if (m_copo[y]<100) m_copo[y]=0;
}
else if (Math.random()>0.9 && m_copo[y]<100) {
m_coch[y]=ma_cho.charAt(Math.floor(Math.random()*ma_cho.length));
m_copo[y]++;
}
}
if (x==columns) clearInterval(ma_bod);
}
function zoomer(ycol) {
var mtmp, mtem, ytmp;
if (m_copo[ycol]==Math.floor(rows/2)+1) {
for (ytmp=0; ytmp<rows; ytmp++) {
if (w3c) {
mtmp=document.getElementById("Mx"+ytmp+"y"+ycol);
mtmp.firstChild.nodeValue=m_coch[ycol];
}
else {
mtmp=document.all["Mx"+ytmp+"y"+ycol];
mtmp.innerHTML=m_coch[ycol];
}
mtmp.style.color="#33ff66";
mtmp.style.fontWeight="bold";
}
if (Math.random()<reveal) {
mtmp=ma_cho.indexOf(ma_txt.charAt(ycol));
ma_cho=ma_cho.substring(0, mtmp)+ma_cho.substring(mtmp+1, ma_cho.length);
}
if (Math.random()<reveal-1) ma_cho=ma_cho.substring(0, ma_cho.length-1);
m_copo[ycol]+=199;
setTimeout("zoomer("+ycol+")", speed);
}
else if (m_copo[ycol]>200) {
if (w3c) {
mtmp=document.getElementById("Mx"+(m_copo[ycol]-201)+"y"+ycol);
mtem=document.getElementById("Mx"+(200+rows-m_copo[ycol]--)+"y"+ycol);
}
else {
mtmp=document.all["Mx"+(m_copo[ycol]-201)+"y"+ycol];
mtem=document.all["Mx"+(200+rows-m_copo[ycol]--)+"y"+ycol];
}

mtmp.style.fontWeight="normal";
mtem.style.fontWeight="normal";
setTimeout("zoomer("+ycol+")", speed);
}
else if (m_copo[ycol]==200) m_copo[ycol]=100+Math.floor(rows/2);
if (m_copo[ycol]>100 && m_copo[ycol]<200) {
if (w3c) {
mtmp=document.getElementById("Mx"+(m_copo[ycol]-101)+"y"+ycol);
mtmp.firstChild.nodeValue=String.fromCharCode(160);
mtem=document.getElementById("Mx"+(100+rows-m_copo[ycol]--)+"y"+ycol);
mtem.firstChild.nodeValue=String.fromCharCode(160);
}
else {
mtmp=document.all["Mx"+(m_copo[ycol]-101)+"y"+ycol];
mtmp.innerHTML=String.fromCharCode(160);
mtem=document.all["Mx"+(100+rows-m_copo[ycol]--)+"y"+ycol];
mtem.innerHTML=String.fromCharCode(160);
}
setTimeout("zoomer("+ycol+")", speed);
}
}
// -->
</script>

3d spinning message
<xml:namespace ns="urn:schemas-microsoft-com:vml" prefix="v"/>
<style type="text/css">
v\:* { behavior: url(#default#VML); }
</style>
<script type="text/javascript">
/***********************************************
* 3D Spinning Message Script- By Copyright (c) 2003 Peter Gehrig
* Website: http://www.24fun.com
* Script available at/modified by Dynamic Drive (http://www.dynamicdrive.com)
* This notice must stay intact for use
***********************************************/
// Add as many messages as you like
var message=new Array("Dynamic Drive", "#1 DHTML site online", "Visit us for free
scripts", "Enjoy")
// Set the outline-color. Add as many colors as you like
var outlinecolor=new Array("black", "black")
// Set fillcolors 1. Add as many colors as you like
var fillcolor1=new Array("gray", "green", "white", "green")
// Set fillcolors 2. Add as many colors as you like
var fillcolor2=new Array("blue", "olive", "black", "lime")
// Set the letter marking the circle
var circlemark=new Array("-")
// Set the width of the outline
var strkweight=2
// Set the waiting time between the messages (seconds)
var pause=2
// Set the strength of the opacity (transparency of letters)
var strengthopacity="60%"
// Set the size of the circle (values range from 0.1 to 1)
var circlesize=0.5
// Always keep messages in view even if page is scrolled? (DD added option)

var keepinview="yes"
// Do not edit below this line
mytruebody=(!window.opera && document.compatMode && document.compatMode!
="BackCompat")? document.documentElement : document.body //Dynamicdrive added
object
var outerwidth=mytruebody.clientWidth
var outerheight=mytruebody.clientHeight
var innerwidth=Math.floor(circlesize*outerwidth)
var innerheight=Math.floor(circlesize*outerheight)
var posleft=(outerwidth-innerwidth)/2
var postop=(outerheight-innerheight)/2
var path=new Array()
var i_message=0
var i_outlinecolor=0
var i_fillcolor1=0
var i_fillcolor2=0
var i_messagelength=0
var longestmessage=0
pause*=1000
var ie=document.getElementById&&document.all?1:0
for (i=0;i<=message.length-1;i++) {
if (message[i].length>longestmessage) {
longestmessage=message[i].length
}
longestmessage+=4
}
for (i=0;i<=message.length-1;i++) {
var emptyspace=""
var i_emptyspace=(longestmessage-message[i].length)/2
for (ii=0;ii<=i_emptyspace;ii++) {
emptyspace+=circlemark
}
message[i]=emptyspace+" "+message[i]+" "+emptyspace
}
function changeform() {
if (keepinview=="yes") //DD added
document.getElementById("roofid").style.top=mytruebody.scrollTop //DD added
if (i_outlinecolor >= outlinecolor.length) {i_outlinecolor=0}
if (i_fillcolor1 >= fillcolor1.length) {i_fillcolor1=0}

if (i_fillcolor2 >= fillcolor2.length) {i_fillcolor2=0}


document.getElementById('strokeid').color=outlinecolor[i_outlinecolor]
document.getElementById('fillid').color=fillcolor1[i_fillcolor1]
document.getElementById('fillid').color2=fillcolor2[i_fillcolor2]
if (i_message < message.length) {tick()}
else {document.getElementById('textpathid').string=""
document.getElementById("roofid").style.display="none" //DD added
}
}
function tick() {
if (i_messagelength <= message[i_message].length) {
var messagestringend=""
var messagestring=message[i_message].substring(0, i_messagelength)
+messagestringend
document.getElementById('textpathid').string=messagestring
var timer=setTimeout("tick()",50)
i_messagelength++
}
else {
clearTimeout(timer)
i_messagelength=0
i_message++
i_outlinecolor++
i_fillcolor1++
i_fillcolor2++
var timer=setTimeout("changeform()",pause)
}
}
if (ie) {
document.write('<div id="roofid"
style="position:absolute;left:0px;top:0px;width:'+outerwidth+'px;height:'+outerheight+'px;ov
erflow:hidden;">')
document.write('<v:oval id="tc"
style="position:absolute;top:'+postop+'px;left:'+posleft+'px;width:'+innerwidth+'px;height:'+i
nnerheight+'px">')
document.write('<v:shadow on="t" opacity="'+strengthopacity+'"/>')
document.write('<v:stroke id="strokeid" weight="'+strkweight+'pt" color="blue"/>')
document.write('<v:fill id="fillid" on="True" color="'+fillcolor1[0]+'"
color2="'+fillcolor2[0]+'" opacity="'+strengthopacity+'" opacity2="'+strengthopacity+'"
type="gradient"/>')
document.write('<v:path textpathok="t"/>')
document.write('<v:textpath id="textpathid" on="t" id="mytp" style="fontfamily:\'Arial Black\'; " fitpath="t" string=""/>')
document.write('</v:oval></div>')
if (window.attachEvent) //DD added code
window.attachEvent("onload", changeform) //DD added code
else

window.onload=changeform
}
</script>

Bouncy message
<style type="text/css">
#supertext {
position:absolute;
left:0;
top:0;
visibility:hide;
visibility:hidden;
}
</style>
<script language="JavaScript1.2">
/*
Bouncy message script- By Dynamicdrive.com
Code based on Lloyd Hassell's, at
http://www.dynamicdrive.com/dynamicindex4/bounceimage.htm
For full source, TOS, and 100s DTHML scripts, visit http://dynamicdrive.com
*/
//Configure the below three variables
//1) Set message to display (HTML accepted)
var thecontent='<h2><font color="#0000FF">Agencija 027 Srbija!</font></h2>'
//2) Set delay after which message should be hidden, in miliseconds ('' makes it incessantly
visible on the screen)
var hidetimer='';
//3) Set speed of animation (1-50), where larger is faster
var BallSpeed = 15;

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


var contentWidth;
var contentHeight;

var maxBallSpeed = 50;


var xMax;
var yMax;
var xPos = 0;
var yPos = 0;
var xDir = 'right';
var yDir = 'down';
var superballRunning = true;
var tempBallSpeed;
var currentBallSrc;
var newXDir;
var newYDir;
function initializeBall() {
if (document.all) {
xMax = document.body.clientWidth
yMax = document.body.clientHeight
document.all("supertext").style.visibility = "visible";
contentWidth=supertext.offsetWidth
contentHeight=supertext.offsetHeight
}
else if (document.layers) {
xMax = window.innerWidth;
yMax = window.innerHeight;
contentWidth=document.supertext.document.width
contentHeight=document.supertext.document.height
document.layers["supertext"].visibility = "show";
}
setTimeout('moveBall()',400);
if (hidetimer!='')
setTimeout("hidetext()",hidetimer)
}
function moveBall() {
if (superballRunning == true) {
calculatePosition();
if (document.all) {
document.all("supertext").style.left = xPos + document.body.scrollLeft;
document.all("supertext").style.top = yPos + document.body.scrollTop;
}
else if (document.layers) {
document.layers["supertext"].left = xPos + pageXOffset;
document.layers["supertext"].top = yPos + pageYOffset;
}
animatetext=setTimeout('moveBall()',20);
}
}

function calculatePosition() {
if (xDir == "right") {
if (xPos > (xMax - contentWidth - BallSpeed)) {
xDir = "left";
}
}
else if (xDir == "left") {
if (xPos < (0 + BallSpeed)) {
xDir = "right";
}
}
if (yDir == "down") {
if (yPos > (yMax - contentHeight - BallSpeed)) {
yDir = "up";
}
}
else if (yDir == "up") {
if (yPos < (0 + BallSpeed)) {
yDir = "down";
}
}
if (xDir == "right") {
xPos = xPos + BallSpeed;
}
else if (xDir == "left") {
xPos = xPos - BallSpeed;
}
else {
xPos = xPos;
}
if (yDir == "down") {
yPos = yPos + BallSpeed;
}
else if (yDir == "up") {
yPos = yPos - BallSpeed;
}
else {
yPos = yPos;
}
}
function hidetext(){
if (document.all)
supertext.style.visibility="hidden"
else if (document.layers)
document.supertext.visibility="hide"
clearTimeout(animatetext)
}
if (document.all||document.layers){

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

In your face message


<div style="position:absolute;color:black" id="test"></div>
<script>
//This script created by Steve Bomer (steveb03@yahoo.com)
//Modified by Dynamic Drive for NS6, additional features
//Visit Dynamicdrive.com to get it!
//Change the message below
var themessage="Welcome to Dynamic Drive!"
var fontsize=10
//Below determines how long the message will appear before disappearing. 3000=3 seconds
var appearfor=3000
function position_at_top(){
if (document.layers)
document.test.top=pageYOffset
else if (document.all){
test.innerHTML='<div align=center><font face="Arial">'+themessage+'</font></div>'
setTimeout("test.style.top=document.body.scrollTop+10;test.style.left=document.body.scrollL
eft+10",100)
}
else if (document.getElementById){
document.getElementById("test").innerHTML='<div align=center><font
face="Arial">'+themessage+'</font></div>'
document.getElementById("test").style.top=pageYOffset
}
}
function expand(){
if (document.layers){
document.test.document.write('<div align=center style="font-size:'+fontsize+'px"><font
face="Arial">'+themessage+'</font></div>')
document.test.document.close()
}
else if (document.all)
test.style.fontSize=fontsize+'px'
else if (document.getElementById)
document.getElementById("test").style.fontSize=fontsize+'px'
fontsize+=5
if (fontsize>90){
if (document.layers)
setTimeout("document.test.visibility='hide'",appearfor)
else if (document.all)

setTimeout("test.style.visibility='hidden'",appearfor)
else if (document.getElementById)
setTimeout("document.getElementById('test').style.visibility='hidden'",appearfor)
return
}
else
setTimeout("expand()",50)
}
</script>

Flying letters
<h2 id="fly">Thanks for visiting$Dynamic Drive!</h2>
<script type="text/javascript">
//Flying Letters script- by Matthias (info@freejavascripts.f2s.com)
// Modified by Twey for efficiency and compatibility
//For this script and more, visit Dynamic Drive: http://www.dynamicdrive.com
//Configure message to display. Use "$" for linebreak
//By default, set to just grab the text from element with ID="fly"
message = document.getElementById("fly").innerHTML; // $ = taking a new line
distance = 50; // pixel(s)
speed = 200; // milliseconds
var txt="",
num=0,
num4=0,
flyofle="",
flyofwi="",
flyofto="",
fly=document.getElementById("fly");
function stfly() {
for(i=0;i != message.length;i++) {
if(message.charAt(i) != "$")
txt += "<span style='position:relative;visibility:hidden;'
id='n"+i+"'>"+message.charAt(i)+"<\/span>";
else
txt += "<br>";
}
fly.innerHTML = txt;
txt = "";
flyofle = fly.offsetLeft;
flyofwi = fly.offsetWidth;
flyofto = fly.offsetTop;
fly2b();
}
function fly2b() {
if(num4 != message.length) {
if(message.charAt(num4) != "$") {
var then = document.getElementById("n" + num4);

then.style.left = flyofle - then.offsetLeft + flyofwi / 2;


then.style.top = flyofto - then.offsetTop + distance;
fly3(then.id, parseInt(then.style.left), parseInt(then.style.left) / 5,
parseInt(then.style.top), parseInt(then.style.top) / 5);
}
num4++;
setTimeout("fly2b()", speed);
}
}
function fly3(target,lef2,num2,top2,num3) {
if((Math.floor(top2) != 0 && Math.floor(top2) != -1) || (Math.floor(lef2) != 0 &&
Math.floor(lef2) != -1)) {
if(lef2 >= 0)
lef2 -= num2;
else
lef2 += num2 * -1;
if(Math.floor(lef2) != -1) {
document.getElementById(target).style.visibility = "visible";
document.getElementById(target).style.left = Math.floor(lef2);
} else {
document.getElementById(target).style.visibility = "visible";
document.getElementById(target).style.left = Math.floor(lef2 + 1);
}
if(lef2 >= 0)
top2 -= num3
else
top2 += num3 * -1;
if(Math.floor(top2) != -1)
document.getElementById(target).style.top = Math.floor(top2);
else
document.getElementById(target).style.top = Math.floor(top2 + 1);
setTimeout("fly3('"+target+"',"+lef2+","+num2+","+top2+","+num3+")",50)
}
}
stfly()
</script>

Nudging text
<script language="JavaScript1.2">
/*
Nudging text by Matthias (info@freejavascripts.f2s.com)
Modified by Dynamic Drive to function in NS6
For this script and more, visit http://www.dynamicdrive.com
*/
//configure message
message="Dobro dosli u Prokuplje!"
//animate text in NS6? (0 will turn it off)
ns6switch=1
var ns6=document.getElementById&&!document.all
mes=new Array();
mes[0]=-1;
mes[1]=-4;
mes[2]=-7;mes[3]=-10;
mes[4]=-7;
mes[5]=-4;
mes[6]=-1;
num=0;
num2=0;
txt="";
function jump0(){
if (ns6&&!ns6switch){
jump.innerHTML=message
return
}
if(message.length > 6){
for(i=0; i != message.length;i++){
txt=txt+"<span style='position:relative;' id='n"+i+"'>"+message.charAt(i)+"</span>"};
jump.innerHTML=txt;
txt="";
jump1a()
}
else{
alert("Your message is to short")
}
}
function jump1a(){

nfinal=(document.getElementById)? document.getElementById("n0") : document.all.n0


nfinal.style.left=-num2;
if(num2 != 9){
num2=num2+3;
setTimeout("jump1a()",50)
}
else{
jump1b()
}
}
function jump1b(){
nfinal.style.left=-num2;
if(num2 != 0){num2=num2-3;
setTimeout("jump1b()",50)
}
else{
jump2()
}
}
function jump2(){
txt="";
for(i=0;i != message.length;i++){
if(i+num > -1 && i+num < 7){
txt=txt+"<span style='position:relative;top:"+mes[i+num]+"'>"+message.charAt(i)+"</span>"
}
else{txt=txt+"<span>"+message.charAt(i)+"</span>"}
}
jump.innerHTML=txt;
txt="";
if(num != (-message.length)){
num--;
setTimeout("jump2()",50)}
else{num=0;
setTimeout("jump0()",50)}}
</script>
</head>
<body>
<h2><div id="jumpx" style="color:green"></div></h2>
<script>
if (document.all||document.getElementById){
jump=(document.getElementById)? document.getElementById("jumpx") :
document.all.jumpx
jump0()
}
else
document.write(message)
</script>

Roller coaster text


<script language="JavaScript">
/*
script edited by David Gardner (toolmandav@geocities.com)
Permission granted to Dynamicdrive.com to feature the script
For more DHTML scripts, visit Dynamicdrive.com
*/
//put your text here
var theText = "David Gardner";
function nextSize(i,incMethod,textLength)
{
if (incMethod == 1) return (72*Math.abs( Math.sin(i/(textLength/3.14))) );
if (incMethod == 2) return (255*Math.abs( Math.cos(i/(textLength/3.14))));
}
function sizeCycle(text,method,dis)
{
output = "";
for (i = 0; i < text.length; i++)
{
size = parseInt(nextSize(i +dis,method,text.length));
output += "<font style='font-size: "+ size +"pt'>" +text.substring(i,i+1)+
"</font>";
}
theDiv.innerHTML = output;
}
function doWave(n)
{
sizeCycle(theText,1,n);
if (n > theText.length) {n=0}
setTimeout("doWave(" + (n+1) + ")", 50);
}
</script>
<div ID="theDiv" align="center">
</div>

Shock wave text


<script language="JavaScript1.2">
/*
Shock Wave Text script- By ejl@worldmailer.com
Submitted to and featured on Dynamic Drive (www.dynamicdrive.com)
For full source code, usage terms, and 100's more DHTML scripts, visit
http://dynamicdrive.com
*/
var size = 25;
var speed_between_messages=1500 //in miliseconds
var tekst = new Array()
{
tekst[0] = "Shock Wave text @ Dynamicdrive.com";
tekst[1] = "Here you can type anything you want";
tekst[2] = "You can change the size";
tekst[3] = "And you can change the speed";
}
var klaar = 0;
var s = 0;
var veran =0;
var tel = 0;
function bereken(i,Lengte)
{
return (size*Math.abs( Math.sin(i/(Lengte/3.14))) );
}
function motor(p)
{
var output = "";
for(w = 0;w < tekst[s].length - klaar+1; w++)
{
q = bereken(w/2 + p,16);
if (q > size - 0.5)
{klaar++;}
if (q < 5)
{tel++;
if (tel > 1)
{
tel = 0;
if (veran == 1)

{
veran = 0;
s++;
if ( s == tekst.length)
{s = 0;}
p = 0;
if (window.loop)
{clearInterval(loop)}
loop = motor();
}
}
}
output += "<font style='font-size: "+ q +"pt'>" +tekst[s].substring(w,w+1)+ "</font>";
}
for(k=w;k<klaar+w;k++)
{
output += "<font style='font-size: " + size + "pt'>" +tekst[s].substring(k,k+1)+ "</font>";
}
idee.innerHTML = output;
}
function startmotor(p){
if (!document.all)
return
var loop = motor(p);
if (window.time)
{clearInterval(time)}
if (klaar == tekst[s].length)
{
klaar = 0;
veran = 1;
tel = 0;
var time = setTimeout("startmotor(" +(p+1) + ")", speed_between_messages);
}else
{
var time =setTimeout("startmotor(" +(p+1) + ")", 50);
}
}
</script>
<div ID="idee"></div>

Sine scrolling text


<style type="text/css">
.scroll {font-weight:bold; font-size:36; text-align: center; font-family: Verdana, Courier,
Courier New;}
</style>
<script language="JavaScript1.2">
/*
By Mark Baker
Showcased on Dynamicdrive.com
For full source code, visit http://dynamicdrive.com
*/
if (document.all)
document.write('<script src="sinescroll.js"><\/script>')
</script>

Text animator
<style type="text/css">
<!-.textanimlink,a {
text-decoration : none;
}
P.main {
font-family : Arial;
font-size : 15pt;
font-weight : bold;
}
-->
</style>
<Script Language="Javascript">
<!-- Hiding
/*
Script created by Lefteris Haritou
(lef@the.forthnet.gr)
Permission granted to Dynamicdrive.com to feature the script
For more DHTML scripts, visit Dynamicdrive.com
*/
bname=navigator.appName;
bversion=parseInt(navigator.appVersion)
if ((bname=="Netscape" && bversion>=4) || (bname=="Microsoft Internet Explorer" &&
bversion>=4))
window.onload=start
else
stop();
window.onunload=stop
if (bname=="Netscape"){
brows=true
dt=2
}
else{
brows=false
dt=20
}
var z=0;
var msg=0;

var rgb=0;
var link=false;
var status=true;
var updwn=false;
var message= new Array();
var value=0;
var h=window.innerHeight;
var w=window.innerWidth;
var timer1;
var timer2;
var timer3;
var convert = new Array()
var hexbase= new Array("0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "A", "B", "C", "D",
"E", "F");
// Put here your own messages. Add as many as you wan't (Do not edit anything else in the
Script except the lines below)
var bgcolor="#FFFFFF"; //Color of background
var color="#00008D"; //Color of the Letters
message[0]='The future of JavaScript'
message[1]='Today.'
message[2]='Dynamic Drive DHTML code library'
message[3]='<a href="http://dynamicdrive.com">Click here to begin THE experience</a>'
// Put here your own messages. Add as many as you wan't (Do not edit anything else in the
Script except the lines above)
for (x=0; x<16; x++){
for (y=0; y<16; y++){
convert[value]= hexbase[x] + hexbase[y];
value++;
}
}
redx=color.substring(1,3);
greenx=color.substring(3,5);
bluex=color.substring(5,7);
hred=eval(parseInt(redx,16));
hgreen=eval(parseInt(greenx,16));
hblue=eval(parseInt(bluex,16));
eredx=bgcolor.substring(1,3);
egreenx=bgcolor.substring(3,5);
ebluex=bgcolor.substring(5,7);
ered=eval(parseInt(eredx,16));
egreen=eval(parseInt(egreenx,16));
eblue=eval(parseInt(ebluex,16));
red=ered;
green=egreen;

blue=eblue;
function start(){
if ((bname=="Netscape" && bversion>=4) || (bname=="Microsoft Internet Explorer" &&
bversion>=4)){
link=false;
updwn=true;
if (brows)
res=document.layers['textanim'].top
else{
textanim.style.width=document.body.offsetWidth-20;
textanim.innerHTML='<Pre><P Class="main" Align="Center">'+message[msg]
+'</P></Pre>'
res=textanim.style.top
for (x=0; x<document.all.length; x++)
if(document.all[x].id=="textanimlink")
link=true;
}
up()
}
}
function stop(){
clearTimeout(timer1);
clearTimeout(timer2);
clearTimeout(timer3);
}
function resz(){
h=window.innerHeight;
w=window.innerWidth;
if (updwn)
timer1=setTimeout('up()',1000)
else
timer2=setTimeout('down()',1000)
}
function breakf(){
if (status){
clearTimeout(timer1);
clearTimeout(timer2);
status=false
return;
}
else{
status=true;
if (updwn)
timer1=setTimeout('up()',dt)
else
timer2=setTimeout('down()',dt)

}
}
function up(){
if (red<hred){
if ((red+7)<hred)
red+=7;
else
red=hred
redx = convert[red]
}
else{
if ((red-7)>hred)
red-=7;
else
red=hred
redx = convert[red]
}
if (green<hgreen){
if ((green+7)<hgreen)
green+=7;
else
green=hgreen
greenx = convert[green]
}
else{
if ((green-7)>hgreen)
green-=7;
else
green=hgreen
greenx = convert[green]
}
if (blue<hblue){
if ((blue+7)<hblue)
blue+=7;
else
blue=hblue
bluex = convert[blue]
}
else{
if ((blue-7)>hblue)
blue-=7;
else
blue=hblue
bluex = convert[blue]
}

rgb = "#"+redx+greenx+bluex;
if (brows){
document.layers['textanim'].document.linkColor=rgb;
document.layers['textanim'].document.vlinkColor=rgb;
if (window.innerHeight!=h || window.innerWidth!=w){
clearTimeout(timer1);
resz()
return;
}
else{
document.layers['textanim'].document.write('<Pre><P Class="main" Align="Center"><font
color="'+rgb+'">'+message[msg]+'</font></P></Pre>')
document.layers['textanim'].document.close();
}
}
else{
textanim.style.color=rgb;
if(link)
textanimlink.style.color=rgb;
}
if (z<38){
if (brows)
document.layers['textanim'].top-else
textanim.style.posTop-z++
timer1=setTimeout('up()',dt)
}
else
{
updwn=false;
down()
}
}
function down(){
if (red<ered){
if ((red+7)<ered)
red+=7;
else
red=ered
redx = convert[red]
}
else{
if ((red-7)>ered)
red-=7;
else
red=ered
redx = convert[red]

}
if (green<egreen){
if ((green+7)<egreen)
green+=7;
else
green=egreen
greenx = convert[green]
}
else{
if ((green-7)>egreen)
green-=7;
else
green=egreen
greenx = convert[green]
}
if (blue<eblue){
if ((blue+7)<eblue)
blue+=7;
else
blue=eblue
bluex = convert[blue]
}
else{
if ((blue-7)>eblue)
blue-=7;
else
blue=eblue
bluex = convert[blue]
}
rgb = "#"+redx+greenx+bluex;
if (brows){
document.layers['textanim'].document.linkColor=rgb;
document.layers['textanim'].document.vlinkColor=rgb;
if (window.innerHeight!=h || window.innerWidth!=w){
clearTimeout(timer2);
resz()
return;
}
else{
document.layers['textanim'].document.write('<Pre><P Class="main" Align="Center"><font
color="'+rgb+'">'+message[msg]+'</font></P></Pre>')
document.layers['textanim'].document.close();
}
}
else{
textanim.style.color=rgb;
if(link)

textanimlink.style.color=rgb;
}
if (z<76){
if (brows)
document.layers['textanim'].top-else
textanim.style.posTop-z++
timer2=setTimeout('down()',dt)
}
else
{
if (brows){
document.layers['textanim'].document.write('')
document.layers['textanim'].document.close();
}
else
textanim.innerHTML='';
window.clearInterval(timer2);
if(msg<message.length-1){
msg++;
z=0;
if (brows){
document.layers['textanim'].top=res;
}
else
textanim.style.top=res;
timer3=setTimeout('start()',100);
}
else
{
msg=0;
z=0;
if (brows)
document.layers['textanim'].top=res;
else
textanim.style.top=res;
timer3=setTimeout('start()',2000);
}
}
}
// done hiding -->
</Script>
<Div id="textanim" style="position: absolute; left: 0; top: 440" onclick="breakf()">
</Div>
<Layer name="textanim" left=0 top=440>
</Layer>

Dissolving text effect


<style type="text/css">
.textstyle
{
position:absolute;
left:-2000px;
width:400px;
font-family:Arial;
font-size:20pt;
font-weight:bold;
text-align:center;
color:FFFFFF;
filter:glow(color=red,strength=2);
}
.coverstyle
{
position:absolute;
left:-2000px;
}
</style>
<script LANGUAGE="JavaScript1.2">
/*
Dissolving text effect - By Peter Gehrig (http://www.24fun.ch/)
Permission given to Dynamicdrive.com to feature script in it's archive.
For full source code, installation instructions, and 1000's more DHTML scripts,
visit http://dynamicdrive.com
*/
var message = new Array()
message[0]="Welcome to Dynamic Drive"
message[1]="The #1 DHTML site on the net"
message[2]="Here you\'ll find free DHTML scripts and components"
message[3]="All of which utilize the latest in DHTML\/ JavaScript technology"
message[4]="Enjoy your stay here"
message[5]="And have a wonderful Christmas Holiday!"
var i_message=0
// The trick of this script is a simple gif-image
// consisting of two colors: black and white dots.
// The black dots are transparent.
// By wipeing this gif-image back and forth over the
// textmessages you get an attractive dissolving effect.

// This image is called slidefader.gif.


// Configure the left and top margin of the text (pixels).
var covertop=20
var coverleft=150
// Configure the size of the wipeing gif-image.
// If you change the size you should create a new image too.
// The coverheight also represents the height of the textzone.
var coverwidth=1200
var coverheight=96
var texttop=covertop
var textleft=coverleft
//configure width of text effect
//be sure to change the corresponding width attribute above in the <style> tag to match
var textwidth=400
var textheight=coverheight
var cliptop=0
var clipright=textwidth
var clipbottom=coverheight
var clipleft=0
var clippoints
// Configure the speeds of the wipeing effect
var step=40
var pause=50
var timer
function init() {
if (document.all) {
document.all.text.style.posTop=texttop
document.all.text.style.posLeft=textleft
document.all.cover.style.posTop=covertop
document.all.cover.style.posLeft=coverleft
clipleft=0
fadeout()
}
}
function fadeout() {
if (document.all.cover.style.posLeft >=(-coverwidth+textwidth+coverleft+step)) {
clipleft+=step
clipright=clipleft+textwidth
clippoints="rect("+cliptop+" "+clipright+" "+clipbottom+" "+clipleft+")"
document.all.cover.style.clip=clippoints
document.all.cover.style.posLeft-=step

timer= setTimeout("fadeout()",pause)
}
else {
clearTimeout(timer)
i_message++
if (i_message>=message.length) {i_message=0}
text.innerHTML=message[i_message]
fadein()
}
}
function fadein() {
if (document.all.cover.style.posLeft <=coverleft) {
clipleft-=step
clipright=clipleft+textwidth
clippoints="rect("+cliptop+" "+clipright+" "+clipbottom+" "+clipleft+")"
document.all.cover.style.clip=clippoints
document.all.cover.style.posLeft+=step
timer= setTimeout("fadein()",pause)
}
else {
clearTimeout(timer)
init()
}
}
</script>
<script language="JavaScript1.2">
if (document.all&&window.print){
document.write('<DIV ID="text" class="textstyle">'+message[0]+'</div>')
document.write('<DIV ID="cover" class="coverstyle"><img src="slidefader.gif"></DIV>')
}
</script>

Pulsating text
<script>
<!-//Pulsating Text (Chris A e-mail: KilerCris@Mail.com)
//Permission granted to Dynamic Drive to feature script in archive
//For full source and 100's more DHTML scripts, visit http://www.dynamicdrive.com
var divs = new Array();
var da = document.all;
var start;
//CONFIGUER THESE VARS!!!!!!
//speed of pulsing
var speed = 50;
function initVars(){
if (!document.all)
return
//Extend of shrink the below list all you want
//put an "addDiv(1,"2",3,4); for each div you made,
//1)'id' of div
//2)color or glow(name or hex)(in quotes!!!)
//3)minimum strength
//4)maximum strength
addDiv(hi,"lime",2,11);
addDiv(welcome,"red",4,9);
addDiv(message,"purple",2,4);
addDiv(msg2,"orange",15,17);
addDiv(msg3,"blue",1,3);
//NO MORE EDITING!!!!!!

startGlow();
}
function addDiv(id,color,min,max)
{
var j = divs.length;
divs[j] = new Array(5);

divs[j][0] = id;
divs[j][1] = color;
divs[j][2] = min;
divs[j][3] = max;
divs[j][4] = true;
}
function startGlow()
{
if (!document.all)
return 0;
for(var i=0;i<divs.length;i++)
{
divs[i][0].style.filter = "Glow(Color=" + divs[i][1] + ", Strength=" + divs[i][2]
+ ")";
divs[i][0].style.width = "100%";
}
start = setInterval('update()',speed);
}
function update()
{
for (var i=0;i<divs.length;i++)
{
if (divs[i][4])
{
divs[i][0].filters.Glow.Strength++;
if (divs[i][0].filters.Glow.Strength == divs[i][3])
divs[i][4] = false;
}
if (!divs[i][4])
{
divs[i][0].filters.Glow.Strength--;
if (divs[i][0].filters.Glow.Strength == divs[i][2])
divs[i][4] = true;
}
}
}
-->
</script>
<div id="hi" style="color: lime">
Hello!
</div>
<br>
<div id="welcome" style="color: lime">
Welcome!
</div>

<br>
<div id="message" style="color: lime">
This is a pulsating message!
</div>
<br>
<div id="msg2" style="color: lime">
This is another pulsating message!
</div>
<br>
<div id="msg3" style="color: lime">
This is yet another pulsating message!
</div>

Upper right
<script LANGUAGE="JavaScript" FPTYPE="mydynamicanimation">
<!-dynamicanimAttr = "mydynamicanimation"
animateElements = new Array()
currentElement = 0
speed = 0
stepsZoom = 8
stepsWord = 8
stepsFly = 12
stepsSpiral = 16
steps = stepsZoom
step = 0
outString = ""
function mydynAnimation()
{
var ms = navigator.appVersion.indexOf("MSIE")
ie4 = (ms>0) && (parseInt(navigator.appVersion.substring(ms+5, ms+6)) >= 4)
if(!ie4)
{
if((navigator.appName == "Netscape") &&
(parseInt(navigator.appVersion.substring(0, 1)) >= 4))
{
for (index=document.layers.length-1; index >= 0; index--)
{
layer=document.layers[index]
if (layer.left==10000)
layer.left=0
}
}
return
}
for (index=document.all.length-1; index >= document.body.sourceIndex; index--)
{
el = document.all[index]
animation = el.getAttribute(dynamicanimAttr, false)
if(null != animation)
{
if(animation == "dropWord" || animation == "flyTopRightWord" || animation ==
"flyBottomRightWord")
{
ih = el.innerHTML
outString = ""
i1 = 0
iend = ih.length

while(true)
{
i2 = startWord(ih, i1)
if(i2 == -1)
i2 = iend
outWord(ih, i1, i2, false, "")
if(i2 == iend)
break
i1 = i2
i2 = endWord(ih, i1)
if(i2 == -1)
i2 = iend
outWord(ih, i1, i2, true, animation)
if(i2 == iend)
break
i1 = i2
}
document.all[index].innerHTML = outString
document.all[index].style.posLeft = 0
document.all[index].setAttribute(dynamicanimAttr, null)
}
if(animation == "zoomIn" || animation == "zoomOut")
{
ih = el.innerHTML
outString = "<SPAN " + dynamicanimAttr + "=\"" + animation + "\" style=\"position:
relative; left: 10000;\">"
outString += ih
outString += "</SPAN>"
document.all[index].innerHTML = outString
document.all[index].style.posLeft = 0
document.all[index].setAttribute(dynamicanimAttr, null)
}
}
}
i=0
for (index=document.body.sourceIndex; index < document.all.length; index++)
{
el = document.all[index]
animation = el.getAttribute(dynamicanimAttr, false)
if (null != animation)
{
if(animation == "flyLeft")
{
el.style.posLeft = 10000-offsetLeft(el)-el.offsetWidth
el.style.posTop = 0
}
else if(animation == "flyRight")
{
el.style.posLeft = 10000-offsetLeft(el)+document.body.offsetWidth
el.style.posTop = 0

}
else if(animation == "flyTop" || animation == "dropWord")
{
el.style.posLeft = 0
el.style.posTop = document.body.scrollTop-offsetTop(el)-el.offsetHeight
}
else if(animation == "flyBottom")
{
el.style.posLeft = 0
el.style.posTop = document.body.scrollTop-offsetTop(el)+document.body.offsetHeight
}
else if(animation == "flyTopLeft")
{
el.style.posLeft = 10000-offsetLeft(el)-el.offsetWidth
el.style.posTop = document.body.scrollTop-offsetTop(el)-el.offsetHeight
}
else if(animation == "flyTopRight" || animation == "flyTopRightWord")
{
el.style.posLeft = 10000-offsetLeft(el)+document.body.offsetWidth
el.style.posTop = document.body.scrollTop-offsetTop(el)-el.offsetHeight
}
else if(animation == "flyBottomLeft")
{
el.style.posLeft = 10000-offsetLeft(el)-el.offsetWidth
el.style.posTop = document.body.scrollTop-offsetTop(el)+document.body.offsetHeight
}
else if(animation == "flyBottomRight" || animation == "flyBottomRightWord")
{
el.style.posLeft = 10000-offsetLeft(el)+document.body.offsetWidth
el.style.posTop = document.body.scrollTop-offsetTop(el)+document.body.offsetHeight
}
else if(animation == "spiral")
{
el.style.posLeft = 10000-offsetLeft(el)-el.offsetWidth
el.style.posTop = document.body.scrollTop-offsetTop(el)-el.offsetHeight
}
else if(animation == "zoomIn")
{
el.style.posLeft = 10000
el.style.posTop = 0
}
else if(animation == "zoomOut")
{
el.style.posLeft = 10000
el.style.posTop = 0
}
else
{
el.style.posLeft = 10000-offsetLeft(el)-el.offsetWidth
el.style.posTop = 0

}
el.initLeft = el.style.posLeft
el.initTop = el.style.posTop
animateElements[i++] = el
}
}
window.setTimeout("animate();", speed)
}
function offsetLeft(el)
{
x = el.offsetLeft
for (e = el.offsetParent; e; e = e.offsetParent)
x += e.offsetLeft;
return x
}
function offsetTop(el)
{
y = el.offsetTop
for (e = el.offsetParent; e; e = e.offsetParent)
y += e.offsetTop;
return y
}
function startWord(ih, i)
{
for(tag = false; i < ih.length; i++)
{
c = ih.charAt(i)
if(c == '<')
tag = true
if(!tag)
return i
if(c == '>')
tag = false
}
return -1
}
function endWord(ih, i)
{
nonSpace = false
space = false
while(i < ih.length)
{
c = ih.charAt(i)
if(c != ' ')
nonSpace = true
if(nonSpace && c == ' ')
space = true
if(c == '<')
return i
if(space && c != ' ')

return i
i++
}
return -1
}
function outWord(ih, i1, i2, dyn, anim)
{
if(dyn)
outString += "<SPAN " + dynamicanimAttr + "=\"" + anim + "\" style=\"position:
relative; left: 10000;\">"
outString += ih.substring(i1, i2)
if(dyn)
outString += "</SPAN>"
}
function animate()
{
el = animateElements[currentElement]
animation = el.getAttribute(dynamicanimAttr, false)
step++
if(animation == "spiral")
{
steps = stepsSpiral
v = step/steps
rf = 1.0 - v
t = v * 2.0*Math.PI
rx = Math.max(Math.abs(el.initLeft), 200)
ry = Math.max(Math.abs(el.initTop), 200)
el.style.posLeft = Math.ceil(-rf*Math.cos(t)*rx)
el.style.posTop = Math.ceil(-rf*Math.sin(t)*ry)
}
else if(animation == "zoomIn")
{
steps = stepsZoom
el.style.fontSize = Math.ceil(50+50*step/steps) + "%"
el.style.posLeft = 0
}
else if(animation == "zoomOut")
{
steps = stepsZoom
el.style.fontSize = Math.ceil(100+200*(steps-step)/steps) + "%"
el.style.posLeft = 0
}
else
{
steps = stepsFly
if(animation == "dropWord" || animation == "flyTopRightWord" || animation ==
"flyBottomRightWord")
steps = stepsWord
dl = el.initLeft / steps
dt = el.initTop / steps

el.style.posLeft = el.style.posLeft - dl
el.style.posTop = el.style.posTop - dt
}
if (step >= steps)
{
el.style.posLeft = 0
el.style.posTop = 0
currentElement++
step = 0
}
if(currentElement < animateElements.length)
window.setTimeout("animate();", speed)
}
//-->
</script>
<p align="center" mydynamicanimation="flyTopRightWord"
style="position: relative !important; left: 10000 !important"><strong><big><big><font
face="Arial">Welcome to <a href="http://www.dynamicdrive.com">Dynamic Drive</a>,
your
ultimate DHTML source.</font></big></big></strong></p>

Dropping
<script LANGUAGE="JavaScript" FPTYPE="dynamicanimation8">
<!-dynamicanimAttr = "dynamicanimation8"
animateElements = new Array()
currentElement = 0
speed = 0
stepsZoom = 8
stepsWord = 8
stepsFly = 12
stepsSpiral = 16
steps = stepsZoom
step = 0
outString = ""
function dynAnimation8()
{
var ms = navigator.appVersion.indexOf("MSIE")
ie4 = (ms>0) && (parseInt(navigator.appVersion.substring(ms+5, ms+6)) >= 4)
if(!ie4)
{
if((navigator.appName == "Netscape") &&
(parseInt(navigator.appVersion.substring(0, 1)) >= 4))
{
for (index=document.layers.length-1; index >= 0; index--)
{
layer=document.layers[index]
if (layer.left==10000)
layer.left=0
}
}
return
}
for (index=document.all.length-1; index >= document.body.sourceIndex; index--)
{
el = document.all[index]
animation = el.getAttribute(dynamicanimAttr, false)
if(null != animation)
{
if(animation == "dropWord" || animation == "flyTopRightWord" || animation ==
"flyBottomRightWord")
{
ih = el.innerHTML
outString = ""
i1 = 0

iend = ih.length
while(true)
{
i2 = startWord(ih, i1)
if(i2 == -1)
i2 = iend
outWord(ih, i1, i2, false, "")
if(i2 == iend)
break
i1 = i2
i2 = endWord(ih, i1)
if(i2 == -1)
i2 = iend
outWord(ih, i1, i2, true, animation)
if(i2 == iend)
break
i1 = i2
}
document.all[index].innerHTML = outString
document.all[index].style.posLeft = 0
document.all[index].setAttribute(dynamicanimAttr, null)
}
if(animation == "zoomIn" || animation == "zoomOut")
{
ih = el.innerHTML
outString = "<SPAN " + dynamicanimAttr + "=\"" + animation + "\" style=\"position:
relative; left: 10000;\">"
outString += ih
outString += "</SPAN>"
document.all[index].innerHTML = outString
document.all[index].style.posLeft = 0
document.all[index].setAttribute(dynamicanimAttr, null)
}
}
}
i=0
for (index=document.body.sourceIndex; index < document.all.length; index++)
{
el = document.all[index]
animation = el.getAttribute(dynamicanimAttr, false)
if (null != animation)
{
if(animation == "flyLeft")
{
el.style.posLeft = 10000-offsetLeft(el)-el.offsetWidth
el.style.posTop = 0
}
else if(animation == "flyRight")
{
el.style.posLeft = 10000-offsetLeft(el)+document.body.offsetWidth

el.style.posTop = 0
}
else if(animation == "flyTop" || animation == "dropWord")
{
el.style.posLeft = 0
el.style.posTop = document.body.scrollTop-offsetTop(el)-el.offsetHeight
}
else if(animation == "flyBottom")
{
el.style.posLeft = 0
el.style.posTop = document.body.scrollTop-offsetTop(el)+document.body.offsetHeight
}
else if(animation == "flyTopLeft")
{
el.style.posLeft = 10000-offsetLeft(el)-el.offsetWidth
el.style.posTop = document.body.scrollTop-offsetTop(el)-el.offsetHeight
}
else if(animation == "flyTopRight" || animation == "flyTopRightWord")
{
el.style.posLeft = 10000-offsetLeft(el)+document.body.offsetWidth
el.style.posTop = document.body.scrollTop-offsetTop(el)-el.offsetHeight
}
else if(animation == "flyBottomLeft")
{
el.style.posLeft = 10000-offsetLeft(el)-el.offsetWidth
el.style.posTop = document.body.scrollTop-offsetTop(el)+document.body.offsetHeight
}
else if(animation == "flyBottomRight" || animation == "flyBottomRightWord")
{
el.style.posLeft = 10000-offsetLeft(el)+document.body.offsetWidth
el.style.posTop = document.body.scrollTop-offsetTop(el)+document.body.offsetHeight
}
else if(animation == "spiral")
{
el.style.posLeft = 10000-offsetLeft(el)-el.offsetWidth
el.style.posTop = document.body.scrollTop-offsetTop(el)-el.offsetHeight
}
else if(animation == "zoomIn")
{
el.style.posLeft = 10000
el.style.posTop = 0
}
else if(animation == "zoomOut")
{
el.style.posLeft = 10000
el.style.posTop = 0
}
else
{
el.style.posLeft = 10000-offsetLeft(el)-el.offsetWidth

el.style.posTop = 0
}
el.initLeft = el.style.posLeft
el.initTop = el.style.posTop
animateElements[i++] = el
}
}
window.setTimeout("animate();", speed)
}
function offsetLeft(el)
{
x = el.offsetLeft
for (e = el.offsetParent; e; e = e.offsetParent)
x += e.offsetLeft;
return x
}
function offsetTop(el)
{
y = el.offsetTop
for (e = el.offsetParent; e; e = e.offsetParent)
y += e.offsetTop;
return y
}
function startWord(ih, i)
{
for(tag = false; i < ih.length; i++)
{
c = ih.charAt(i)
if(c == '<')
tag = true
if(!tag)
return i
if(c == '>')
tag = false
}
return -1
}
function endWord(ih, i)
{
nonSpace = false
space = false
while(i < ih.length)
{
c = ih.charAt(i)
if(c != ' ')
nonSpace = true
if(nonSpace && c == ' ')
space = true
if(c == '<')
return i

if(space && c != ' ')


return i
i++
}
return -1
}
function outWord(ih, i1, i2, dyn, anim)
{
if(dyn)
outString += "<SPAN " + dynamicanimAttr + "=\"" + anim + "\" style=\"position:
relative; left: 10000;\">"
outString += ih.substring(i1, i2)
if(dyn)
outString += "</SPAN>"
}
function animate()
{
el = animateElements[currentElement]
animation = el.getAttribute(dynamicanimAttr, false)
step++
if(animation == "spiral")
{
steps = stepsSpiral
v = step/steps
rf = 1.0 - v
t = v * 2.0*Math.PI
rx = Math.max(Math.abs(el.initLeft), 200)
ry = Math.max(Math.abs(el.initTop), 200)
el.style.posLeft = Math.ceil(-rf*Math.cos(t)*rx)
el.style.posTop = Math.ceil(-rf*Math.sin(t)*ry)
}
else if(animation == "zoomIn")
{
steps = stepsZoom
el.style.fontSize = Math.ceil(50+50*step/steps) + "%"
el.style.posLeft = 0
}
else if(animation == "zoomOut")
{
steps = stepsZoom
el.style.fontSize = Math.ceil(100+200*(steps-step)/steps) + "%"
el.style.posLeft = 0
}
else
{
steps = stepsFly
if(animation == "dropWord" || animation == "flyTopRightWord" || animation ==
"flyBottomRightWord")
steps = stepsWord
dl = el.initLeft / steps

dt = el.initTop / steps
el.style.posLeft = el.style.posLeft - dl
el.style.posTop = el.style.posTop - dt
}
if (step >= steps)
{
el.style.posLeft = 0
el.style.posTop = 0
currentElement++
step = 0
}
if(currentElement < animateElements.length)
window.setTimeout("animate();", speed)
}
//-->
</script>
<p dynamicanimation8="dropWord"
style="position: relative !important; left: 10000 !important"><big><big>Thanks for
dropping by! Please visit us again soon.</big></big></p>

Email riddler
<script type="text/javascript">
/*<![CDATA[*/
/***********************************************
* Encrypt Email script- Please keep notice intact
* Tool URL: http://www.dynamicdrive.com/emailriddler/
* **********************************************/
<!-- Encrypted version of: milantoplica [at] *****.*** //-->
var
emailriddlerarray=[109,105,108,97,110,116,111,112,108,105,99,97,64,103,109,97,105,108,46
,99,111,109]
var encryptedemail_id57='' //variable to contain encrypted email
for (var i=0; i<emailriddlerarray.length; i++)
encryptedemail_id57+=String.fromCharCode(emailriddlerarray[i])
document.write('<a href="mailto:'+encryptedemail_id57+'">Contact Us</a>')
/*]]>*/
</script>

Snow effect

<script type="text/javascript">
/******************************************
* Snow Effect Script- By Altan d.o.o. (http://www.altan.hr/snow/index.html)
* Visit Dynamic Drive DHTML code library (http://www.dynamicdrive.com/) for full source
code
* Last updated Nov 9th, 05' by DD. This notice must stay intact for use
******************************************/
//Configure below to change URL path to the snow image
var snowsrc="snow.gif"
// Configure below to change number of snow to render
var no = 10;
// Configure whether snow should disappear after x seconds (0=never):
var hidesnowtime = 0;
// Configure how much snow should drop down before fading ("windowheight" or
"pageheight")
var snowdistance = "pageheight";
///////////Stop Config//////////////////////////////////
var ie4up = (document.all) ? 1 : 0;
var ns6up = (document.getElementById&&!document.all) ? 1 : 0;
function iecompattest(){
return (document.compatMode && document.compatMode!="BackCompat")?
document.documentElement : document.body
}
var dx, xp, yp; // coordinate and position variables
var am, stx, sty; // amplitude and step variables
var i, doc_width = 800, doc_height = 600;
if (ns6up) {
doc_width = self.innerWidth;
doc_height = self.innerHeight;
} else if (ie4up) {
doc_width = iecompattest().clientWidth;
doc_height = iecompattest().clientHeight;
}
dx = new Array();

xp = new Array();
yp = new Array();
am = new Array();
stx = new Array();
sty = new Array();
snowsrc=(snowsrc.indexOf("dynamicdrive.com")!=-1)? "snow.gif" : snowsrc
for (i = 0; i < no; ++ i) {
dx[i] = 0;
// set coordinate variables
xp[i] = Math.random()*(doc_width-50); // set position variables
yp[i] = Math.random()*doc_height;
am[i] = Math.random()*20;
// set amplitude variables
stx[i] = 0.02 + Math.random()/10; // set step variables
sty[i] = 0.7 + Math.random(); // set step variables
if (ie4up||ns6up) {
if (i == 0) {
document.write("<div id=\"dot"+ i +"\" style=\"POSITION: absolute; Z-INDEX: "+ i +";
VISIBILITY: visible; TOP: 15px; LEFT: 15px;\"><a href=\"http://dynamicdrive.com\"><img
src='"+snowsrc+"' border=\"0\"><\/a><\/div>");
} else {
document.write("<div id=\"dot"+ i +"\" style=\"POSITION: absolute; Z-INDEX: "+ i +";
VISIBILITY: visible; TOP: 15px; LEFT: 15px;\"><img src='"+snowsrc+"'
border=\"0\"><\/div>");
}
}
}
function snowIE_NS6() { // IE and NS6 main animation function
doc_width = ns6up?window.innerWidth-10 : iecompattest().clientWidth-10;
doc_height=(window.innerHeight && snowdistance=="windowheight")?
window.innerHeight : (ie4up && snowdistance=="windowheight")?
iecompattest().clientHeight : (ie4up && !window.opera && snowdistance=="pageheight")?
iecompattest().scrollHeight : iecompattest().offsetHeight;
for (i = 0; i < no; ++ i) { // iterate for every dot
yp[i] += sty[i];
if (yp[i] > doc_height-50) {
xp[i] = Math.random()*(doc_width-am[i]-30);
yp[i] = 0;
stx[i] = 0.02 + Math.random()/10;
sty[i] = 0.7 + Math.random();
}
dx[i] += stx[i];
document.getElementById("dot"+i).style.top=yp[i]+"px";
document.getElementById("dot"+i).style.left=xp[i] + am[i]*Math.sin(dx[i])+"px";
}
snowtimer=setTimeout("snowIE_NS6()", 10);
}
function hidesnow(){
if (window.snowtimer) clearTimeout(snowtimer)

for (i=0; i<no; i++)


document.getElementById("dot"+i).style.visibility="hidden"
}
if (ie4up||ns6up){
snowIE_NS6();
if (hidesnowtime>0)
setTimeout("hidesnow()", hidesnowtime*1000)
}
</script>

Autumn levels

<script language="JavaScript1.2">
//Autumn leaves- by Kurt Grigg (kurt.grigg@virgin.net)
//Modified by Dynamic Drive for NS6 functionality
//visit http://www.dynamicdrive.com for this script
//Pre-load your image below!
grphcs=new Array(6)
Image0=new Image();
Image0.src=grphcs[0]="al.gif";
Image1=new Image();
Image1.src=grphcs[1]="bl.gif"
Image2=new Image();
Image2.src=grphcs[2]="cl.gif"
Image3=new Image();
Image3.src=grphcs[3]="dl.gif"
Image4=new Image();
Image4.src=grphcs[4]="el.gif"
Image5=new Image();
Image5.src=grphcs[5]="fl.gif"
Amount=8; //Smoothness depends on image file size, the smaller the size the more you can
use!
Ypos=new Array();
Xpos=new Array();
Speed=new Array();
Step=new Array();
Cstep=new Array();
ns=(document.layers)?1:0;
ns6=(document.getElementById&&!document.all)?1:0;
if (ns){
for (i = 0; i < Amount; i++){
var P=Math.floor(Math.random()*grphcs.length);
rndPic=grphcs[P];
document.write("<LAYER NAME='sn"+i+"' LEFT=0 TOP=0><img
src="+rndPic+"></LAYER>");
}
}
else{

document.write('<div style="position:absolute;top:0px;left:0px"><div
style="position:relative">');
for (i = 0; i < Amount; i++){
var P=Math.floor(Math.random()*grphcs.length);
rndPic=grphcs[P];
document.write('<img id="si'+i+'" src="'+rndPic+'"
style="position:absolute;top:0px;left:0px">');
}
document.write('</div></div>');
}
WinHeight=(ns||ns6)?window.innerHeight:window.document.body.clientHeight;
WinWidth=(ns||ns6)?window.innerWidth-70:window.document.body.clientWidth;
for (i=0; i < Amount; i++){
Ypos[i] = Math.round(Math.random()*WinHeight);
Xpos[i] = Math.round(Math.random()*WinWidth);
Speed[i]= Math.random()*5+3;
Cstep[i]=0;
Step[i]=Math.random()*0.1+0.05;
}
function fall(){
var WinHeight=(ns||ns6)?window.innerHeight:window.document.body.clientHeight;
var WinWidth=(ns||ns6)?window.innerWidth-70:window.document.body.clientWidth;
var hscrll=(ns||ns6)?window.pageYOffset:document.body.scrollTop;
var wscrll=(ns||ns6)?window.pageXOffset:document.body.scrollLeft;
for (i=0; i < Amount; i++){
sy = Speed[i]*Math.sin(90*Math.PI/180);
sx = Speed[i]*Math.cos(Cstep[i]);
Ypos[i]+=sy;
Xpos[i]+=sx;
if (Ypos[i] > WinHeight){
Ypos[i]=-60;
Xpos[i]=Math.round(Math.random()*WinWidth);
Speed[i]=Math.random()*5+3;
}
if (ns){
document.layers['sn'+i].left=Xpos[i];
document.layers['sn'+i].top=Ypos[i]+hscrll;
}
else if (ns6){
document.getElementById("si"+i).style.left=Math.min(WinWidth,Xpos[i]);
document.getElementById("si"+i).style.top=Ypos[i]+hscrll;
}
else{
eval("document.all.si"+i).style.left=Xpos[i];
eval("document.all.si"+i).style.top=Ypos[i]+hscrll;
}
Cstep[i]+=Step[i];
}
setTimeout('fall()',20);
}

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

Bubble effect

<script language="JavaScript1.2">
<!-- Begin
//Bubble Script by Lisa (issa@lissaexplains.com, http://lissaexplains.com)
//Based on code by Altan d.o.o. (snow@altan.hr)
//For full source code and installation instructions to this script, visit
http://www.dynamicdrive.com
var no = 15; // image number or falling rate
var speed = 2; // the lower the number the faster the image moves
var snow = new Array();
snow[0] = "bubble.gif"
snow[1] = "bubble.gif"
snow[2] = "bubble.gif"
var ns4up = (document.layers) ? 1 : 0; // browser sniffer
var ie4up = (document.all) ? 1 : 0;
var ns6up = (document.getElementById&&!document.all) ? 1 : 0;
var dx, xp, yp; // coordinate and position variables
var am, stx, sty; // amplitude and step variables
var i, doc_width = 800, doc_height = 1800;
if (ns4up||ns6up) {
doc_width = self.innerWidth;
doc_height = self.innerHeight;
} else if (ie4up) {
doc_width = document.body.clientWidth;
doc_height = document.body.clientHeight;
}
dx = new Array();
xp = new Array();
yp = new Array();
am = new Array();
stx = new Array();
sty = new Array();
j = 0;

for (i = 0; i < no; ++ i) {


dx[i] = 0;
// set coordinate variables
xp[i] = Math.random()*(doc_width-50); // set position variables
yp[i] = Math.random()*doc_height;
am[i] = Math.random()*20;
// set amplitude variables
stx[i] = 0.02 + Math.random()/10; // set step variables
sty[i] = 0.7 + Math.random(); // set step variables
if (ns4up) {
// set layers
if (i == 0) {
document.write("<layer name=\"dot"+ i +"\" left=\"15\" top=\"15\"
visibility=\"show\"><img src=\""+ snow[j] + "\" border=\"0\"></layer>");
} else {
document.write("<layer name=\"dot"+ i +"\" left=\"15\" top=\"15\"
visibility=\"show\"><img src=\""+ snow[j] + "\" border=\"0\"></layer>");
}
} else if (ie4up||ns6up) {
if (i == 0)
{
document.write("<div id=\"dot"+ i +"\" style=\"POSITION: absolute; ZINDEX: "+ i +"VISIBILITY: visible; TOP: 15px; LEFT: 15px; width:1;\"><img src=\"" +
snow[j] + "\" border=\"0\"></div>");
} else {
document.write("<div id=\"dot"+ i +"\" style=\"POSITION: absolute; ZINDEX: "+ i +"VISIBILITY: visible; TOP: 15px; LEFT: 15px; width:1;\"><img src=\"" +
snow[j] + "\" border=\"0\"></div>");
}
}
if (j == (snow.length-1)) { j = 0; } else { j += 1; }
}
function snowNS() { // Netscape main animation function
for (i = 0; i < no; ++ i) { // iterate for every dot
yp[i] -= sty[i];
if (yp[i] < -50) {
xp[i] = Math.random()*(doc_width-am[i]-30);
yp[i] = doc_height;
stx[i] = 0.02 + Math.random()/10;
sty[i] = 0.7 + Math.random();
doc_width = self.innerWidth;
doc_height = self.innerHeight;
}
dx[i] += stx[i];
document.layers["dot"+i].top = yp[i]+pageYOffset;
document.layers["dot"+i].left = xp[i] +
am[i]*Math.sin(dx[i]);
}
setTimeout("snowNS()", speed);
}
function snowIE_NS6() { // IE main animation function
for (i = 0; i < no; ++ i) { // iterate for every dot
yp[i] -= sty[i];
if (yp[i] < -50) {

xp[i] = Math.random()*(doc_width-am[i]-30);
yp[i] = doc_height;
stx[i] = 0.02 + Math.random()/10;
sty[i] = 0.7 + Math.random();
doc_width = ns6up?window.innerWidth-5:document.body.clientWidth;
doc_height = ns6up?window.innerHeight-5:document.body.clientHeight;
}
dx[i] += stx[i];
if (ie4up){
document.all["dot"+i].style.pixelTop = yp[i]+document.body.scrollTop;
document.all["dot"+i].style.pixelLeft = xp[i] + am[i]*Math.sin(dx[i]);
}
else if (ns6up){
document.getElementById("dot"+i).style.top=yp[i]+pageYOffset;
document.getElementById("dot"+i).style.left=xp[i] + am[i]*Math.sin(dx[i]);
}
}
setTimeout("snowIE_NS6()", speed);
}
if (ns4up) {
snowNS();
} else if (ie4up||ns6up) {
snowIE_NS6();
}
// End -->
</script>

Scrolable content
<ilayer name="scroll1" width=170 height=150 clip="0,0,170,150">
<layer name="scroll2" width=170 height=150 bgColor="lightyellow">
<div id="scroll3" style="width:170px;height:150px;backgroundcolor:lightyellow;overflow:scroll">
<big>T</big>his is a cool script that allows you to compact any content and confine it within
a scrollable mini "window" Save valuable document space while making your page more
"interactive", all at the same time! This script uses two different techniques- one for IE, one
for NS- to create the scrollable window. Scrollbars will be available to IE 4 users to scroll the
window, while NS users will need to use the "up" and "down" buttons instead (since NS does
not support the adding of scrollbars to contents).
</div>
</layer>
</ilayer>
<script>
/***********************************************
* Scrollable content Script- Dynamic Drive (www.dynamicdrive.com)
* This notice must stay intact for use
* Visit http://www.dynamicdrive.com/ for full source code
***********************************************/
var nsstyle='display:""'
if (document.layers)
var scrolldoc=document.scroll1.document.scroll2
function up(){
if (!document.layers) return
if (scrolldoc.top<0)
scrolldoc.top+=10
temp2=setTimeout("up()",50)
}
function down(){
if (!document.layers) return
if (scrolldoc.top-150>=scrolldoc.document.height*-1)
scrolldoc.top-=10
temp=setTimeout("down()",50)
}
function clearup(){
if (window.temp2)
clearInterval(temp2)
}
function cleardown(){
if (window.temp)

clearInterval(temp)
}
</script>
<br><span style="display:none" style=&{nsstyle};><a href="#" onMousedown="up()"
onMouseup="clearup()" onClick="return false" onMouseout="clearup()">Up</a> | <a
href="#"
onMousedown="down()" onMouseup="cleardown()" onClick="return false"
onMouseout="cleardown()">Down</a> | <a href="#" onClick="if (document.layers)
scrolldoc.top=0;return false">Top</a> | <a href="#" onClick="if (document.layers)
scrolldoc.top=scrolldoc.document.height*(-1)+150;return false">Bottom</a></span>

Flexy slideshow
<script language="JavaScript1.2">
/***********************************************
* Flexi Slideshow- Dynamic Drive (www.dynamicdrive.com)
* This notice must stay intact for use
* Visit http://www.dynamicdrive.com/ for full source code
***********************************************/
var variableslide=new Array()
//variableslide[x]=["path to image", "OPTIONAL link for image", "OPTIONAL text
description (supports HTML tags)"]
variableslide[0]=['ball.gif', '', '']
variableslide[1]=['spaceship.gif', 'http://www.space.com', 'Has aliens landed on earth? You
decide.']
variableslide[2]=['cake.gif', '', '']
//configure the below 3 variables to set the dimension/background color of the slideshow
var slidewidth='130px' //set to width of LARGEST image in your slideshow
var slideheight='120px' //set to height of LARGEST iamge in your slideshow, plus any text
description
var slidebgcolor='#F3F3F3'
//configure the below variable to determine the delay between image rotations (in
miliseconds)
var slidedelay=3000
////Do not edit pass this line////////////////
var ie=document.all
var dom=document.getElementById
for (i=0;i<variableslide.length;i++){
var cacheimage=new Image()
cacheimage.src=variableslide[i][0]
}
var currentslide=0
function rotateimages(){
contentcontainer='<center>'
if (variableslide[currentslide][1]!="")

contentcontainer+='<a href="'+variableslide[currentslide][1]+'">'
contentcontainer+='<img src="'+variableslide[currentslide][0]+'" border="0" vspace="3">'
if (variableslide[currentslide][1]!="")
contentcontainer+='</a>'
contentcontainer+='</center>'
if (variableslide[currentslide][2]!="")
contentcontainer+=variableslide[currentslide][2]
if (document.layers){
crossrotateobj.document.write(contentcontainer)
crossrotateobj.document.close()
}
else if (ie||dom)
crossrotateobj.innerHTML=contentcontainer
if (currentslide==variableslide.length-1) currentslide=0
else currentslide++
setTimeout("rotateimages()",slidedelay)
}
if (ie||dom)
document.write('<div id="slidedom" style="width:'+slidewidth+';height:'+slideheight+';
background-color:'+slidebgcolor+'"></div>')
function start_slider(){
crossrotateobj=dom? document.getElementById("slidedom") : ie? document.all.slidedom :
document.slidensmain.document.slidenssub
if (document.layers)
document.slidensmain.visibility="show"
rotateimages()
}
if (ie||dom)
start_slider()
else if (document.layers)
window.onload=start_slider
</script>
<ilayer id="slidensmain" width=&{slidewidth}; height=&{slideheight};
bgColor=&{slidebgcolor}; visibility=hide><layer id="slidenssub" width=&{slidewidth};
left=0 top=0></layer></ilayer>
<p align="center"><font face="Arial" size="-2">Free DHTML scripts provided by<br>
<a href="http://www.dynamicdrive.com">Dynamic Drive</a></font></p>

Translucend slideshow
<script type="text/javascript">
/***********************************************
* Translucent Slideshow script- Dynamic Drive DHTML code library
(www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit Dynamic Drive at http://www.dynamicdrive.com/ for full source code
***********************************************/
var trans_width='140px' //slideshow width
var trans_height='225px' //slideshow height
var pause=3000 //SET PAUSE BETWEEN SLIDE (3000=3 seconds)
var degree=10 //animation speed. Greater is faster.
var slideshowcontent=new Array()
//Define slideshow contents: [image URL, OPTIONAL LINK, OPTIONAL LINK TARGET]
slideshowcontent[0]=["photo1.jpg", "http://www.cnn.com", "_new"]
slideshowcontent[1]=["photo2.jpg", "", ""]
slideshowcontent[2]=["photo3.jpg", "http://www.google.com", ""]
////NO need to edit beyond here/////////////
var bgcolor='white'
var imageholder=new Array()
for (i=0;i<slideshowcontent.length;i++){
imageholder[i]=new Image()
imageholder[i].src=slideshowcontent[i][0]
}
var ie4=document.all
var dom=document.getElementById&&navigator.userAgent.indexOf("Opera")==-1
if (ie4||dom)
document.write('<div
style="position:relative;width:'+trans_width+';height:'+trans_height+';overflow:hidden"><div
id="canvas0" style="position:absolute;backgroundcolor:'+bgcolor+';width:'+trans_width+';height:'+trans_height+';left:-'+trans_width+';filter:alp
ha(opacity=20);-moz-opacity:0.2;"></div><div id="canvas1"
style="position:absolute;backgroundcolor:'+bgcolor+';width:'+trans_width+';height:'+trans_height+';left:-'+trans_width+';filter:alp
ha(opacity=20);-moz-opacity:0.2;"></div></div>')
else if (document.layers){

document.write('<ilayer id=tickernsmain visibility=hide width='+trans_width+'


height='+trans_height+' bgColor='+bgcolor+'><layer id=tickernssub width='+trans_width+'
height='+trans_height+' left=0 top=0>'+'<img src="'+slideshowcontent[0]
[0]+'"></layer></ilayer>')
}
var curpos=trans_width*(-1)
var curcanvas="canvas0"
var curindex=0
var nextindex=1
function getslidehtml(theslide){
var slidehtml=""
if (theslide[1]!="")
slidehtml='<a href="'+theslide[1]+'" target="'+theslide[2]+'">'
slidehtml+='<img src="'+theslide[0]+'" border="0">'
if (theslide[1]!="")
slidehtml+='</a>'
return slidehtml
}
function moveslide(){
if (curpos<0){
curpos=Math.min(curpos+degree,0)
tempobj.style.left=curpos+"px"
}
else{
clearInterval(dropslide)
if (crossobj.filters)
crossobj.filters.alpha.opacity=100
else if (crossobj.style.MozOpacity)
crossobj.style.MozOpacity=1
nextcanvas=(curcanvas=="canvas0")? "canvas0" : "canvas1"
tempobj=ie4? eval("document.all."+nextcanvas) : document.getElementById(nextcanvas)
tempobj.innerHTML=getslidehtml(slideshowcontent[curindex])
nextindex=(nextindex<slideshowcontent.length-1)? nextindex+1 : 0
setTimeout("rotateslide()",pause)
}
}
function rotateslide(){
if (ie4||dom){
resetit(curcanvas)
crossobj=tempobj=ie4? eval("document.all."+curcanvas) :
document.getElementById(curcanvas)
crossobj.style.zIndex++
if (crossobj.filters)
document.all.canvas0.filters.alpha.opacity=document.all.canvas1.filters.alpha.opacity=20
else if (crossobj.style.MozOpacity)

document.getElementById("canvas0").style.MozOpacity=document.getElementById("canvas
1").style.MozOpacity=0.2
var temp='setInterval("moveslide()",50)'
dropslide=eval(temp)
curcanvas=(curcanvas=="canvas0")? "canvas1" : "canvas0"
}
else if (document.layers){
crossobj.document.write(getslidehtml(slideshowcontent[curindex]))
crossobj.document.close()
}
curindex=(curindex<slideshowcontent.length-1)? curindex+1 : 0
}
function jumptoslide(which){
curindex=which
rotateslide()
}
function resetit(what){
curpos=parseInt(trans_width)*(-1)
var crossobj=ie4? eval("document.all."+what) : document.getElementById(what)
crossobj.style.left=curpos+"px"
}
function startit(){
crossobj=ie4? eval("document.all."+curcanvas) : dom? document.getElementById(curcanvas)
: document.tickernsmain.document.tickernssub
if (ie4||dom){
crossobj.innerHTML=getslidehtml(slideshowcontent[curindex])
rotateslide()
}
else{
document.tickernsmain.visibility='show'
curindex++
setInterval("rotateslide()",pause)
}
}
if (window.addEventListener)
window.addEventListener("load", startit, false)
else if (window.attachEvent)
window.attachEvent("onload", startit)
else if (ie4||dom||document.layers)
window.onload=startit
</script>
<p align="center"><font face="arial" size="-2">This free script provided by</font><br>
<font face="arial, helvetica" size="-2"><a href="http://www.dynamicdrive.com">Dynamic
Drive</a></font></p>

PresentaTIONAL slidewshow
<script language="JavaScript1.2">
//Presentational Slideshow Script- By Dynamic Drive
//For full source code and more DHTML scripts, visit http://www.dynamicdrive.com
//This credit MUST stay intact for legal use
var slideshow_width='100px' //SET SLIDESHOW WIDTH (set to largest image's width if
multiple dimensions exist)
var slideshow_height='100px' //SET SLIDESHOW HEIGHT (set to largest image's height if
multiple dimensions exist)
var pause=3000 //SET PAUSE BETWEEN SLIDE (2000=2 seconds)
var slidebgcolor="white"
var dropimages=new Array()
//SET IMAGE PATHS. Extend or contract array as needed
dropimages[0]="image1.gif"
dropimages[1]="image2.gif"
dropimages[2]="image3.gif"
var droplinks=new Array()
//SET IMAGE URLs. Use "" if you wish particular image to NOT be linked:
droplinks[0]="http://www.yahoo.com"
droplinks[1]=""
droplinks[2]="http://www.google.com"
////NO need to edit beyond here/////////////
var preloadedimages=new Array()
for (p=0;p<dropimages.length;p++){
preloadedimages[p]=new Image()
preloadedimages[p].src=dropimages[p]
}
var ie4=document.all
var dom=document.getElementById
if (ie4||dom)
document.write('<div
style="position:relative;width:'+slideshow_width+';height:'+slideshow_height+';overflow:hid
den"><div id="canvas0"

style="position:absolute;width:'+slideshow_width+';height:'+slideshow_height+';backgroundcolor:'+slidebgcolor+';left:-'+slideshow_width+'"></div><div id="canvas1"
style="position:absolute;width:'+slideshow_width+';height:'+slideshow_height+';backgroundcolor:'+slidebgcolor+';left:-'+slideshow_width+'"></div></div>')
else
document.write('<a href="javascript:rotatelink()"><img name="defaultslide"
src="'+dropimages[0]+'" border=0></a>')
var curpos=parseInt(slideshow_width)*(-1)
var degree=10
var curcanvas="canvas0"
var curimageindex=linkindex=0
var nextimageindex=1
function movepic(){
if (curpos<0){
curpos=Math.min(curpos+degree,0)
tempobj.style.left=curpos+"px"
}
else{
clearInterval(dropslide)
nextcanvas=(curcanvas=="canvas0")? "canvas0" : "canvas1"
tempobj=ie4? eval("document.all."+nextcanvas) : document.getElementById(nextcanvas)
var slideimage='<img src="'+dropimages[curimageindex]+'" border=0>'
tempobj.innerHTML=(droplinks[curimageindex]!="")? '<a href="'+droplinks[curimageindex]
+'">'+slideimage+'</a>' : slideimage
nextimageindex=(nextimageindex<dropimages.length-1)? nextimageindex+1 : 0
setTimeout("rotateimage()",pause)
}
}
function rotateimage(){
if (ie4||dom){
resetit(curcanvas)
var crossobj=tempobj=ie4? eval("document.all."+curcanvas) :
document.getElementById(curcanvas)
crossobj.style.zIndex++
var temp='setInterval("movepic()",50)'
dropslide=eval(temp)
curcanvas=(curcanvas=="canvas0")? "canvas1" : "canvas0"
}
else
document.images.defaultslide.src=dropimages[curimageindex]
linkindex=curimageindex
curimageindex=(curimageindex<dropimages.length-1)? curimageindex+1 : 0
}
function rotatelink(){

if (droplinks[linkindex]!="")
window.location=droplinks[linkindex]
}
function resetit(what){
curpos=parseInt(slideshow_width)*(-1)
var crossobj=ie4? eval("document.all."+what) : document.getElementById(what)
crossobj.style.left=curpos+"px"
}
function startit(){
var crossobj=ie4? eval("document.all."+curcanvas) : document.getElementById(curcanvas)
crossobj.innerHTML='<a href="'+droplinks[curimageindex]+'"><img
src="'+dropimages[curimageindex]+'" border=0></a>'
rotateimage()
}
if (ie4||dom)
window.onload=startit
else
setInterval("rotateimage()",pause)
</script>
<p align="center"><font face="Arial" size="-2">Free DHTML scripts provided by<br>
<a href="http://www.dynamicdrive.com">Dynamic Drive</a></font></p>

DROP-IN SLIDESHOW
<script language="JavaScript1.2">
//Drop-in slideshow- By Dynamic Drive
//For full source code and more DHTML scripts, visit http://www.dynamicdrive.com
//This credit MUST stay intact for use
var slideshow_width='140px' //SET SLIDESHOW WIDTH (set to largest image's width if
multiple dimensions exist)
var slideshow_height='225px' //SET SLIDESHOW HEIGHT (set to largest image's height if
multiple dimensions exist)
var pause=3000 //SET PAUSE BETWEEN SLIDE (3000=3 seconds)
var dropimages=new Array()
//SET IMAGE PATHS. Extend or contract array as needed
dropimages[0]="photo1.jpg"
dropimages[1]="photo2.jpg"
dropimages[2]="photo3.jpg"
////NO need to edit beyond here/////////////
var preloadedimages=new Array()
for (p=0;p<dropimages.length;p++){
preloadedimages[p]=new Image()
preloadedimages[p].src=dropimages[p]
}
var ie4=document.all
var dom=document.getElementById
if (ie4||dom)
document.write('<div
style="position:relative;width:'+slideshow_width+';height:'+slideshow_height+';overflow:hid
den"><div id="canvas0"
style="position:absolute;width:'+slideshow_width+';height:'+slideshow_height+';top:-'+slides
how_height+'"></div><div id="canvas1"
style="position:absolute;width:'+slideshow_width+';height:'+slideshow_height+';top:-'+slides
how_height+'"></div></div>')
else
document.write('<img name="defaultslide" src="'+dropimages[0]+'">')
var curpos=parseInt(slideshow_height)*(-1)
var degree=10
var curcanvas="canvas0"
var curimageindex=0
var nextimageindex=1

function movepic(){
if (curpos<0){
curpos=Math.min(curpos+degree,0)
tempobj.style.top=curpos+"px"
}
else{
clearInterval(dropslide)
nextcanvas=(curcanvas=="canvas0")? "canvas0" : "canvas1"
tempobj=ie4? eval("document.all."+nextcanvas) : document.getElementById(nextcanvas)
tempobj.innerHTML='<img src="'+dropimages[nextimageindex]+'">'
nextimageindex=(nextimageindex<dropimages.length-1)? nextimageindex+1 : 0
setTimeout("rotateimage()",pause)
}
}
function rotateimage(){
if (ie4||dom){
resetit(curcanvas)
var crossobj=tempobj=ie4? eval("document.all."+curcanvas) :
document.getElementById(curcanvas)
crossobj.style.zIndex++
var temp='setInterval("movepic()",50)'
dropslide=eval(temp)
curcanvas=(curcanvas=="canvas0")? "canvas1" : "canvas0"
}
else
document.images.defaultslide.src=dropimages[curimageindex]
curimageindex=(curimageindex<dropimages.length-1)? curimageindex+1 : 0
}
function resetit(what){
curpos=parseInt(slideshow_height)*(-1)
var crossobj=ie4? eval("document.all."+what) : document.getElementById(what)
crossobj.style.top=curpos+"px"
}
function startit(){
var crossobj=ie4? eval("document.all."+curcanvas) : document.getElementById(curcanvas)
crossobj.innerHTML='<img src="'+dropimages[curimageindex]+'">'
rotateimage()
}
if (ie4||dom)
window.onload=startit
else
setInterval("rotateimage()",pause)
</script>

<p align="center"><font face="Arial" size="-2">Free DHTML scripts provided by<br>


<a href="http://www.dynamicdrive.com">Dynamic Drive</a></font></p>

DROPI-IN 2
<script language="JavaScript1.2">
//Drop-in slideshow II (hyperlinked)- By Dynamic Drive
//For full source code and more DHTML scripts, visit http://www.dynamicdrive.com
//This credit MUST stay intact for use
var slideshow_width='88px' //SET SLIDESHOW WIDTH (set to largest image's width if
multiple dimensions exist)
var slideshow_height='31px' //SET SLIDESHOW HEIGHT (set to largest image's height if
multiple dimensions exist)
var pause=3000 //SET PAUSE BETWEEN SLIDE (2000=2 seconds)
var dropimages=new Array()
//SET IMAGE PATHS. Extend or contract array as needed
dropimages[0]="button1.gif"
dropimages[1]="button2.gif"
dropimages[2]="button3.gif"
var droplinks=new Array()
//SET IMAGE URLs. Extend or contract array as needed
droplinks[0]="http://www.dynamicdrive.com"
droplinks[1]="http://www.freewarejava.com"
droplinks[2]="http://www.javascriptkit.com"
////NO need to edit beyond here/////////////
var preloadedimages=new Array()
for (p=0;p<dropimages.length;p++){
preloadedimages[p]=new Image()
preloadedimages[p].src=dropimages[p]
}
var ie4=document.all
var dom=document.getElementById
if (ie4||dom)
document.write('<div
style="position:relative;width:'+slideshow_width+';height:'+slideshow_height+';overflow:hid
den"><div id="canvas0"
style="position:absolute;width:'+slideshow_width+';height:'+slideshow_height+';top:-'+slides
how_height+'"></div><div id="canvas1"
style="position:absolute;width:'+slideshow_width+';height:'+slideshow_height+';top:-'+slides
how_height+'"></div></div>')
else

document.write('<a href="javascript:rotatelink()"><img name="defaultslide"


src="'+dropimages[0]+'" border=0></a>')
var curpos=parseInt(slideshow_height)*(-1)
var degree=10
var curcanvas="canvas0"
var curimageindex=0
var nextimageindex=1
function movepic(){
if (curpos<0){
curpos=Math.min(curpos+degree,0)
tempobj.style.top=curpos+"px"
}
else{
clearInterval(dropslide)
nextcanvas=(curcanvas=="canvas0")? "canvas0" : "canvas1"
tempobj=ie4? eval("document.all."+nextcanvas) : document.getElementById(nextcanvas)
tempobj.innerHTML='<a href="'+droplinks[curimageindex]+'"><img
src="'+dropimages[curimageindex]+'" border=0></a>'
nextimageindex=(nextimageindex<dropimages.length-1)? nextimageindex+1 : 0
setTimeout("rotateimage()",pause)
}
}
function rotateimage(){
if (ie4||dom){
resetit(curcanvas)
var crossobj=tempobj=ie4? eval("document.all."+curcanvas) :
document.getElementById(curcanvas)
crossobj.style.zIndex++
var temp='setInterval("movepic()",50)'
dropslide=eval(temp)
curcanvas=(curcanvas=="canvas0")? "canvas1" : "canvas0"
}
else
document.images.defaultslide.src=dropimages[curimageindex]
linkindex=curimageindex
curimageindex=(curimageindex<dropimages.length-1)? curimageindex+1 : 0
}
function rotatelink(){
window.location=droplinks[linkindex]
}
function resetit(what){
curpos=parseInt(slideshow_height)*(-1)
var crossobj=ie4? eval("document.all."+what) : document.getElementById(what)
crossobj.style.top=curpos+"px"

}
function startit(){
var crossobj=ie4? eval("document.all."+curcanvas) : document.getElementById(curcanvas)
crossobj.innerHTML='<a href="'+droplinks[curimageindex]+'"><img
src="'+dropimages[curimageindex]+'" border=0></a>'
rotateimage()
}
if (ie4||dom)
window.onload=startit
else
setInterval("rotateimage()",pause)
</script>
<p align="center"><font face="Arial" size="-2">Free DHTML scripts provided by<br>
<a href="http://www.dynamicdrive.com">Dynamic Drive</a></font></p>

UP-DOWN IMAGE SLIDESHOW


<script language="JavaScript1.2">
/*
Up down slideshow Script
By Dynamic Drive (www.dynamicdrive.com)
For full source code, terms of use, and 100's more scripts, visit http://www.dynamicdrive.com
*/
///////configure the below four variables to change the style of the slider///////
//set the scrollerwidth and scrollerheight to the width/height of the LARGEST image in your
slideshow!
var scrollerwidth='103px'
var scrollerheight='106px'
//3000 miliseconds=3 seconds
var pausebetweenimages=3000
//configure the below variable to change the images used in the slideshow. If you wish the
images to be clickable, simply wrap the images with the appropriate <a> tag
var slideimages=new Array()
slideimages[0]='<a href="http://www.cnn.com"><img src="PE01805A.gif" border="0"></a>'
slideimages[1]='<img src="PE01803A.gif">'
slideimages[2]='<img src="TN00411A.gif">'
slideimages[3]='<img src="PE02054A.gif">'
slideimages[4]='<img src="cake.gif">'
//extend this list
///////Do not edit pass this line///////////////////////
var ie=document.all
var dom=document.getElementById
if (slideimages.length>2)
i=2
else
i=0
function move1(whichlayer){
tlayer=eval(whichlayer)
if (tlayer.top>0&&tlayer.top<=5){
tlayer.top=0
setTimeout("move1(tlayer)",pausebetweenimages)
setTimeout("move2(document.main.document.second)",pausebetweenimages)
return
}
if (tlayer.top>=tlayer.document.height*-1){
tlayer.top-=5

setTimeout("move1(tlayer)",50)
}
else{
tlayer.top=parseInt(scrollerheight)
tlayer.document.write(slideimages[i])
tlayer.document.close()
if (i==slideimages.length-1)
i=0
else
i++
}
}
function move2(whichlayer){
tlayer2=eval(whichlayer)
if (tlayer2.top>0&&tlayer2.top<=5){
tlayer2.top=0
setTimeout("move2(tlayer2)",pausebetweenimages)
setTimeout("move1(document.main.document.first)",pausebetweenimages)
return
}
if (tlayer2.top>=tlayer2.document.height*-1){
tlayer2.top-=5
setTimeout("move2(tlayer2)",50)
}
else{
tlayer2.top=parseInt(scrollerheight)
tlayer2.document.write(slideimages[i])
tlayer2.document.close()
if (i==slideimages.length-1)
i=0
else
i++
}
}
function move3(whichdiv){
tdiv=eval(whichdiv)
if (parseInt(tdiv.style.top)>0&&parseInt(tdiv.style.top)<=5){
tdiv.style.top=0+"px"
setTimeout("move3(tdiv)",pausebetweenimages)
setTimeout("move4(second2_obj)",pausebetweenimages)
return
}
if (parseInt(tdiv.style.top)>=tdiv.offsetHeight*-1){
tdiv.style.top=parseInt(tdiv.style.top)-5+"px"
setTimeout("move3(tdiv)",50)
}
else{
tdiv.style.top=scrollerheight

tdiv.innerHTML=slideimages[i]
if (i==slideimages.length-1)
i=0
else
i++
}
}
function move4(whichdiv){
tdiv2=eval(whichdiv)
if (parseInt(tdiv2.style.top)>0&&parseInt(tdiv2.style.top)<=5){
tdiv2.style.top=0+"px"
setTimeout("move4(tdiv2)",pausebetweenimages)
setTimeout("move3(first2_obj)",pausebetweenimages)
return
}
if (parseInt(tdiv2.style.top)>=tdiv2.offsetHeight*-1){
tdiv2.style.top=parseInt(tdiv2.style.top)-5+"px"
setTimeout("move4(second2_obj)",50)
}
else{
tdiv2.style.top=scrollerheight
tdiv2.innerHTML=slideimages[i]
if (i==slideimages.length-1)
i=0
else
i++
}
}
function startscroll(){
if (ie||dom){
first2_obj=ie? first2 : document.getElementById("first2")
second2_obj=ie? second2 : document.getElementById("second2")
move3(first2_obj)
second2_obj.style.top=scrollerheight
second2_obj.style.visibility='visible'
}
else if (document.layers){
document.main.visibility='show'
move1(document.main.document.first)
document.main.document.second.top=parseInt(scrollerheight)+5
document.main.document.second.visibility='show'
}
}
window.onload=startscroll
</script>

<ilayer id="main" width=&{scrollerwidth}; height=&{scrollerheight}; visibility=hide>


<layer id="first" left=0 top=1 width=&{scrollerwidth};>
<script language="JavaScript1.2">
if (document.layers)
document.write(slideimages[0])
</script>
</layer>
<layer id="second" left=0 top=0 width=&{scrollerwidth}; visibility=hide>
<script language="JavaScript1.2">
if (document.layers)
document.write(slideimages[dyndetermine=(slideimages.length==1)? 0 : 1])
</script>
</layer>
</ilayer>
<script language="JavaScript1.2">
if (ie||dom){
document.writeln('<div id="main2"
style="position:relative;width:'+scrollerwidth+';height:'+scrollerheight+';overflow:hidden;">')
document.writeln('<div
style="position:absolute;width:'+scrollerwidth+';height:'+scrollerheight+';clip:rect(0
'+scrollerwidth+' '+scrollerheight+' 0);left:0px;top:0px">')
document.writeln('<div id="first2"
style="position:absolute;width:'+scrollerwidth+';left:0px;top:1px;">')
document.write(slideimages[0])
document.writeln('</div>')
document.writeln('<div id="second2"
style="position:absolute;width:'+scrollerwidth+';left:0px;top:0px;visibility:hidden">')
document.write(slideimages[dyndetermine=(slideimages.length==1)? 0 : 1])
document.writeln('</div>')
document.writeln('</div>')
document.writeln('</div>')
}
</script>
<p align="center"><font face="Arial" size="-2">Free DHTML scripts provided by<br>
<a href="http://dynamicdrive.com">Dynamic Drive</a></font></p>

LEFT-RIGHT IMAGE SLIDESHOW


<script language="JavaScript1.2">
/*
Left-Right image slideshow ScriptBy Dynamic Drive (www.dynamicdrive.com)
For full source code, terms of use, and 100's more scripts, visit http://dynamicdrive.com
*/
///////configure the below four variables to change the style of the slider///////
//set the scrollerwidth and scrollerheight to the width/height of the LARGEST image in your
slideshow!
var scrollerwidth='100px'
var scrollerheight='106px'
var scrollerbgcolor='white'
//3000 miliseconds=3 seconds
var pausebetweenimages=3000
//configure the below variable to change the images used in the slideshow. If you wish the
images to be clickable, simply wrap the images with the appropriate <a> tag
var slideimages=new Array()
slideimages[0]='<a href="http://www.cnn.com"><img src="PE01805A.gif" border=0"></a>'
slideimages[1]='<img src="PE01803A.gif">'
slideimages[2]='<img src="TN00411A.gif">'
slideimages[3]='<img src="PE02054A.gif">'
slideimages[4]='<img src="cake.gif">'
//extend this list
///////Do not edit pass this line///////////////////////
var ie=document.all
var dom=document.getElementById
if (slideimages.length>1)
i=2
else
i=0
function move1(whichlayer){
tlayer=eval(whichlayer)
if (tlayer.left>0&&tlayer.left<=5){
tlayer.left=0
setTimeout("move1(tlayer)",pausebetweenimages)
setTimeout("move2(document.main.document.second)",pausebetweenimages)
return
}

if (tlayer.left>=tlayer.document.width*-1){
tlayer.left-=5
setTimeout("move1(tlayer)",50)
}
else{
tlayer.left=parseInt(scrollerwidth)+5
tlayer.document.write(slideimages[i])
tlayer.document.close()
if (i==slideimages.length-1)
i=0
else
i++
}
}
function move2(whichlayer){
tlayer2=eval(whichlayer)
if (tlayer2.left>0&&tlayer2.left<=5){
tlayer2.left=0
setTimeout("move2(tlayer2)",pausebetweenimages)
setTimeout("move1(document.main.document.first)",pausebetweenimages)
return
}
if (tlayer2.left>=tlayer2.document.width*-1){
tlayer2.left-=5
setTimeout("move2(tlayer2)",50)
}
else{
tlayer2.left=parseInt(scrollerwidth)+5
tlayer2.document.write(slideimages[i])
tlayer2.document.close()
if (i==slideimages.length-1)
i=0
else
i++
}
}
function move3(whichdiv){
tdiv=eval(whichdiv)
if (parseInt(tdiv.style.left)>0&&parseInt(tdiv.style.left)<=5){
tdiv.style.left=0+"px"
setTimeout("move3(tdiv)",pausebetweenimages)
setTimeout("move4(scrollerdiv2)",pausebetweenimages)
return
}
if (parseInt(tdiv.style.left)>=tdiv.offsetWidth*-1){
tdiv.style.left=parseInt(tdiv.style.left)-5+"px"
setTimeout("move3(tdiv)",50)
}

else{
tdiv.style.left=scrollerwidth
tdiv.innerHTML=slideimages[i]
if (i==slideimages.length-1)
i=0
else
i++
}
}
function move4(whichdiv){
tdiv2=eval(whichdiv)
if (parseInt(tdiv2.style.left)>0&&parseInt(tdiv2.style.left)<=5){
tdiv2.style.left=0+"px"
setTimeout("move4(tdiv2)",pausebetweenimages)
setTimeout("move3(scrollerdiv1)",pausebetweenimages)
return
}
if (parseInt(tdiv2.style.left)>=tdiv2.offsetWidth*-1){
tdiv2.style.left=parseInt(tdiv2.style.left)-5+"px"
setTimeout("move4(scrollerdiv2)",50)
}
else{
tdiv2.style.left=scrollerwidth
tdiv2.innerHTML=slideimages[i]
if (i==slideimages.length-1)
i=0
else
i++
}
}
function startscroll(){
if (ie||dom){
scrollerdiv1=ie? first2 : document.getElementById("first2")
scrollerdiv2=ie? second2 : document.getElementById("second2")
move3(scrollerdiv1)
scrollerdiv2.style.left=scrollerwidth
}
else if (document.layers){
document.main.visibility='show'
move1(document.main.document.first)
document.main.document.second.left=parseInt(scrollerwidth)+5
document.main.document.second.visibility='show'
}
}
window.onload=startscroll
</script>

<ilayer id="main" width=&{scrollerwidth}; height=&{scrollerheight};


bgColor=&{scrollerbgcolor}; visibility=hide>
<layer id="first" left=1 top=0 width=&{scrollerwidth}; >
<script language="JavaScript1.2">
if (document.layers)
document.write(slideimages[0])
</script>
</layer>
<layer id="second" left=0 top=0 width=&{scrollerwidth}; visibility=hide>
<script language="JavaScript1.2">
if (document.layers)
document.write(slideimages[1])
</script>
</layer>
</ilayer>
<script language="JavaScript1.2">
if (ie||dom){
document.writeln('<div id="main2"
style="position:relative;width:'+scrollerwidth+';height:'+scrollerheight+';overflow:hidden;bac
kground-color:'+scrollerbgcolor+'">')
document.writeln('<div
style="position:absolute;width:'+scrollerwidth+';height:'+scrollerheight+';clip:rect(0
'+scrollerwidth+' '+scrollerheight+' 0);left:0px;top:0px">')
document.writeln('<div id="first2"
style="position:absolute;width:'+scrollerwidth+';left:1px;top:0px;">')
document.write(slideimages[0])
document.writeln('</div>')
document.writeln('<div id="second2"
style="position:absolute;width:'+scrollerwidth+';left:0px;top:0px">')
document.write(slideimages[1])
document.writeln('</div>')
document.writeln('</div>')
document.writeln('</div>')
}
</script>
<p align="center"><font face="Arial" size="-2">Free DHTML scripts provided by<br>
<a href="http://dynamicdrive.com">Dynamic Drive</a></font></p>

CONVEYOR SLIDESHOW
<script type="text/javascript">
/***********************************************
* Conveyor belt slideshow script- Dynamic Drive DHTML code library
(www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit Dynamic Drive at http://www.dynamicdrive.com/ for full source code
***********************************************/
//Specify the slider's width (in pixels)
var sliderwidth="300px"
//Specify the slider's height
var sliderheight="150px"
//Specify the slider's slide speed (larger is faster 1-10)
var slidespeed=3
//configure background color:
slidebgcolor="#EAEAEA"
//Specify the slider's images
var leftrightslide=new Array()
var finalslide=''
leftrightslide[0]='<a href="http://"><img src="dynamicbook1.gif" border=1></a>'
leftrightslide[1]='<a href="http://"><img src="dynamicbook2.gif" border=1></a>'
leftrightslide[2]='<a href="http://"><img src="dynamicbook3.gif" border=1></a>'
leftrightslide[3]='<a href="http://"><img src="dynamicbook4.gif" border=1></a>'
leftrightslide[4]='<a href="http://"><img src="dynamicbook5.gif" border=1></a>'
//Specify gap between each image (use HTML):
var imagegap=" "
//Specify pixels gap between each slideshow rotation (use integer):
var slideshowgap=5
////NO NEED TO EDIT BELOW THIS LINE////////////
var copyspeed=slidespeed
leftrightslide='<nobr>'+leftrightslide.join(imagegap)+'</nobr>'
var iedom=document.all||document.getElementById
if (iedom)
document.write('<span id="temp" style="visibility:hidden;position:absolute;top:-100px;left:9000px">'+leftrightslide+'</span>')
var actualwidth=''
var cross_slide, ns_slide

function fillup(){
if (iedom){
cross_slide=document.getElementById? document.getElementById("test2") :
document.all.test2
cross_slide2=document.getElementById? document.getElementById("test3") :
document.all.test3
cross_slide.innerHTML=cross_slide2.innerHTML=leftrightslide
actualwidth=document.all? cross_slide.offsetWidth :
document.getElementById("temp").offsetWidth
cross_slide2.style.left=actualwidth+slideshowgap+"px"
}
else if (document.layers){
ns_slide=document.ns_slidemenu.document.ns_slidemenu2
ns_slide2=document.ns_slidemenu.document.ns_slidemenu3
ns_slide.document.write(leftrightslide)
ns_slide.document.close()
actualwidth=ns_slide.document.width
ns_slide2.left=actualwidth+slideshowgap
ns_slide2.document.write(leftrightslide)
ns_slide2.document.close()
}
lefttime=setInterval("slideleft()",30)
}
window.onload=fillup
function slideleft(){
if (iedom){
if (parseInt(cross_slide.style.left)>(actualwidth*(-1)+8))
cross_slide.style.left=parseInt(cross_slide.style.left)-copyspeed+"px"
else
cross_slide.style.left=parseInt(cross_slide2.style.left)+actualwidth+slideshowgap+"px"
if (parseInt(cross_slide2.style.left)>(actualwidth*(-1)+8))
cross_slide2.style.left=parseInt(cross_slide2.style.left)-copyspeed+"px"
else
cross_slide2.style.left=parseInt(cross_slide.style.left)+actualwidth+slideshowgap+"px"
}
else if (document.layers){
if (ns_slide.left>(actualwidth*(-1)+8))
ns_slide.left-=copyspeed
else
ns_slide.left=ns_slide2.left+actualwidth+slideshowgap
if (ns_slide2.left>(actualwidth*(-1)+8))
ns_slide2.left-=copyspeed
else
ns_slide2.left=ns_slide.left+actualwidth+slideshowgap
}

}
if (iedom||document.layers){
with (document){
document.write('<table border="0" cellspacing="0" cellpadding="0"><td>')
if (iedom){
write('<div
style="position:relative;width:'+sliderwidth+';height:'+sliderheight+';overflow:hidden">')
write('<div style="position:absolute;width:'+sliderwidth+';height:'+sliderheight+';backgroundcolor:'+slidebgcolor+'" onMouseover="copyspeed=0"
onMouseout="copyspeed=slidespeed">')
write('<div id="test2" style="position:absolute;left:0px;top:0px"></div>')
write('<div id="test3" style="position:absolute;left:-1000px;top:0px"></div>')
write('</div></div>')
}
else if (document.layers){
write('<ilayer width='+sliderwidth+' height='+sliderheight+' name="ns_slidemenu"
bgColor='+slidebgcolor+'>')
write('<layer name="ns_slidemenu2" left=0 top=0 onMouseover="copyspeed=0"
onMouseout="copyspeed=slidespeed"></layer>')
write('<layer name="ns_slidemenu3" left=0 top=0 onMouseover="copyspeed=0"
onMouseout="copyspeed=slidespeed"></layer>')
write('</ilayer>')
}
document.write('</td></table>')
}
}
</script>
<p align="center"><font face="Arial" size="-2">Free DHTML scripts provided by<br>
<a href="http://dynamicdrive.com">Dynamic Drive</a></font></p>

BACKGROUND SLIDESHOW
<style>
body{
/*Remove below line to make bgimage NOT fixed*/
background-attachment:fixed;
background-repeat: no-repeat;
/*Use center center in place of 300 200 to center bg image*/
background-position: 300 200;
}
</style>
<script language="JavaScript1.2">
//Background Image Slideshow- Dynamic Drive (www.dynamicdrive.com)
//For full source code, 100's more DHTML scripts, and TOS,
//visit http://www.dynamicdrive.com
//Specify background images to slide
var bgslides=new Array()
bgslides[0]="bgslide.jpg"
bgslides[1]="bgslide2.jpg"
bgslides[2]="bgslide3.jpg"
//Specify interval between slide (in miliseconds)
var speed=3000
//preload images
var processed=new Array()
for (i=0;i<bgslides.length;i++){
processed[i]=new Image()
processed[i].src=bgslides[i]
}
var inc=-1
function slideback(){
if (inc<bgslides.length-1)
inc++
else
inc=0
document.body.background=processed[inc].src
}
if (document.all||document.getElementById)
window.onload=new Function('setInterval("slideback()",speed)')

</script>

DYNAMIC IMAGE SELECTOR


<form name="dynamicselector">
<table border="0" width="100%" cellspacing="0" cellpadding="0" height="178">
<tr>
<td width="35%" valign="top" align="left">
<select name="dynamicselector2" size="4"
onChange="generateimage(this.options[this.selectedIndex].value)">
<option value="http://images.amazon.com/images/P/1565924940.01.TZZZZZZZ.jpg"
selected>DHTML Guide</option>
<option
value="http://images.amazon.com/images/P/0201353415.01.TZZZZZZZ.jpg">DHTML
QuickStart</option>
<option
value="http://images.amazon.com/images/P/1556225865.01.TZZZZZZZ.jpg">HTML4</opti
on>
<option
value="http://images.amazon.com/images/P/1861001746.01.TZZZZZZZ.jpg">IE5
DHTML</option>
</select>
</td>
<td width="65%" valign="top" align="left"><ilayer id="dynamic1" width=100%
height=178><layer id="dynamic2" width=100% height=178><div
id="dynamic3"></div></layer></ilayer></td>
</tr>
</table>
</form>
<script>
//Dynamic Image selector Script- Dynamic Drive (www.dynamicdrive.com)
//For full source code, installation instructions,
//100's more DHTML scripts, visit dynamicdrive.com
//enter image descriptions ("" for blank)
var description=new Array()
description[0]="DHTML: The Definitive Guide"
description[1]="DHTML Visual QuickStart Guide"
description[2]="HTML 4 and DHTML"
description[3]="IE5 DHTML Reference"
var ie4=document.all
var ns6=document.getElementById
var tempobj=document.dynamicselector.dynamicselector2

if (ie4||ns6)
var contentobj=document.getElementById? document.getElementById("dynamic3"):
document.all.dynamic3
function generateimage(which){
if (ie4||ns6){
contentobj.innerHTML='<center>Loading image...</center>'
contentobj.innerHTML='<center><img
src="'+which+'"><br><br>'+description[tempobj.options.selectedIndex]+'</center>'
}
else if (document.layers){
document.dynamic1.document.dynamic2.document.write('<center><img
src="'+which+'"><br><br>'+description[tempobj.options.selectedIndex]+'</center>')
document.dynamic1.document.dynamic2.document.close()
}
else
alert('You need NS 4+ or IE 4+ to view the images!')
}
function generatedefault(){
generateimage(tempobj.options[tempobj.options.selectedIndex].value)
}
if (ie4||ns6||document.layers){
if (tempobj.options.selectedIndex!=-1){
if (ns6)
generatedefault()
else
window.onload=generatedefault
}
}
</script>

FLOATING MENU SCRIPT


<script>
if (!document.layers)
document.write('<div id="divStayTopLeft" style="position:absolute">')
</script>
<layer id="divStayTopLeft">
<!--EDIT BELOW CODE TO YOUR OWN MENU-->
<table border="1" width="130" cellspacing="0" cellpadding="0">
<tr>
<td width="100%" bgcolor="#FFFFCC">
<p align="center"><b><font size="4">Menu</font></b></td>
</tr>
<tr>
<td width="100%" bgcolor="#FFFFFF">
<p align="left"> <a href="http://www.dynamicdrive.com">Dynamic Drive</a><br>
<a href="http://www.dynamicdrive.com/new.htm">What's New</a><br>
<a href="http://www.dynamicdrive.com/hot.htm">What's Hot</a><br>
<a href="http://www.dynamicdrive.com/faqs.htm">FAQs</a><br>
<a href="http://www.dynamicdrive.com/morezone/">More Zone</a></td>
</tr>
</table>
<!--END OF EDIT-->
</layer>
<script type="text/javascript">
/*
Floating Menu script- Roy Whittle (http://www.javascript-fx.com/)
Script featured on/available at http://www.dynamicdrive.com/
This notice must stay intact for use
*/
//Enter "frombottom" or "fromtop"
var verticalpos="frombottom"
if (!document.layers)
document.write('</div>')
function JSFX_FloatTopDiv()
{
var startX = 3,
startY = 150;
var ns = (navigator.appName.indexOf("Netscape") != -1);
var d = document;

function ml(id)
{
var el=d.getElementById?d.getElementById(id):d.all?d.all[id]:d.layers[id];
if(d.layers)el.style=el;
el.sP=function(x,y){this.style.left=x;this.style.top=y;};
el.x = startX;
if (verticalpos=="fromtop")
el.y = startY;
else{
el.y = ns ? pageYOffset + innerHeight : document.body.scrollTop +
document.body.clientHeight;
el.y -= startY;
}
return el;
}
window.stayTopLeft=function()
{
if (verticalpos=="fromtop"){
var pY = ns ? pageYOffset : document.body.scrollTop;
ftlObj.y += (pY + startY - ftlObj.y)/8;
}
else{
var pY = ns ? pageYOffset + innerHeight : document.body.scrollTop +
document.body.clientHeight;
ftlObj.y += (pY - startY - ftlObj.y)/8;
}
ftlObj.sP(ftlObj.x, ftlObj.y);
setTimeout("stayTopLeft()", 10);
}
ftlObj = ml("divStayTopLeft");
stayTopLeft();
}
JSFX_FloatTopDiv();
</script>

SCROLLABLE MENU LINKS


<script type="text/javascript">
/***********************************************
* Scrollable Menu Links- Dynamic Drive DHTML code library (www.dynamicdrive.com)
* Visit http://www.dynamicDrive.com for hundreds of DHTML scripts
* This notice must stay intact for legal use
***********************************************/
//configure path for left and right arrows
var goleftimage='pointer2.gif'
var gorightimage='pointer.gif'
//configure menu width (in px):
var menuwidth=300
//configure menu height (in px):
var menuheight=25
//Specify scroll buttons directions ("normal" or "reverse"):
var scrolldir="normal"
//configure scroll speed (1-10), where larger is faster
var scrollspeed=6
//specify menu content
var menucontents='<nobr><a href="http://www.dynamicdrive.com">Dynamic Drive</a> | <a
href="http://www.javascriptkit.com">JavaScript Kit</a> | <a
href="http://www.codingforums.com">CodingForums.com</a> | <a
href="http://www.builder.com">Builder.com</a> | <a
href="http://freewarejava.com">Freewarejava.com</a></nobr>'
////NO NEED TO EDIT BELOW THIS LINE////////////
var iedom=document.all||document.getElementById
var leftdircode='onMouseover="moveleft()" onMouseout="clearTimeout(lefttime)"'
var rightdircode='onMouseover="moveright()" onMouseout="clearTimeout(righttime)"'
if (scrolldir=="reverse"){
var tempswap=leftdircode
leftdircode=rightdircode
rightdircode=tempswap
}
if (iedom)
document.write('<span id="temp" style="visibility:hidden;position:absolute;top:-100;left:5000">'+menucontents+'</span>')
var actualwidth=''
var cross_scroll, ns_scroll
var loadedyes=0
function fillup(){
if (iedom){
cross_scroll=document.getElementById? document.getElementById("test2") :
document.all.test2

cross_scroll.innerHTML=menucontents
actualwidth=document.all? cross_scroll.offsetWidth :
document.getElementById("temp").offsetWidth
}
else if (document.layers){
ns_scroll=document.ns_scrollmenu.document.ns_scrollmenu2
ns_scroll.document.write(menucontents)
ns_scroll.document.close()
actualwidth=ns_scroll.document.width
}
loadedyes=1
}
window.onload=fillup
function moveleft(){
if (loadedyes){
if (iedom&&parseInt(cross_scroll.style.left)>(menuwidth-actualwidth)){
cross_scroll.style.left=parseInt(cross_scroll.style.left)-scrollspeed+"px"
}
else if (document.layers&&ns_scroll.left>(menuwidth-actualwidth))
ns_scroll.left-=scrollspeed
}
lefttime=setTimeout("moveleft()",50)
}
function moveright(){
if (loadedyes){
if (iedom&&parseInt(cross_scroll.style.left)<0)
cross_scroll.style.left=parseInt(cross_scroll.style.left)+scrollspeed+"px"
else if (document.layers&&ns_scroll.left<0)
ns_scroll.left+=scrollspeed
}
righttime=setTimeout("moveright()",50)
}
if (iedom||document.layers){
with (document){
write('<table border="0" cellspacing="0" cellpadding="2">')
write('<td valign="middle"><a href="#" '+leftdircode+'><img
src="'+goleftimage+'"border=0></a> </td>')
write('<td width="'+menuwidth+'px" valign="top">')
if (iedom){
write('<div
style="position:relative;width:'+menuwidth+'px;height:'+menuheight+'px;overflow:hidden;">'
)
write('<div id="test2" style="position:absolute;left:0;top:0">')
write('</div></div>')
}
else if (document.layers){

write('<ilayer width='+menuwidth+' height='+menuheight+' name="ns_scrollmenu">')


write('<layer name="ns_scrollmenu2" left=0 top=0></layer></ilayer>')
}
write('</td>')
write('<td valign="middle"> <a href="#" '+rightdircode+'>')
write('<img src="'+gorightimage+'"border=0></a>')
write('</td></table>')
}
}
</script>

BLM MULTILEVEL MENU


<link rel="stylesheet" href="css.css" />
<!--[if IE]>
<link rel="stylesheet" href="hack.css" />
<script type="text/javascript">
window.mlrunShim = true;
</script>
<![endif]-->
<script type="text/javascript" src="js.js">
/***********************************************
* Blm Multi-level Effect menu- By Brady Mulhollem at http://www.bradyontheweb.com/
* Script featured on DynamicDrive.com
* Visit Dynamic Drive at http://www.dynamicdrive.com/ for this script and more
***********************************************/
</script>
<div class="mlmenu [horizontal|vertical] [effect] [arrow] [color_class] [inaccesible]">
<ul>
<li><a href="#">Link</a></li>
<li><a href="#">Link</a></li>
<li><a href="#">Link</a>
<ul>
<li><a href="#">Link</a></li>
<li><a href="#">Link</a></li>
</ul>
</li>
<li><a href="#">Link</a></li>
<li><a href="#">Link</a></li>
<li><a href="#">Link</a>
<ul>
<li><a href="#">Link</a></li>
<li><a href="#">Link</a></li>
<li><a href="#">Link</a></li>
<li><a href="#">Link</a>
<ul>
<li><a href="#">Link</a></li>
<li><a href="#">Link</a></li>
<li><a href="#">Link</a>
<ul>
<li><a href="#">Link</a></li>
<li><a href="#">Link</a></li>
<li><a href="#">Link</a></li>
</ul>

</li>
<li><a href="#">Link</a></li>
<li><a href="#">Link</a></li>
</ul>
</li>
<li><a href="#">Link</a></li>
<li><a href="#">Link</a></li>
<li><a href="#">Link</a></li>
</ul>
</li>
<li><a href="#">Link</a></li>
</ul>
</div>

TRANSLUCENT SCROLLER
<script language="JavaScript1.2">
//Translucent scroller- By Dynamic Drive
//For full source code and more DHTML scripts, visit http://www.dynamicdrive.com
//This credit MUST stay intact for use
var scroller_width='150px'
var scroller_height='115px'
var bgcolor='#E0EFD1'
var pause=3000 //SET PAUSE BETWEEN SLIDE (3000=3 seconds)
var scrollercontent=new Array()
//Define scroller contents. Extend or contract array as needed
scrollercontent[0]='Visit our partner site <a
href="http://freewarejava.com">Freewarejava.com </a>for free Java applets!'
scrollercontent[1]='Got JavaScript? <a href="http://www.javascriptkit.com">JavaScript
Kit</a> is the most comprehensive JavaScript site online.'
scrollercontent[2]='Link to Dynamic Drive on your site. Please visit our <a
href="http://www.dynamicdrive.com/link.htm">links page</a>.'
////NO need to edit beyond here/////////////
var ie4=document.all
var dom=document.getElementById&&navigator.userAgent.indexOf("Opera")==-1
if (ie4||dom)
document.write('<div
style="position:relative;width:'+scroller_width+';height:'+scroller_height+';overflow:hidden"
><div id="canvas0" style="position:absolute;backgroundcolor:'+bgcolor+';width:'+scroller_width+';height:'+scroller_height+';top:'+scroller_height+';fi
lter:alpha(opacity=20);-moz-opacity:0.2;"></div><div id="canvas1"
style="position:absolute;backgroundcolor:'+bgcolor+';width:'+scroller_width+';height:'+scroller_height+';top:'+scroller_height+';fi
lter:alpha(opacity=20);-moz-opacity:0.2;"></div></div>')
else if (document.layers){
document.write('<ilayer id=tickernsmain visibility=hide width='+scroller_width+'
height='+scroller_height+' bgColor='+bgcolor+'><layer id=tickernssub
width='+scroller_width+' height='+scroller_height+' left=0
top=0>'+scrollercontent[0]+'</layer></ilayer>')
}
var curpos=scroller_height*(1)
var degree=10
var curcanvas="canvas0"
var curindex=0
var nextindex=1

function moveslide(){
if (curpos>0){
curpos=Math.max(curpos-degree,0)
tempobj.style.top=curpos+"px"
}
else{
clearInterval(dropslide)
if (crossobj.filters)
crossobj.filters.alpha.opacity=100
else if (crossobj.style.MozOpacity)
crossobj.style.MozOpacity=1
nextcanvas=(curcanvas=="canvas0")? "canvas0" : "canvas1"
tempobj=ie4? eval("document.all."+nextcanvas) : document.getElementById(nextcanvas)
tempobj.innerHTML=scrollercontent[curindex]
nextindex=(nextindex<scrollercontent.length-1)? nextindex+1 : 0
setTimeout("rotateslide()",pause)
}
}
function rotateslide(){
if (ie4||dom){
resetit(curcanvas)
crossobj=tempobj=ie4? eval("document.all."+curcanvas) :
document.getElementById(curcanvas)
crossobj.style.zIndex++
if (crossobj.filters)
document.all.canvas0.filters.alpha.opacity=document.all.canvas1.filters.alpha.opacity=20
else if (crossobj.style.MozOpacity)
document.getElementById("canvas0").style.MozOpacity=document.getElementById("canvas
1").style.MozOpacity=0.2
var temp='setInterval("moveslide()",50)'
dropslide=eval(temp)
curcanvas=(curcanvas=="canvas0")? "canvas1" : "canvas0"
}
else if (document.layers){
crossobj.document.write(scrollercontent[curindex])
crossobj.document.close()
}
curindex=(curindex<scrollercontent.length-1)? curindex+1 : 0
}
function resetit(what){
curpos=parseInt(scroller_height)*(1)
var crossobj=ie4? eval("document.all."+what) : document.getElementById(what)
crossobj.style.top=curpos+"px"
}
function startit(){

crossobj=ie4? eval("document.all."+curcanvas) : dom? document.getElementById(curcanvas)


: document.tickernsmain.document.tickernssub
if (ie4||dom){
crossobj.innerHTML=scrollercontent[curindex]
rotateslide()
}
else{
document.tickernsmain.visibility='show'
curindex++
setInterval("rotateslide()",pause)
}
}
if (ie4||dom||document.layers)
window.onload=startit
</script>

Forms
<HTML><HEAD>
<TITLE>ASP Web Pro</TITLE>
</HEAD>
<BODY>
<FORM NAME="YourFormName" METHOD="post" ACTION="confirmationpage.asp">
<TABLE>
<TR><TD>Email: </TD>
<TD><INPUT TYPE="text" NAME="Email" SIZE="50"></TD></TR>
<TR><TD>Namel: </TD>
<TD><INPUT TYPE="text" NAME="Name" SIZE="50"></TD></TR>
</TABLE>
<INPUT TYPE="submit" NAME="Submit" VALUE="Submit Form">
</BODY>
</HTML>

<SELECT NAME="Subject">
<OPTION SELECTED>List Item 1</OPTION>
<OPTION>List Item 2</OPTION>
<OPTION>List Item 3</OPTION>
</SELECT>

<BODY>
<table>
<tr><td><% Response.Write objRS("Company") %></td></tr>
<tr><td><% Response.Write objRS("Address") %></td></tr>
<tr><td><% Response.Write objRS("City") %></td></tr>
<tr><td><% Response.Write objRS("State") %></td></tr>
<tr><td><% Response.Write objRS("Zipcode") %></td></tr>
</table>
</BODY>
<%
' Don't forget to close your connection after you display your data.
objRS.Close
Set objRS = Nothing
objConn.Close
Set objConn = Nothing
%>

<table>
<% DO WHILE NOT objRS.EOF %>
<tr><td><% Response.Write objRS("Company") %></td></tr>
<tr><td><% Response.Write objRS("Address") %></td></tr>
<tr><td><% Response.Write objRS("City") %></td></tr>
<tr><td><% Response.Write objRS("State") %></td></tr>
<tr><td><% Response.Write objRS("Zipcode") %></td></tr>
<tr><td><hr></td></tr>
<%
objRS.MoveNext
Loop
%>
</table>
</BODY>
<%
' Don't forget to close your connection after you display your data.
objRS.Close
Set objRS = Nothing
objConn.Close
Set objConn = Nothing
%>

Sql basic
<%
DIM objConn
Set objConn = Server.CreateObject("ADODB.Connection")
objConn.ConnectionString = "DSN=myCONNECTION.dsn"
objConn.Open
DIM mySQL
mySQL = "SELECT * FROM myTABLE"
DIM objRS
Set objRS = Server.CreateObject("ADODB.Recordset")
objRS.Open mySQL, objConn
%>
<HTML>
<HEAD><TITLE></TITLE><HEAD>
<BODY>
Display data from database here.
</BODY>

New wave to handle variables


<%
FirstName = Request.Form("FirstName")
Surname = Request.Form("Surname")
Address1 = Request.Form("Address1")
Address2 = Request.Fomr(Address2")
...
...
%>

Php poll
It's a PHP script, so installation is pretty easy.
Copy '*.php', 'poll_data.txt' and 'vote/*' in your good directory.
Change permissions to 'poll_data.txt' for be writing by nobody (chmod a+rw)
Edit 'poll_data.txt', you will have to do some configuration:
$RESULT_FILE_NAME = "poll_data.txt";
// En: Absolute path and name to file contain poll data.
$QUESTION = "How do you like this Script?";
// En: Question Text.
$ANSWER = array("Love it!", "Like it!", "Its okay..", "I dislike it", "I hate it..");
// En: All answer.
$IMG_DIR_URL = "./vote";
// En: URL Directory of poll graphs.
$REVOTE_TIME = 3600;
// En: Time (second) after people can revote, use cookies.
You can edit 'test.php' to change look.

Za DODAJ U FAVORITE
<script language="JavaScript1.2">

//podesite ime vase stranice i URL


var bookmarkurl="http://www.agencija027.com"
var bookmarktitle="Agencija 027 Prokuplje"
function addbookmark(){
if (document.all)
window.external.AddFavorite(bookmarkurl,bookmarktitle)
}
</script>
ZATIM DA POVEZEM TEKST SA LINKOM
javascript:addbookmark()

ZABRANA DESNOG KLIKA MISEM DA NE MOZE DA KOPIRA SAJT


<script language=JavaScript>
<!-//Zabrana desnog klika misem
//By Maximus (maximus@nsimail.com)
//korak-po-korak upute za ne-programere
//Posjetite http://www.skriptarnica.com
var message="Zabranjeno kopiranje!";
///////////////////////////////////
function clickIE() {if (document.all) {alert(message);return false;}}
function clickNS(e) {if
(document.layers||(document.getElementById&&!document.all)) {
if (e.which==2||e.which==3) {alert(message);return false;}}}
if (document.layers)
{document.captureEvents(Event.MOUSEDOWN);document.onmousedown=clickNS;}
else{document.onmouseup=clickNS;document.oncontextmenu=clickIE;}
// -->
</script>

POP UP PROZORI
Korak 1: Dodajte ovaj dolje kod u <head> dio vae stranice.
<STYLE TYPE="text/css">
<!-BODY {OVERFLOW:scroll;OVERFLOW-X:hidden}
.DEK {POSITION:absolute;VISIBILITY:hidden;Z-INDEX:200;}
//-->
</STYLE>
Korak 2: Dodajte ovaj dolje kod u <body> dio vae stranice.
<DIV ID="dek" CLASS="dek"></DIV>
<SCRIPT TYPE="text/javascript">
<!-/*
korak-po-korak upute za ne-programere
Posjetite http://www.webmajstor.net
*/
Xoffset=-60; // podesavanje mjesta prozora.
Yoffset= 20; // podesavanje mjesta prozora.
var nav,old,iex=(document.all),yyy=-1000;
if(navigator.appName=="Netscape"){(document.layers)?nav=true:old=true;}
if(!old){
var skn=(nav)?document.dek:dek.style;
if(nav)document.captureEvents(Event.MOUSEMOVE);
document.onmousemove=get_mouse;
}
function popup(msg,bak){
var content="<TABLE WIDTH=150 BORDER=1 BORDERCOLOR=black
CELLPADDING=2 CELLSPACING=0 "+
"BGCOLOR="+bak+"><TD ALIGN=center><FONT COLOR=black
SIZE=2>"+msg+"</FONT></TD></TABLE>";
if(old){alert(msg);return;}
else{yyy=Yoffset;
if(nav){skn.document.write(content);skn.document.close();skn.visibility="visible"}
if(iex){document.all("dek").innerHTML=content;skn.visibility="visible"}

}
}
function get_mouse(e){
var x=(nav)?e.pageX:event.x+document.body.scrollLeft;skn.left=x+Xoffset;
var y=(nav)?e.pageY:event.y+document.body.scrollTop;skn.top=y+yyy;
}
function kill(){
if(!old){yyy=-1000;skn.visibility="hidden";}
}
//-->
</SCRIPT>
Korak 3: I na kraju napiite ovo dole u svaki link koji ce sadrzavati prozorcic. U prvom dijelu
napiite tekst koji ce biti u prozoru a u drugom dijelu napiite boju prozora:
ONMOUSEOVER="popup('Opis linka ovdje','orange')"; ONMOUSEOUT="kill()"
Primjer:
<a href="http://www.agencija027.com" ONMOUSEOVER="popup('Najjeftinija I
najkvalitetnija izrada sajtova.','lightblue')"; ONMOUSEOUT="kill()">Agencija027r</a>
Uzivajte!

SHAKE IMAGE SCRIPT


Korak 1: Kopirajte ovo dolje i paste u <head> dio vae stranice:
<style>
.shakeimage{
position:relative
}
</style>
<script language="JavaScript1.2">
/*
Shake image scripta
korak-po-korak upute za ne-programere
Posjetite: http://www.webmajstor.net
*/
//Promijenite jacinu tresanja(sa vecim brojem # veca tresnja)
var rector=3
///////NE MIJENJATI NISTA ISPOD///////////
var stopit=0
var a=1
function init(which){
stopit=0
shake=which
shake.style.left=0
shake.style.top=0
}
function rattleimage(){
if ((!document.all&&!document.getElementById)||stopit==1)
return
if (a==1){
shake.style.top=parseInt(shake.style.top)+rector
}
else if (a==2){
shake.style.left=parseInt(shake.style.left)+rector
}
else if (a==3){
shake.style.top=parseInt(shake.style.top)-rector

}
else{
shake.style.left=parseInt(shake.style.left)-rector
}
if (a<4)
a++
else
a=1
setTimeout("rattleimage()",50)
}
function stoprattle(which){
stopit=1
which.style.left=0
which.style.top=0
}
</script>
Korak 2: Dodajte ovo dolje u <img> tag u sve objekte gdje zelite da se efekt deava:
class="shakeimage" onMouseover="init(this);rattleimage()" onMouseout="stoprattle(this)"

Za primjer:
<img src="slika.gif" class="shakeimage"onMouseover="init(this);rattleimage()"
onMouseout="stoprattle(this)">
skriptarnica (c) 2000 - 2003 :: powered by WEBMAJSTOR - izrada i dizajn web stranica,
programiranje, registracija domena, hosting

Browser poruke (Sve)


Kategorija: SYSTEM
Opis: Scripta koja u dnu browsera vaih posjetitelja utipkava vae poruke.
Demo: Pogledajte donji lijevi dio vaeg browsera ili oko sredine za korisnike NS-a.

Upute
Korak 1: Jednostavno dodajte copy/paste ovaj dole kod odmah iznad </body> taga.
<script>
<!-- Hide from old browsers
// korak-po-korak upute za ne programere.
// Posjetite http://www.agencija027.com
// Sve sto trebate napraviti je da stavite svoj tekst u mjesto mojeg.
// Nemojte zaboraviti da na kraju svake poruke stavite ^
// Ako ne stavite ^ na kraj svih poruka, poruke se nece ponavljati
message

= "Dobro dosli na sajt DELFIN RADIJA iz Prokuplja!^" +


"100.3 MHz fm stereo^" +
"Put do Vas^" +
"pronalazi dobar glas!^" +
"Prokuplje nekad I sad!^" +
" www.delfinradio.co.yu^" +
"^"
scrollSpeed = 25
lineDelay = 1500
// Ne mijenjajte nista ispod //
txt

= ""

function scrollText(pos) {
if (message.charAt(pos) != '^') {
txt = txt + message.charAt(pos)
status = txt
pauze = scrollSpeed
}
else {
pauze = lineDelay
txt = ""
if (pos == message.length-1) pos = -1
}
pos++

setTimeout("scrollText('"+pos+"')",pauze)
}
// Unhide -->
scrollText(0)
</script>

Korak 2: Upute za koristenje scripte nalaze se u samoj scripti.


Uzivajte!

TETIVA MENU
Tetiva menu (Sve)
Kategorija: MENU
Opis: Ova odlicna menu scripta za razliku od ostalih menua, kada dodjete sa miom na link u
status baru se pojavi sadrzaj linka, lako za instaliranje.
Demo:

Zahvala: Riccardo Vas poziva da posjetite njegov JavaScript Directory http://www.jsdir.com/


- oni koji neznaju talijanski...
Upute
Korak 1: Dodajte ovaj kod u sam <body> tag.
<body onResize="self.location.reload()"><DIV ALIGN="justify">
<script src="dynamenu.js"></script>
</div>
Korak2: Usnimite (zip) dynamenu.js i zatim odzipajte u folder vaeg weba.
Korak3: Ovaj kod dodajte odmah iznad </head> taga.
<style>
.menuIEb {font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 11px;fontweight:bold;color:ffffff;text-decoration:none}
.menuNNb {font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12px;fontweight:bold;color:ffffff;text-decoration:none}
.menuIE {font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 10px;fontweight:bold;color:ffffff;text-decoration:none}
.menuNN {font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 11px;fontweight:bold;color:ffffff;text-decoration:none}
</style>
Korak4: Zatim otvorite dynamenu.js file (ie: Notepad) i dodajte svoje linkove

LEBDECI MENI
<div id="point1" STYLE="position:absolute;visibility:visible;">
<!--Please delete this table and insert into your html elements-->
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td>
<a href="http://www.agencija027.com">
<img src="...scripte/images2" width=96 height=60 alt="" border="0">
</a>
</td>
</tr>
<tr>
<td>
<center><a href="marketing.htm">
<font face="Arial" size="2" color="#0000FF">Marketing</font>
</a></center>
</td>
</tr>
<tr>
<td>
<center><a href="nekretnine.htm">
<font face="Arial" size="2" color="#0000FF">Nekretnine</font>
</a></center>
</td>
</tr>
<tr>
<td>
<center><a href="turizam.htm">
<font face="Arial" size="2" color="#0000FF">Turizam</font>
</a></center>
</td>
</tr>
<tr>
<td>
<center><a href="kontakt.htm">
<font face="Arial" size="2" color="#0000FF">Kontakt</font>
</a></center>
</td>
</tr>
</table>
<!--End of the customizable area, please do not delete div the tag -->
</div>
<script LANGUAGE="JavaScript1.2">

/*
Lebdeci menu - Bruce Anderson (http://appletlib.tripod.com)
korak-po-korak upute za ne-programere
Posjetite http://www.skriptarnica.com
*/
var XX=20; // X position of the scrolling objects
var xstep=1;
var delay_time=60;
//Ne mijenjajte nista ispod
var YY=0;
var ch=0;
var oh=0;
var yon=0;
var ns4=document.layers?1:0
var ie=document.all?1:0
var ns6=document.getElementById&&!document.all?1:0
if(ie){
YY=document.body.clientHeight;
point1.style.top=YY;
}
else if (ns4){
YY=window.innerHeight;
document.point1.pageY=YY;
document.point1.visibility="hidden";
}
else if (ns6){
YY=window.innerHeight
document.getElementById('point1').style.top=YY
}
function reloc1()
{
if(yon==0){YY=YY-xstep;}
else{YY=YY+xstep;}
if (ie){
ch=document.body.clientHeight;
oh=point1.offsetHeight;
}
else if (ns4){
ch=window.innerHeight;
oh=document.point1.clip.height;
}
else if (ns6){

ch=window.innerHeight
oh=document.getElementById("point1").offsetHeight
}
if(YY<0){yon=1;YY=0;}
if(YY>=(ch-oh)){yon=0;YY=(ch-oh);}
if(ie){
point1.style.left=XX;
point1.style.top=YY+document.body.scrollTop;
}
else if (ns4){
document.point1.pageX=XX;
document.point1.pageY=YY+window.pageYOffset;
}
else if (ns6){
document.getElementById("point1").style.left=XX
document.getElementById("point1").style.top=YY+window.pageYOffset
}
}
function onad()
{
if(ns4)
document.point1.visibility="visible";
loopfunc();
}
function loopfunc()
{
reloc1();
setTimeout('loopfunc()',delay_time);
}
if (ie||ns4||ns6)
window.onload=onad
</script>

VEBMAJSTOR MENU
Kategorija: MENU
Opis: Unutra-van menu ce zadovoljiti i najzahtjevnije webmastere. Izmeu duge liste opcija
koju ova scripta ima jesu i:
Opcija za staticku poziciju menija na stranici.
Podrka da se linkovi mogu podici u novom frame-u ili browseru.
Mogucnost da se prikazu header-i i subheader-i unutar menija.
I na kraju jo i to da radi na svim browserima!
Demo: S vae lijeve...
Upute:
Korak 1: Prvo, "skinite" ova dva file-a "menu.js" i "main.js" i usnimite ih u direktorij vae
stranice.
MENU.JS
if (IE) {document.write('<DIV ID="ssm2" style="visibility:hidden;Position : Absolute ;Left :
0px ;Top : '+YOffset+'px ;Z-Index : 20;width:1px" onmouseover="moveOut()"
onmouseout="moveBack()">')}
if (NS) {document.write('<LAYER visibility="hide" top="'+YOffset+'" name="ssm2"
bgcolor="'+menuBGColor+'" left="0" onmouseover="moveOut()"
onmouseout="moveBack()">')}
tempBar=""
for (i=0;i<barText.length;i++) {
tempBar+=barText.substring(i, i+1)+"<BR>"}
document.write('<table border="0" cellpadding="0" cellspacing="1" width="'+
(menuWidth+16+2)+'" bgcolor="'+menuBGColor+'"><tr><td bgcolor="'+hdrBGColor+'"
WIDTH="'+menuWidth+'">&nbsp;<font face="'+hdrFontFamily+'" Size="'+hdrFontSize+'"
COLOR="'+hdrFontColor+'"><b>'+menuHeader+'</b></font></td><td align="center"
rowspan="100" width="16" bgcolor="'+barBGColor+'"><p align="center"><font
face="'+barFontFamily+'" Size="'+barFontSize+'"
COLOR="'+barFontColor+'"><B>'+tempBar+'</B></font></p></TD></tr>')
function addItem(text, link, target) {
if (!target) {target=linkTarget}
document.write('<TR><TD BGCOLOR="'+linkBGColor+'"
onmouseover="bgColor=\''+linkOverBGColor+'\'"
onmouseout="bgColor=\''+linkBGColor+'\'"><ILAYER><LAYER
onmouseover="bgColor=\''+linkOverBGColor+'\'"
onmouseout="bgColor=\''+linkBGColor+'\'" WIDTH="100%"><FONT
face="'+linkFontFamily+'" Size="'+linkFontSize+'">&nbsp;<A HREF="'+link+'"
target="'+target+'"
CLASS="ssm2Items">'+text+'</A></FONT></LAYER></ILAYER></TD></TR>')}

function addHdr(text) {
document.write('<tr><td bgcolor="'+hdrBGColor+'" WIDTH="140">&nbsp;<font
face="'+hdrFontFamily+'" Size="'+hdrFontSize+'"
COLOR="'+hdrFontColor+'"><b>'+text+'</b></font></td></tr>')}
//Only edit the script between HERE
addItem('Naslovnica', 'http://www.webmajstor.net/index.htm', '');
addItem('Naj scripte', 'http://www.webmajstor.net/naj.htm', '');
addItem('Za mia', 'http://www.webmajstor.net/mis.htm', '');
addItem('Menu', 'http://www.webmajstor.net/menu.htm', '');
addItem('Satovi', 'http://www.webmajstor.net/sat.htm', '');
addItem('Counter', 'http://www.webmajstor.net/brojac.htm', '');
addHdr('Ostali linkovi');
addItem('Bug', 'http://www.bug.hr', '_blank');
addItem('Vidi', 'http://www.vidi.hr', '_blank');
addItem('Monitor', 'http://www.monitor.hr', '_blank');
addItem('Hinet', 'http://www.ht.hr', '_blank');
addItem('GrafikaKreimir', 'http://www.grafika-kresimir.hr', '_blank');
// and HERE! No more!
document.write('<tr><td bgcolor="'+hdrBGColor+'"><font size="0"
face="Arial">&nbsp;</font></td></TR></table>')
if (IE) {document.write('</DIV>')}
if (NS) {document.write('</LAYER>')}
if ((IE||NS) && (menuIsStatic=="yes"&&staticMode)) {makeStatic(staticMode);}

MAIN.JS
function MM_displayStatusMsg(msgStr) {
status=msgStr;
document.MM_returnValue = true;
}
function highlight(x){
document.forms[x].elements[0].focus()
document.forms[x].elements[0].select()
}
function MM_jumpMenu(targ,selObj,restore){
eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
if (restore) selObj.selectedIndex=0;
}
var NS

IE=document.all;
NS=document.layers;
hdrFontFamily="Verdana, Arial, Helevetica";
hdrFontSize="2";
hdrFontColor="white";
hdrBGColor="#FF9900";
linkFontFamily="Verdana, Arial, Helevetica";
linkFontSize="2";
linkBGColor="white";
linkOverBGColor="#CCCCCC";
linkTarget="_top";
YOffset=60;
staticYOffset=20;
menuBGColor="black";
menuIsStatic="no";
menuHeader="Glavni linkovi"
menuWidth=150; // Must be a multiple of 5!
staticMode="advanced"
barBGColor="#1298fd";
barFontFamily="Verdana";
barFontSize="2";
barFontColor="white";
barText="MENU";
function moveOut() {
if (window.cancel) {
cancel="";
}
if (window.moving2) {
clearTimeout(moving2);
moving2="";
}
if ((IE && ssm2.style.pixelLeft<0)||(NS && document.ssm2.left<0)) {
if (IE) {ssm2.style.pixelLeft += (5%menuWidth);
}
if (NS) {
document.ssm2.left += (5%menuWidth);
}
moving1 = setTimeout('moveOut()', 5)
}
else {
clearTimeout(moving1)
}
};
function moveBack() {

cancel = moveBack1()
}
function moveBack1() {
if (window.moving1) {
clearTimeout(moving1)
}
if ((IE && ssm2.style.pixelLeft>(-menuWidth))||(NS && document.ssm2.left>(-150))) {
if (IE) {ssm2.style.pixelLeft -= (5%menuWidth);
}
if (NS) {
document.ssm2.left -= (5%menuWidth);
}
moving2 = setTimeout('moveBack1()', 5)}
else {
clearTimeout(moving2)
}
};
lastY = 0;
function makeStatic(mode) {
if (IE) {winY = document.body.scrollTop;var NM=ssm2.style
}
if (NS) {winY = window.pageYOffset;var NM=document.ssm2
}
if (mode=="smooth") {
if ((IE||NS) && winY!=lastY) {
smooth = .2 * (winY - lastY);
if(smooth > 0) smooth = Math.ceil(smooth);
else smooth = Math.floor(smooth);
if (IE) NM.pixelTop+=smooth;
if (NS) NM.top+=smooth;
lastY = lastY+smooth;
}
setTimeout('makeStatic("smooth")', 1)
}
else if (mode=="advanced") {
if ((IE||NS) && winY>YOffset-staticYOffset) {
if (IE) {NM.pixelTop=winY+staticYOffset
}
if (NS) {NM.top=winY+staticYOffset
}
}
else {
if (IE) {NM.pixelTop=YOffset
}
if (NS) {NM.top=YOffset-7
}
}

setTimeout('makeStatic("advanced")', 1)
}
}
function init() {
if (IE) {
ssm2.style.pixelLeft = -menuWidth;
ssm2.style.visibility = "visible"
}
else if (NS) {
document.ssm2.left = -menuWidth;
document.ssm2.visibility = "show"
}
else {
alert('Choose either the "smooth" or "advanced" static modes!')
}
}
function MM_displayStatusMsg(msgStr) {
status=msgStr;
document.MM_returnValue = true;
}

Korak 2: Copy zatim paste ovaj dolje kod u <head> dio vae stranice.
<style>
<!-/*
Maximus' Slide-In Menu (By Maximus at http://absolutegb.com/maximus/)
Posjetite http://www.skriptarnica.net
*/
#ssm2 A {
color:black;
text-decoration:none;

font-size:12;
font-family:verdana;
}
#ssm2 A:hover {
color:red;
}
-->
</style>
<script language="javascript1.2" src="main.js"></script>
Korak 3: Dodajte ovaj dolje kod u <body> dio vae stranice odmah prateci <body> tag.
<script language="javascript1.2" src="menu.js"></script>

Korak 4: Jo malo. I na kraju upiite ovo dolje (crveno) u sam <body> tag kao to je i
prikazano:
<body onLoad="init()">
Sve to zelite promijeniti nalazi se u u "main.js" i "menu.js" file-u koji mozete konfigurirati
uz pomoc bilo kojeg tekstualnog editora (ie: Notepad).

Statini menu (Sve)


Kategorija: MENU
Opis: Ovo je jednostavna scripta koja stoji na lijevoj strani browsera, dijelom vidljiva, za
razliku od verzije2 koja se vidi u cijelosti.
Demo: Sa lijeve strane.

Upute:
Korak 1: Dodajte ovaj dolje kod u <head> dio vae stranice.
<script language="JavaScript1.2">
/*
Static menu script (By maXimus, maximus@nsimail.com, http://absolutegb.com/maximus/)
Prilogodba: http://www.skriptarnica.com
*/
function move(x) {
if (document.all) {
object1.style.pixelLeft += x;
object1.style.visibility = "visible"}
else if (document.layers) {
document.object1.left += x;
document.object1.visibility = "show"}};
function makeStatic() {
if (document.all) {object1.style.pixelTop=document.body.scrollTop+20}
else {eval(document.object1.top=eval(window.pageYOffset+20));}
setTimeout("makeStatic()",0);}
</script>
<style>
<!-.hl

{
Background-Color : silver;
Cursor:hand;

.n

}
{
Cursor:hand;

}
-->
</style>

Korak 2: Dodajte ovaj dolje kod u <body> dio vae stranice izvan svih tagova
<LAYER visibility="hide" top="20" name="object1" bgcolor="black" left="0"
onmouseover="move(132)" onmouseout="move(-132)">
<script language="JavaScript1.2">
function positionmenu(){
move(-132)
}
if (document.all) {document.write('<DIV ID="object1" style="visibility:hidden;cursor:hand;
Position : Absolute ;Left : 0px ;Top : 20px ;Z-Index : 20" onmouseover="move(132)"
onmouseout="move(-132)">')}
</script>
<table border="0" cellpadding="0" cellspacing="1" width="150" bgcolor="#000000">
<tr><td bgcolor="#0099FF"> <font size="4" face="Verdana, Arial,
Helevetica"><b>Menu</b></font></td>
<script language="JavaScript1.2">
document.write('<td align="center" rowspan="100" width="16" bgcolor="#FF6666"><span
style="font-size:13px"><p align="center"><font face="Arial
Black">S<br>I<br>D<br>E<br>M<br>E<br>N<BR>U</font></p></span></TD>')
</script>
</tr>
<script language="JavaScript1.2"><!-if (document.all||document.layers) {
makeStatic();}
var text=new Array();
var thelink=new Array();
//Ovdje promijenite linkove. Koliko god...
text[0]="Naslovna";
text[1]="Marketing";
text[2]="Modeli";
text[3]="Nekretnine";
text[4]="Chat";
text[5]="Forum";
text[6]="Slike";
text[7]="Oglasi";
thelink[0]="index.htm";
thelink[1]="marketing.htm";
thelink[2]="modeli.htm";

thelink[3]="nekretnine.htm";
thelink[4]="chat.htm";
thelink[5]="forum.htm";
thelink[6]="slike.htm";
thelink[7]="oglasi.htm";
//enter target of above links
//Valid values are '', 'new', or 'framename' (where 'framename' is the name of the frame you
wish the links to target)
var linktarget=''
///NE MIJENJAJTE NISTA ISPOD OVE LINIJE////////////////
function navigateie(which){
if (linktarget=='')
window.location=thelink[which]
else if (linktarget=='new')
window.open(thelink[which])
else{
temp_var=eval("window.parent."+linktarget)
temp_var.location=thelink[which]
}
}
for (i=0;i<=text.length-1;i++)
if (document.all) {document.write('<TR><TD height=20 bgcolor=white
onclick="navigateie('+i+')" onmouseover="className=\'hl\'"
onmouseout="className=\'n\'"><FONT SIZE=2 FACE=ARIAL> '+text[i]
+'</FONT></TD></TR>')}
else {document.write('<TR><TD bgcolor="white"><ILAYER><LAYER HEIGHT="18"
onmouseover="this.bgColor=\'yellow\'" onmouseout="this.bgColor=\'white\'"
width=131><FONT SIZE=2 FACE=ARIAL> <A HREF="'+thelink[i]+'"
target="'+linktarget+'" id="nounderline">'+text[i]
+'</A></FONT></LAYER></ILAYER></TD></TR>')}
//-->
</script>
<tr>
<td bgcolor="#0099FF"><font size="1" face="Arial"> </font></td>
</TR>
</table>
<script language="JavaScript1.2">
if (document.all) {document.write('</DIV>')}
window.onload=positionmenu
</script>
</LAYER>
Promijenite linkove unutar koda u drugom koraku kao i sve ostalo.

VOJNI SAT
<script language="JavaScript">
<!-f1Col='ccccc0';//boja glave.
f2Col='ccccc0';//boja glave.
d1Col='ff0000';//boja tocki.
d2Col='ff0000';//boja tocki.
hCol='00ff00';//boja sati.
mCol='00ff00';//boja minuta.
sCol='00ff00';//boja sekundi.
ClockHeight=50;
ClockWidth=50;
//NE MIJENJAJTE NITA ISPOD!

h=10;
m=7;
s=7;
face24='06 07 08 09 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 01 02 03 04 05';
face24=face24.split(' ');
n1=face24.length;
face12='15 20 25 30 35 40 45 50 55 0 5 10';
face12=face12.split(' ');
n2=face12.length;
p="<font face=Arial size=1 color=#"+f1Col+">";
p2="<font face=Arial size=1 color=#"+f2Col+">";
e=360/n1;
e2=360/n2
e3=360/60
HandHeight=ClockHeight/6;
HandWidth=ClockWidth/6;
y=0;
x=0;
ns6=(document.getElementById&&!document.all);
ns=(document.layers);
ie=(document.all);
if (ns){
for (i=0; i < n1; i++)
document.write('<layer name="nshour24'+i+'" top=0 left=0 height=15
width=15><center>'+p+face24[i]+'</font></center></layer>');
for (i=0; i < n1; i++)

document.write('<layer name=nsdots1'+i+' top=0 left=0 bgcolor='+d1Col+'


clip="0,0,2,2"></layer>');
for (i=0; i < n2; i++)
document.write('<layer name="nshour12'+i+'" top=0 left=0 height=15
width=15><center>'+p2+face12[i]+'</font></center></layer>');
for (i=0; i < 12; i++)
document.write('<layer name=nsdots2'+i+' top=0 left=0 bgcolor='+d2Col+'
clip="0,0,2,2"></layer>');
for (i=0; i < h; i++)
document.write('<layer name=nsH'+i+' top=0 left=0 bgcolor='+hCol+'
clip="0,0,2,2"></layer>');
for (i=0; i < m; i++)
document.write('<layer name=nsM'+i+' top=0 left=0 bgcolor='+mCol+'
clip="0,0,2,2"></layer>');
for (i=0; i < s; i++)
document.write('<layer name=nsS'+i+' top=0 left=0 bgcolor='+sCol+'
clip="0,0,2,2"></layer>');
}
if (ie||document.getElementById){
for (i=0; i < n1; i++)
document.write('<div id="hour24'+i+'"
style="position:absolute;top:0px;left:0px;width:15px;height:15px;textalign:center">'+p+face24[i]+'</font></div>');
for (i=0; i < n1; i++)
document.write('<div id="dots1'+i+'"
style="position:absolute;top:0px;left:0px;width:2px;height:2px;fontsize:2px;background:#'+d1Col+'"></div>');
for (i=0; i < n2; i++)
document.write('<div id="hour12'+i+'"
style="position:absolute;top:0px;left:0px;width:15px;height:15px;textalign:center">'+p2+face12[i]+'</font></div>');
for (i=0; i < 12; i++)
document.write('<div id="dots2'+i+'"
style="position:absolute;top:0px;left:0px;height:2px;width:2px;fontsize:2px;background:#'+d2Col+'"></div>');
for (i=0; i < h; i++)
document.write('<div id="ieH'+i+'"
style="position:absolute;top:0px;left:0px;width:2px;height:2px;fontsize:2px;background:#'+hCol+'"></div>');
for (i=0; i < m; i++)
document.write('<div id="ieM'+i+'"
style="position:absolute;top:0px;left:0px;width:2px;height:2px;fontsize:2px;background:#'+mCol+'"></div>');
for (i=0; i < s; i++)
document.write('<div id="ieS'+i+'"
style="position:absolute;top:0px;left:0px;width:2px;height:2px;fontsize:2px;background:#'+sCol+'"></div>');
}
function Scroll(){

if (ns){
y=window.pageYOffset+window.innerHeight-ClockHeight*2;
x=window.pageXOffset+window.innerWidth-ClockWidth*2.3;
}
if (ns6){
y=window.pageYOffset+window.innerHeight-ClockHeight*2.1;
x=window.pageXOffset+window.innerWidth-ClockWidth*2.2;
}
if (ie){
y=document.body.scrollTop+window.document.body.clientHeight-ClockHeight*2;
x=document.body.scrollLeft+window.document.body.clientWidth-ClockWidth*2;
}
setTimeout('Scroll()',50);
}
Scroll();
function ClockAndAssign(){
time = new Date ();
secs = time.getSeconds();
sec = -1.57 + Math.PI * secs/30;
mins = time.getMinutes();
min = -1.57 + Math.PI * mins/30;
hr = time.getHours();
hrs = -1.57 + Math.PI * hr/12 + Math.PI*parseInt(time.getMinutes())/720;
for (i=0; i < s; i++){
var cs=(ns)?document.layers['nsS'+i]:(ie)?
document.all['ieS'+i].style:document.getElementById("ieS"+i).style;
cs.top=y+(i*HandHeight)*Math.sin(sec);
cs.left=x+(i*HandWidth)*Math.cos(sec);
}
for (i=0; i < m; i++){
var cm=(ns)?document.layers['nsM'+i]:(ie)?
document.all['ieM'+i].style:document.getElementById("ieM"+i).style;
cm.top=y+(i*HandHeight)*Math.sin(min);
cm.left=x+(i*HandWidth)*Math.cos(min);
}
for (i=0; i < h; i++){
var ch=(ns)?document.layers['nsH'+i]:(ie)?
document.all['ieH'+i].style:document.getElementById("ieH"+i).style;
ch.top=y+(i*HandHeight)*Math.sin(hrs);
ch.left=x+(i*HandWidth)*Math.cos(hrs);
}
for (i=0; i < 12; i++){
var d2=(ns)?document.layers['nsdots2'+i]:(ie)?
document.all['dots2'+i].style:document.getElementById("dots2"+i).style;
d2.top=y + ClockHeight*Math.sin(-1.0471 + i*e2*Math.PI/180);
d2.left=x + ClockWidth*Math.cos(-1.0471 + i*e2*Math.PI/180);
}
for (i=0; i < n2; i++){

var h12=(ns)?document.layers['nshour12'+i]:(ie)?
document.all['hour12'+i].style:document.getElementById("hour12"+i).style;
h12.top=y-6 + ClockHeight*1.2*Math.sin(i*e2*Math.PI/180);
h12.left=x-6 + ClockWidth*1.2*Math.cos(i*e2*Math.PI/180);
}
for (i=0; i < n1; i++){
var d1=(ns)?document.layers['nsdots1'+i]:(ie)?
document.all['dots1'+i].style:document.getElementById("dots1"+i).style;
d1.top=y + ClockHeight*1.5*Math.sin(-1.0471 + i*e*Math.PI/180);
d1.left=x + ClockWidth*1.5*Math.cos(-1.0471 + i*e*Math.PI/180);
}
for (i=0; i < n1; i++){
var h24=(ns)?document.layers['nshour24'+i]:(ie)?
document.all['hour24'+i].style:document.getElementById("hour24"+i).style;
h24.top=y-6 + ClockHeight*1.7*Math.sin(i*e*Math.PI/180);
h24.left=x-6 + ClockWidth*1.7*Math.cos(i*e*Math.PI/180);
}
setTimeout('ClockAndAssign()',500);
}
ClockAndAssign();
//-->
</script>

POZDRAVNA PORUKA

<SCRIPT LANGUAGE="JavaScript">
<!-- Pocetak
day = new Date()
hr = day.getHours()
if ((hr == 0)||(hr == 1)||(hr == 2)||(hr == 3)||(hr == 4)||(hr == 5))
document.write("Laku noc.")
if ((hr == 6)||(hr == 7)||(hr == 8)||(hr == 9)||(hr == 10)||(hr == 11))
document.write("Dobro jutro.")
if ((hr == 12)||(hr == 13)||(hr == 14)||(hr == 15)||(hr == 16)||(hr == 17))
document.write("Dobar dan.")
if ((hr == 18)||(hr == 19)||(hr == 20)||(hr == 21)||(hr == 22)||(hr == 23))
document.write("Dobra vece.")
//www.agencija027.com
// Kraj -->
</SCRIPT>

Roendan (Sve)
Kategorija: SEZONA
Opis: Scripta koja moze reci vaim posjetiocima koliko imaju jo roendana.

Demo:
Rodjendan
Odaberite datum vaeg slijedeceg rodjendana i kliknite 'koliko jo'. Odbrojavanje cete vidjeti
u status baru.
Korak 1: Dodajte ovaj dolje kod u <head> dio vae stranice
<script>
var futuredate
var nowdate
var resulthoursraw
var resulthours
var resultminutesraw
var resultminutes
var resultsecondsraw
var resultseconds
var content
function setfuturedate() {
var futureyear=document.future.ye.options[document.future.ye.selectedIndex].value
var
futuremonth=document.future.mo.options[document.future.mo.selectedIndex].value
var futureday=document.future.da.options[document.future.da.selectedIndex].value
futuredate=new Date(futureyear,futuremonth,futureday,0,0,0)
docountdown()
}
function docountdown() {
caclulateresults()
formatresults()
displayresults()
setTimeout("docountdown()",1000)
}
function caclulateresults() {
nowdate=new Date()
resultdaysraw=(Date.parse(futuredate)-Date.parse(nowdate))/1000/60/60/24
resultdays=Math.floor((Date.parse(futuredate)-Date.parse(nowdate))/1000/60/60/24)
resulthoursraw=(resultdaysraw-resultdays)*24
resulthours=Math.floor((resultdaysraw-resultdays)*24)
resultminutesraw=(resulthoursraw-resulthours)*60
resultminutes=Math.floor((resulthoursraw-resulthours)*60)
resultsecondsraw=(resultminutesraw-resultminutes)*60
resultseconds=Math.floor((resultminutesraw-resultminutes)*60)

}
function formatresults() {
content="Morate cekati "+resultdays+" dana i "+resulthours+" sati i "+resultminutes
+" minuta i "+resultseconds +" sekundi do vaseg rodjendana."
}
function displayresults() {
if (document.all) {
window.status=content
//korak-po-korak upute za ne programere
//posjetite www.skriptarnica.com
}
if (document.layers) {
window.status=content
}
}
</script>

Korak 2: Dodajte ovaj dolje kod gdje zelite da se form pojavi.

<form name="future">
<font size=2 face=Verdana><b>Rodjendan</b><br>
Odaberite datum vaeg slijedeceg rodjendana i kliknite 'koliko jo'. Odbrojavanje cete vidjeti
u status baru. <br><br>
<select name="ye" style="font-size:8pt">
<option>godina</option>
<option value="2010">2010</option>
<option value="2009">2009</option>
<option value="2008">2008</option>
<option value="2007">2007</option>
</select>
<select name="mo" style="font-size:8pt">
<option>mjesec</option>
<option value="0">Januar</option>
<option value="1">Februar</option>
<option value="2">Mart</option>
<option value="3">April</option>
<option value="4">Maj</option>
<option value="5">Jun</option>
<option value="6">Jul</option>
<option value="7">Avgust</option>
<option value="8">Septembar</option>

<option value="9">Oktobar</option>
<option value="10">Novembar</option>
<option value="11">Decembar</option>
</select>
<select name="da" style="font-size:8pt">
<option>dan</option>
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
<option value="4">4</option>
<option value="5">5</option>
<option value="6">6</option>
<option value="7">7</option>
<option value="8">8</option>
<option value="9">9</option>
<option value="10">10</option>
<option value="11">11</option>
<option value="12">12</option>
<option value="13">13</option>
<option value="14">14</option>
<option value="15">15</option>
<option value="16">16</option>
<option value="17">17</option>
<option value="18">18</option>
<option value="19">19</option>
<option value="20">20</option>
<option value="21">21</option>
<option value="22">22</option>
<option value="23">23</option>
<option value="24">24</option>
<option value="25">25</option>
<option value="26">26</option>
<option value="27">27</option>
<option value="28">28</option>
<option value="29">29</option>
<option value="30">30</option>
<option value="31">31</option>
</select>
<input type="button" onClick="setfuturedate()" value="Koliko jo" style="fontsize:8pt"></form>

I koliko jo...? :)

LETECI KUPID ANDJEO

<script language="JavaScript1.2">
<!-/*
Leteci KupidPosjetite http://www.skriptarnica.com
*/
Cupid=new Image();
Cupid.src="kupid.gif"; //napiite src. slike
amount=3; //Broj kupida, minimum 3.
Xpos=700; //kupid x koordinate, u pixelima
Ypos=200; //kupid y koordinate, u pixelima
step=0.3; //Brzina animacije (manje je sporije)
dismissafter=10; //sekunde nakon koliko kupid nestane, u sekundama
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://webmajstor.terrashare.com'><IMG SRC='"+Cupid.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://webmajstor.terrashare.com"><img src="'+Cupid.src+'"
id="msieBats" style="position:absolute;top:-50;left:0" border=0></a>')
else
document.write('<a href="http://webmajstor.terrashare.com"><img src="'+Cupid.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 dismisscupid(){
clearInterval(flycupid)
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=Cupid.src
}
else if (document.all){
for (i=0; i < amount; i++)
document.all.msieBats[i].src=Cupid.src
}
else if (ns6){
for (i=0; i < amount; i++)
document.getElementById("ns6Bats"+i).src=Cupid.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)
}
}
}
flycupid=setInterval('Animate()',30);
setTimeout("dismisscupid()",dismissafter*1000)
//-->
</script>

Copyright zatita (Sve)


Kategorija: SECURITY

Opis: Ako zelite zatititi tekst na vaim stranicama onda bez razmiljanja dodajte ovu scriptu.
Demo: Pokuajte kopirati bilo koji tekst na ovoj stranici :) a sada pokuajte kopirat ovaj dolje
kod :))
Upute
Dodajte ovaj kod u <body> dio vae stranice.
<script language="JavaScript">
//Posjetite www.agencija027.com
<!-document.onselectstart= function() {return false}
// -->
</script>

ZABRANA KOPIRANJA SLIKA SA SAJTA


<script language="JavaScript1.2">

/*
korak-po-korak upute za ne-programere
Posjetite http://www.agencija027.com
*/
var clickmessage="Zabranjeno kopiranje slika!"
function disableclick(e) {
if (document.all) {
if (event.button==2||event.button==3) {
if (event.srcElement.tagName=="IMG"){
alert(clickmessage);
return false;
}
}
}
if (document.layers) {
if (e.which == 3) {
alert(clickmessage);
return false;
}
}
}
function associateimages(){
for(i=0;i<document.images.length;i++)
document.images[i].onmousedown=disableclick;
}
if (document.all)
document.onmousedown=disableclick
else if (document.layers)
associateimages()
</script>

ZABRANA DESNOG KLIKA MISEM

<script language="JavaScript">
// Posjetite www.skriptarnica.com
<!-document.oncontextmenu= function() {return false}
document.onmousedown= function() {return false}
// -->
</script>

Automatski pop-up prozor (Sve)


Kategorija: SYSTEM

Opis: Scripta koju mozete vrlo cesto vidjeti na Internetu. Kada posjetilac dodje na vae
stranice automatski se otvori pop-up prozor.
Demo: Vjerojatno ste ga ugasili :)

Upute
Korak1: Dodajte ovaj dolje kod u <head> dio vae stranice.

<SCRIPT>
//Posjetite : http://www.skriptarnica.com
var win=true;
function wm()
{
if (win)
window.open('http://www.skriptarnica.com/imeprozora.htm','wm','width=468,height=60,resiz
able=no');
}
</SCRIPT>

Korak2: Ako zelite da Vam se prozor pojavljuje na ulasku u stranicu upiite u sam <body> tag
kao to je prikazano.
<BODY onload=wm()>
Korak3: Ako zelite da Vam se prozor pojavljuje na izlasku iz stranice upiite u sam <body>
tag kao to je prikazano.
<BODY onunload=wm()>

Preporuka (Sve)
Kategorija: SYSTEM
Opis: Neka vai posjetitelji preporuce svojim prijateljima vau stranicu (putem emaila) sa
ovom scriptom! Pitajuci za prijateljev e-mail, zatim loadira email program sa vec gotovom
porukom koja je odmah spremna za slanje.
Demo:
Preporuci ovaj site prijatelju:

Upute
Korak 1: Dodajte ovaj dolje kod u <body> dio vae stranice gdje zelite da vam se scripta
pojavi

<SCRIPT LANGUAGE="JavaScript">
<!-- Pocni
//Posjetite http://www.skriptarnica.com
var initialsubj="Hey prijatelju, pogledaj ovo"
var initialmsg="Hey:\n Pogledaj ovaj site: "+window.location
var good;
function checkEmailAddress(field) {
var goodEmail = field.value.match(/\b(^(\S+@).+((\.com)|(\.net)|(\.edu)|(\.mil)|(\.gov)|(\.org)|
(\.info)|(\.sex)|(\.biz)|(\.aero)|(\.coop)|(\.museum)|(\.name)|(\.pro)|(\..{2,2}))$)\b/gi);
if (goodEmail) {
good = true;
}
else {
alert(milantoplica@gmail.com');
field.focus();
field.select();
good = false;
}
}
u = window.location;
function mailThisUrl() {
good = false
checkEmailAddress(document.eMailer.email);
if (good) {

//window.location = "mailto:"+document.eMailer.email.value+"?
subject="+initialsubj+"&body="+document.title+" "+u;
window.location = "mailto:"+document.eMailer.email.value+"?
subject="+initialsubj+"&body="+initialmsg
}
}
// End -->
</script>
<form name="eMailer">
Preporuci ovaj site prijatelju:
<input type="text" name="email" size="26" value=" Upiite email adresu ovdje"
onFocus="this.value=''" onMouseOver="window.status='Upiite email adresu ovdje i
preporucite site prijatelju...'; return true" onMouseOut="window.status='';return true">
<br>
<input type="button" value="Poalji" onMouseOver="window.status='Kliknite da bi poslali
email (sa adresom sitea) prijatelju! Upiite iznad email'; return true"
onMouseOut="window.status='';return true" onClick="mailThisUrl();">
</form>

Preporuka2 (Sve)

Kategorija: SYSTEM
Opis: Neka vai posjetitelji preporuce svojim prijateljima vau stranicu (putem emaila) sa
ovom scriptom! Za razliku od prve scripte u ovoj scripti vai posjetitelji mogu napisati subject
i tekst po zelji. Lako za instaliranje.
Demo:
Sviaju Vam se nae stranice...
Zelite javiti vaim prijateljima o nama? Prima email:
Subject:
Text:

Upute:
Korak1: Dodajte ovaj kod u <head> dio vae stranice.

<script language="Javascript">
function sem(form){
var okem=form.st.value.match(/\b(^(\S+@).+((\.com)|(\.net)|(\.edu)|(\.mil)|(\.gov)|(\.org)|(\..
{2,2}))$)\b/gi);
if (okem){
window.location = "mailto:"+form.st.value+"?
subject="+form.sb.value+"&body="+form.ta.value;
}
else{
alert("Upiite ispravnu email adresu.");
form.st.focus();
form.st.select();
}
}
</script>

Korak2: Dodajte ovaj kod u <body> dio vae stranice.


<form action="mailto:delfinprokuplje@yahoo.com"><table border="0"><tr><td><font
color="#FF6600">Prima email:</font></td><td><input type="text" name="st" value=""
size="30"></td></tr><tr><td><font color="#FF6600">Subject:</font></td><td><input
type="text" name="sb" value="Vidi ovo" size="30"></td></tr><tr><td valign="top"><font
color="#FF6600">Text:</font></td><td><textarea name="ta" Rows=4 Cols=25>Poseti ovaj
sajt: http://www.delfinradio.co.yu/</textarea></td></tr></table><P><input type="Button"
value="Poalji Email" onClick="javascript:sem(this.form);"></form>

Izmjena bannera (Sve)


Kategorija: SYSTEM
Opis: Ova scripta ce vam izmjenjivati koliko zelite bannera u intervalima koje si sami
odaberete, scripta automatski mijenja i linkove.

Demo: U ovom slucaju izmjena svakih 5 sek.

Upute:
Korak 1: Dodajte ovaj dolje kod u <body> dio vae stranice

<SCRIPT LANGUAGE="JavaScript">
<!-- Hide from JavaScript-Impaired Browsers
/* Prvo, Ako imate manje ili vise od 6 sponzora u vasem
rotatoru promijenite dolje broj. */
number_of_sponsors=6;
var sctr=0;
var halt=0;
var isn=new Array();
for (i=0;i<number_of_sponsors;i++){
isn[i]=new Image();
}
/* Ovdje napisati adrese gif.-ova po rednom broju. */
isn[0].src="http://www.tvojurl/ime.gif";
isn[1].src="http://www.tvojurl/ime.gif";
isn[2].src="http://www.tvojurl/ime.gif";
isn[3].src="http://www.tvojurl/ime.gif";
isn[4].src="http://www.tvojurl/ime.gif";
isn[5].src="http://www.tvojurl/ime.gif";
/* Ovdje zamijenite adrese linkova po rednom broju. */
var durl=new Array();
durl[0]="http://www.webmajstor.net/";
durl[1]="http://www.bug.hr";
durl[2]="http://www.vidi.hr";
durl[3]="http://www.croadria.com";
durl[4]="http://www.grafika-kresimir.f2s.com";
durl[5]="http://www.pcchip.hr/";
/* Ova scripta je podesena da mijenja bannere svakih 10 sekundi.
(5000=5 sekundi, dakle 30000 bi bilo 30 sek.)
Promijeni vrijeme pod "seTimeut" dolje. */

function rotateIt(){
if (halt!=1){
sctr++;
if (sctr>number_of_sponsors-1){
sctr=0;
}
document.sponsor.src=isn[sctr].src;
setTimeout("rotateIt()",5000);
}
}
/* Ovaj kod ce raditi ako imate ili nemate frameove.
Ali ako zelite da promijenite target jednostavno promijenite:
location.href call u:
parent.location.href=durl[sctr];
ovdje dolje. */
function doIt(){
halt=1;
parent.location.href=durl[sctr];
}
function dispIt(){
parent.window.status=durl[sctr];
}
// End Hiding -->
</SCRIPT><center><table BORDER=0 CELLSPACING=0 CELLPADDING=0 >
<tr>
<td><a href="index.htm" onClick="doIt();return false" onMouseover="dispIt();return true;"
target="_blank"><img SRC="http://nekoime.gif" NAME="sponsor" BORDER=0 height=31
width=88></a></td>
</tr>
</table></center>
<!-- webmajstor.net -->
Korak 2: Ovaj kod dodajte na sam kraj stranice odmah iza </body> taga.
<!-- webmajstor.net -->
<SCRIPT LANGUAGE="JavaScript">
<!-- Hide JavaScript from Java-Impaired Browsers
sctr=0;
rotateIt();
// End Hiding -->
</SCRIPT>
<!-- webmajstor.net -->

Sve upute to i kako se nalaze unutar scripte.

Browser poruka (Sve)


Kategorija: SYSTEM

Opis: Sa ovom scriptom mozete napisati tekst u status baru vaeg browsera. Mozete dodati
bilo koji tekst, samo morate paziti da nije previe dugacak, jer se nece cijeli prikazati.
Demo: Pogledajte va status bar (dolje lijevo)
Upute
Korak 1: Dodajte ovaj dolje kod u <head> dio vae stranice
<script language="JavaScript1.2">
/*
korak-po-korak upute za ne programere
www.skriptarnica.com
*/
timeID = 5;
stcnt = 11;
msg = "<< VA TEKST >>";
wmsg = new Array(33);
wmsg[0]=msg;
blnk = "
";
for (i=1; i<32; i++)
{
b = blnk.substring(0,i);
wmsg[i]="";
for (j=0; j<msg.length; j++) wmsg[i]=wmsg[i]+msg.charAt(j)+b;
}
function wiper()
{
if (stcnt > -1) str = wmsg[stcnt]; else str = wmsg[0];
if (stcnt-- < -40) stcnt=31;
status = str;
clearTimeout(timeID);
timeID = setTimeout("wiper()",100);
}
//-->
</script>

Korak 2: Dodajte ovaj kod u sam <body> tag


<body onload="wiper()">

Na vrh (Sve)
Kategorija: SYSTEM

Opis: Za stranice koje su malo duze od ostalih, ova scripta omogucuje brzi nacin povratka na
vrh stranice.
Demo: Pogledajte u donji desni kut vaeg browsera...
Upute:
Korak 1: Usnimite ovaj dole file u direktorij vae stranice:
jumptop.js
Korak 2: Dodajte ovaj dole kod u <body> dio vae stranice i u svaku stranicu gdje zelite da se
efekt pojavi.

<script src="http://www.ime.com/jumptop.js">
//Na vrh
//korak-po-korak upute za ne programere
//Posjetite http://www.skriptarnica.com
</script>

Nemojte zaboraviti promijeniti http://www.ime.com/jumptop.js u ime vaeg url-a gdje se


nalazi scripta, tekst "na vrh" mozete promijeniti unutar scripte koristeci bilo koji tekstualni
editor (ie: Notepad)

Slucajne stvari (Sve)


Kategorija: OSTALO
Opis: Upotrijebite ovu scriptu da bi ste na vaim stranicama imali Random tekst, slike,
linkove, bannere i sve ostalo u jednoj scripti.
Demo: Kliknite refresh/reload na vaem brovseru da bi vidjeli ostale poruke i efekte.
Mislite na buducnost.

Upute:
Dodajte ovaj dolje kod u <body> dio vae stranice gdje zelite da vam se scripta pojavi.

<script language=JavaScript>
function somequotes(){
//korak-po-korak upute za ne programere
//www.webmajstor.net
var quotes=new Array()
quotes[0]='Cak i <img src="../banneri/wm1.gif" border=0 alt="Prikazuje i bannere">
prikazuje slucajne bannere'
quotes[1]='Zahvaljujem na posjeti'
quotes[2]='Jeli ovo dobra scripta ili ne?'
quotes[3]='Zivio webmajstor!!! :)'
quotes[4]='Ne radite nedjeljom.'
quotes[5]='Mislite na buducnost.'
quotes[6]='Dobrodoli'
quotes[7]='<a href="http://www.webmajstor.net" target="_blank">www.webmajstor.net</a>'
var whichquote=Math.floor(Math.random()*(quotes.length));
var fontstylestart='<font face="Tahoma,Verdana,Arial,Helvetica" size="2"
color="#FF6600"><b><span style="letter-spacing: 1">';
var fontstyleend='</span></b></font>'
document.write(fontstylestart+quotes[whichquote]+fontstyleend)
}
somequotes();
</script>

Loptanje (Sve)
Kategorija: OSTALO
Opis: Zanimljiva scripta kojoj i samo ime govori sve. Lopta koja se odbija od rubova vaeg
browsera...
Demo:

Upute:
Korak 1: Snimite loptu u direktorij vae stranice ili ako zelite upotrijebiti vlastitu sliku ili
objekt preskocite ovaj dio.

Korak 2: Dodajte ovaj dolje kod u <head> dio vae stranice

<script language="JavaScript">
<!-- hide script from old browsers
/*
korak-po-korak upute za ne-programere
Posjetite http://www.webmajstor.net
*/
//Podesite brzinu(od 1 do 50, vece je brze)
var ballWidth = 40;
var ballHeight = 40;
var BallSpeed = 11;
var maxBallSpeed = 50;
var xMax;
var yMax;
var xPos = 0;
var yPos = 0;
var xDir = 'right';
var yDir = 'down';
var superballRunning = true;
var tempBallSpeed;

var currentBallSrc;
var newXDir;
var newYDir;
function initializeBall() {
if (document.all) {
xMax = document.body.clientWidth
yMax = document.body.clientHeight
document.all("superball").style.visibility = "visible";
}
else if (document.layers) {
xMax = window.innerWidth;
yMax = window.innerHeight;
document.layers["superball"].visibility = "show";
}
setTimeout('moveBall()',400);
}
function moveBall() {
if (superballRunning == true) {
calculatePosition();
if (document.all) {
document.all("superball").style.left = xPos + document.body.scrollLeft;
document.all("superball").style.top = yPos + document.body.scrollTop;
}
else if (document.layers) {
document.layers["superball"].left = xPos + pageXOffset;
document.layers["superball"].top = yPos + pageYOffset;
}
setTimeout('moveBall()',30);
}
}
function calculatePosition() {
if (xDir == "right") {
if (xPos > (xMax - ballWidth - BallSpeed)) {
xDir = "left";
}
}
else if (xDir == "left") {
if (xPos < (0 + BallSpeed)) {
xDir = "right";
}
}
if (yDir == "down") {
if (yPos > (yMax - ballHeight - BallSpeed)) {
yDir = "up";
}
}
else if (yDir == "up") {

if (yPos < (0 + BallSpeed)) {


yDir = "down";
}
}
if (xDir == "right") {
xPos = xPos + BallSpeed;
}
else if (xDir == "left") {
xPos = xPos - BallSpeed;
}
else {
xPos = xPos;
}
if (yDir == "down") {
yPos = yPos + BallSpeed;
}
else if (yDir == "up") {
yPos = yPos - BallSpeed;
}
else {
yPos = yPos;
}
}
if (document.all||document.layers)
window.onload = initializeBall;
window.onresize = new Function("window.location.reload()");
// end hiding from old browsers -->
</script>
<style type="text/css">
#superball {
position:absolute;
left:0;
top:0;
visibility:hide;
visibility:hidden;
width:40;
height:40;
}
</style>

Korak 3: Dodajte ovaj dolje kod u <body> dio vae stranice, IZVAN svih tagova. Ovaj dio
scripte sadrzi original HTLM kod da prikazuje loptu.

<span id="superball"><a href="http://www.webmajstor.net"><img name="superballImage"


src="superball.gif" height="40" width="40" border="0"></a></span>

Mijenjanje scripte:
Ako zelite loptu zamijeniti nekim vlastitim objektom. Morate promijenti img src u trecem
koraku. Kao i brzinu kretanja lopte u kodu drugog koraka.
skriptarnica (c) 2000 - 2003 :: powered by WEBMA

Nai na stranici (Sve)


Kategorija: OSTALO

Opis: Ova DHTML scripta simulira Edit> Find In Page radnju da vaim posjetiocima olaka
trazenje odreenog teksta na vaim stranicama. Ako vae stranice sadrze podosta teksta,
nemojte razmiljati o dodatku ove scripte na vae stranice.
Demo: Napiite rijec koju zelite naci na ovoj stranici.

Upute:
Jednostavno dodajte ovaj dolje kod u vae stranice.
<script language="JavaScript">
/*
Nadji na straniciPosjetite http://www.delfinradio.co.yu
*/
var NS4 = (document.layers);
var IE4 = (document.all);
var win = window;
var n = 0;

// Which browser?

// window to search.

function findInPage(str) {
var txt, i, found;
if (str == "")
return false;
// Find next occurance of the given string on the page, wrap around to the
// start of the page if necessary.
if (NS4) {
// Look for match starting at the current point. If not found, rewind
// back to the first match.
if (!win.find(str))
while(win.find(str, false, true))
n++;
else
n++;

// If not found in either direction, give message.


if (n == 0)
alert("Takve reci nema.");
}
if (IE4) {
txt = win.document.body.createTextRange();
// Find the nth match from the top of the page.
for (i = 0; i <= n && (found = txt.findText(str)) != false; i++) {
txt.moveStart("character", 1);
txt.moveEnd("textedit");
}
// If found, mark it and scroll it into view.
if (found) {
txt.moveStart("character", -1);
txt.findText(str);
txt.select();
txt.scrollIntoView();
n++;
}
// Otherwise, start over at the top of the page and find first match.
else {
if (n > 0) {
n = 0;
findInPage(str);
}
// Not found anywhere, give message.
else
alert("Takve reci nema.");
}
}
return false;
}
</script>
<form name="search" onSubmit="return findInPage(this.string.value);">
<font size=3><input name="string" type="text" size=15 onChange="n = 0;"></font>

<input type="submit" value="Trazi rec!">


</form>

Legenda:
(Sve) - Scripte rade sa Netscape 4+ i Internet Explorer 4+
(NS) - Znaci da scripte rade sa Netscape 4 i vie
(IE) - Znaci da scripte rade sa Internet Explorer 4 i vie
(IE5) - Znaci da scripte rade sa Internet Explorer 5 i vie
webmajstor 2000-2002

Mjehurici (Sve)
Kategorija: OSTALO

Opis: Mjehurici idu prema gore, zatim nestaju. Mjehurici se pojavljuju samo u gornjem dijelu
dugih stranica.
Demo:

Upute
Korak 1: Snimite i stavite u svoj direktorij sliku koja slijedi (kliknite desnom tipkom mia i
odaberite opciju "Save As")

Korak 2: Jeste snimili? sada dodajte ovaj dole kod copy/paste ODMAH iza <body> taga:

<script language="JavaScript1.2">
<!-- Pocetak
/*
korak-po-korak upute za ne-programere
Posjetite http://www.webmajstor.net
*/
var no = 20; // Broj mjehurica
var speed = 1; // Sto ih manje ima to su brzi
var snow = new Array();
snow[0] = "bubble.gif"
snow[1] = "bubble.gif"
snow[2] = "bubble.gif"
var ns4up = (document.layers) ? 1 : 0; // browser sniffer
var ie4up = (document.all) ? 1 : 0;
var dx, xp, yp; // coordinate and position variables
var am, stx, sty; // amplitude and step variables
var i, doc_width = 800, doc_height = 1800;
if (ns4up) {
doc_width = self.innerWidth;
doc_height = self.innerHeight;
} else if (ie4up) {
doc_width = document.body.clientWidth;
doc_height = document.body.clientHeight;
}

dx = new Array();
xp = new Array();
yp = new Array();
am = new Array();
stx = new Array();
sty = new Array();
j = 0;
for (i = 0; i < no; ++ i) {
dx[i] = 0;
// set coordinate variables
xp[i] = Math.random()*(doc_width-50); // set position variables
yp[i] = Math.random()*doc_height;
am[i] = Math.random()*20;
// set amplitude variables
stx[i] = 0.02 + Math.random()/10; // set step variables
sty[i] = 0.7 + Math.random(); // set step variables
if (ns4up) {
// set layers
if (i == 0) {
document.write("<layer name=\"dot"+ i +"\" left=\"15\" top=\"15\"
visibility=\"show\"><img src=\""+ snow[j] + "\" border=\"0\"></layer>");
} else {
document.write("<layer name=\"dot"+ i +"\" left=\"15\" top=\"15\"
visibility=\"show\"><img src=\""+ snow[j] + "\" border=\"0\"></layer>");
}
} else if (ie4up) {
if (i == 0)
{
document.write("<div id=\"dot"+ i +"\" style=\"POSITION: absolute; ZINDEX: "+ i +"VISIBILITY: visible; TOP: 15px; LEFT: 15px; width:1;\"><img src=\"" +
snow[j] + "\" border=\"0\"></div>");
} else {
document.write("<div id=\"dot"+ i +"\" style=\"POSITION: absolute; ZINDEX: "+ i +"VISIBILITY: visible; TOP: 15px; LEFT: 15px; width:1;\"><img src=\"" +
snow[j] + "\" border=\"0\"></div>");
}
}
if (j == (snow.length-1)) { j = 0; } else { j += 1; }
}
function snowNS() { // Netscape main animation function
for (i = 0; i < no; ++ i) { // iterate for every dot
yp[i] -= sty[i];
if (yp[i] < -50) {
xp[i] = Math.random()*(doc_width-am[i]-30);
yp[i] = doc_height;
stx[i] = 0.02 + Math.random()/10;
sty[i] = 0.7 + Math.random();
doc_width = self.innerWidth;
doc_height = self.innerHeight;
}
dx[i] += stx[i];
document.layers["dot"+i].top = yp[i];
document.layers["dot"+i].left = xp[i] +
am[i]*Math.sin(dx[i]);

}
setTimeout("snowNS()", speed);
}
function snowIE() { // IE main animation function
for (i = 0; i < no; ++ i) { // iterate for every dot
yp[i] -= sty[i];
if (yp[i] < -50) {
xp[i] = Math.random()*(doc_width-am[i]-30);
yp[i] = doc_height;
stx[i] = 0.02 + Math.random()/10;
sty[i] = 0.7 + Math.random();
doc_width = document.body.clientWidth;
doc_height = document.body.clientHeight;
}
dx[i] += stx[i];
document.all["dot"+i].style.pixelTop = yp[i];
document.all["dot"+i].style.pixelLeft = xp[i] +
am[i]*Math.sin(dx[i]);
}
setTimeout("snowIE()", speed);
}
if (ns4up) {
snowNS();
} else if (ie4up) {
snowIE();
}
// Kraj -->
</script>

You might also like