
//set flag, if flag=0, the child won' show below
//otherwise, the child will show below
function Partner(id,flag,url,text) {
	this.url=url;
	this.text=text;
	this.id=id;
	this.flag=flag;
	this.part = new Array();
	this.add = function(partner) {
		this.part[this.part.length] = partner;
	}
}

function PartnerLine() {
	this.partLine = new Array();
	this.root = new Partner("dummy","hello");
	this.add = function(id,pId,flag,url,text) {
		this.partLine[id] = new Partner(id,flag,url,text);
		if(pId==0)
		this.root.add(this.partLine[id]);
			else{
		this.partLine[pId].add(this.partLine[id]);
		}
	}
}

var partLine = new PartnerLine();
partLine.add(1,0,0,'','Software solution');
partLine.add(2,0,0,'','Hardware solution');
partLine.add(3,0,0,'','Testimonial');
partLine.add(4,0,0,'','Success stories');

partLine.add(29,1,-1,'http://www.alpharetailtech.com/','Alpha Retail Technology');
partLine.add(5,1,-1,'http://www.aldelo.com/','Aldelo');
partLine.add(6,1,-1,'http://www.biztracker.com/','Biztracker');
partLine.add(7,1,-1,'http://www.celerant.com/','Celerant Technology Corp');
partLine.add(8,1,-1,'http://www.cougarmtn.com/','Cougar Mountain Software');
partLine.add(9,1,-1,'http://www.synchronics.com/index1.htm','Synchronics / CounterPoint');
partLine.add(10,1,-1,'http://www.diamondscan.com/','Diamond Scan');
partLine.add(11,1,-1,'http://www.infotouch.com/','InfoTouch');
partLine.add(12,1,-1,'http://www.keystrokepos.com/','KeyStroke POS');
partLine.add(13,1,-1,'http://www.netpos.com/','NetPOS');
partLine.add(14,1,-1,'http://www.pcamerica.com/','PC America');
partLine.add(29,1,-1,'http://www.plexispos.com/','Plexis POS');
partLine.add(15,1,-1,'http://www.possoft.com/','POS Soft, Inc');
partLine.add(16,1,-1,'http://www.posintl.com/','Power POS');
partLine.add(17,1,-1,'http://www.infospec.com/','Profitek');
partLine.add(18,1,-1,'http://www.posplus.com/','Visual Retail Plus');

partLine.add(19,3,-1,'','\"We were pleasantly surprised with the ease, professionalism and flexibility that POSIFLEX gave us.\"  Ian Gooldman, CEO of  Celerant Technology Corp.');
partLine.add(20,3,-1,'','"POSIFLEX has gained a lot of momentum in the Reseller Channel with the recent release of our bundle promo package.  This offer was so successful that many of our resellers are begging us to bring it back.  We value our relationship with POSIFLEX, both for the quality and reliability of their hardware and the competitive edge that it brings to the Reseller community.  Aloha looks forward to a long and profitable partnership with our friends at POSIFLEX."  Lee Harville, Director of Channel Sales for Aloha.  ');
partLine.add(21,3,-1,'','"Offering a powerful, feature rich point-of-sale software application in NetPOS combined with high-quality terminals backed by a three-year warranty from POSIFLEX provides tremendous value to our clients.  As a long time PC manufacture, we understand the important of reliable hardware and how it impacts the overall end-user experience.  It\'s something we never take for granted."  Marshall Miller, President of NetPOS.');
partLine.add(22,3,-1,'','	"The JIVA5815 is a very well-engineered machine that offers a great alue for the price.  It truly is an easy to install, out of the box solution.  We simply installed Maitre\'D onto the equipment and everything worked great!"  Michel Côté, Vice President of POSERA Corporation');

partLine.add(23,4,-1,'','Work N\' Gear / Celerant Technology');

partLine.add(24,2,-1,'jiva5700.php','JIVA 5700');
partLine.add(25,2,-1,'jiva5800.php','JIVA 5800');
partLine.add(26,2,-1,'jiva6000.php','JIVA 6000');
partLine.add(27,2,-1,'jiva7000.php','JIVA 7000');
partLine.add(28,2,-1,'jiva8000.php','JIVA 8000');


