(function() { // The following code will be enclosed within an anonymous function var arrPages = new Array(); var strPages = ""; var ind=0; arrPages[ind] = '0-9'; ind++; var contentid = 16641; //alert(contentid); var authorid = 35868; var title = "Tails+of+Sweetbrier"; var title_hypen = "tails-of-sweetbrier"; var twitterUsername = 'Hollyssis'; var widgetWidth = 320; var widgetHeight = 240; var widgetBgColor = %E2%80%99fffbee%27; var logoColor = ""; if(widgetBgColor == "ffffff") logoColor = "000000"; else if(widgetBgColor == "fffbee") logoColor = "FFA901"; else logoColor = "ffffff"; var bottom_left_fontsize = Math.round((widgetWidth * 5.65)/100); var bottom_right_fontsize = Math.round((widgetWidth * 4.75)/100); var bottom_right_imagesize = Math.round((widgetWidth * 6.25)/100); var bottom_sharebutton_lineheight = (bottom_right_imagesize >= 15) ? 15 : 10; bottom_left_fontsize = (bottom_left_fontsize > 15) ? 15 : bottom_left_fontsize; bottom_right_fontsize = (bottom_right_fontsize > 12) ? 12 : bottom_right_fontsize; bottom_right_imagesize = (bottom_right_imagesize > 20) ? 20 : bottom_right_imagesize; var excerpt_version = 0; var prize_id = ''; var prize_relation_id = ''; var subscribed = 0; //alert(widgetBgColor); var bookImg = "https://d3vm9ajvvas0k9.cloudfront.net/cdn/img/meta/books/fb/853a5d51b5d167c35eb5306bf1ae64d0.png"; // var ind=0; //arrPages[ind] = '0-5'; //ind++; var myWidth = 0, myHeight = 0; if( typeof( window.innerWidth ) == 'number' ) { //Non-IE myWidth = window.innerWidth; myHeight = window.innerHeight; } else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) { //IE 6+ in 'standards compliant mode' myWidth = document.documentElement.clientWidth; myHeight = document.documentElement.clientHeight; } else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) { //IE 4 compatible myWidth = document.body.clientWidth; myHeight = document.body.clientHeight; } var arrDimension = new Array(); //var arrDimensionWidget = new Array(); arrDimensionWidget=getDimension(360,576,widgetWidth,widgetHeight); arrDimension=getDimension(360,576,myWidth,myHeight); //alert(arrDimensionWidget['width']+'_'+arrDimension['width']); //alert(arrDimension['height']+'_'+(arrDimension['width']*2)+"__"+arrDimensionWidget['height']+"_"+arrDimensionWidget['width']*2); new_widgetHeight = widgetHeight; document.write("
"); })(); // We call our anonymous function immediately function getDimension(pageWidth,pageHeight,browserWidth,browserHeight){ var arrDimension = new Array(); var pageHeightRatio=0; var pageWidthRatio=0; var newPageWidth=0; var newPageHeight=0; browserWidth=(browserWidth/2); browserHeight=(browserHeight-20); pageHeightRatio=(browserHeight/pageHeight); newPageWidth=(pageWidth*pageHeightRatio); newPageHeight=(pageHeight*pageHeightRatio); if(newPageWidth<=browserWidth && newPageHeight<=browserHeight){ arrDimension['width']=newPageWidth; arrDimension['height']=newPageHeight; }else{ pageWidthRatio=(browserWidth/pageWidth); newPageWidth=(pageWidth*pageWidthRatio); newPageHeight=(pageHeight*pageWidthRatio); arrDimension['width']=newPageWidth; arrDimension['height']=newPageHeight; } return arrDimension; } //document.write("After our anonymous function foo means '" + foo + '_'+ myHeight +'_'+ myWidth +'".
'); var FlashDetect = new function(){ var self = this; self.installed = false; self.raw = ""; self.major = -1; self.minor = -1; self.revision = -1; self.revisionStr = ""; var activeXDetectRules = [ { "name":"ShockwaveFlash.ShockwaveFlash.7", "version":function(obj){ return getActiveXVersion(obj); } }, { "name":"ShockwaveFlash.ShockwaveFlash.6", "version":function(obj){ var version = "6,0,21"; try{ obj.AllowScriptAccess = "always"; version = getActiveXVersion(obj); }catch(err){} return version; } }, { "name":"ShockwaveFlash.ShockwaveFlash", "version":function(obj){ return getActiveXVersion(obj); } } ]; var getActiveXVersion = function(activeXObj){ var version = -1; try{ version = activeXObj.GetVariable("$version"); }catch(err){} return version; }; var getActiveXObject = function(name){ var obj = -1; try{ obj = new ActiveXObject(name); }catch(err){} return obj; }; var parseActiveXVersion = function(str){ var versionArray = str.split(",");//replace with regex return { "raw":str, "major":parseInt(versionArray[0].split(" ")[1], 10), "minor":parseInt(versionArray[1], 10), "revision":parseInt(versionArray[2], 10), "revisionStr":versionArray[2] }; }; var parseStandardVersion = function(str){ var descParts = str.split(/ +/); var majorMinor = descParts[2].split(/\./); var revisionStr = descParts[3]; return { "raw":str, "major":parseInt(majorMinor[0], 10), "minor":parseInt(majorMinor[1], 10), "revisionStr":revisionStr, "revision":parseRevisionStrToInt(revisionStr) }; }; var parseRevisionStrToInt = function(str){ return parseInt(str.replace(/[a-zA-Z]/g, ""), 10) || self.revision; }; self.majorAtLeast = function(version){ return self.major >= version; }; self.FlashDetect = function(){ if(navigator.plugins && navigator.plugins.length>0){ var type = 'application/x-shockwave-flash'; var mimeTypes = navigator.mimeTypes; if(mimeTypes && mimeTypes[type] && mimeTypes[type].enabledPlugin && mimeTypes[type].enabledPlugin.description){ var version = mimeTypes[type].enabledPlugin.description; var versionObj = parseStandardVersion(version); self.raw = versionObj.raw; self.major = versionObj.major; self.minor = versionObj.minor; self.revisionStr = versionObj.revisionStr; self.revision = versionObj.revision; self.installed = true; } }else if(navigator.appVersion.indexOf("Mac")==-1 && window.execScript){ var version = -1; for(var i=0; i