var _gPics = []; _gPics['clients'] = [ 'pelican', 'laoplife', 'northlake', 'covla', 'cbt', 'joshkelley', 'commonwealth', 'jd', 'hometown', 'kappas', 'aubert', 'superchec', 'swagelok' ]; var _gCaptions = []; _gCaptions['clients'] = [ 'Pelican Pictures, Inc.', 'LA Operation Lifesaver', 'Northlake Insurance', 'City of Covington, LA', 'Citizens Bank and Trust', 'Josh Kelley', 'Commonwealth Investments', 'JD Real Estate Group', 'Hometown Construction', 'Kappa Alpha Psi, S.U. Chapter', 'Aubert Insurance', 'Superchec', 'Capital Valve & Fittings' ]; _gPics['animation'] = [ 'dragonphy', 'balldrop', 'carspin', 'jagroom' ]; _gPics['sites'] = [ 'college', 'lamar', 'pennington', 'southern' ]; _gPics['print'] = [ 'envtoxicology', 'su_museumofart', 'powerup', 'centerforwellness', 'womensnutrition', 'masscommunications', 'designsymbols', 'deborahluke', 'joshkelley', 'issues', 'dochyde', 'digitalportfolio', 'xpondezign', 'checo' ]; _gPics['imaging'] = [ 'imagery', 'lattice', 'enhance', 'modichips', 'perspective', 'lava1', 'cosmicbilliards', 'timegate', 'planetenhance', 'phazic', 'newdimension', 'finalfrontier', 'eyi' ]; _gPics['logos'] = [ 'homebuilders', 'topnotch', 'joshkelley', 'aubert', 'trsl', 'obrien', 'storytime', 'lpca', 'sus', 'superchec', 'foxlink' ]; /* after instantiation -- MUST set dimensions */ _galleryImageCount = 0; _galleryImageDeclared = 0; _gallery_countLoaded = function() { _galleryImageCount++; // window.status = window.defaultStatus = _galleryImageCount; // trace(_galleryImageCount); } function galleryBuilder(parent) { this.layer = parent; this.rendered = false; this.leftInset = 0; this.topInset = 0; this.interImageDistance = 32; this.images = []; this.caption = []; this.linkAction = []; // point to specific external function // each image can have its own handler this.imagePath = []; this.innerLayer = null; this.imageLayer = []; this.captionLayer = []; this.imageHeight = 133; // default for this instance this.imageWidth = 200; this.imageBorderColor = "white"; this.imageBGColor = null; this.captionFont = "Verdana, sans-serif"; this.captionSize = "9px"; this.captionColor = "white"; this.captionWeight = "normal"; this.dataTemplate = null; this.dataLabels = []; this.totalHeight = 0; this.imageObjects = []; this.addImage = function(url) { _galleryImageDeclared++; this.images[this.images.length] = url; var img = new Image(); //preload //img.onload = _gallery_countLoaded; img.src = url; //img.onload = document.all ? "_gallery_countLoaded()" : _gallery_countLoaded; // this.imageObjects[this.imageObjects.length] = img; } this.setImageWidth = function(w) { this.imageWidth = w; } this.setImageHeight = function(h) { this.imageHeight = h; } this.setImageSize = function(w, h) { this.setImageWidth(w); this.setImageHeight(h); } this.setLinkAction = function(proc,path) { var indx = this.linkAction.length; this.linkAction[indx] = proc; this.imagePath[indx] = path; } this.setLinkActionForImage = function(index, proc, path) // remember this is 1-based indexing -- for user { this.linkAction[index -1] = proc; this.imagePath[index - 1] = path; } this.addLink = function(func, path) { this.setLinkAction(func, path); } this.addCaption = function(str) { this.caption[this.caption.length] = str; } this.setCaptionForImage = function(indx, str) // index here is 1-based converted -- for user { this.caption[indx - 1] = str; //expect number base to be 1 } this.setLocation = function(left, top) { this.top = top; this.left = left; } this.setDimension = function(w, h) { this.width = w; this.height = h; } this.setWidth = function(w) { this.width = w; } this.setLeftInset = function(i) { this.leftInset = i; } this.setTopInset = function(i) { this.topInset = i; } this.show = function() { this.layer.style.visibility = "visible"; } this.hide = function() { this.layer.style.visibility = "hidden"; } this.set_zIndex = function(v) { this.layer.style.zIndex = v; } /* okay == the plan we have labels we need data each record is new keyvalue hashtable record[dataLabel[i] ] = fillstr; */ this.db = []; // this is the database object prototype this.dbLabelFont = "Verdana, sans-serif"; this.dbLabelColor = "red"; this.dbLabelSize = "10px"; this.dbLabelWeight = "bold"; this.dbTextFont = "Verdana, sans-serif"; this.dbTextColor = "white"; this.dbTextSize = "9px"; this.dbTextWeight = "normal"; this.addRecord = function() { var data = arguments; var record = []; for(var i = 0; i < this.dataLabels.length; i++) record[this.dataLabels[i]] = data[i] || ""; this.db[this.db.length] = record; } this.addRecordForImage = function(index) { var data = arguments; var record = []; for(var i = 0; i < this.dataLabels.length; i++) record[this.dataLabels[i]] = data[i + 1] || ""; this.db[index - 1] = record; } this.setDataDelimiter = function(str) { this.dataDelimiter = str; } this.setDataLabels = function() { for(var i = 0; i < arguments.length; i++) this.dataLabels[i] = arguments[i]; } ///////// renderAsHTML this.renderAsHTML = function() { var ref = this; var runningSpace = 0; var html = ""; // need copy of dimensions // just figure that all relative to parent layer [this.layer] //html += "