/**
*	+---------------------------------------------------------------+
* 	| Functions and objects for writing the html table for our	|
* 	|  clients pages.						|
*	|  Call instances of Client object below (The object appends	|
*	|  itself onto the clients[] array).				|
*	|  The args you need to specify are				|
*	|  1. Client's name						|
*	|  2. URL of the client's web (Use empty string for no link)	|
*	|  3. URL of our info page					|
*	|  4. Number of target languages				|
*	|  5. Whether we did the graphics (true or false)		|
*	|  6. Whether we QCed the web (true or false)			|
*	|  7. Whether it was a maintenance job (true or false)		|
*	|								| 
*	| A page that wants to write the table rows needs to have the   |
*	| top and bot of the table hardwired and call			|
*	| writeClients(doc, version). The doc represents the NS4	|
*	| layer	and the version shows whether to include HREF links	| 
*	| 1 = yes, 2 = no (for the tour pages)				|
*	+---------------------------------------------------------------+
*/

CLIENTS_WITH_LINKS = 1;
CLIENTS_NO_LINKS = 2;

clients = [];

function Client(name, url, info, langs, gfx, qc, mem){
	this.name = name;
	this.url = url;
	this.info = info;
	this.langsIcon = "../img/lan" + new String(langs) + ".gif";
	this.gfxIcon = (gfx) ? "../img/check2.gif": "../img/blank2.gif";
	this.qcIcon = (qc) ? "../img/check3.gif": "../img/blank3.gif";
	this.memIcon = (mem) ? "../img/check4.gif": "../img/blank4.gif";
	clients[clients.length] = this;
}

