﻿//
//---edited: 2008-06-05 / kd
//		2008-06-10 / fs : set licht-mehr inactive
//      2008-06-17 / fs : hyperlinks updated
//      2008-07-01 / fs : added: Nemo Lighting, - Oty Lighting - Le Klint Lighting - Contardi Lighting - Lamp International Lighting - de  Majo Illuminazione
//      2008-07-02 / fs : several URLs switched to global ...
//      2008-09-25 / fs : artemide.com changed to artemide.us
//      2009-02-01 / fs : kichler, black-blum, glassfire
//      2009-03-04 / fs : edge lighting has new website; former: http://www.purelighting.com/edge/products/ no longer valid
//      2009-03-19 / fs : new vendor: ufo
//      2009-03-21 / fs : Miroir Brot, http://www.brot.com/ added
//      2009-04-22 / fs : Eglo link changed to: http://www.eglolighting.com.au/
//      2009-06-02 / fs : new vendors Smart Earth LED, OGGETTI, HOLTKÖTTER
//      2009-06-11 / fs : new vendor Unlimited Light
//      2009-06-18 / fs : new vendor Barovier&Toso
//      2009-08-05 / fs : new vendor bacchus glass / http://www.bacchusglass.com/
//      2009-08-11 / fs : new vendors Kartell / http://www.kartell.it/, planika / http://www.planikausa.com/collection/1/3/ 
//      2010-01-07 / fs : new vendors minka , origina , FDV Collection , chameledeon , lumetta 
//      2010-01-08 / fs : new vendors minka , origina , FDV Collection , chameledeon , lumetta 
//      2010-01-27 / fs : new vendor wide loyal 

