// VIEWER.JS
// SWCast.net Music License Certificate Viewer
//
// Copyright (c) 2005, SWCast Network, Inc.
// Unauthorized Reproduction Prohibited.

function SWCertViewer( StationHandle )
{
	this.StationHandle = StationHandle;

	this.PrintSealGraphic = function ( ImageAlign, ImageHorzSpace, ImageVertSpace )
	{
		if( ImageAlign == null ) ImageAlign = 'baseline';
		if( ImageHorzSpace == null ) ImageHorzSpace = 0;
		if( ImageVertSpace == null ) ImageVertSpace = 0
		document.write( '<A HREF="javascript:void( 0 );"><IMG SRC="http://swcast.net/cert/seal.gif" WIDTH="145" HEIGHT="65" BORDER="0" ALIGN="' + ImageAlign + '" HSPACE="' + ImageHorzSpace + '" VSPACE="' + ImageVertSpace + '" ALT="SWCast Network Licensed Music"></A>' );
		document.links[ document.links.length - 1 ].onclick = function ( ) { this.Parent.Popup( ); };
		document.links[ document.links.length - 1 ].Parent = this;
	};
	this.PrintSealText = function ( LinkStyle )
	{
		if( LinkStyle == null ) LinkStyle = 'SWSealTextLink';
		document.write( '<NOBR><A CLASS="' + LinkStyle + '" HREF="javascript:void( 0 );">SWCast Network Licensed Music</A></NOBR>' );
		document.links[ document.links.length - 1 ].onclick = function ( ) { this.Parent.Popup( ); };
		document.links[ document.links.length - 1 ].Parent = this;
	};
	this.Popup = function ( )
	{
        	if( window.document.layers != null )  return;
	        window.open( 'http://swcast.net/cert/verify.cgi/' + this.StationHandle, 'SWCertViewPopup', 'scrolling=no,width=550,height=500' );
	};
};

