

	// SET DEFAULTS
	var lhf_type=typeof lhf_type=='string'?lhf_type:'Organization';
	var lhf_location=typeof lhf_location=='string'?lhf_location:'inline';
	var lhf_customstyle=typeof lhf_customstyle=='string'?lhf_customstyle:'';
	var lhf_badgetype=typeof lhf_badgetype=='string'?lhf_badgetype:'rect';
	var lhf_class = "";
	
	// DETERMINE STYLE TO USE
	switch(lhf_location.toLowerCase())
	{
		case "topright":
		  var lhf_style="lhf_badge_topright";
		  break;
		case "topleft":
		  var lhf_style="lhf_badge_topleft";
		  break; 
		case "bottomright":
		  var lhf_style="lhf_badge_bottomright";
		  break;
		case "bottomleft":
		  var lhf_style="lhf_badge_bottomleft";
		  break; 
		case "inline":
		  var lhf_style="lhf_badge_inline";
		  break; 
		case "custom":
		  var lhf_style="lhf_badge_inline";  
		  break;
		default:
		  document.write("Lindy Hoppers Fund: You have entered an invalid lhf_location: "+lhf_location);
		  break; 
	}
	
	// FORMAT TEXT FOR TYPE
	switch(lhf_type.toLowerCase())
	{
		case "donate":
		  lhf_type="Donate";
		  break;	
		case "instructor":
		  lhf_type="Instructor";
		  break;
		case "organization":
		  lhf_type="Organization";
		  break;
		case "event":
		  lhf_type="Event";
		  break;   
		default:
		  document.write("Lindy Hoppers Fund: You have entered an invalid lhf_type: "+lhf_type);
		  break; 
	}
	
	// MAKE IMAGE TAG 
	switch(lhf_badgetype.toLowerCase())
	{
		case "rect":
			lhf_imgtag = "<img src='http://www.lindyhoppersfund.org/badge/img/badge_rect_"+lhf_type.toLowerCase()+".gif' alt='Lindy Hoppers Fund Contributing "+lhf_type+"' border='0'  width='169' height='69' />";
			lhf_class = "lhf_img-shadow";
			break;
		case "star":
			lhf_imgtag = "<img src='http://www.lindyhoppersfund.org/badge/img/badge_star_"+lhf_type.toLowerCase()+".png' alt='Lindy Hoppers Fund Contributing "+lhf_type+"' border='0' />";
			break;
		default:
			document.write("Lindy Hoppers Fund: You have entered an invalid lhf_badgetype: "+lhf_badgetype);
			break;
	}
	
	// OUTPUT
	document.write("<link rel='stylesheet' href='http://www.lindyhoppersfund.org/badge/lhf_badge.css' />");
	if (lhf_customstyle.length > 0) {
		document.write("<div id='"+lhf_style+"' class='"+lhf_class+"' style='"+lhf_customstyle+"'>");
	} else {
		document.write("<div id='"+lhf_style+"' class='"+lhf_class+"'>");
	}
	
	
		document.write("<a href='http://www.lindyhoppersfund.org'>"+lhf_imgtag+"</a>");

	document.write("</div>");

