/* Shadow dropping letters by Laszlo Naszodi LaszChess@yahoo.com
Have this file in the script folder.
Put a <script src="script/shady.js" /> tag in the <head> section and
another script tag in the body where you want to display a shady letter. 
Examples:	<script>shady('G')</script>. 
(narrow I)	<script>shady('I', 22)</script>. 
(wide M)	<script>shady('M', 38)</script>. 
*/
function isNull(obj){return (obj==null)||(obj==undefined)}

function shady(ltr, shift){//Suggested shift for I:22; for M and W:38
 if (isNull(shift))	var shift=30;//Default for medium width letters
 var shiftShadow=shift/5-3;
 var edge=6-shift;
 with (document){
	write('<span style="float:left;font:bold 34pt Bookman Old Style, Times New Roman;');
	write('margin-left='+edge+'px;line-height:75%">');
	write('<span style="position:relative;top:-4px;left:'+shift+'px; color:black; z-index:2">');
	write(ltr+'<\/span>');
	write('<span style="position:relative;top:-2px;left:'+shiftShadow+'px; color:gray; z-index:1">');
	write(ltr+'<\/span><\/span>')
 }
}
