BluePink BluePink
XHost
Servere virtuale de la 20 eur / luna. Servere dedicate de la 100 eur / luna - servicii de administrare si monitorizare incluse. Colocare servere si echipamente de la 75 eur / luna. Pentru detalii accesati site-ul BluePink.
enter page web design web resource entertainment personals  

Tricks: How to...
Image effects:
Preload images
Preload images 2
Swap images
Swap images 2
View larger image
Image transparency
Image slideshow
Special effects:
Border
Border 2
Watermark
Scroller
Scroller 2
Link hover color
Custom cursor
Snowing
Auto window resizer
Link tips
Popup
Buttons & menus:
Back button
Java buttons
Flat buttons
Slide menu
Drop down menu
Alphabet menu
Mouse effects:
Elastic mouse
Mouse snake
Mouse stars
Mouse orbit
Mouse eyes
Text generators:
Infobox
Quote generator
Fading messages
Text fader
Text glow
Credits

home > real world > web resource > web source codes >

 

STEP 1/3: Put this code into the <HEAD> of your document:

<SCRIPT LANGUAGE="JavaScript">
<!-- Begin
// add as many or as few messages as you would like
var msg=new Array()
msg[0]="<CENTER>Welcome to Digital Elf' Real World</CENTER>";
msg[1]="<CENTER>www.digitalelf.go.ro<BR>The Real World</CENTER>";
msg[2]="<CENTER>The best scripts<BR>from source.html</CENTER>";
msg[3]="<CENTER>and the most usefull scripts for web.</CENTER>";

// set your first set of colors. Use as many or as few as you wish.
var colors1=new Array("ffffff", "eeffee", "ddffdd", "ccffcc", "bbffbb", "aaffaa", "99ff99", "88ff88", "77ff77", "66ff66", "55ff55", "44ff44", "33ff33","22ff22", "11ff11", "00ff00")

//set your second set of colors
//must have exactly the same number of colors as the array above
var colors2=new Array("ffffff", "eeffee", "ddffdd", "ccffcc", "bbffbb", "aaffaa", "99ff99", "88ff88", "77ff77", "66ff66", "55ff55", "44ff44", "33ff33","22ff22", "11ff11", "00ff00")

//set the height of the display in pixels
high=40;

//set the width of the display in pixels
wide=200;

//set the pixel coordinates for the upper left hand corner of the display
Xpos=10;
Ypos=10;

// move the display away from the edges of the background
pad=2;

// set the background color of the display
bgcol="000000";

//add a background image if you want.
//for no image, just leave empty quotes (ex. cellbg=""; )
cellbg="faderbg.jpg";

// set the font
fntFam="trebuchet ms,verdana,helvetica,arial";
fntSize=10;

// set how how many seconds you want the message to stay remain at totality.
pause=2.5;


// Do not edit these values below!!!
icolor=0;
mcolor=1;
imsg=0;
spWidth=wide-(2*pad);
totality=false;
glowing=true;
var theMsg="";
var cellcontent="";
pause=pause*1000;
if(cellbg.length>4){cellbg=" background="+cellbg}
else{cellbg="";}

function doPause(){
totality=false; t=setTimeout("changecolor()",pause);
}
function initiate(){
getContentColor();
getMsg();
getCellContent();
if(document.all){
msgbg.innerHTML=cellcontent;
msgfade.innerHTML=theMsg;
msgbg.style.posLeft=Xpos;
msgbg.style.posTop=Ypos;
msgfade.style.posLeft=Xpos+pad;
msgfade.style.posTop=Ypos+pad;
t=setTimeout("changecolor()",50);}
if(document.layers){
document.msgbg.document.write(cellcontent);
document.msgbg.document.close();
document.msgfade.document.write(theMsg);
document.msgfade.document.close();
document.msgbg.left=Xpos;
document.msgbg.top=Ypos;
document.msgfade.left=Xpos+pad;
document.msgfade.top=Ypos+pad;
t=setTimeout("changecolor()",100);}
}
function changecolor(){
if(totality==true){doPause();}
else{
getMsg();
getContentColor();
if(document.all){
msgfade.innerHTML=theMsg;
t=setTimeout("changecolor()",50);}
if(document.layers){
document.msgfade.document.write(theMsg);
document.msgfade.document.close();
t=setTimeout("changecolor()",70);}
}
}
function getFadeColor(){
icolor=icolor-1;
if(mcolor==1){contentcolor=colors1[icolor];}
else{contentcolor=colors2[icolor];}
}
function getGlowColor(){
icolor=icolor+1;
if(mcolor==1){contentcolor=colors1[icolor];}
else{contentcolor=colors2[icolor];}
}
function changemsg(){
if(imsg==msg.length-1){imsg=0; mcolor=1;}
else if(imsg != msg.lenght-1 && mcolor==1){imsg=imsg+1; mcolor=0;}
else{imsg=imsg+1; mcolor=1;}
}
function getContentColor(){
if(icolor==colors1.length-1 && glowing==true){
getFadeColor(); glowing=false; totality=true;}
else if(icolor < colors1.length && glowing==true){
getGlowColor();}
else if(icolor < 1 && glowing==false){changemsg(); getGlowColor(); glowing=true;}
else{getFadeColor();}
}
function getMsg() {
theMsg="<span style='font-size:"+fntSize+"pt; font-family:"+fntFam+"; width:"+spWidth+";'>"
theMsg+="<B><font color="+contentcolor+">"+msg[imsg]+"</font></B> "
theMsg+="</span>"
}
function getCellContent(){
cellcontent="<TABLE height="+high+
" width="+wide+" bgcolor="+bgcol+" cellpadding=0 cellspacing=0><TR><TD"+cellbg+"> </TD></TR></TABLE>"}
// End -->
</script>
</HEAD>

STEP 2/3: Put this event into the <BODY> of your document:

<BODY onLoad="initiate()">

STEP 3/3: Put this code into the document:

<DIV id=msgbg style="position: absolute;"></DIV>
<DIV id=msgfade style="position: absolute;"></DIV>
© copyright 2004 - DigitalElf.ro - marian_dumitriu@yahoo.com