function Thumb (magid, name) { this.magid = magid; this.name = (typeof name == "undefined") ? "z_thumb" : name; var REQUIRED_FLASH_PLAYER_VERSION = 9; var INSECURE_BASE_URL = "http://viewer.zmags.com/"; var SECURE_BASE_URL = "https://secure.viewer.zmags.com/"; var BASE_URL = (window.location.href.indexOf('https://') === 0) ? SECURE_BASE_URL : INSECURE_BASE_URL; this.pageID = 1; this.fullscreen = true; this.backgroundColor = "#ffffff"; this.border = false; this.borderColor = 0; this.launchURL = null; this.launchTarget = "_blank"; this.width = 200; this.height = 300; this.wmode = false; this.scheduleID = null; this.publicationID = null; function createThumbnail () { var imageBaseURL = BASE_URL+"services/thumbResize"; if (!this.launchURL) { if (this.publicationID) { this.launchURL = BASE_URL + "publication/" + this.publicationID; } else { this.launchURL = BASE_URL + "legacy?magid=" + this.magid; } this.setFullscreen(false); } var playerVersion = swfobject.getFlashPlayerVersion().major; if (playerVersion >= REQUIRED_FLASH_PLAYER_VERSION && !this.publicationID) { wmodestring = "opaque"; if (this.wmode) { wmodestring = "transparent"; } var flashvars = { magid:this.magid, __width:this.width, baseURL:BASE_URL, fullscreen:this.fullscreen, _border:this.border, launchURL:this.launchURL, launchTarget:this.launchTarget, pageid:this.pageID, imageBaseURL: imageBaseURL, _borderColor:this.borderColor }; var params = { allowScriptAccess:"always", wmode:wmodestring }; var attributes = {}; swfobject.embedSWF(BASE_URL + "gfx/r_singleFront_2.0.swf", this.name, this.width, this.height, "9.0.0", "expressInstall.swf", flashvars, params, attributes); } else { var targetElement = document.getElementById(this.name); var anchor = document.createElement("a"); var thumb = document.createElement("img"); targetElement.style.display = "inline"; if (this.borderColor === 0) { this.borderColor = "#000000" } anchor.href = unescape(this.launchURL); anchor.target = this.launchTarget; thumb.style.border = "none"; thumb.src = imageBaseURL+"?publicationID="+(this.publicationID || this.magid)+"&pageNumber="+this.pageID+"&width="+this.width; thumb.alt = ""; if (this.border) { thumb.style.border = "solid 1px"; thumb.style.borderColor = this.borderColor; } anchor.appendChild(thumb); targetElement.appendChild(anchor); } } this.setSWFTransparency = function (SWFTransparency){ this.wmode = SWFTransparency; }; this.setSize = function (w, h) { this.width = w; this.height = h; }; this.setPageID = function (id) { this.pageID = id; }; this.setBackgroundColor = function (backgroundColor) { this.backgroundColor = backgroundColor; }; this.setFullscreen = function (flag) { this.fullscreen = flag; }; this.setBorder = function (border) { this.border = border; }; this.setBorderColor = function (borderColor) { this.borderColor = borderColor; }; this.setLaunchURL = function (launchURL) { this.launchURL = escape(launchURL); }; this.setLaunchTarget = function (launchTarget) { this.launchTarget = launchTarget; }; this.setScheduleID = function (scheduleID) { this.scheduleID = scheduleID; }; /** * SWFObject v2.1 * Copyright (c) 2007-2008 Geoff Stearns, Michael Williams, and Bobby van der Sluis * This software is released under the MIT License */ var swfobject=function (){var b="undefined",Q="object",n="Shockwave Flash",p="ShockwaveFlash.ShockwaveFlash",P="application/x-shockwave-flash",m="SWFObjectExprInst",j=window,K=document,T=navigator,o=[],N=[],i=[],d=[],J,Z=null,M=null,l=null,e=false,A=false;var h=function (){var v=typeof K.getElementById!=b&&typeof K.getElementsByTagName!=b&&typeof K.createElement!=b,AC=[0,0,0],x=null;if(typeof T.plugins!=b&&typeof T.plugins[n]==Q){x=T.plugins[n].description;if(x&&!(typeof T.mimeTypes!=b&&T.mimeTypes[P]&&!T.mimeTypes[P].enabledPlugin)){x=x.replace(/^.*\s+(\S+\s+\S+$)/,"$1");AC[0]=parseInt(x.replace(/^(.*)\..*$/,"$1"),10);AC[1]=parseInt(x.replace(/^.*\.(.*)\s.*$/,"$1"),10);AC[2]=/r/.test(x)?parseInt(x.replace(/^.*r(.*)$/,"$1"),10):0}}else{if(typeof j.ActiveXObject!=b){var y=null,AB=false;try{y=new ActiveXObject(p+".7")}catch(t){try{y=new ActiveXObject(p+".6");AC=[6,0,21];y.AllowScriptAccess="always"}catch(t){if(AC[0]==6){AB=true}}if(!AB){try{y=new ActiveXObject(p)}catch(t){}}}if(!AB&&y){try{x=y.GetVariable("$version");if(x){x=x.split(" ")[1].split(",");AC=[parseInt(x[0],10),parseInt(x[1],10),parseInt(x[2],10)]}}catch(t){}}}}var AD=T.userAgent.toLowerCase(),r=T.platform.toLowerCase(),AA=/webkit/.test(AD)?parseFloat(AD.replace(/^.*webkit\/(\d+(\.\d+)?).*$/,"$1")):false,q=false,z=r?/win/.test(r):/win/.test(AD),w=r?/mac/.test(r):/mac/.test(AD);/*@cc_on q=true;@if(@_win32)z=true;@elif(@_mac)w=true;@end@*/return{w3cdom:v,pv:AC,webkit:AA,ie:q,win:z,mac:w}}();var L=function (){if(!h.w3cdom){return }f(H);if(h.ie&&h.win){try{K.write("