Table of contents :
The script parts highlighted in red are the ones you can customize.
/*
Following function is required to initialise Reveal
The function is called in the following manner :
initReveal(type,div1bg,div2bg,div1bw,div2bw,div1bc,div2bc,step,timeOut,click)
Parameter description :
type -> 0 for vertical | 1 for horizantal
div1bg -> Background color of first layer (eg. '#CCCCCC')
div2bg -> Background color of second layer (eg. '#CCCCCC')
div1bw -> Border width of first layer (eg. 1)
div2bw -> Border width of second layer (eg. 1)
div1bc -> Border color of first layer (eg. '#000000')
div2bc -> Border color of second layer (eg. '#000000')
step -> The amount revealed every interval (eg. 5)
timeOut -> The delay in milliseconds
click -> true if user has to click to reveal | false for auto
reveal
function initReveal(type,div1bg,div2bg,div1bw,div2bw,div1bc,div2bc,step,timeOut,click)
{
if(type==0) {
var bWhere1="border-bottom";
var bWhere2="border-top";
var putZero1="top:0px; left:0px";
var putZero2="bottom:0px; left:0px";
document.write('<div id="revealDiv1" style="z-index:100;
display:block; position:absolute; '+putZero1+'; background:'+div1bg+' ;
width:'+(width)+'; height:'+(height/2)+'; '+bWhere1+':'+div1bc+' solid
'+div1bw+'px"></div>');
document.write('<div id="revealDiv2" style="z-index:100;
display:block; position:absolute; '+putZero2+'; background:'+div2bg+' ;
width:'+(width)+'; height:'+(height/2)+'; '+bWhere2+':'+div2bc+' solid
'+div2bw+'px"></div>');
if(!click) {
reveal('revealDiv1',step,timeOut,0);
reveal('revealDiv2',step,timeOut,1);
}
else {
clickText(type,step,timeOut);
}
}
if(type==1) {
var bWhere1="border-right";
var bWhere2="border-left";
var putZero1="top:0px; left:0px";
var putZero2="top:0px; right:0px";
document.write('<div id="revealDiv1" style="z-index:100;
display:block; position:absolute; '+putZero1+'; background:'+div1bg+' ;
width:'+(width/2)+'; height:'+(height)+'; '+bWhere1+':'+div1bc+' solid
'+div1bw+'px"></div>');
document.write('<div id="revealDiv2" style="z-index:100;
display:block; position:absolute; '+putZero2+'; background:'+div2bg+' ;
width:'+(width/2)+'; height:'+(height)+'; '+bWhere2+':'+div2bc+' solid
'+div2bw+'px"></div>');
if(!click) {
reveal('revealDiv1',step,timeOut,2);
reveal('revealDiv2',step,timeOut,3);
}
else {
clickText(type,step,timeOut);
}
}
function clickText(type,step,timeOut) {
document.write('<div id="clickText" style="z-index:101; display:block;
position:absolute; top:'+(height/2-clickh/2-clickb)+'; left:'+(width/2-clickw/2-clickb)+'"><table
style="border:'+clickc+' solid '+clickb+'px; background:'+clickbg+' ;width:'+clickw+'px;
height:'+clickh+'; '+clickFont+'; cursor:hand; cursor:pointer" onClick="doClickText(\'clickText\','+type+','+step+','+timeOut+')"><tr><td
align="middle">'+clickt+'</td></tr></table></div>');
}
}