var partLine1 = new PartnerLine();
partLine1.add(1,0,0,'','Software solution');
partLine1.add(2,0,0,'','Hardware solution');
partLine1.add(3,0,0,'','Testimonial');
partLine1.add(4,0,0,'','Success stories');

partLine1.add(5,1,-1,'http://www.accoldae.com','Accolade');
partLine1.add(6,1,-1,'http://www.aldelo.com','Aldelo');
partLine1.add(7,1,-1,'http://www.alohapos.com','Aloha POS');
partLine1.add(8,1,-1,'http://www.actionsystems.com/','ASI / Restaurant Manager');
partLine1.add(9,1,-1,'http://www.comcash.com/','Comcash');
partLine1.add(10,1,-1,'http://www.rocklandtech.com/','Diamond Touch');
partLine1.add(11,1,-1,'http://www.digitaldining.com/','Digital Dining');
partLine1.add(12,1,-1,'http://www.futurepos.com/','Future POS');
partLine1.add(13,1,-1,'http://www.hotsauce.com/','Hotsauce POS');
partLine1.add(14,1,-1,'http://www.maitredpos.com/','Maitré D');
partLine1.add(15,1,-1,'http://www.infoserveusa.com/','Master Chef');
partLine1.add(16,1,-1,'http://www.netpos.com/','NetPOS');
partLine1.add(17,1,-1,'http://www.pcamerica.com/','PC America');
partLine1.add(18,1,-1,'http://www.plexispos.com/','Plexis POS');
partLine1.add(19,1,-1,'http://www.pixelpoint.com/','Pixel Point');
partLine1.add(20,1,-1,'http://www.possoft.com/','POS Soft, Inc');
partLine1.add(21,1,-1,'http://www.positouch.com/','PosiTouch');
partLine1.add(22,1,-1,'http://www.posintl.com/','Power POS');
partLine1.add(23,1,-1,'http://www.infospec.com/','Profitek');
partLine1.add(24,1,-1,'http://www.xpient.com/','Progressive Software, Inc');
partLine1.add(25,1,-1,'http://www.rpower.com/','Rpower');
partLine1.add(26,1,-1,'','Silverware');
partLine1.add(27,1,-1,'http://www.volantesystems.com/','Tesoro / Volanté™');
partLine1.add(28,1,-1,'http://www.twotouchpos.com/','Two Touch Technologies');
partLine1.add(29,1,-1,'http://www.vivonet.com/','Vivonet');

partLine1.add(29,3,-1,'','"POSIFLEX terminal has exceeded our expectations - it\'s a great, solid product."  Rob Jakoby, Director of MIS at Red Robin.');

partLine1.add(39,4,-1,'downloadPosiflex/FamigliaPizza.pdf','Famiglia Pizzeria / FuturePOS');
partLine1.add(40,4,-1,'downloadPosiflex/DQTX.pdf','DQTX / Jumpware');
partLine1.add(30,4,-1,'downloadPosiflex/VSattui-flyer.pdf','V Sattui Winery / Infinity');
partLine1.add(31,4,-1,'downloadPosiflex/bigboy.pdf','Big Boy / NetPOS');
partLine1.add(32,4,-1,'downloadPosiflex/biztracker.pdf','Mazzaro\'s Italian Market / Biztracker')
partLine1.add(33,4,-1,'downloadPosiflex/Red Robin.pdf','Red Robin / Aloha');

partLine1.add(34,2,-1,'jiva5700.php','JIVA 5700');
partLine1.add(35,2,-1,'jiva5800.php','JIVA 5800');
partLine1.add(36,2,-1,'jiva6000.php','JIVA 6000');
partLine1.add(37,2,-1,'jiva7000.php','JIVA 7000');
partLine1.add(38,2,-1,'jiva8000.php','JIVA 8000');

var partLine2 = new PartnerLine();
partLine2.add(1,0,0,'','Software solution');
partLine2.add(2,0,0,'','Hardware solution');
partLine2.add(3,0,0,'','Testimonial');
partLine2.add(4,0,0,'','Success stories');

