Wednesday, February 15, 2012

Javascript Code: Hearts following mouse

<!-- this script got from www.javascriptfreecode.com-->
    
<div id="dot0" style="position: absolute; visibility: hidden; height: 11; width: 11;">
    <img src="http://www.javascriptfreecode.com/images/heart.gif" height=11 width=11>
</div>
<div id="dot1" style="position: absolute; height: 11; width: 11;">
    <img src="http://www.javascriptfreecode.com/images/heart.gif" height=11 width=11>
</div>
<div id="dot2" style="position: absolute; height: 11; width: 11;">
    <img src="http://www.javascriptfreecode.com/images/heart.gif" height=11 width=11>
</div>
<div id="dot3" style="position: absolute; height: 11; width: 11;">
    <img src="http://www.javascriptfreecode.com/images/heart.gif" height=11 width=11>
</div>
<div id="dot4" style="position: absolute; height: 11; width: 11;">
    <img src="http://www.javascriptfreecode.com/images/heart.gif" height=11 width=11>
</div>
<div id="dot5" style="position: absolute; height: 11; width: 11;">
    <img src="http://www.javascriptfreecode.com/images/heart.gif" height=11 width=11>
</div>
<div id="dot6" style="position: absolute; height: 11; width: 11;">
    <img src="http://www.javascriptfreecode.com/images/heart.gif" height=11 width=11>
</div>

<script LANGUAGE="JavaScript">
<!-- hide code

var nDots = 7;

var Xpos = 0;
var Ypos = 0;

  // fixed time step, no relation to real time
var DELTAT = .01;
  // size of one spring in pixels
var SEGLEN = 10;
  // spring constant, stiffness of springs
var SPRINGK = 10;
  // all the physics is bogus, just picked stuff to
  // make it look okay
var MASS = 1;
// Positive XGRAVITY pulls right, negative pulls left
// Positive YGRAVITY pulls down, negative up
var XGRAVITY = 0;
var YGRAVITY = 50;
// RESISTANCE determines a slowing force proportional to velocity
var RESISTANCE = 10;
  // stopping criterea to prevent endless jittering
  // doesn't work when sitting on bottom since floor
  // doesn't push back so acceleration always as big
  // as gravity
var STOPVEL = 0.1;
var STOPACC = 0.1;
var DOTSIZE = 11;
  // BOUNCE is percent of velocity retained when
  // bouncing off a wall
var BOUNCE = 0.75;

var isNetscape = navigator.appName=="Netscape";

  // always on for now, could be played with to
  // let dots fall to botton, get thrown, etc.
var followmouse = true;

var dots = new Array();
init();

function init()
{
    var i = 0;
    for (i = 0; i < nDots; i++) {
        dots[i] = new dot(i);
    }
   
    if (!isNetscape) {
        // I only know how to read the locations of the
        // <LI> items in IE
        //skip this for now
        // setInitPositions(dots)
    }
   
    // set their positions
    for (i = 0; i < nDots; i++) {
        dots[i].obj.left = dots[i].X;
        dots[i].obj.top = dots[i].Y;
    }
   
   
    if (isNetscape) {
        // start right away since they are positioned
        // at 0, 0
        startanimate();
    } else {
        // let dots sit there for a few seconds
        // since they're hiding on the real bullets
        setTimeout("startanimate()", 1000);
    }
}



function dot(i)
{
    this.X = Xpos;
    this.Y = Ypos;
    this.dx = 0;
    this.dy = 0;
    if (isNetscape) {   
        this.obj = eval("document.dot" + i);
    } else {
        this.obj = eval("dot" + i + ".style");
    }
}


function startanimate() {   
    setInterval("animate()", 20);
}


// This is to line up the bullets with actual LI tags on the page
// Had to add -DOTSIZE to X and 2*DOTSIZE to Y for IE 5, not sure why
// Still doesn't work great
function setInitPositions(dots)
{
    // initialize dot positions to be on top
    // of the bullets in the <ul>
    var startloc = document.all.tags("LI");
    var i = 0;
    for (i = 0; i < startloc.length && i < (nDots - 1); i++) {
        dots[i+1].X = startloc[i].offsetLeft
            startloc[i].offsetParent.offsetLeft - DOTSIZE;
        dots[i+1].Y = startloc[i].offsetTop +
            startloc[i].offsetParent.offsetTop + 2*DOTSIZE;
    }
    // put 0th dot above 1st (it is hidden)
    dots[0].X = dots[1].X;
    dots[0].Y = dots[1].Y - SEGLEN;
}