var aManufacturer = [					    
					    ["12timer","12 Timer","http://12timer.com/"]
					   ,["100watt","100 Watt","http://www.100watt.net/"]
					   ,["2000degrees","2000 degrees","http://www.2thousanddegrees.com/"]
					   ,["aamsco","AAMSCO Lighting","http://www.aamsco.com/"]
                        ,["access_lighting","Access Lighting","http://www.accesslighting.com/"] 
					   ,["album","ALBUM","http://www.album.it/"]
                        
					   ,["alias","Alias","http://www.aliasdesign.it/"]
                        ,["alico","Alico","http://www.alicoindustries.com/"]
					   ,["ameico","AMEICO","http://www.ameico.com/"]
                        ,["american_lightin","American Lighting","http://www.americanlighting.com/"]
 ,["anta","Anta Leuchten","http://www.anta.de/engl_frameset_black.html"]
					   ,["anthologie","anthologie QUARTETT","http://www.anthologiequartett.de/eng/"]
					   ,["aqua","AQUA","http://www.aquagallery.com/"]
,["arteflash","Arte Flash","http://www.arteflash.it/"]
					   ,["artemide","Artemide","http://www.artemide.us/"]
,["avmazzega","AV Mazzega","http://www.avmazzega.com/"]				   
,["axo","AXO","http://www.axolight.it/"]
,["baccarat","Baccarat","http://www.baccarat.com/"]
, ["baci_remcraft", "Baci by Remcraft", "http://www.remcraft.com/"]
, ["bacchusglass", "BACCHUS GLASS", "http://www.bacchusglass.com/"]
, ["Barovier_Toso", "Barovier & Toso", "http://www.barovier.com/home.asp?lg=eng"]

,["bartco_lighting","Bartco Lighting","http://www.bartcolighting.com/"]
,["basic_source","Basic Source","http://www.basicsourcelighting.com/"]
,["bega","BEGA","http://bega-us.com/"]
, ["besa", "BESA", "http://www.besalighting.com/"]
, ["black-blum", "black+blum", "http://www.black-blum.com/"]
,["blauet","BLAUET","http://www.blauet.com/"]
,["blux","B.Lux","http://www.globallighting.net/"]
,["bocci","BOCCI","http://www.bocci.ca/"]
,["bover","Bover","http://www.globallighting.net/"]
,["boyd_lighting","Boyd Lighting","http://www.boydlighting.com/"]
,["brand_egmond","Brand van Egmond","http://www.brandvanegmond.nl/"]
//   ,["bloom","BLOOM USA","http://www.bloomlightinggroup.com/"]
					, ["brot", "Brot", "http://www.brot.com/"]
					   ,["bruck","BRUCK","http://www.brucklightingsystems.com/"]
					   , ["cesareo", "CESAREO", "http://www.cesareo.ch/"]
					   , ["chameledeon", "chameledeon", "http://www.chameledeon.com/"]
					   
					   
					 ,["colorkinetics","Color Kinetics","http://www.colorkinetics.com/"]
					 ,["condorlighting","Condor Lighting","http://condorlighting.com/"]
,["con_tech","Con-Tech","http://www.con-techlighting.com/"]
 ,["contardi","Contardi Lighting","http://www.globallighting.net/"]
					   ,["contrast","CONTRAST","http://www.contrastlighting.com/"]
					   ,["cree","CREE Lighting","http://creelighting.com/index.aspx"]
,["csl","CSL","http://www.csllighting.com/"]
					   ,["curvet","CURVET","http://www.curvetusa.com/"]
					   ,["cxdesign","CX design","http://www.cxny.com/"]
					,["de_majo","de Majo Illuminazione","http://www.demajoilluminazione.com/pages_uk/prodotti.asp"]   
					   ,["edgelighting","Edge Lighting","http://www.edgelighting.com/"]
					    , ["eglo", "Eglo", "http://www.eglolighting.com.au/"]
					   
,["e_l_k","E.L.K lighting ","http://www.elklighting.com/"] 
					   ,["elco","ELCO","http://www.elcolighting.com/"]

					   ,["erco","ERCO","http://www.erco.com/"]
					   ,["estiluz","ESTILUZ","http://www.estiluz.com/"]
,["eureka","Eureka ","http://www.eurekalighting.com/"]
,["eurofase","Eurofase ","http://www.eurofase.com/"]
,["eurolite","Eurolite ","http://www.euroliteusa.com/"]
					   ,["europeanlighthouse","European Lighthouse","http://www.eurolighthouse.com/"]
,["fabbian","Fabbian ","http://www.fabbian.com/"]  
,["fabby","Fabby Lighting ","http://www.fabby.com/"]
, ["farallon", "Farallon Studios", "http://www.shaperlighting.com/"]
, ["fdv_collection", "FDV collection", "http://www.fdvcollection.com/"]

,["finelite","Finelite","http://finelite.com/"]

,["firefarm","Fire Farm Lighting ","http://www.firefarm.com/"]
		 			   ,["fiam","FIAM ITALIA","http://www.fiamitalia.it/"]
					   ,["flos","FLOS","http://www.flos.com/"]
					   ,["FontanaArte","Fontana Arte","http://www.fontanaarte.com/"]
,["forecast","FORECAST ","http://www.forecastltg.com/"]
					   ,["foscarini","FOSCARINI","http://www.foscarini.com/"]
					   ,["gamma_delta","Gamma Delta","http://www.gammadeltagroup.com/"]
					   , ["geometrix", "geometrix", "http://www.schonbek.com/geometrix/"]
					   , ["glassfire-planika", "Glassfire", "http://www.glassfires.com/"]
					   
					   ,["Global_Lighting","Global Lighting","http://www.globallighting.net/"]
					   ,["Gregory_Prade","Gregory Prade","http://www.gregory-prade.de/"]   
					   ,["HampStead","HAMPSTEAD","http://www.hampsteadlighting.com/"]

,["hanover","Hanover Lighting","http://www.hanoverlantern.com/"]
,["harco_loor","Harco Loor","http://harcoloor.com/"]
,["hess","Hess","http://www.hess.eu/en/Homepage/"]
,["hinkley","Hinkley Lighting","http://www.hinkleylighting.com/ "]

					   , ["HollyHunt", "HOLLY HUNT", "http://www.hollyhunt.com/"]
					   , ["holtkotter", "Holtkötter", "http://www.holtkoetter.com/"]
					   
,["hubbardton_forge","Hubbardton Forge","http://www.vtforge.com/"]
					   ,["illuminatingexp","ILLUMINATING EXPERIENCES","http://www.illuminatingexperiences.com/"]
,["ilex","ILEX","http://www.ilexlight.com/"]
					   ,["IngoMaurer","Ingo Maurer","http://www.ingo-maurer.com/"]
					   ,["innermost","Innermost","http://www.innermost.co.uk/index.html"]
,["inter_lux","Inter-Lux","http://www.inter-lux.com/"] 
					   ,["io","io","http://www.iolighting.com/"]
					   ,["italamp","ITALAMP ","http://www.italamp.com/"]
,["itre","ITRE","http://www.itreusa.com/"]
					   ,["ivalo","IVALO","http://www.ivalolighting.com/"]
					   ,["JeremyCole","jeremycole","http://www.jeremycole.net/"]
,["jesco_lighting","Jesco Lighting","http://www.jescolighting.com/"]
,["jonathan_browning","Jonathan Browning","http://www.jonathanbrowninginc.com/"] 
					   ,["justicedesign","Justice Design Group","http://www.jdg.com/"]
					   , ["kania", "Kania Lighting Systems", "http://www.kania.us/"]
					   , ["kartell", "Kartell", "http://www.kartell.it/"]
					   
					   , ["kichler", "Kichler Lighting", "http://www.kichler.com/consumer/products/catType/OUTDOOR"]
					   , ["koncept", "Koncept Technologies", "http://www.konceptech.com/"]
					   ,["kundalini","Kundalini","http://www.kundalini.it/index.php"]
					   
					   ,["LaMurrina","La Murrina","http://www.lamurrina.com/"]
				,["lamp_international","Lamp International Lighting","http://www.lamp-international.it/catalogo-uk.html"]	   
					   ,["lb_lighting","LBL Lighting","http://www.lbllighting.com/"]
					   ,["le_klint","Le Klint Lighting","http://www.leklint.com/pre/frontsite.aspx"]
					   ,["leucos","LEUCOS","http://www.leucos.com/"]
					   //,["lichtmehr","Lichtmehr","http://www.licht-mehr.de/"]
,["light_source","Light Source","http://www.lite-source.com/"]
,["lightcrafters","Lightcrafters  ","http://www.lightcrafters.com/"]
,["lithonia_lighting","Lithonia Lighting","http://www.lithonia.com/"]
					   ,["livit","livit","http://www.livit.it/"]
					   ,["louispolsen","louis poulsen","http://www.louispoulsen.com/"]

,["lujan_sicilia","Lujan & Sicilia","http://www.lujan-sicilia.com/"]
,["lumen_center","Lumen Center","http://www.lumencenteritalia.com/"]
, ["lumen_art", "Lumen Art", "http://www.lumenartltd.com/"]
, ["lumetta", "Lumetta", "http://www.lumettainc.com/"]


                         //,["lumi_source","Lumi Source","http://www.lumisource.com/"]
,["luminara","Luminara","http://www.luminara.it/"]  
					   ,["luceplan","LUCEPLAN","http://www.luceplan.com/"]
					   //,["lucesco","LUCESCO","http://www.lucesco.com/"]
					   ,["lutron","LUTRON","http://www.lutron.com/"]
					   ,["luzifer_spain","Luzifer Spain","http://www.lzf-lamps.com/"]
					   ,["martini","MARTINI","http://www.martinilight.com/"]
,["matthews","Matthews","http://www.matthewsfanco.com/"]
,["media_light","Media Light","http://www.medialightusa.com/"]

	
				   ,["metraspot","metalspot","http://www.metalspot.com/"]
, ["micron", "Micron Lighting", "http://www.micron-srl.it/"]
, ["mindspring", "Mindspring", "http://lights-sarasota.com/resources/pdf/sololamp.pdf"]

, ["minka_aire", "MINKA", "http://www.minkagroup.net/landing.aspx?cat=aire"]

					   ,["modernfanco","The Modern Fan Company","http://www.modernfan.com/"]
					   ,["modernica","Modernica","http://www.modernica.net/"]
					   ,["modiss","Modiss","http://www.modiss.com/"]
 ,["modulightor"," Modulightor","http://www.modulightor.com/"]
					   ,["moodlight","MOOD LIGHT","http://www.mood-light.com/"]

					  // ,["MoonLight","Moonlight","http://www.moonlight.info/"]
,["mothdesign","Moth Design","http://mothdesign.com/"]
,["neidhardt","Neidhardt","http://www.neidhardtinc.com/"]
,["nemo","Nemo Lighting","http://www.nemo.cassina.it/u_index.asp"]
,["nessen","Nessen Lighting","http://www.nessenlighting.com/"]
,["nora","Nora Lighting","http://www.noralighting.com/"]
					   , ["neuhaus", "NEUHAUS DESIGN", "http://www.neuhaus-licht.com/"]
, ["oggetti", "OGGETTI Lighting", "http://www.oggetti.com/ "]
					   
					   ,["alex_ogus_design", "Alex Ogus design","http://www.ogusdesign.com/ "]
					   ,["oligo","oligo","http://www.oligo.ca/products.htm"]
					   , ["oluce", "Oluce", "http://www.oluce.com/intro.php?lang=en/"]
					   , ["origina", "ORIGINA", "http://www.originacanada.com/"]
					   
,["oty","Oty Lighting","http://www.otylight.com/oty.php?lang=2"]
, ["oxygen", "Oxygen", "http://www.oxygenlighting.com/"]
, ["planika", "planika", "http://www.planikausa.com/"]

,["plc","PLC","http://www.plclighting.com/"]
,["prandina","Prandina","http://www.prandina.it/full_en.html"]
,["prospetto","Prospetto Light","http://www.prospettolight.com/"]
,["psm","PSM Lighting","http://www.psm-lighting.com/"]
,["pure","Pure Lighting","http://www.purelighting.com/"]

					   ,["renoma","RENOMA Lighting","http://www.renomalights.com/"]
					   ,["robern","robern","http://www.robern.com/"]
					   ,["roland_simmons","Roland Simmons","http://www.rolandsimmons.com/"]
					   ,["rossettilight","Rossettilight","http://www.globallighting.net/"]
					   ,["rotalina","Rotaliana","http://www.rotalianausa.com/"]
//,["ruud","RUUD","http://www.ruudlighting.com/"]
					   ,["saija","SAIJA","http://www.saija.ch/"]
					   ,["scangift","Scangift Ltd.","http://www.scangift.com/"]
,["sogno","Sogno","http://www.thesogno.com/index0.php/"]
,["siena","Siena Lighting","http://www.sienalighting.com/"]
					   ,["sirius","sirius","http://www.siriuslighting.com/homepage.aspx"]
, ["slamp", "SLAMP", "http://www.slamp.com/eng/hindex_eng.html"]
, ["smart_earth", "SMART EARTH LED", "http://www.smartearthled.com/"]

					   ,["solvanti","solvanti lighting","http://www.solavantilighting.com/"]
					   ,["sonneman","SONNEMAN Design Group","http://www.sonnemanawayoflight.com/"]
,["space","Space Lighting","http://www.spacelighting.com/"]
,["spark","Spark Lighting","http://www.sparklights.com/"]

,["spazia","Spazia","http://www.spazia.com/"]

					   ,["stonegate","STONEGATE Designs","http://www.stonegatedesigns.com/"]
					   ,["studiodesignitalia","STUDIO DESIGNITALIA","http://www.studioitaliadesign.com/"]
					   ,["taller_uno","Taller Uno","http://www.globallighting.net/"]
					   ,["tango","TANGO lighting","http://www.tangolighting.com/"]
					   ,["techlighting","TECH LIGHTING","http://www.techlighting.com/"]
					   ,["terzani","TERZANI","http://www.terzani.com/"]
					   ,["tiella","tiella","http://www.tiella.com/"]
					   ,["tobiasgrau","TOBIAS GRAU","http://www.tobias-grau.com/"]
					   ,["tokistar","TOKISTAR LIGHTING SYSTEMS","http://www.tokistar.com/"]
,["trans_globe","Trans Globe Lighting ","http://www.tglighting.com/"]

					   ,["tranlite_sonoma","TRANSLITE SONOMA","http://www.translite.com/"]
					   ,["trendlighting","Trend Lighting"," http://72.32.107.243/"]
,["tronconi","Tronconi","http://www.kundalini.it/"]
					   , ["treciluce", "Tre Ci Luce", "http://www.treciluce.com/"]
					   , ["ufo", "Universal Fibre Optics", "http://www.universal-fibre-optics.com/"]
					   , ["unlimited_light", "Unlimited Light", "http://www.fiberopticlighting.com/"]
					   
					   ,["vallivalli","Valli & Valli","http://www.vallivalli-us.com/"]
,["venini","Venini","http://www.venini.com/"]
					   ,["verner_panton","VERNER PANTON LIGHT","http://www.vernerpanton.com/"]
					   ,["vibia","VIBIA","http://www.vibialight.com/"]
					   ,["victor1","Victor Lighting","http://www.victorlighting.com/"]
,["wac","WAC","http://www.waclighting.com/USA/"]
, ["wide_lite", "WideLite", "http://www.widelite.com/"]
, ["wide_loyal", "Wide Loyal", "http://www.wideloyal.us/"]
,["wilshire","Wilshire","http://www.wilshiremfg.com/"]
,["wilmette","Wilmette Ligthing","http://www.wilmettelighting.com"]
,["wpt_design","WPT Design","http://www.matthewsfanco.com/WPT%20Pages/WPT-Home-2.html"]
					   ,["zaneen","ZANEEN","http://www.zaneen.com/"]

,["zoltan","Zoltan","http://www.zoltan.it/"]
					   
						   ];


