function BensHostingButton() {

	var buttontype = 1;
	var buttonalign = 'left';
	var inline = true;
	var destination;
	var buttontext = 'Hosted by Ben&rsquo;s Hosting';
	var buttontitle = 'This site is hosted by Ben&rsquo;s Hosting';
	var buttonlink = 'http://benshosting.com/';
	var uniqueID = '';

	this.display = function() {

		var HTML;

		switch( buttontype ) {
			case 1:
				switch( buttonalign ) {
					case 'right':
						HTML = '<div style="height:15px;padding:1em 0;"><a style="display:block;height:15px;background:url(http://benshosting.com/api/button/benshosting.gif) right -15px no-repeat;text-indent:-9999px;text-align:left" onmouseover="this.style.backgroundPosition=\'right 0px\';" onmouseout="this.style.backgroundPosition=\'right -15px\';" href="' + buttonlink + '" title="' + buttontitle + '">' + buttontext + '</a></div>';
						break;
					default:
						HTML = '<div style="height:15px;padding:1em 0;"><a style="display:block;height:15px;background:url(http://benshosting.com/api/button/benshosting.gif) 0 -15px no-repeat;text-indent:-9999px;text-align:left" onmouseover="this.style.backgroundPosition=\'0 0px\';" onmouseout="this.style.backgroundPosition=\'0 -15px\';" href="' + buttonlink + '" title="' + buttontitle + '">' + buttontext + '</a></div>';
						break;
				}
				break;
		}

		if( inline ) {
			document.write( HTML );
		} else {
			destination.innerHTML = HTML;
		}

	}

	this.setAlignment = function( alignment ) {
		switch( alignment ) {
			case 'left':
			case 'right':
				buttonalign = alignment;
				break;
		}
	}

	this.setCreatedBy = function( createdBy ) {
		if( createdBy ) {
			buttontext = 'Created and hosted by Ben&rsquo;s Hosting';
			buttontitle = 'This site created and hosted by Ben&rsquo;s Hosting';
		}
	}

	function getUniqueID() {
		if( uniqueID == '' ) {
			var chars = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXTZabcdefghiklmnopqrstuvwxyz";
			var string_length = 32;
			var randomstring = '';
			for (var i=0; i<string_length; i++) {
				var rnum = Math.floor(Math.random() * chars.length);
				uniqueID += chars.substring(rnum,rnum+1);
			}
		}
		return uniqueID;
	}
}