partLine2.add(5,1,-1,'http://www.diatouch.com/','Digivey™');
partLine2.add(6,1,-1,'http://www.touchsurveysolutions.com/','Touch View Survey Solutions');

partLine2.add(7,2,-1,'jiva5700.php','JIVA 5700');
partLine2.add(8,2,-1,'jiva5800.php','JIVA 5800');
partLine2.add(9,2,-1,'jiva6000.php','JIVA 6000');
partLine2.add(10,2,-1,'jiva7000.php','JIVA 7000');
partLine2.add(11,2,-1,'jiva8000.php','JIVA 8000');


var partLine3 = new PartnerLine();
partLine3.add(1,0,0,'','Software solution');
partLine3.add(2,0,0,'','Hardware solution');
partLine3.add(3,0,0,'','Testimonial');
partLine3.add(4,0,0,'','Success stories');

partLine3.add(5,1,-1,'http://www.ccistech.com/','CCis Tech');
partLine3.add(6,1,-1,'http://www.pcamerica.com/','PC America');

partLine3.add(7,2,-1,'jiva5800.php','JIVA 5800');
partLine3.add(8,2,-1,'jiva6000.php','JIVA 6000');
partLine3.add(9,2,-1,'jiva8000.php','JIVA 8000');

var partLine4 = new PartnerLine();
partLine4.add(1,0,0,'','Software solution');
partLine4.add(2,0,0,'','Hardware solution');
partLine4.add(3,0,0,'','Testimonial');
partLine4.add(4,0,0,'','Sucess stories');

/*partLine4.add(5,1,-1,'http://www.biztracker.com/','Biztracker');
partLine4.add(6,1,-1,'http://www.celerant.com/','Celerant Technology Corp');
partLine4.add(7,1,-1,'http://www.cougarmtn.com/','Cougar Mountain Software');
partLine4.add(8,1,-1,'http://www.synchronics.com/index1.htm','Synchronics / CounterPoint');
partLine4.add(9,1,-1,'http://www.diamondscan.com/','Diamond Scan');
partLine4.add(10,1,-1,'http://www.infotouch.com/','InfoTouch');
partLine4.add(11,1,-1,'http://www.keystrokepos.com/','KeyStroke POS');
partLine4.add(12,1,-1,'http://www.netpos.com/','NetPOS');
partLine4.add(13,1,-1,'http://www.nextpos.com/','NextPOS');
partLine4.add(14,1,-1,'http://www.pcamerica.com/','PC America');
partLine4.add(15,1,-1,'http://www.possoft.com/','POS Soft, Inc');
partLine4.add(16,1,-1,'http://www.posintl.com/','Power POS');
partLine4.add(17,1,-1,'http://www.infospec.com/','Profitek');
partLine4.add(18,1,-1,'http://www.posplus.com/','Visual Retail Plus');
*/

/*partLine4.add(19,3,-1,'','\"We were pleasantly surprised with the ease, professionalism and flexibility that POSIFLEX gave us.\"  Ian Gooldman, CEO of  Celerant Technology Corp.');
partLine4.add(20,3,-1,'','"POSIFLEX has gained a lot of momentum in the Reseller Channel with the recent release of our bundle promo package.  This offer was so successful that many of our resellers are begging us to bring it back.  We value our relationship with POSIFLEX, both for the quality and reliability of their hardware and the competitive edge that it brings to the Reseller community.  Aloha looks forward to a long and profitable partnership with our friends at POSIFLEX."  Lee Harville, Director of Channel Sales for Aloha.  ');
partLine4.add(21,3,-1,'','"Offering a powerful, feature rich point-of-sale software application in NetPOS combined with high-quality terminals backed by a three-year warranty from POSIFLEX provides tremendous value to our clients.  As a long time PC manufacture, we understand the important of reliable hardware and how it impacts the overall end-user experience.  It\'s something we never take for granted."  Marshall Miller, President of NetPOS.');
partLine4.add(22,3,-1,'','	"The JIVA5815 is a very well-engineered machine that offers a great alue for the price.  It truly is an easy to install, out of the box solution.  We simply installed Maitre\'D onto the equipment and everything worked great!"  Michel Côté, Vice President of POSERA Corporation');

partLine4.add(23,4,-1,'','Work N\' Gear / Celerant Technology');*/

