// *****************************************************************************
// 	TASC Javascript Seal Widget Code
//	Developed for TASC by Advanced Media Productions Inc.
// *****************************************************************************


// Public Variables
TASCSealWidget.prototype.ID;


// Constructors
function TASCSealWidget() {
	// Start the object with the default configuration:
	//  Horizontal, show main content, background = 069, 468x150
	this.ID = "";
}



// Public Methods

// This method makes sure there are no hacking attempts in the ID parameter
TASCSealWidget.prototype.checkParams = function() {
	if(!parseInt(this.ID)) {this.ID = 0;} 
}


/// This method renders the code for the widget using document.write
TASCSealWidget.prototype.show = function() {
	// First of all, parse the params, make sure numbers are numbers.
	this.checkParams(); 

	// Generate the HTML code
	document.write('<a href="javascript:void(0);" onclick="TASCSealWindow=window.open(\'http://tascsite.org/index.cfm?event=Seal&ID=' + this.ID + '\',\'TASCSealWindow\',\'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=no,width=640,height=500\'); return false;"><img src="http://www.tascsite.org/seal.cfm?i=' + this.ID + '" style="border: none; width: 174px; height: 60px;"></a>');
} 