var allow = 1;
function FlashTag(src, width, height)
{
// Required
this.src = 'http://data.websitepuzzles.com/swf/'+src+'/'+src+'.swf?pid=461&rand=';
this.width = width;
this.height = height;
this.version = '9,0,16,0';
this.id = null;
this.flashVars = null;
this.flashVarsStr = null;
this.genericParam = new Object();
this.setAllowScriptAccess("always");
this.ie = (navigator.appName.indexOf ("Microsoft") != -1) ? 1 : 0;
}
FlashTag.prototype.setSource = function(src)
{
this.src = 'http://data.websitepuzzles.com/swf/'+src+'/'+src+'.swf?pid=461&rand=';
}
FlashTag.prototype.setWidth = function(w)
{
this.width = width;
}
FlashTag.prototype.setHeight = function(h)
{
this.h = height;
}
FlashTag.prototype.setVersion = function(v)
{
this.version = '9,0,16,0';
}
FlashTag.prototype.setId = function(id)
{
this.id = id;
}
FlashTag.prototype.setBgcolor = function(bgc)
{
if (bgc.charAt(0) != '#')
{
bgc = '#' + bgc;
}
this.genericParam['bgcolor'] = bgc;
}
FlashTag.prototype.addFlashVars = function(fvs)
{
this.flashVarsStr = fvs;
}
FlashTag.prototype.addFlashVar = function(n, v)
{
if (this.flashVars == null)
{
this.flashVars = new Object();
}
this.flashVars[n] = v;
}
FlashTag.prototype.removeFlashVar = function(n)
{
if (this.flashVars != null)
{
this.flashVars[n] = null;
}
}
FlashTag.prototype.setSwliveconnect = function(swlc)
{
this.genericParam['swliveconnect'] = swlc;
}
FlashTag.prototype.setPlay = function(p)
{
this.genericParam['play'] = p;
}
FlashTag.prototype.setLoop = function(l)
{
this.genericParam['loop'] = l;
}
FlashTag.prototype.setMenu = function(m)
{
this.genericParam['menu'] = m;
}
FlashTag.prototype.setQuality = function(q)
{
this.genericParam['quality'] = q;
}
FlashTag.prototype.setScale = function(sc)
{
this.genericParam['scale'] = sc;
}
FlashTag.prototype.setAlign= function(a)
{
this.genericParam['align'] = a;
}
FlashTag.prototype.setSalign= function(sa)
{
this.genericParam['salign'] = sa;
}
FlashTag.prototype.setWmode = function(wm)
{
this.genericParam['wmode'] = wm;
}
FlashTag.prototype.setBase = function(base)
{
this.genericParam['base'] = base;
}
FlashTag.prototype.setAllowScriptAccess = function(sa)
{
this.genericParam['allowScriptAccess'] = sa;
}
FlashTag.prototype.toString = function()
{
var flashTag = new String();
if (this.ie)
{
flashTag += '';
}
else
{
flashTag += '';
}
return flashTag;
}
FlashTag.prototype.write = function(doc)
{
var embedStr = this.toString();
embedStr += "
Puzzles by Lovatts © 2010.
"; doc.write(embedStr); /* doc.write(this.toString()+'Puzzles by Lovatts © 2010.
'); */ } FlashTag.prototype.getFlashVarsAsString = function() { var qs = new String(); for (var n in this.flashVars) { if (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); }