partLine4.add(24,2,-1,'jiva5700.php','JIVA 5700');
partLine4.add(25,2,-1,'jiva5800.php','JIVA 5800');

var partLine5 = new PartnerLine();
partLine5.add(1,0,0,'','Software solution');
partLine5.add(2,0,0,'','Hardware solution');
partLine5.add(3,0,0,'','Testimonial');
partLine5.add(4,0,0,'','Success stories');

partLine5.add(5,1,-1,'http://www.biztracker.com/','Biztracker');
partLine5.add(6,1,-1,'http://www.celerant.com/','Celerant Technology Corp');
partLine5.add(7,1,-1,'http://www.cougarmtn.com/','Cougar Mountain Software');
partLine5.add(8,1,-1,'http://www.synchronics.com/index1.htm','Synchronics / CounterPoint');
partLine5.add(9,1,-1,'http://www.diamondscan.com/','Diamond Scan');
partLine5.add(10,1,-1,'http://www.infotouch.com/','InfoTouch');
partLine5.add(11,1,-1,'http://www.keystrokepos.com/','KeyStroke POS');
partLine5.add(12,1,-1,'http://www.netpos.com/','NetPOS');
partLine5.add(13,1,-1,'http://www.nextpos.com/','NextPOS');
partLine5.add(14,1,-1,'http://www.pcamerica.com/','PC America');
partLine5.add(15,1,-1,'http://www.possoft.com/','POS Soft, Inc');
partLine5.add(16,1,-1,'http://www.posintl.com/','Power POS');
partLine5.add(17,1,-1,'http://www.infospec.com/','Profitek');
partLine5.add(18,1,-1,'http://www.posplus.com/','Visual Retail Plus');

partLine5.add(19,3,-1,'','\"We were pleasantly surprised with the ease, professionalism and flexibility that POSIFLEX gave us.\"  Ian Gooldman, CEO of  Celerant Technology Corp.');
partLine5.add(20,3,-1,'','"POSIFLEX has gained a lot of momentum in the Reseller Channel with the recent release of our bundle promo package.  This offer was so successful that many of our resellers are begging us to bring it back.  We value our relationship with POSIFLEX, both for the quality and reliability of their hardware and the competitive edge that it brings to the Reseller community.  Aloha looks forward to a long and profitable partnership with our friends at POSIFLEX."  Lee Harville, Director of Channel Sales for Aloha.  ');
partLine5.add(21,3,-1,'','"Offering a powerful, feature rich point-of-sale software application in NetPOS combined with high-quality terminals backed by a three-year warranty from POSIFLEX provides tremendous value to our clients.  As a long time PC manufacture, we understand the important of reliable hardware and how it impacts the overall end-user experience.  It\'s something we never take for granted."  Marshall Miller, President of NetPOS.');
partLine5.add(22,3,-1,'','	"The JIVA5815 is a very well-engineered machine that offers a great alue for the price.  It truly is an easy to install, out of the box solution.  We simply installed Maitre\'D onto the equipment and everything worked great!"  Michel Côté, Vice President of POSERA Corporation');

partLine5.add(23,4,-1,'','Work N\' Gear / Celerant Technology');

partLine5.add(24,2,-1,'jiva5700.php','JIVA 5700');
partLine5.add(25,2,-1,'jiva5800.php','JIVA 5800');
partLine5.add(26,2,-1,'jiva6000.php','JIVA 6000');


