Site hosted by Angelfire.com: Build your free website today!

Background Preview

¡@

¡@

¡@

¡@










¡@

¡@

¡@

You see those three columns, simply move it up and down, and the background color will change.

This script is from Simply The Best. net: You can take the script from their site or copy it from my site.

¡@

Paste this at the <head> section of your page:

<STYLE>.drag {
CURSOR: hand; POSITION: relative
}
</STYLE>

¡@

Paste this at the <head section of your page:

<SCRIPT language=JavaScript1.2>
// Slider script by Ronald H. Jankowsky (http://rj-edv-beratung.de), parts of code (draglayer, movelayer) by DynamicDrive.com, small changes in code by SimplytheBest.net.
// This script is free for use, please leave this notice intact
// Courtesy of SimplytheBest.net (http://simplythebest.net/info/dhtml_scripts.html)
var sPosition;
var showPerc=100;
document.onmousedown=dragLayer
document.onmouseup=new Function("dragMe=false")
var Color= new Array();
Color[0] = "00";
Color[1] = "11";
Color[2] = "22";
Color[3] = "33";
Color[4] = "44";
Color[5] = "55";
Color[6] = "66";
Color[7] = "77";
Color[8] = "88";
Color[9] = "99";
Color[10] = "AA";
Color[11] = "BB";
Color[12] = "CC";
Color[13] = "DD";
Color[14] = "EE";
Color[15] = "FF";
// Demofunction to change bg-color by moving slider
var rVal,gVal,bVal, cCol
function chgBg() {
cCol = document.bgColor; rVal=cCol.substr(1,2); gala=cCol.substr(3,2); bVal=cCol.substr(5,2);
ind = Math.round(showPerc/16); if (ind < 0) ind = 0; if (ind > 15) ind=15;
// If more sliders are used, each of them has to be handled separately
if (kObj.id =="knobImg") document.bgColor="#"+Color[ind]+gVal+bVal;
if (kObj.id =="knobImg1") document.bgColor="#"+rVal+Color[ind]+bVal;
if (kObj.id =="knobImg2") document.bgColor="#"+rVal+gVal+Color[ind];
}
// Drag and move engine (original code by DynamicDrive.com), don't change unless explicitely indicated
var dragMe=false, kObj, yPos,direction
function moveLayer() {
if (event.button==1 && dragMe) {
oldY = kObj.style.pixelTop; kObj.style.pixelTop=temp2+event.clientY-yPos; 
// Limit movement of knob to stay inside layer
if (kObj.style.pixelTop > oldY) direction="dn"; else direction="up";
if (kObj.style.pixelTop < 2 && direction=="up") {kObj.style.pixelTop=2; direction="dn";}
if (kObj.style.pixelTop > 102 && direction=="dn") {kObj.style.pixelTop=102; direction="up";}
// Set working variable 'showPerc' depending on 100 or 250 scaling
sPosition=kObj.style.pixelTop; showPerc = (perCent[0].checked) ? sPosition-2 : (sPosition-2)/2*5; 
// The following line should be replaced by the function-call with the actual task to perform
chgBg(); 
return false; }
}
function dragLayer() {
if (!document.all) return;
if (event.srcElement.className=="drag") {dragMe=true; kObj=event.srcElement; temp2=kObj.style.pixelTop; yPos=event.clientY; document.onmousemove=moveLayer; }
}
</SCRIPT>

¡@

Then paste this at the <body> section of your page:

<DIV id=outerLyr 
style="BACKGROUND-COLOR: #000000; HEIGHT: 120px; LEFT: 155px; POSITION: absolute; TOP: 250px; WIDTH: 23px; Z-INDEX: 1"><IMG 
class=drag id=knobImg src="dscript33/knob33.jpg" 
style="HEIGHT: 17px; LEFT: 2px; TOP: 100px; WIDTH: 20px; Z-INDEX: 3"> 
<DIV id=innerLyr 
style="BACKGROUND-COLOR: #EBECD9; HEIGHT: 117px; LEFT: 2px; POSITION: absolute; TOP: 2px; WIDTH: 20px; Z-INDEX: 2">
<DIV id=barLyr 
style="BACKGROUND-COLOR: #000000; HEIGHT: 110px; LEFT: 9px; POSITION: absolute; TOP: 5px; WIDTH: 2px; Z-INDEX: 1"></DIV></DIV></DIV>
<DIV id=outerLyr1 
style="BACKGROUND-COLOR: #000000; HEIGHT: 120px; LEFT: 185px; POSITION: absolute; TOP: 250px; WIDTH: 23px; Z-INDEX: 1"><IMG 
class=drag id=knobImg1 src="dscript33/knob33.jpg" 
style="HEIGHT: 17px; LEFT: 2px; TOP: 100px; WIDTH: 20px; Z-INDEX: 3"> 
<DIV id=innerLyr1 
style="BACKGROUND-COLOR: #EBECD9; HEIGHT: 117px; LEFT: 2px; POSITION: absolute; TOP: 2px; WIDTH: 20px; Z-INDEX: 2">
<DIV id=barLyr1 
style="BACKGROUND-COLOR: #000000; HEIGHT: 110px; LEFT: 9px; POSITION: absolute; TOP: 5px; WIDTH: 2px; Z-INDEX: 1"></DIV></DIV></DIV>
<DIV id=outerLyr2 
style="BACKGROUND-COLOR: #000000; HEIGHT: 120px; LEFT: 215px; POSITION: absolute; TOP: 250px; WIDTH: 23px; Z-INDEX: 1"><IMG 
class=drag id=knobImg2 src="dscript33/knob33.jpg" 
style="HEIGHT: 17px; LEFT: 2px; TOP: 100px; WIDTH: 20px; Z-INDEX: 3"> 
<DIV id=innerLyr2 
style="BACKGROUND-COLOR: #EBECD9; HEIGHT: 117px; LEFT: 2px; POSITION: absolute; TOP: 2px; WIDTH: 20px; Z-INDEX: 2">
<DIV id=barLyr2 
style="BACKGROUND-COLOR: #000000; HEIGHT: 110px; LEFT: 9px; POSITION: absolute; TOP: 5px; WIDTH: 2px; Z-INDEX: 1"></DIV></DIV></DIV><font face="Arial" size="2"><br>
<INPUT 
name=perCent type=hidden value=false><INPUT CHECKED name=perCent 
type=hidden value=true></font>

¡@

This page will be updated every week!

¡@