cShadowEffect_Section = 3; //****** END OF AUTOMATIC CODE ****** function ShadowText( sCreateText, iEffect, iDX, iDY, iBaseColour,iColour, iCount, iColourMod ) { /* This function breaks when certain formatting styles are applied - centering=BAD, although parents may work. The containing box must be large enough for the entire object. Test it and leave some space, just in case. sCreatetext : The text to insert into the file iEffect : Index code for the effect iDX : X Offset per shadow layer - generally 1 or -1, fractions permissible and will be rounded iDY : Y Offset as above iBaseColour : Colour of the text's lowest element, also the colour displayed if JS is disabled iColour : Colour of the top-most layer iCount : Number of shadow layers, excluding base iColourMod : Used per layer to modify the shadow's colour: +0xRRGGBB Effects 0, 1 and 3 require only sCreateText and iEffect to display, Effect 2 requires ALL arguments */ document.open(); switch (iEffect) { case 0 : { document.writeln('
' + sCreateText); document.writeln('
' + sCreateText + '
'); document.writeln('
' + sCreateText + '
'); document.writeln('
' + sCreateText + '
'); document.writeln('
' + sCreateText + '
'); document.writeln('
' + sCreateText + '
'); document.writeln('
' + sCreateText + '
'); document.writeln('
'); break; } case 1: { document.writeln('
' + sCreateText); document.writeln('
' + sCreateText + '
'); document.writeln('
' + sCreateText + '
'); document.writeln('
' + sCreateText + '
'); document.writeln('
' + sCreateText + '
'); document.writeln('
' + sCreateText + '
'); document.writeln('
'); break; } case 2 : { RenderText( sCreateText, iDX, iDY, iBaseColour,iColour, iCount, iColourMod ); break; } case 3 : //Used for page section headers { RenderText( sCreateText, 1,0.5, 0x000080,0xffffff, 8,-0x151515 ); break; } } document.close(); } function RenderText( sCreateText, iDX, iDY, iBaseColour,iColour, iCount, iColourMod ) { var x; document.writeln('
' + sCreateText); for( x=0; x < iCount; x++ ) { document.writeln('
' + sCreateText + '
'); } document.writeln('
'); } function DecTo6Hex( iDecColour ) { var x, sHex, sHexColour; sHex = "0123456789abcdef"; sHexColour = ""; for ( x = 0; x < 6; x++ ) { sHexColour = sHex.substring( iDecColour & 15, (iDecColour & 15) + 1 ) + sHexColour; iDecColour = iDecColour / 16; } return sHexColour; } /* Cookie functions from http://techpatterns.com/ */ function GetCookie( name ) { var start = document.cookie.indexOf( name + "=" ); var len = start + name.length + 1; if ( ( !start ) && ( name != document.cookie.substring( 0, name.length ) ) ) { return null; } if ( start == -1 ) return null; var end = document.cookie.indexOf( ";", len ); if ( end == -1 ) end = document.cookie.length; return unescape( document.cookie.substring( len, end ) ); } function SetCookie( name, value, expires, path, domain, secure ) { // set time, it's in milliseconds var today = new Date(); today.setTime( today.getTime() ); /* if the expires variable is set, make the correct expires time, the current script below will set it for x number of days, to make it for hours, delete * 24, for minutes, delete * 60 * 24 */ if ( expires ) { expires = expires * 1000 * 60 * 60 * 24; } var expires_date = new Date( today.getTime() + (expires) ); document.cookie = name + "=" +escape( value ) + ( ( expires ) ? ";expires=" + expires_date.toGMTString() : "" ) + ( ( path ) ? ";path=" + path : "" ) + ( ( domain ) ? ";domain=" + domain : "" ) + ( ( secure ) ? ";secure" : "" ); }