// ---------- script properties ----------
var include_num = 1;
var bold = 1;
// ---------- sites ----------
var s = new Array();
//Actual format For specifying the all these parameters.
//s[REC NUM] = "TITLE^URL OR FILENAME^DESCRIPTIVE LINE^KEYWORDS Separated By Comma";
//e.g :
//s[0] = "DL^form.html^Enter DL in the example above ...^open source, free, client side";

s[0] = "Home : IX Solutions for Retail and Branded Products...^http://nexgenix.com^ Nexgenix is an Enterprise Software Application company that changes the nature of software appliations and implementations by bringing 60-75% of common workflow to our clients and allows the business users to build the rest using IX Configurator ©. This is our key differentiator.";
s[1] = "Industry: ^industry.html^AMR Research defines Profitable Differentiation as the blending of an atomic-level understanding of consumer demand with effective retail execution to create a profitable and superior shopping experience.  Achieving cost-efficient, flawless order fulfillment means matching supply and demand using an S&OP process leveraging technology. While many companies have spent a lot on planning and collaboration software technology, most have not leveraged these investments to their full extent. AMR Research...Nexgenix addresses this problem with the flexibility of its ix planning solutions powered by iX Platform. ";
s[2] = "Retail: IX Strategic Services Methodology...^indretail.html^The iX Advanced Retail Planning solution (iX ARP) brings a comprehensive retail planning and execution software in one inclusive package. iX ARP aligns merchandise execution decisions with store-specific consumer demand signals. iX Advance Planning provides workflow-based planning solution, giving you all the capabilities required to successfully manage the retail merchandising cycle by roles and responsibilities.";
s[3] = "Hightech: ^indhitech.html^Accurately and reliably commit to customer, improve order fill rates, significantly reduce customer commitment cycle time, and absorb demand variability intelligently.";
s[4] = "Consumer Products: ^indcpg.html^Nexgenix helps you optimize your VMI processes through a complete understanding of what's happening at the retail shelf at the store-SKU level to optimize consumer sales, while ensuring minimum lost-sales and returns. Nexgenix Solves The Last Mile Problem in High Tech.";
s[5] = "Company: ^company.html^Nexgenix Business Solutions uniquely stretch your supply chain from vertical silos to highly responsive, horizontally synchronized and customer driven-planning and execution processes. We are the only solution provider that natively considers the supply chain as a set of cross-functional processes throughout your organization as well as your partner organization.";
s[6] = "Management Team: ^mteam.html^Nexgenix has brought together a multicultural management team with unmatched vision and experience. All executive team members contribute to managing Nexgenix' rapid growth and strategic direction. Collectively, this team of accomplished executives brings decades of high-tech consulting, marketing, sales, operations, technology and management experience to a company driven to deliver the highest quality services to its global customers. Rick Dutta, Founder, CEO and Chairman of the Board of Directors. Martin Onofrio,Senior Vice President of Sales and Marketing.";
s[7] = "Board of Directors: ^board.html^Nexgenix has assembled a board of prominent technology industry visionaries who bring extensive experience in building industry-leading, multi-billion dollar enterprises to Nexgenix. David R. Dukes, David has served as a member of the board of directors since October 1999. Rick Dutta, Rick Dutta is a seasoned entrepreneur with over 20 years of experience in high tech industry and computer software technology. Don Ganguly, Current chief executive officer of Equinox, a BPO company focusing in the financial services space.  James J. Goodman, Jim Goodman has been an investor in private middle market companies for the last eleven years. Safi U. Qureshey, Safi has served as a member of the board of directors since October 1999.";
s[8] = "Resources: ^resources.html^Resources: Download IX White Papers";
s[9] = "Contact us: ^contact.html^Contact us - USA: 320, Commerce, Irvine, CA 92602, Tel: 714 665 6200, Fax: 714 669 8848 Email: contact@Nexgenix.com. India: Unit 149, SDF V,  SEEPZ, Andheri, Mumbai 400096. Tel: 91 22 28290174, Fax: 91 22 28291277.";
s[10] = "Support: ^../ix/support/support.html^Support: Electronics OEMs and component suppliers are experiencing rapid changes. Our solutions for the Hi-Tech and Semiconductor industry could help you achieve a higher level of operational excellence and help you gain that competitive advantage where your strongest differentiator would be to react to changes faster than you ever saw before. ";
s[11] = "Legal: ^legal2.html^Legal Nexgenix, Inc. hereby authorizes you to copy documents published by Nexgenix, Inc. on this World Wide Web site for non-commercial use within your organization only. In consideration of this authorization, you agree that any copy of these documents which you make shall retain all copyright and other proprietary notices contained herein. By your copying such documents for your internal use only, you agree not to re-use in any manner any such documents or content thereof or any other materials contained in or otherwise accessible from this World Wide Web site. You may not modify any documents or material. If you do, you will be in violation of our intellectual property rights and possibly the intellectual property rights of others. Copyright © 2005 Nexgenix Inc., 320, Commerce, Irvine, CA 92602. All rights reserved. ";

