// has been created
var callback = function (e){
//Only execute if SWFObject embed was successful
if(!e.success || !e.ref){
// alert("No Flash Supported");
if('flipbuilder_hasMobile'=='flipbuilder_'+'hasMobile'){
delayToShowVersion("mobile/index.html")
// window.location = "mobile/index.html";
}else if(hasBasicHtml){
delayToShowVersion("files/basic-html/index.html");
}else{//no sutable fla
}
// setTimeout("shutDownLoader()", 1000);
return false;
}
};
// BR.Platform.name ='ios';
// if(BR.Platform.name == 'ios'||BR.Platform.name == 'android') window.location = "mobile/index.html";
// if( BR.Platform.name == 'webos' || BR.Platform.name == 'bada' || BR.Platform.name == 'symbian' || BR.Platform.name == 'palm' || BR.Platform.name == 'blackberry') window.location = dir+"assets/seo/page1.html";
function getURLParam(strParamName){
var strReturn = "";
var strHref = window.location.href;
if ( strHref.indexOf("?") > -1 ){
var strQueryString = strHref.substr(strHref.indexOf("?"));//.toLowerCase();
var aQueryString = strQueryString.split("&");
for ( var iParam = 0; iParam < aQueryString.length; iParam++ ){
//if ( aQueryString[iParam].indexOf(strParamName.toLowerCase() + "=") > -1 ){
if ( aQueryString[iParam].indexOf(strParamName + "=") > -1 ){
var aParam = aQueryString[iParam].split("=");
strReturn = aParam[1];
break;
}
}
}
return unescape(strReturn);
}
var pageIndex=getURLParam('pageIndex');
if(!pageIndex){
pageIndex=-1;
}
var alwaysShowBookMark=getURLParam('alwaysShowBookMark');
if(!alwaysShowBookMark){
alwaysShowBookMark=false;
}
var alwaysShowThumbnails=getURLParam('alwaysShowThumbnails');
if(!alwaysShowThumbnails){
alwaysShowThumbnails=false;
}
var alwaysMinimeStyle=getURLParam('alwaysMinimeStyle');
if(!alwaysMinimeStyle){
alwaysMinimeStyle=false;
}
var currentHTMLURL= window.encodeURIComponent(window.location.href);
if(!currentHTMLURL){
currentHTMLURL='';
}
var pice=getURLParam('pice');
if(!pice){
pice=false;
}
var lang=getURLParam('lang');
if(!lang){
lang="NONE";
}
var itemValues=getURLParam('itemValues');
if(!itemValues){
itemValues="NONE";
}
var swfVersionStr = "10.0.0";
var xiSwfUrlStr = "";
var flashvars = {pageIndex:pageIndex,alwaysShowBookMark:alwaysShowBookMark,alwaysShowThumbnails:alwaysShowThumbnails,
alwaysMinimeStyle:alwaysMinimeStyle,currentHTMLURL:currentHTMLURL,pice:pice,lang:lang,itemValues:itemValues};
var params = {};
params.quality = "high";
params.bgcolor = "#ffffff";
params.allowscriptaccess = "always";
params.allowfullscreen = "true";
params.allowFullScreenInteractive = "true";
params.wmode = "transparent";
var attributes = {};
attributes.id = "FlipBookBuilder";
attributes.name = "FlipBookBuilder";
attributes.align = "middle";
var hasMobileVersion=true;
var hasBasicHtmlVersion=true;
var callback = function (e){
//Only execute if SWFObject embed was successful
if(!e.success || !e.ref){ // alert("No Flash Supported");
if(hasMobileVersion){
var pageIndex=getURLParam('pageIndex');
if(!pageIndex){
window.location = "mobile/index.html"+(window.location.hash?window.location.hash:'');
}else{
window.location = "mobile/index.html#p="+pageIndex;
}
}else if(hasBasicHtmlVersion){
window.location ='files/basic-html/index.html';
}else{
document.write("Sorry,need flash player. Get Adobe Flash Player<\/a> it's possible to view a simplified version of the book on any device, or you can view the mobile version here " );
}
return false;
}
};
var forceOld=false;
function detectAndGoVersion(loadType){
if(forceOld){
swfobject.embedSWF(
"book.swf", "flashContent",
"100%", "100%",
swfVersionStr, xiSwfUrlStr,
flashvars, params, attributes);
swfobject.createCSS("#flashContent", "display:block;text-align:left;");
return;
}
var pageIndex=getURLParam('pageIndex');
if(!pageIndex){
pageIndex=-1;
}
if(BR.isMobile){
if(hasMobileVersion){
if(pageIndex!=-1){
window.location = "mobile/index.html#p="+pageIndex;
}else{
window.location = "mobile/index.html"+(window.location.hash?window.location.hash:'');
//window.location = "mobile/index.html";
}
}else if(hasBasicHtmlVersion){
window.location ='files/basic-html/index.html';
}else {
swfobject.embedSWF(
"book.swf", "flashContent",
"100%", "100%",
swfVersionStr, xiSwfUrlStr,
flashvars, params, attributes,callback);
swfobject.createCSS("#flashContent", "display:block;text-align:left;");
}
}else{
if(loadType==2){
if(hasMobileVersion){
if(pageIndex!=-1){
window.location = "mobile/index.html#p="+pageIndex;
}else{
window.location = "mobile/index.html"+(window.location.hash?window.location.hash:'');
//window.location = "mobile/index.html";
}
return;
}
}
swfobject.embedSWF(
"book.swf", "flashContent",
"100%", "100%",
swfVersionStr, xiSwfUrlStr,
flashvars, params, attributes,callback);
swfobject.createCSS("#flashContent", "display:block;text-align:left;");
}
}
detectAndGoVersion(2);