function loadIndustry(flag,testId)
{        
		var objectLine;
		if(flag==0)
			objectLine=partLine;
		else if(flag==1)
			objectLine=partLine1;
		else if(flag==2)  //Survey
			objectLine=partLine2;
		else if(flag==3)   //C-Store/Grocery/Petroleum
			objectLine=partLine3;
		else if(flag==4)   //Healthcare
			objectLine=partLine4;
		else if(flag==5)   //C-Store/Grocery/Petroleum
			objectLine=partLine5;
			
		var st='font-family:Arial, Helvetica, sans-serif; font-size:10px; text-decoration:underline; color:#0000FF;line-height:15px;padding:0px;';
		var loadArea=document.getElementById('industry1');
		var lenLn=objectLine.root.part.length;
		var str="<span style='"+st+"' valign='top'><ul>";

	//	loadSubIndustry(1,partLine);
		for (i=0;i<lenLn;i++)
		{	
			var itsId=objectLine.root.part[i].id;
			var subLen=objectLine.root.part[i].part.length;
			if (objectLine.root.part[i].flag==0)
			{
				if(testId!=null & itsId==testId)
					str+="<a href=\"javascript:loadIndustry("+flag+","+itsId+");loadSubIndustry("+flag+","+itsId+");\" style='color:#ff0000;'><li style=\"padding-left:0px;\">"+objectLine.root.part[i].text+"</li></a>";
			
				else
					str+="<a href=\"javascript:loadIndustry("+flag+","+itsId+");loadSubIndustry("+flag+","+itsId+");\" style='color:blue;'><li style=\"padding-left:0px;\">"+objectLine.root.part[i].text+"</li></a>";
				
			}
		
			
			else
			{
				str+="<li>"+objectLine.root.part[i].text+"</li>";
				for(n=0;n<subLen;n++)
				{	
					var someId=objectLine.root.part[i].part[n].id;
					if(testId!=null & someId==testId)
						str+="<a href=\"javascript:loadIndustry("+flag+","+someId+");loadSubIndustry("+flag+","+someId+");\"  style='color:#FF0000;' ><li style=\"padding-left:20px;\">"+objectLine.root.part[i].part[n].text+"</li></a>";
					else
						str+="<a href=\"javascript:loadIndustry("+flag+","+someId+");loadSubIndustry("+flag+","+someId+");\"  style='color:blue;' ><li style=\"padding-left:20px;\">"+objectLine.root.part[i].part[n].text+"</li></a>";
			
				}
				
			}
			
		
		}
		str+="</ul></span>";
	//	alert(document.getElementById('industry1'));
		loadArea.innerHTML=str;

}


function popTest(url)
{
	window.open(url, "example1", "width=800, height=800, location=yes, menubar=yes, status=yes, toolbar=yes, scrollbars=yes, resizable=yes");
}

function loadSubIndustry(flag,itsId,testId)
{
	var partLineVar;
	if(flag==0)
		partLineVar=partLine;
	else if(flag==1)
		partLineVar=partLine1;
	else if(flag==2)  //Survey
		partLineVar=partLine2;
	else if(flag==3)   //C-Store/Grocery/Petroleum
		partLineVar=partLine3;
	else if(flag==4)   //C-Store/Grocery/Petroleum
		partLineVar=partLine4;
	else if(flag==5)   //C-Store/Grocery/Petroleum
		partLineVar=partLine5;

	var divArea=document.getElementById("industry2");
	var st='font-family:Arial, Helvetica, sans-serif; font-size:10px; text-decoration:underline; color:#0000FF;';
	var lenSubLn=partLineVar.partLine[itsId].part.length;
		
	var str="<ul>";
	for (i=0;i<lenSubLn;i++)
	{	
		var id=partLineVar.partLine[itsId].part[i].id;
		if (partLineVar.partLine[itsId].part[i].url!=null &&partLineVar.partLine[itsId].part[i].url!='' )
		{	
				url=partLineVar.partLine[itsId].part[i].url;
				text=partLineVar.partLine[itsId].part[i].text;

				if(testId!=null & id==testId)
					str+="<a href=\"javascript:loadSubIndustry("+flag+","+itsId+","+id+");popTest('"+url+"');\" style='color:#FF0000;'><li>"+text+"</li></a>";
				else
					str+="<a href=\"javascript:loadSubIndustry("+flag+","+itsId+","+id+");popTest('"+url+"');\" style='color:blue;'><li>"+text+"</li></a>";
		}
			else 
			str+="<li>"+partLineVar.partLine[itsId].part[i].text+"</li>";
		
	}

	str+="</ul>";
	divArea.innerHTML=str;
}


