var remote_flash = 'http://bouwformatie.whobuilt.com/_content_/flash/'; function Widget_FlashTag(src, width, height, version, groep, soort, info,full) { if (full == '' || full == undefined) { full = false; } // Required this.src = src; this.width = width; this.height = height; this.version = version; this.id = 'flashfloater'; this.flashVars = null; this.flashVarsStr = null; this.genericParam = new Object(); this.genericParam['menu'] = 'false'; this.genericParam['scale'] = 'noscale'; this.genericParam['quality'] = 'high'; if (full) { this.genericParam['allowFullScreen'] = 'true'; } this.addFlashVar('typert', groep); this.addFlashVar('melding', soort); this.addFlashVar('info', info); this.genericParam['wmode'] = 'transparent'; this.addFlashVar('ID', 'flashfloater'); this.genericParam['allowScriptAccess'] = 'always'; this.ie = (navigator.appName.indexOf ("Microsoft") != -1) ? 1 : 0; } /** * Specifies the location (URL) of the Flash content to be loaded. */ Widget_FlashTag.prototype.setSource = function(src) { this.src = src; } /** * Specifies the width of the Flash content in either pixels or percentage of browser window. */ Widget_FlashTag.prototype.setWidth = function(w) { this.width = width; } /** * Specifies the height of the Flash content in either pixels or percentage of browser window. */ Widget_FlashTag.prototype.setHeight = function(h) { this.h = height; } /** * The required version of the Flash Player for the specified content. */ Widget_FlashTag.prototype.setVersion = function(v) { this.version = v; } /** * Identifies the Flash content to the host environment (a web browser, for example) so that * it can be referenced using a scripting language. This value will be used for both the 'id' * and 'name' attributes depending on the client platform and whether the object or the embed * tag are used. */ Widget_FlashTag.prototype.setId = function(id) { this.id = id; } /** * Specifies the background color of the Flash content. Use this attribute to override the background * color setting specified in the Flash file. This attribute does not affect the background * color of the HTML page. */ Widget_FlashTag.prototype.setBgcolor = function(bgc) { if (bgc.charAt(0) != '#') { bgc = '#' + bgc; } this.genericParam['bgcolor'] = bgc; } /** * Allows you to set multiple Flash vars at once rather than adding them one at a time. The string * you pass in should contain all your Flash vars, properly URL encoded. This function can be used in * conjunction with addFlashVar. */ Widget_FlashTag.prototype.addFlashVars = function(fvs) { this.flashVarsStr = fvs; } /** * Used to send root level variables to the Flash content. You can add as many name/value pairs as * you want. The formatting of the Flash vars (turning them into a query string) is handled automatically. */ Widget_FlashTag.prototype.addFlashVar = function(n, v) { if (this.flashVars == null) { this.flashVars = new Object(); } this.flashVars[n] = unescape(v); } /** * Used to remove Flash vars. This is primarily useful if you want to reuse an instance of the Widget_FlashTag * but you don't want to send the same variables to more than one piece of Flash content. */ Widget_FlashTag.prototype.removeFlashVar = function(n) { if (this.flashVars != null) { this.flashVars[n] = undefined; } } /** * (true, false) Specifies whether the browser should start Java when loading the Flash Player for the first time. * The default value is false if this property is not set. */ Widget_FlashTag.prototype.setSwliveconnect = function(swlc) { this.genericParam['swliveconnect'] = swlc; } /** * (true, false) Specifies whether the Flash content begins playing immediately on loading in the browser. * The default value is true if this property is not set. */ Widget_FlashTag.prototype.setPlay = function(p) { this.genericParam['play'] = p; } /** * (true, false) Specifies whether the Flash content repeats indefinitely or stops when it reaches the last frame. * The default value is true if this property is not set. */ Widget_FlashTag.prototype.setLoop = function(l) { this.genericParam['loop'] = l; } /** * (true,false) Whether or not to display the full Flash menu. If false, displays a menu that contains only * the Settings and the About Flash options. */ Widget_FlashTag.prototype.setMenu = function(m) { this.genericParam['menu'] = m; } /** * (low, high, autolow, autohigh, best) Sets the quality at which the Flash content plays. */ Widget_FlashTag.prototype.setQuality = function(q) { if (q != 'low' && q != 'high' && q != 'autolow' && q != 'autohigh' && q != 'best') { alert('Supported values are "low", "high", "autolow", "autohigh", and "best".'); } this.genericParam['quality'] = q; } /** * (showall, noborder, exactfit) Determins how the Flash content scales. */ Widget_FlashTag.prototype.setScale = function(sc) { if (sc != 'showall' && sc != 'noborder' && sc != 'exactfit') { alert('Supported values are "showall", "noborder", and "exactfit".'); } this.genericParam['scale'] = sc; } /** * (l, t, r, b) Align the Flash content along the corresponding edge of the browser window and crop * the remaining three sides as needed. */ Widget_FlashTag.prototype.setAlign= function(a) { if (a != 'l' && a != 't' && a != 'r' && a != 'b') { alert('Supported values are "l", "t", "r" and "b".'); } this.genericParam['align'] = a; } /** * (l, t, r, b, tl, tr, bl, br) Align the Flash content along the corresponding edge of the browser * window and crop the remaining three sides as needed. */ Widget_FlashTag.prototype.setSalign= function(sa) { if (sa != 'l' && sa != 't' && sa != 'r' && sa != 'b' && sa != 'tl' && sa != 'tr' && sa != 'bl' && sa != 'br') { alert('Supported values are "l", "t", "r", "b", "tl", "tr", "bl" and "br".'); } this.genericParam['salign'] = sa; } /** * (window, opaque, transparent) Sets the Window Mode property of the Flash content for transparency, * layering, and positioning in the browser. */ Widget_FlashTag.prototype.setWmode = function(wm) { if (wm != 'window' && wm != 'opaque' && wm != 'transparent') { alert('Supported values are "window", "opaque", and "transparent".'); } this.genericParam['wmode'] = wm; } /** * Specifies the base directory or URL used to resolve all relative path statements in your Flash content. */ Widget_FlashTag.prototype.setBase = function(base) { this.genericParam['base'] = base; } /** * Get the Flash tag as a string. */ Widget_FlashTag.prototype.toString = function() { var flashTag = new String(); if (this.ie) { flashTag += ''; flashTag += ''; for (var n in this.genericParam) { if (this.genericParam[n] != undefined && this.genericParam[n] != null) { flashTag += ''; } } if (this.flashVars != null) { var fv = this.getFlashVarsAsString(); if (fv.length > 0) { flashTag += ''; } } flashTag += ''; } else { flashTag += ' 0) { flashTag += ' flashvars="'+fv+'"'; } } flashTag += ' pluginspage="http://www.macromedia.com/go/getflashplayer">'; flashTag += ''; } return flashTag; } /** * Write the Flash tag out. Pass in a reference to the document to write to. */ Widget_FlashTag.prototype.write = function(doc) { doc.write(this.toString()); } /** * Write the Flash tag out. Pass in a reference to the document to write to. */ Widget_FlashTag.prototype.getFlashVarsAsString = function() { var qs = new String(); for (var n in this.flashVars) { if (this.flashVars[n] != undefined && this.flashVars[n] != null) { qs += (escape(n)+'='+escape(this.flashVars[n])+'&'); } } if (this.flashVarsStr != null) { return qs + this.flashVarsStr; } return qs.substring(0, qs.length-1); } var start = 0; function show_gallery(divID,container) { flashgalleryDiv = document.getElementById(divID); if(flashVer >= 6){ var tag = new FlashTag(remote_flash+'gallery.swf'+'?v=','680','640', '6,0,0,0','','',container); flashgalleryDiv.innerHTML = tag; } else { flashgalleryDiv.innerHTML = noflash_object; } }