/////////////////////////////////////////////////////////////////////////////
// Function : nvca_login_example
// Comments : 
/////////////////////////////////////////////////////////////////////////////

function nvca_login_example(strCgiUrl, strSiteId, strTargetSiteId, strButtonText, strClassName, strTextColor)
{
	this.m_CgiUrl = "";
	this.m_SiteId = -1;
	this.m_ResultsPage = "";
	this.m_ButtonText="Search";
	this.m_ClassName  = 'nvca_login_example';
	this.m_TextColor  = '';

	this.m_FormName = "nvca_login_example";
	
	if (strCgiUrl != '')
		this.m_CgiUrl = strCgiUrl;

	if (strSiteId != null)
		this.m_SiteId = strSiteId;

	if (strTargetSiteId != '')
		this.m_TargetSiteId = strTargetSiteId;

	if (strButtonText != '')
		this.m_ButtonText = strButtonText;

	if (strClassName != '')
		this.m_ClassName = strClassName;

	if (strTextColor != '')
		this.m_TextColor = strTextColor;
	
	nvca_login_example.prototype.Display = nvca_login_example_Display;
}

function nvca_login_example_Display()	
{
	var ds = new Array();
	var di = 0;
	
	ds[di++] = '<form action="' + this.m_CgiUrl;
	ds[di++] = '" + method="get" + name="' + this.m_FormName + '"';
	ds[di++] = '>';

	ds[di++] = '<input type=hidden name="IdcService" value="SS_GET_PAGE">';
	ds[di++] = '<input type=hidden name="siteId" value="' + this.m_TargetSiteId + '">';
	ds[di++] = '<input type=hidden name="nodeId" value="' + this.m_TargetSiteId + '">';
	ds[di++] = '<input type=hidden name="ssDocName" value="' + this.m_ResultsPage + '">';
	////
	ds[di++] = '<input';
	ds[di++] = ' class = "' + this.m_ClassName + '"';

	if (this.m_TextColor != '')	
	{
		ds[di++] = ' style="color:' + this.m_TextColor + ';"';
	}	
	
	ds[di++] = ' type=submit value="' + this.m_ButtonText + '">';
	
	ds[di++] = '</form>';
	
	document.write(ds.join(''));
}