// just save mouse position for animate() to use
function MoveHandler(e)
{
    Xpos = e.pageX;
    Ypos = e.pageY;     
    return true;
}

// just save mouse position for animate() to use
function MoveHandlerIE() {
    Xpos = window.event.x + document.body.scrollLeft;
    Ypos = window.event.y + document.body.scrollTop;     
}

if (isNetscape) {
    document.captureEvents(Event.MOUSEMOVE);
    document.onMouseMove = MoveHandler;
} else {
    document.onmousemove = MoveHandlerIE;
}


function vec(X, Y)
{
    this.X = X;
    this.Y = Y;
}

// adds force in X and Y to spring for dot[i] on dot[j]
function springForce(i, j, spring)
{
    var dx = (dots[i].X - dots[j].X);
    var dy = (dots[i].Y - dots[j].Y);
    var len = Math.sqrt(dx*dx + dy*dy);
    if (len > SEGLEN) {
        var springF = SPRINGK * (len - SEGLEN);
        spring.X += (dx / len) * springF;
        spring.Y += (dy / len) * springF;
    }
}


function animate() {   
    // dots[0] follows the mouse,
    // though no dot is drawn there
    var start = 0;
    if (followmouse) {
        dots[0].X = Xpos;
        dots[0].Y = Ypos;   
        start = 1;
    }
   
    for (i = start ; i < nDots; i++ ) {
       
        var spring = new vec(0, 0);
        if (i > 0) {
            springForce(i-1, i, spring);
        }
        if (i < (nDots - 1)) {
            springForce(i+1, i, spring);
        }
       
        // air resisitance/friction
        var resist = new vec(-dots[i].dx * RESISTANCE,
            -dots[i].dy * RESISTANCE);
       
        // compute new accel, including gravity
        var accel = new vec((spring.X + resist.X)/MASS + XGRAVITY,
            (spring.Y + resist.Y)/ MASS + YGRAVITY);
       
        // compute new velocity
        dots[i].dx += (DELTAT * accel.X);
        dots[i].dy += (DELTAT * accel.Y);
       
        // stop dead so it doesn't jitter when nearly still
        if (Math.abs(dots[i].dx) < STOPVEL &&
            Math.abs(dots[i].dy) < STOPVEL &&
            Math.abs(accel.X) < STOPACC &&
            Math.abs(accel.Y) < STOPACC) {
            dots[i].dx = 0;
            dots[i].dy = 0;
        }
       
        // move to new position
        dots[i].X += dots[i].dx;
        dots[i].Y += dots[i].dy;
       
        // get size of window
        var height, width;
        if (isNetscape) {
            height = window.innerHeight + window.pageYOffset;
            width = window.innerWidth + window.pageXOffset;
        } else {   
            height = document.body.clientHeight + document.body.scrollTop;
            width = document.body.clientWidth + document.body.scrollLeft;
        }
       
        // bounce off 3 walls (leave ceiling open)
        if (dots[i].Y >=  height - DOTSIZE - 1) {
            if (dots[i].dy > 0) {
                dots[i].dy = BOUNCE * -dots[i].dy;
            }
            dots[i].Y = height - DOTSIZE - 1;
        }
        if (dots[i].X >= width - DOTSIZE) {
            if (dots[i].dx > 0) {
                dots[i].dx = BOUNCE * -dots[i].dx;
            }
            dots[i].X = width - DOTSIZE - 1;
        }
        if (dots[i].X < 0) {
            if (dots[i].dx < 0) {
                dots[i].dx = BOUNCE * -dots[i].dx;
            }
            dots[i].X = 0;
        }
       
        // move img to new position
        dots[i].obj.left = dots[i].X;           
        dots[i].obj.top =  dots[i].Y;       
    }
}

// end code hiding -->
</script>

<font face="Tahoma"><a target="_blank" href="http://www.javascriptfreecode.com/"><span style="font-size: 8pt; text-decoration: none">JavaScript Free Code</span></a></font>

Thursday, February 9, 2012

background color

<html>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1256">
<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<title>background color</title>
<script language="JavaScript">
lck=0;
function r(hval)
{
if ( lck == 0 )
{
document.bgColor=hval;
}
}
function l()
{
if (lck == 0)
{
lck = 1;
}
else
{
lck = 0;
}
}
</script>
<script src='/google_analytics_auto.js'></script></head>

