var g_allDocs  = new Array();
var g_allDocs1  = new Array();
function _webLinkDocument_sidebarLink() {
	var cxtRoot = getContextRoot();
	var idx = this.url.indexOf("http");
	if (idx == 0) {
		cxtRoot = "";
	}
	var url = cxtRoot + this.url;
	var dt = this.displayText;
	var s = getSidebarLink(url, dt);
	return s;
}


/**
 * Add a new document to the list.
 */	
function addNewDocument(doc) {
	g_allDocs[g_AllDocs.length] = doc;
}

/**
 * url always defined from the root.
 */
function _webLinkDocument(displayText_in, docUid_in, 
						url_in, 
						dateCreate_in, dateUpdated_in, 
						blurb_in) {
	this.displayText = displayText_in;
	this.uuid = docUid_in;
	this.url = url_in;
	this.dateCreated = dateCreate_in;
	this.dateC = fnParseDate_MMddyyyy(dateCreate_in);
	this.dateUpdated = dateUpdated_in;
	this.dateU = fnParseDate_MMddyyyy(dateUpdated_in);
	this.blurb = blurb_in;
	this.sidebarLink = _webLinkDocument_sidebarLink;
	g_allDocs[docUid_in] = this;
	
	
	var u = getContextUrl(url_in);
//	alert(u);
	g_allDocs[u] = this;
	g_allDocs1[g_allDocs1.length] = this;
	return this;
}

var g_allMktDocs = new Array();
function newMktDoc(displayText_in, docUid_in, 
						url_in, 
						dateCreate_in, dateUpdated_in, 
						blurb_in) {
						
	var wld = new  _webLinkDocument(displayText_in, docUid_in, 
						url_in, 
						dateCreate_in, dateUpdated_in, 
						blurb_in);
	g_allMktDocs[g_allMktDocs.length] = wld;
	return wld;
}

var g_allTechDocs = new Array();
function newTechDoc(displayText_in, docUid_in, 
						url_in, 
						dateCreate_in, dateUpdated_in, 
						blurb_in) {
						
	var wld = new  _webLinkDocument(displayText_in, docUid_in, 
						url_in, 
						dateCreate_in, dateUpdated_in, 
						blurb_in);
	g_allTechDocs[g_allTechDocs.length] = wld;
	return wld;
}

// ECS_CRM Docs.
var doc_omcomp_help = newTechDoc(
		"Order Mgr Help (.zip)", "doc_omcomp_help", 
		"/ecs_provisioning/ecs-ordermgr-hlp.zip", 
		"11/08/2006", "11/08/2006", 
		"This document describes the Order Manager."
		);
		
var doc_omcomp_javadocs = newTechDoc(
		"Order Mgr Javadocs (.zip)", "doc_omcomp_javadocs", 
		"/ecs_provisioning/ecs-ordermgr-javadoc.zip", 
		"11/08/2006", "11/08/2006", 
		"This document describes the Order Manager APIs."
		);

var arch = newTechDoc(
		"Architecture", "arch", 
		"/product_docs/Architecture.pdf", 
		"12/10/2004", "12/10/2004", 
		"This document describes the SemaTree Technical Architecture"
		);
		
var perf = newTechDoc(
		"Performace Report", "perf", 
		"/product_docs/PerformanceReport.pdf", 
		"12/10/2004", "12/10/2004", 
		"ECS scales gracefully under load.  This technical document shows the results of our scalability testing."
		);
		
var pageHandlers = newTechDoc(
		"SemaTree Web Delivery", "pageHandlers", 
		"/product_docs/ECSWebFramework.pdf", 
		"12/10/2004", "12/10/2004", 
		"ECS uses a 'Page Handler' framework to render dynamic content in the pages."
		);
		
var configFwk = newTechDoc(
		"Configuring ECS", "configFwk", 
		"/product_docs/config_framework.html", 
		"12/10/2004", "12/10/2004", 
		"ECS supports a wild variety of configuration options."
		);
		
		
var mktdash = newMktDoc(
		"Marketing Document", "mktdash", 
		"/product_docs/ecs_crm/marketingdashboard.pdf", 
		"12/10/2004", "12/10/2004", 
		"Marketing in ECS allows your marketing team to send out material and analyze the results."
		);
		
var leadmgt = newMktDoc(
		"Lead Management", "leadmgt", 
		"/product_docs/ecs_crm/leadmgt.pdf", 
		"12/10/2004", "12/10/2004", 
		"This document discusses the ECS lead management sub-system in detail.."
		);
		
var crm_fulfillment = newMktDoc(
		"Fulfillment", "crm_fulfillment", 
		"/ecs_fulfillment/index.html", 
		"12/10/2004", "12/10/2004", 
		"This document discusses the ECS Fulfillment sub-system in detail.."
		);
		
	/**
var crm_messaging = newMktDoc(
		"Secure Messaging", "crm_messaging", 
		"/ecs_message/index.html", 
		"12/10/2004", "12/10/2004", 
		"This document discusses the ECS Messaging sub-system in detail.."
		);
		
var crm_user = newMktDoc(
		"User Management", "crm_user", 
		"/ecs_user/index.html", 
		"12/10/2004", "12/10/2004", 
		"This document discusses the ECS User sub-system in detail.."
		);
**/
		
