1 Part to this script, simply enter this into the head of your page
=========================================================================================

<script>
<!-- Beginning of JavaScript -

// CREDITS:
// Random-Background-Color onDoublelick by Urs Dudli and Peter Gehrig 
// Copyright (c) 2000 Peter Gehrig and Urs Dudli. All rights reserved.
// Permission given to use the script provided that this notice remains as is.
// Additional scripts can be found at http://www.24fun.ch.
// info@24fun.ch
// 2/3/2000

// IMPORTANT: 
// If you add this script to a script-library or script-archive 
// you have to add a link to http://www.24fun.ch on the webpage 
// where this script will be running.

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

function makeHexa(thiscol) {
    var colhex_left = Math.floor(thiscol/16)
    var colhex_right= thiscol-(colhex_left*16)
    if (colhex_left == 10) {colhex_left="A"}
    if (colhex_left == 11) {colhex_left="B"}
    if (colhex_left == 12) {colhex_left="C"}
    if (colhex_left == 13) {colhex_left="D"}
    if (colhex_left == 14) {colhex_left="E"}
    if (colhex_left == 15) {colhex_left="F"}  
    if (colhex_right == 10) {colhex_right="A"}
    if (colhex_right == 11) {colhex_right="B"}
    if (colhex_right == 12) {colhex_right="C"}
    if (colhex_right == 13) {colhex_right="D"}
    if (colhex_right == 14) {colhex_right="E"}
    if (colhex_right == 15) {colhex_right="F"}    
    var colhex =""+colhex_left+colhex_right
    return colhex
}

function dblclick() {   
	var redcolor=makeRandom(255)
	redcolor=makeHexa(redcolor)	
	var greencolor=makeRandom(255)
	greencolor=makeHexa(greencolor)
	var bluecolor=makeRandom(255)
	bluecolor=makeHexa(bluecolor)
    document.bgColor=""+redcolor+greencolor+bluecolor
}

if (document.layers) {
document.captureEvents(Event.ONDBLCLICK);
}
document.ondblclick=dblclick;

// - End of JavaScript - -->

</SCRIPT>