// ---------- end of script properties and sites ----------

var cookies = document.cookie;
var p = cookies.indexOf("d=");

if (p != -1) {
	var st = p + 2;
	var en = cookies.indexOf(";", st);
	if (en == -1) {
		en = cookies.length;
	}
	var d = cookies.substring(st, en);
	d = unescape(d);
}
var od = d;
var m = 1;
if (d.charAt(0) == '"' && d.charAt(d.length - 1) == '"') {
	m = 1;
}

var r = new Array();
var co = 0;

if (m == 0) {
	var woin = new Array();
	var w = d.split(" ");
	for (var a = 0; a < w.length; a++) {
		woin[a] = 0;
		if (w[a].charAt(0) == '-') {
			woin[a] = 1;
		}
	}
	for (var a = 0; a < w.length; a++) {
		w[a] = w[a].replace(/^\-|^\+/gi, "");
	}
	a = 0;
	for (var c = 0; c < s.length; c++) {
		pa = 0;
		nh = 0;
		for (var i = 0; i < woin.length; i++) {
			if (woin[i] == 0) {
				nh++;
				var pat = new RegExp(w[i], "i");
				var rn = s[c].search(pat);
				if (rn >= 0) {
					pa++;
				} else {
					pa = 0;
				}
			}
			if (woin[i] == 1) {
				var pat = new RegExp(w[i], "i");
				var rn = s[c].search(pat);
				if (rn >= 0) {
					pa = 0;
				}
			}
		}
		if (pa == nh) {
			r[a] = s[c];
			a++;
		}
	}
	co = a;
}

if (m == 1) {
	d = d.replace(/"/gi, "");
	var str=d;
	var a = 0;
	var pat = new RegExp(d, "i");
	for (var c = 0; c < s.length; c++) {
		var rn = s[c].search(pat);
		if (rn >= 0) {
			r[a] = s[c];
			a++;
		}
	}
	co = a;
}

function return_query() {
	document.dl_Form.d.value = od;
}

function num_dl() {
	document.write(co);
}

function out_dl() {
	if (co == 0) {
		document.write('Your search did not match any documents.<p>Make sure all keywords are spelt correctly.<br>Try different or more general keywords.');
		return;
	}
	for (var a = 0; a < r.length; a++) {
		var os = r[a].split("^");
		if (bold == 1 && m == 1) {
			var br = "<b>" + d + "</b>";
			os[2] = os[2].replace(pat, br);
		}
		if (include_num == 1) {
			document.write(a + 1, '. <a href="', os[1], '">', os[0], '</a><br>', os[2], '<p>');
		} else {
			document.write('<a href="', os[1], '">', os[0], '</a><br>', os[2], '<p>');
		}
	}

}