//test how many we have
writeA();

//construct a table
var nCol = 0;
var nRow = 0;
var maxPerRow = 9;
var sTable="";

tStart();
tBuildCells();
tEnd();

document.writeln("");
//alert(sTable);

//========================
//functions
//========================
function tStart(){
// template: <table style='width:400px;'>
document.writeln("<table style='width:400px;'>");
sTable+="<table style='width:400px;'>";
}//end

function tEnd(){
// template: </table>
if(nCol>0)
    tEndRow();
document.writeln("</table>");
sTable+="</table>";
}//end

function tStartRow(){
document.writeln("<tr>");
sTable+="<tr>";

}//end
function tEndRow(){
document.writeln("</tr>");
sTable+="</tr>";
nCol=0;
}//end
function tBuildCells(){

for(i=0; i<aManufacturer.length; i++){
    if(nCol<1)
        tStartRow();
        
    
    tCol(aManufacturer[i][0],aManufacturer[i][1],aManufacturer[i][2]);
    nCol++;
    if(nCol>(maxPerRow-1))
        tEndRow();   
    
}
}//end
function tCol(_sImg, _sClearName, _sUrl){
//template: <td><img alt='12 Timer' src='resources/VendorLogos/12timer.jpg' /></td>

String.format = function()
{
    if( arguments.length == 0 )
        return null;

   var str = arguments[0];
   for(var i=1;i<arguments.length;i++)
    {
        var re = new RegExp('\\{' + (i-1) + '\\}','gm');
        str = str.replace(re, arguments[i]);
    }

   return str;
}//end static function

//var test = String.format('My Name is:{0} {1}.','aaa','bbb') ;
//document.writeln(test);
var thisCol = String.format("<td style='border: 1px dotted Gray;'><a target='_blank' href='{2}'><img alt='{1}' title='{1}' src='../resources/swf/Manufacturer/images/Lightslogos/th_{0}.jpg' /></a></td>",_sImg,_sClearName, _sUrl) ;
document.writeln(thisCol);
sTable+=thisCol;



}//end








function writeA(){
//print 
//document.write(aManufacturer[0][1]);
document.write('Vendors: ');
document.writeln(aManufacturer.length);




}//end