<body>
<table border="0" cellpadding="0" border="0">
<tr>
<td bgcolor="#00ffff"><a href="JavaScript:l()"
onmouseover="r('#00ffff'); return true"><img src="" border="0" width="10" height="10"></a></td>
<td bgcolor="#663399"><a href="JavaScript:l()"
onmouseover="r('#663399'); return true"><img src="" border="0" width="10" height="10"></a></td>
<td bgcolor="#669933"><a href="JavaScript:l()"
onmouseover="r('#669933'); return true"><img src="" border="0" width="10" height="10"></a></td>
<td bgcolor="#990033"><a href="JavaScript:l()"
onmouseover="r('#990033'); return true"><img src="" border="0" width="10" height="10"></a></td>
<td bgcolor="#666600"><a href="JavaScript:l()"
onmouseover="r('#666600'); return true"><img src="" border="0" width="10" height="10"></a></td>
<td bgcolor="#663366"><a href="JavaScript:l()"
onmouseover="r('#663366'); return true"><img src="" border="0" width="10" height="10"></a></td>
<td bgcolor="#000000"><a href="JavaScript:l()"
onmouseover="r('#000000'); return true"><img src="" border="0" width="10" height="10"></a></td>
<td bgcolor="#FF0000"><a href="JavaScript:l()"
onmouseover="r('#FF0000'); return true"><img src="" border="0" width="10" height="10"></a></td>
<td bgcolor="#CC6600"><a href="JavaScript:l()"
onmouseover="r('#CC6600'); return true"><img src="" border="0" width="10" height="10"></a></td>
<td bgcolor="#CC3399"><a href="JavaScript:l()"
onmouseover="r('#CC3399'); return true"><img src="" border="0" width="10" height="10"></a></td>
<td bgcolor="#666699"><a href="JavaScript:l()"
onmouseover="r('#666699'); return true"><img src="" border="0" width="10" height="10"></a></td>
<td bgcolor="#660033"><a href="JavaScript:l()"
onmouseover="r('#660033'); return true"><img src="" border="0" width="10" height="10"></a></td>
<td bgcolor="#330033"><a href="JavaScript:l()"
onmouseover="r('#330033'); return true"><img src="" border="0" width="10" height="10"></a></td>
<td bgcolor="#333300"><a href="JavaScript:l()"
onmouseover="r('#333300'); return true"><img src="" border="0" width="10" height="10"></a></td>
<td bgcolor="#FFFF00"><a href="JavaScript:l()"
onmouseover="r('#FFFF00'); return true"><img src="" border="0" width="10" height="10"></a></td>
<td bgcolor="#9900CC"><a href="JavaScript:l()"
onmouseover="r('#9900CC'); return true"><img src="" border="0" width="10" height="10"></a></td>
<td bgcolor="#FFCC66"><a href="JavaScript:l()"
onmouseover="r('#FFCC66'); return true"><img src="" border="0" width="10" height="10"></a></td>
<td bgcolor="#FFFFFF"><a href="JavaScript:l()"
onmouseover="r('#FFFFFF'); return true"><img src="" border="0" width="10" height="10"></a></td>
    </tr>
</table>
<a><font face="Helvetica" size=-2>background color</font></a>
</body>

</html>

Refresh Page code

<script>
<!--

/*
Auto Refresh Page with Time script
By JavaScript Kit (javascriptkit.com)
Over 200+ free scripts here!
http://www.*******.com/
*/

//enter refresh time in "minutes:seconds" Minutes should range from 0 to inifinity. Seconds should range from 0 to 59
var limit="0:30"

if (document.images){
var parselimit=limit.split(":")
parselimit=parselimit[0]*60+parselimit[1]*1
}
function beginrefresh(){
if (!document.images)
return
if (parselimit==1)
window.location.reload()
else{
parselimit-=1
curmin=Math.floor(parselimit/60)
cursec=parselimit%60
if (curmin!=0)
curtime=curmin+"  "+cursec+" "
else
curtime=cursec+" "
window.status=curtime
setTimeout("beginrefresh()",1000)
}
}

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

homepage code

<a class="chlnk" style="cursor:hand" HREF onClick="this.style.behavior='url(#default#homepage)';this.setHomePage('http://www.*******.com');">homepage</a>

Saturday, January 14, 2012

Google Webmaster Tools

Introduction