// new Client("3M","http://www.3M.com/meetingnetwork/readingroom/meetingguides.html","3m.htm",4,1,1,0);
// new Client("CIRSA","http://www.cirsa.es/","cirsa.htm",1,1,1,1);
// new Client("Campofr&iacute;o","","campofrio.htm",1,0,0,0);
// new Client("Coca Cola","http://www.cocacola.es/","cocacola.htm",2,1,1,0);
// new Client("Compaq","http://www6.compaq.com/corporate/1999ar/nf/letter_english.html","compaq.htm",7,1,0,0);
// new Client("Cr&eacute;dito y Cauci&oacute;n","http://www.creditoycaucion.es","cyc.htm",2,1,1,0);
// new Client("Deloitte & Touche","http://www.peerscape.com","peerscape.htm",6,1,1,1);
// new Client("GMX","http://www.gmx.net","gmx.htm",3,0,0,0);
// new Client("IBM Global Services","http://www.ibm.com","ibm_gs.htm",1,0,1,1);
// new Client("IBM PartnerRewards","http://publicpi.partner.boulder.ibm.com/partnerinfo/html3/index.html","ibm_partner.htm",6,1,1,0);
// new Client("IBM e-business","http://www.ibm.com","ibm_ebiz.htm",2,1,1,0);
// new Client("Intel Web Outfitter","","iwos.htm",2,1,0,0);
// new Client("Iridium","","iridium.htm",12,1,1,1);
// new Client("Leading Hotels of the World","http://www.lhw.com","lhw.htm",3,1,1,0);
// new Client("LetsBuyIt.com","http://www.LetsBuyIt.com","letsbuyit.htm",9,0,0,0);
// new Client("Levi's","http://www.levis.com","levis.htm",4,1,0,0);
// new Client("Network Solutions","http://www.networksolutions.com","nsi.htm",16,1,1,0);
// new Client("Nike","http://www.brasilfutebol.com","nike.htm",3,1,0,0);
// new Client("Nortel Networks","http://www1.nortelnetworks.com/pcn/fast/index.html","nortel.htm",1,0,0,1);
// new Client("PR News","http://www.prninternational.com","prnews.htm",4,0,0,0);
// new Client("Quintela","http://www.quintela.com","quintela.htm",4,1,0,0);
// new Client("Songfile","http://www.songfile.com","songfile.htm",4,0,0,1);
// new Client("Stratus","http://www.stratus.com","stratus.htm",7,1,0,0);
// new Client("Unilever","","unilever.htm",1,1,0,0);
// new Client("Universitat Ramon Llull","http://www.url.es","url.htm",2,1,0,0);
new Client("AENOR","http://www.aenor.es","aenor.htm",1,1,1,1);
new Client("BMG MusicSearch","http://www.bmgmusicsearch.com","bmgmusicsearch.htm",3,1,1,0);
new Client("British Airways","","british_airways.htm",6,0,1,1);
new Client("Cantabria Tourism","http://www.turismodecantabria.com","cantabria.htm",1,1,1,0);
new Client("Confortel Hotels","http://www.confortelhoteles.com","confortel.htm",2,1,1,0);
new Client("Cr&egrave;dit Andorr&agrave;","http://www.creditandorra.com","creditandorra.htm",5,0,1,1);
new Client("Delta BusinessElite","","bizelite.htm",5,1,0,1);
new Client("Delta SkyMiles","","delta.htm",8,1,1,1);
new Client("Dollar Rent A Car","http://www.dollar.com","dollar.htm",1,1,1,1);
new Client("Eli Lilly &amp; Company","http://www.diabeteseducationcenter.com/","elililly.htm",1,1,1,0);
new Client("Graco Baby","http://www.gracobebe.com","gracobaby.htm",1,1,1,1);
new Client("HealthEducationAnswers","http://www.healtheducationanswers.com","healtheducationanswers.htm",1,1,1,1);
new Client("HEREIU Funds","http://www.hereiufund.com","hereiu.htm",1,1,1,0);
new Client("HP","http://www.hp.com","hp.htm",5,1,0,0);
new Client("Hendrickson International","http://www.hendrickson-intl.com","hendrickson.htm",1,1,1,1);
new Client("Infosys","http://www.infy.com/infocus/june2000/default.htm","infosys.htm",2,1,0,0);
new Client("L'Or&eacute;al","http://www.loreal.com","loreal.htm",2,0,1,0);
new Client("Meta4","http://www.meta4.com","meta4.htm",1,1,0,0);
new Client("Mixmail","http://www.mixmail.com","mixmail.htm",2,0,1,0);
new Client("Open Bank","","openbank.htm",1,0,0,0);
new Client("Partners","http://www.partners.org/international/","partners.htm",2,1,0,0);
new Client("Passport Kids","http://www.sesameworkshop.org/passport","passpkids.htm",9,1,0,0);
new Client("Philips Speech Processing","http://www.dictation.philips.com/wse/index.asp","philips.htm",4,1,0,1);
new Client("Rogers","http://www.rogers.com/","rogers.htm",1,1,0,1);
new Client("SEUR","","seur.htm",2,1,0,0);
new Client("Sanitas","http://www.sanitas.es/","sanitas.htm",2,0,1,1);
new Client("Sesame Street Workshop","http://www.sesameworkshop.org/international/portal.php","sesamestreet.htm",8,1,1,1);
new Client("Spanish Pavilion Expo 2005","http://www.expoaichi2005.com/","aichi.htm",2,1,1,1);
new Client("Targus","http://www.targus.com","targus.htm",11,1,1,1);