// CRM Documents 
	var crm_relnotes = new _webLinkDocument(
		"Release Notes", "crm_relnotes", 
		"/ecs_crm/release_notes.html", 
		"12/10/2004", "12/10/2004", 
		"The release notes for the various releases."
		);
	var crm_installguide = newTechDoc(
		"ECS CRM Installation Guides", "crm_installguide", 
		"/ecs_crm/ecs_crm_install.html", 
		"12/10/2004", "12/10/2004", 
		"Installation guides for the various platforms."
		);

	var crm_installdb = newTechDoc(
		"ECS CRM Database Installation", "crm_installdb", 
		"/ecs_crm/install_db.html", 
		"12/10/2004", "12/10/2004", 
		"Database Installation guides."
		);
	var crm_bizgraph = newTechDoc(
		"Business Graphics Configuration", "crm_bizgraph", 
		"/ecs_crm/business_graphics.html", 
		"12/10/2004", "12/10/2004", 
		"Installation guides for the various platforms."
		);
		
	var crm_cfg = newTechDoc(
		"ECS CRM Configuration", "crm_cfg", 
		"/ecs_crm/ecs_crm_config.html", 
		"12/10/2004", "12/10/2004", 
		"Configuration of the product."
		);
	
	var crm_userguides = newTechDoc(
		"ECS CRM User Guide", "crm_userguides", 
		"/ecs_crm/ecs_crm_userguide.html", 
		"12/10/2004", "12/10/2004", 
		"User Guide shows how to use the product."
		);

/**
	var crm_enduserguide = newTechDoc(
		"ECS Internal End User Guide", "crm_enduserguide", 
		"http://localhost:18080/ecshelp/users_guide/hh_start.htm", 
		"12/10/2004", "12/10/2004", 
		"ECS CRM End user documentation contains detailed information about ECS CRM features as used by a typical Customer Service Rep."
		);

	var crm_salesadminguide = newTechDoc(
		"ECS Sales Administration Guide", "crm_salesadminguide", 
		"http://localhost:18080/ecshelp/sales_admin_guide/hh_start.htm", 
		"12/10/2004", "12/10/2004", 
		"ECS Sales Adminstration Guide contains information about how the different administration features are used."
		);

	var crm_mktadminguide = newTechDoc(
		"ECS CRM Marketing Administration Guide", "crm_mktadminguide", 
		"http://localhost:18080/ecshelp/mkt_admin_guide/hh_start.htm", 
		"12/10/2004", "12/10/2004", 
		"ECS Marketing Adminstration Guide contains information about how the different marketing administration features are used."
		);
*/		
	var ecs_product_suite = newMktDoc(
		"ECS Product Suite Overview", "ecs_product_suite", 
		"/ecs_crm/ecs_product_suite.html", 
		"12/10/2004", "12/10/2004", 
		"Enterprise Component Series is a suite of applications that enable your organization to manage your customer interactions and the activity that is generated from these interactions. This page provides a summary of all the ECS products.  "
		);

	var tradeshow = newTechDoc(
		"Tradeshow Application User Guide", "tradeshow", 
		"/product_docs/tradeshow/ECSTradeshow.pdf", 
		"12/10/2004", "12/10/2004", 
		"Read how ECS Tradeshow can support your tradeshow marketing team in the field."
		);
		
	var ts_install = newTechDoc(
		"Tradeshow Installation Guide", "ts_install", 
		"/ts_product/install_tradeshow.html", 
		"12/10/2004", "12/10/2004", 
		"Tradeshow Application installation guide."
		);
		
	var ts_releaseNotes = new _webLinkDocument(
		"Tradeshow Release Notes", "ts_releaseNotes", 
		"/ts_product/release_notes.html", 
		"12/10/2004", "12/10/2004", 
		"Tradeshow Application installation guide."
		);
		
	
	var b2p_releaseNotes = new _webLinkDocument(
		"PartnerNet Release Notes", "b2p_releaseNotes", 
		"/ecs_partnernet/release_notes.html", 
		"12/10/2004", "12/10/2004", 
		"Partner Net Release Notes ."
		);
	

		
// Technology
	var tech_open = newTechDoc(
		"Open Standards", "tech_open", 
		"/technology/index.html", 
		"12/10/2004", "12/10/2004", 
		"SemaTree has used a broad range of open source products and technologies to provide a scalable, robust solution.  "
		);
	var tech_matrix = newTechDoc(
		"Product/Technology Matrix", "tech_matrix", 
		"/technology/product_tech_matrix.html", 
		"12/10/2004", "12/10/2004", 
		"The product matrix lists the products availablity on various DB's and Application Servers."
		);
	var tech_docs = new _webLinkDocument(
		"All Documentation", "tech_docs", 
		"/technology/documentation.html", 
		"12/10/2004", "12/10/2004", 
		""
		);
	

// Services
	var solutions_docs = new _webLinkDocument(
		"All Documentation", "solutions_docs", 
		"/services/documentation.html", 
		"12/10/2004", "12/10/2004", 
		""
		);
		
		
var prod_usecase = newMktDoc(
		"SemaTree Use Cases", "art_crm_usecase", 
		"/articles/items/use_cases.pdf", 
		"09/06/2005", "09/06/2005", 
		"This document describes ECS customer scenarios for the fictional ACME company. "
		);
				

//	alert("all_docs : " + g_allDocs.length);
	
			