<!-- Original:  Craig Lumley -->
<!-- Web Site:  http://www.ws4all.co.uk -->
<!-- This script and many more are available free online at -->
<!-- The JavaScript Source!! http://javascript.internet.com -->
<!-- Begin
function MakeArrayday(size) {
this.length = size;
for(var f = 1; f <= size; f++) {
this[f] = "";
}
return this;
}
function MakeArraymonth(size) {
this.length = size;
for(var f = 1; f <= size; f++) {
this[f] = "";
}
return this;
}
function funClock() {
if (!document.layers && !document.all)
return;
var runTime = new Date();
var hours = runTime.getHours();
var minutes = runTime.getMinutes();
var seconds = runTime.getSeconds();
var dn = "AM";
if (hours >= 12) {
dn = "PM";
hours = hours - 12;
}
if (hours == 0) {
hours = 12;
}
if (minutes <= 9) {
minutes = "0" + minutes;
}
if (seconds <= 9) {
seconds = "0" + seconds;
}
movingtime = "<b>"+ hours + ":" + minutes + ":" + seconds + " " + dn + "</b>";
if (document.layers) {
document.layers.clock.document.write(movingtime);
document.layers.clock.document.close();
}
else if (document.all) {
clock.innerHTML = movingtime;
}
setTimeout("funClock()", 1000)
}
window.onload = funClock;


function mOvr(src,clrOver){ 


	if (!src.contains(event.fromElement)){ 


		src.bgColor = clrOver; 


	} 


} 


function mOut(src,clrIn){ 


	if (!src.contains(event.toElement)){ 


		src.bgColor = clrIn; 


	} 


} 


function mClk(src){ 


	if(event.srcElement.tagName=='TD')


		src.children.tags('A')[0].click();


}





function openwin(page){


part1="http://www."


window.location.href = part1 + page;


}





function PopMeUp(url, name, w, h, perc) {


		var winX = (screen.availWidth - w)*perc*.01;


  		var winY = (screen.availHeight - h)*perc*.01;


  		popupWin = window.open(url, name,'width=' + w + ',height=' + h + ',left=' + winX + ',top=' + winY);


	}





/************* 

**** <config> 

**/ 

startColor = "#FF0000"; // MouseOut link color 

endColor = "#FFFFFF"; // MouseOver link color 



stepIn = 15; // delay when fading in 

stepOut = 15; // delay when fading out 



/* 

** set to true or false; true will 

** cause all links to fade automatically 

***/ 

autoFade = true; 

/* 

** set to true or false; true will cause all CSS 

** classes with "fade" in them to fade onmouseover 

***/ 

sloppyClass = true; 

/** 

**** </config> 

**************/ 

/************* 

**** <install> 

** 

** 

**** </install> 

**************/ 



hexa = new makearray(16); 

for(var i = 0; i < 10; i++) 

hexa[i] = i; 

hexa[10]="a"; hexa[11]="b"; hexa[12]="c"; 

hexa[13]="d"; hexa[14]="e"; hexa[15]="f"; 



document.onmouseover = domouseover; 

document.onmouseout = domouseout; 



startColor = dehexize(startColor.toLowerCase()); 

endColor = dehexize(endColor.toLowerCase()); 



var fadeId = new Array(); 



function dehexize(Color){ 

var colorArr = new makearray(3); 

for (i=1; i<7; i++){ 

for (j=0; j<16; j++){ 

if (Color.charAt(i) == hexa[j]){ 

if (i%2 !=0) 

colorArr[Math.floor((i-1)/2)]=eval(j)*16; 

else 

colorArr[Math.floor((i-1)/2)]+=eval(j); 

} 

} 

} 

return colorArr; 

} 



function domouseover() { 

if(document.all){ 

var srcElement = event.srcElement; 

if ((srcElement.tagName == "A" && autoFade) || srcElement.className == "fade" || (sloppyClass && srcElement.className.indexOf("fade") != -1)) 

fade(startColor,endColor,srcElement.uniqueID,stepIn); 

} 

} 