Yep, I know what you are thinking. "Thanks to HTML Goodies, I've got Internet Explorer Web Developer Toolbar, Firefox Web Developer Extension, and Firebug, what more do I need."
Okay, so you have a hammer, a screwdriver, and an adjustable wrench. Even your basic tool belt has room for a few more tools. Google Webmaster Tools is a handy

How to Upload Your Photos onto the Web by Flickr

Flickr is a photo uploading site owned by Yahoo. You can sign into Flickr using your Yahoo login identity and password. Flickr has improved a lot as of late, and has easy uploading features. Once uploaded, photos can be added to blogs with a few clicks. The text that will accompany the photo can also be added on Flickr, thereby avoiding additional work. Flickr offers a free uploading tool that which is a good add-on. Flickr has also gone multilingual and is available in English, Chinese, Japanese, German, Spanish, French, Italian and Portuguese.

www.Flickr.com

youtube code for any video


add u link youtube in ***********
past this code in your site


<iframe width="640" height="360" src="http://www.youtube.com/************feature=player_embedded" frameborder="0" allowfullscreen></iframe>

Thursday, January 12, 2012

code PHP with HTML


There are two ways to use HTML on your PHP page. The first way is to put the HTML outside of your PHP tags. You can even put it in the middle if you close and reopen the <?php -and- ?> tags. Here is an example of putting the HTML outside of the tags:

 <html>
 <title>HTML with PHP</title>
 <body>
 <h1>My Example</h1>

 <?php
 //your php code here
 ?>

 <b>Here is some more HTML</b>

 <?php
 //more php code
 ?>


 </body>
 </html>


As you can see you can use any HTML you want without doing anything special or extra in your .php file, as long as it is outside of the PHP tags.

The second way to use HTML with PHP is by using PRINT or ECHO. By using this method you can include the HTML inside of the PHP tags. This is a nice quick method if you only have a line or so to do. Here is an example:


 <?php
 Echo "<html>";
 Echo "<title>HTML with PHP</title>";
 Echo "<b>My Example</b>";

 //your php code here

 Print "<i>Print works too!</i>";
 ?>

Wednesday, January 11, 2012

Script Visitor Counter



<!-- This  is from www.hawkee.com, found at www.phpfreecode.com-->

<br />
<b>Warning</b>:  fopen(count.dat) [<a href='function.fopen'>function.fopen</a>]: failed to open stream: No such file or directory in <b>/home/content/k/k/r/kkr152/html/phpfreecode/visitor_counter.htm</b> on line <b>153</b><br />
cannot open counter file

image code

image code

<html>
<body>

<img src="code.jpg" width="130" height="107" />

</body>
</html>

colors code