function writeClients(doc, vers){
	if(vers == CLIENTS_WITH_LINKS){
		for(i=0; i<clients.length; i++){
			c = clients[i];
			infoIcon = "infoIcon"+i;
			str = new String();
			str += "<tr height=\"24\">";
			str += 	"<td width=\"1\"><img src=\"../img/red.gif\" width=\"1\" height=\"24\" alt=\"\" border=\"0\"></td>";
			str += (c.url.length > 0) ? "<td class=\"client\" width=\"171\">&nbsp; <a class=\"cliente\" href=\"" + c.url +"\" target=\"_blank\">" + c.name + "</a></td>" : "<td class=\"client\" width=\"171\">&nbsp; " + "<span class=\"cliente\">" + c.name +"</span>" + "</td>";
			str += 	"<td width=\"44\"><a href=\"" + c.info + "\" onmouseover=\"" + infoIcon + ".src=\'../img/info_on.gif\'\" onmouseout=\"" + infoIcon +".src=\'../img/info_off.gif\'\"><img name=\"" + infoIcon + "\" src=\"../img/info_off.gif\" width=\"44\" height=\"24\" alt=\"\" border=\"0\"></a></td>";
			str += 	"<td width=\"57\"><a href=\"javascript:void(null);\" onmouseover=\"menu1.src=\'../img/1on.gif\'; status=status; return true;\" onmouseout=\"menu1.src=\'../img/1.gif\'\"><img src=\"" + c.langsIcon + "\" width=\"57\" height=\"24\" alt=\"\" border=\"0\"></a></td>";
			str += 	"<td width=\"65\"><a href=\"javascript:void(null);\" onmouseover=\"menu2.src=\'../img/2on.gif\'; status=status; return true;\" onmouseout=\"menu2.src=\'../img/2.gif\'\"><img src=\"" + c.gfxIcon + "\" width=\"65\" height=\"24\" alt=\"\" border=\"0\"></a></td>";
			str += 	"<td width=\"65\"><a href=\"javascript:void(null);\" onmouseover=\"menu3.src=\'../img/3on.gif\'; status=status; return true;\" onmouseout=\"menu3.src=\'../img/3.gif\'\"><img src=\"" + c.qcIcon + "\" width=\"65\" height=\"24\" alt=\"\" border=\"0\"></a></td>";
			str += 	"<td width=\"65\"><a href=\"javascript:void(null);\" onmouseover=\"menu4.src=\'../img/4on.gif\'; status=status; return true;\" onmouseout=\"menu4.src=\'../img/4.gif\'\"><img src=\"" + c.memIcon + "\" width=\"65\" height=\"24\" alt=\"\" border=\"0\"></a></td>";
			str += 	(i>0) ? "<td width=\"9\"><img src=\"../img/sombraDer.gif\" width=\"9\" height=\"24\"></td>" : "<td width=\"9\" valign=\"bottom\"><img src=\"../img/sombraEsqArriba.gif\" width=\"9\" height=\"16\"></td>" ;
			str += "</tr>";
			str += "<tr height=\"1\">";
			str += 	"<td colspan=\"7\"><img src=\"../img/red.gif\" width=\"468\" height=\"1\"></td>";
			str += 	"<td><img src=\"../img/sombraDer.gif\" width=\"9\" height=\"1\"></td>";
			str += "</tr>";
			doc.write(str);
		}
	}
	else{						// (vers == CLIENTS_NO_LINKS)
		for(i=0; i<clients.length; i++){
			c = clients[i];
			infoIcon = "infoIcon"+i;
			str = new String();
			str += "<tr height=\"24\">";
			str += 	"<td width=\"1\"><img src=\"../img/red.gif\" width=\"1\" height=\"24\" alt=\"\" border=\"0\"></td>";
			str +=  "<td class=\"client\" width=\"171\">&nbsp; " + "<span class=\"cliente\">" + c.name +"</span>" + "</td>";
			str += 	"<td width=\"1\"><img src=\"../img/red.gif\" width=\"1\" height=\"24\" alt=\"\" border=\"0\"></td>";
			str += 	"<td width=\"57\"><img src=\"" + c.langsIcon + "\" width=\"57\" height=\"24\" alt=\"\" border=\"0\"></td>";
			str += 	"<td width=\"65\"><img src=\"" + c.gfxIcon + "\" width=\"65\" height=\"24\" alt=\"\" border=\"0\"></td>";
			str += 	"<td width=\"65\"><img src=\"" + c.qcIcon + "\" width=\"65\" height=\"24\" alt=\"\" border=\"0\"></td>";
			str += 	"<td width=\"65\"><img src=\"" + c.memIcon + "\" width=\"65\" height=\"24\" alt=\"\" border=\"0\"></td>";
			str += 	(i>0) ? "<td width=\"9\"><img src=\"../img/sombraDer.gif\" width=\"9\" height=\"24\"></td>" : "<td width=\"9\" valign=\"bottom\"><img src=\"../img/sombraEsqArriba.gif\" width=\"9\" height=\"16\"></td>" ;
			str += "</tr>";
			str += "<tr height=\"1\">";
			str += 	"<td colspan=\"7\"><img src=\"../img/red.gif\" width=\"425\" height=\"1\"></td>";
			str += 	"<td><img src=\"../img/sombraDer.gif\" width=\"9\" height=\"1\"></td>";
			str += "</tr>";
			doc.write(str);
		}
	}
}