function domouseout() { 

if (document.all){ 

var srcElement = event.srcElement; 

if ((srcElement.tagName == "A" && autoFade) || srcElement.className == "fade" || (sloppyClass && srcElement.className.indexOf("fade") != -1)) 

fade(endColor,startColor,srcElement.uniqueID,stepOut); 

} 

} 



function makearray(n) { 

this.length = n; 

for(var i = 1; i <= n; i++) 

this[i] = 0; 

return this; 

} 



function hex(i) { 

if (i < 0) 

return "00"; 

else if (i > 255) 

return "ff"; 

else 

return "" + hexa[Math.floor(i/16)] + hexa[i%16];} 



function setColor(r, g, b, element) { 

var hr = hex(r); var hg = hex(g); var hb = hex(b); 

element.style.color = "#"+hr+hg+hb; 

} 



function fade(s,e, element,step){ 

var sr = s[0]; var sg = s[1]; var sb = s[2]; 

var er = e[0]; var eg = e[1]; var eb = e[2]; 



if (fadeId[0] != null && fade[0] != element){ 

setColor(sr,sg,sb,eval(fadeId[0])); 

var i = 1; 

while(i < fadeId.length){ 

clearTimeout(fadeId[i]); 

i++; 

} 

} 



for(var i = 0; i <= step; i++) { 

fadeId[i+1] = setTimeout("setColor(Math.floor(" +sr+ " *(( " +step+ " - " +i+ " )/ " +step+ " ) + " +er+ " * (" +i+ "/" + 

step+ ")),Math.floor(" +sg+ " * (( " +step+ " - " +i+ " )/ " +step+ " ) + " +eg+ " * (" +i+ "/" +step+ 

")),Math.floor(" +sb+ " * ((" +step+ "-" +i+ ")/" +step+ ") + " +eb+ " * (" +i+ "/" +step+ ")),"+element+");",i*step); 

} 

fadeId[0] = element; 

}



/*****************************************

* Lottery Picker (By Kurt at kurt.grigg@virgin.net)

* Featured on/available at http://www.dynamicdrive.com/

* Modified by DynamicDrive.com for below config options

* This notice must stay intact for use.

*****************************************/



var totalnumbers=6 //input total numbers to generate

var lowerbound=1   //input lower bound for each random number

var upperbound=49  //input upper bound for each random number



function lotto(){

B=' ';	

LottoNumbers=new Array();	

 for (i = 1; i <= totalnumbers; i++)

 {

 RandomNumber = Math.round(lowerbound+Math.random()*(upperbound-lowerbound));

  for (j = 1; j <= totalnumbers; j)

  {

  if (RandomNumber == LottoNumbers[j])

    {

     RandomNumber=Math.round(lowerbound+Math.random()*(upperbound-lowerbound));

     j=0;

    }

  j++;

  }

 LottoNumbers[i]=RandomNumber;

 }

LottoNumbers=LottoNumbers.toString();

X=LottoNumbers.split(',');

 for (i=0; i < X.length; i++)

 {

 X[i]=X[i]+' ';

 if (X[i].length==2) 

 X[i]='0'+X[i];

 } 

X=X.sort();

 for (i=0; i < X.length; i++)

 {

 OutPut=B+=X[i];

 }

if (document.all)document.all.layer1.innerHTML=OutPut;

if (document.getElementById)document.getElementById("layer1").innerHTML=OutPut;

if (document.layers){

  document.layers.layer1.document.open();

  document.layers.layer1.document.write("<span style='position:absolute;top:0px;left:0px;font-family:Verdana;font-size:20px;color:#888888;text-align:center'> "+OutPut+"</span>");

  document.layers.layer1.document.close();

  }

  T=setTimeout('lotto()',20);

//window.status=OutPut;

}

function StOp(){

setTimeout('clearTimeout(T)',1000);

}