code
colors
#000000
Black
#150517
Gray0
#250517
Gray18
#2B1B17
Gray21
#302217
Gray23
#302226
Gray24
#342826
Gray25
#34282C
Gray26
#382D2C
Gray27
#3b3131
Gray28
#3E3535
Gray29
#413839
Gray30
#41383C
Gray31
#463E3F
Gray32
#4A4344
Gray34
#4C4646
Gray35
#4E4848
Gray36
#504A4B
Gray37
#544E4F
Gray38
#565051
Gray39
#595454
Gray40
#5C5858
Gray41
#5F5A59
Gray42
#625D5D
Gray43
#646060
Gray44
#666362
Gray45
#696565
Gray46
#6D6968
Gray47
#6E6A6B
Gray48
#726E6D
Gray49
#747170
Gray50
#736F6E
Gray
#616D7E
Slate Gray4
#657383
Slate Gray
#646D7E
Light Steel Blue4
#6D7B8D
Light Slate Gray
#4C787E
Cadet Blue4
#4C7D7E
Dark Slate Gray4
#806D7E
Thistle4
#5E5A80
Medium Slate Blue
#4E387E
Medium Purple4
#151B54
Midnight Blue
#2B3856
Dark Slate Blue
#25383C
Dark Slate Gray
#463E41
Dim Gray
#151B8D
Cornflower Blue
#15317E
Royal Blue4
#342D7E
Slate Blue4
#2B60DE
Royal Blue
#306EFF
Royal Blue1
#2B65EC
Royal Blue2
#2554C7
Royal Blue3
#3BB9FF
Deep Sky Blue
#38ACEC
Deep Sky Blue2
#3574EC7
Slate Blue
#3090C7
Deep Sky Blue3
#25587E
Deep Sky Blue4
#1589FF
Dodger Blue
#157DEC
Dodger Blue2
#1569C7
Dodger Blue3
#153E7E
Dodger Blue4
#2B547E
Steel Blue4
#4863A0
Steel Blue
#6960EC
Slate Blue2
#8D38C9
Violet
#7A5DC7
Medium Purple3
#8467D7
Medium Purple
#9172EC
Medium Purple2
#9E7BFF
Medium Purple1
#728FCE
Light Steel Blue
#488AC7
Steel Blue3
#56A5EC
Steel Blue2
#5CB3FF
Steel Blue1
#659EC7
Sky Blue3
#41627E
Sky Blue4
#737CA1
Slate Blue
#98AFC7
Slate Gray3
#F6358A
Violet Red
#F6358A
Violet Red1
#E4317F
Violet Red2
#F52887
Deep Pink
#E4287C
Deep Pink2
#C12267
Deep Pink3
#7D053F
Deep Pink4
#CA226B
Medium Violet Red
#C12869
Violet Red3
#800517
Firebrick
#7D0541
Violet Red4
#7D0552
Maroon4
#810541
Maroon
#C12283
Maroon3
#E3319D
Maroon2
#F535AA
Maroon1
#FF00FF
Magenta
#F433FF
Magenta1
#E238EC
Magenta2
#C031C7
Magenta3
#B048B5
Medium Orchid
#D462FF
Medium Orchid1
#C45AEC
Medium Orchid2
#A74AC7
Medium Orchid3
#6A287E
Medium Orchid4
#8E35EF
Purple
#893BFF
Purple1
#7F38EC
Purple2
#6C2DC7
Purple3
#461B7E
Purple4
#571B7e
Dark Orchid4
#7D1B7E
Dark Orchid
#842DCE
Dark Violet
#8B31C7
Dark Orchid3
#A23BEC
Dark Orchid2
#B041FF
Dark Orchid1
#7E587E
Plum4
#D16587
Pale Violet Red
#F778A1
Pale Violet Red1
#E56E94
Pale Violet Red2
#C25A7C
Pale Violet Red3
#7E354D
Pale Violet Red4
#B93B8F
Plum
#F9B7FF
Plum1
#E6A9EC
Plum2
#C38EC7
Plum3
#D2B9D3
Thistle
#C6AEC7
Thistle3
#EBDDE2
Lavendar Blush2
#C8BBBE
Lavendar Blush3
#E9CFEC
Thistle2
#FCDFFF
Thistle1
#E3E4FA
Lavendar
#FDEEF4
Lavendar Blush
#C6DEFF
Light Steel Blue1
#ADDFFF
Light Blue
#BDEDFF
Light Blue1
#E0FFFF
Light Cyan
#C2DFFF
Slate Gray1
#B4CFEC
Slate Gray2
#B7CEEC
Light Steel Blue2
#52F3FF
Turquoise1
#00FFFF
Cyan
#57FEFF
Cyan1
#50EBEC
Cyan2
#4EE2EC
Turquoise2
#48CCCD
Medium Turquoise
#43C6DB
Turquoise
#9AFEFF
Dark Slate Gray1
#8EEBEC
Dark slate Gray2
#78c7c7
Dark Slate Gray3
#46C7C7
Cyan3
#43BFC7
Turquoise3
#77BFC7
Cadet Blue3
#92C7C7
Pale Turquoise3
#AFDCEC
Light Blue2
#3B9C9C
Dark Turquoise
#307D7E
Cyan4
#3EA99F
Light Sea Green
#82CAFA
Light Sky Blue
#A0CFEC
Light Sky Blue2
#87AFC7
Light Sky Blue3
#82CAFF
Sky Blue
#79BAEC
Sky Blue2
#566D7E
Light Sky Blue4
#6698FF
Sky Blue
#736AFF
Light Slate Blue
#CFECEC
Light Cyan2
#AFC7C7
Light Cyan3
#717D7D
Light Cyan4
#95B9C7
Light Blue3
#5E767E
Light Blue4
#5E7D7E
Pale Turquoise4
#617C58
Dark Sea Green4
#348781
Medium Aquamarine
#306754
Medium Sea Green
#4E8975
Sea Green
#254117
Dark Green
#387C44
Sea Green4
#4E9258
Forest Green
#347235
Medium Forest Green
#347C2C
Spring Green4
#667C26
Dark Olive Green4
#437C17
Chartreuse4
#347C17
Green4
#348017
Medium Spring Green
#4AA02C
Spring Green
#41A317
Lime Green
#4AA02C
Spring Green
#8BB381
Dark Sea Green
#99C68E
Dark Sea Green3
#4CC417
Green3
#6CC417
Chartreuse3
#52D017
Yellow Green
#4CC552
Spring Green3
#54C571
Sea Green3
#57E964
Spring Green2
#5EFB6E
Spring Green1
#64E986
Sea Green2
#6AFB92
Sea Green1
#B5EAAA
Dark Sea Green2
#C3FDB8
Dark Sea Green1
#00FF00
Green
#87F717
Lawn Green
#5FFB17
Green1
#59E817
Green2
#7FE817
Chartreuse2
#8AFB17
Chartreuse
#B1FB17
Green Yellow
#CCFB5D
Dark Olive Green1
#BCE954
Dark Olive Green2
#A0C544
Dark Olive Green3
#FFFF00
Yellow
#FFFC17
Yellow1
#FFF380
Khaki1
#EDE275
Khaki2
#EDDA74
Goldenrod
#EAC117
Gold2
#FDD017
Gold1
#FBB917
Goldenrod1
#E9AB17
Goldenrod2
#D4A017
Gold
#C7A317
Gold3
#C68E17
Goldenrod3
#AF7817
Dark Goldenrod
#ADA96E
Khaki
#C9BE62
Khaki3
#827839
Khaki4
#FBB117
Dark Goldenrod1
#E8A317
Dark Goldenrod2
#C58917
Dark Goldenrod3
#F87431
Sienna1
#E66C2C
Sienna2
#F88017
Dark Orange
#F87217
Dark Orange1
#E56717
Dark Orange2
#C35617
Dark Orange3
#C35817
Sienna3
#8A4117
Sienna
#7E3517
Sienna4
#7E2217
Indian Red4
#7E3117
Dark Orange3
#7E3817
Salmon4
#7F5217
Dark Goldenrod4
#806517
Gold4
#805817
Goldenrod4
#7F462C
Light Salmon4
#C85A17
Chocolate
#C34A2C
Coral3
#E55B3C
Coral2
#F76541
Coral
#E18B6B
Dark Salmon
#F88158
Pale Turquoise4
#E67451
Salmon2
#C36241
Salmon3
#C47451
Light Salmon3
#E78A61
Light Salmon2
#F9966B
Light Salmon
#EE9A4D
Sandy Brown
#F660AB
Hot Pink
#F665AB
Hot Pink1
#E45E9D
Hot Pink2
#C25283
Hot Pink3
#7D2252
Hot Pink4
#E77471
Light Coral
#F75D59
Indian Red1
#E55451
Indian Red2
#C24641
Indian Red3
#FF0000
Red
#F62217
Red1
#E41B17
Red2
#F62817
Firebrick1
#E42217
Firebrick2
#C11B17
Firebrick3
#FAAFBE
Pink
#FBBBB9
Rosy Brown1
#E8ADAA
Rosy Brown2
#E7A1B0
Pink2
#FAAFBA
Light Pink
#F9A7B0
Light Pink1
#E799A3
Light Pink2
#C48793
Pink3
#C5908E
Rosy Brown3
#B38481
Rosy Brown
#C48189
Light Pink3
#7F5A58
Rosy Brown4
#7F4E52
Light Pink4
#7F525D
Pink4
#817679
Lavendar Blush4
#817339
Light Goldenrod4
#827B60
Lemon Chiffon4
#C9C299
Lemon Chiffon3
#C8B560
Light Goldenrod3
#ECD672
Light Golden2
#ECD872
Light Goldenrod
#FFE87C
Light Goldenrod1
#ECE5B6
Lemon Chiffon2
#FFF8C6
Lemon Chiffon
#FAF8CC
Light Goldenrod Yellow

Tuesday, January 10, 2012

code add to Favorites button

code add to Favorites button

1- Copy this code and put it in the HEAD

  <SCRIPT language="JavaScript1.2">
var bookmarkurl="http://*******.com";
var bookmarktitle="name site ";
function addbookmark(){
if (document.all)
window.external.AddFavorite(bookmarkurl,bookmarktitle);
}
</SCRIPT>


2 - Copy this code and put it where you want it in the BODY

  <A href="javascript:addbookmark()">add bookmarkurl,</A> 

code search engine within your web page

code search engine within your web page

<script language="JavaScript">


var NS4 = (document.layers); // Which browser?
var IE4 = (document.all);

var win = window; // window to search.
var n= 0;

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("Not found.");
  }

  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("Not found.");
 }
  }

  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="Find">
</form>