[24467] | 1 | /********************
|
---|
| 2 | * EXPANSION SCRIPTS *
|
---|
| 3 | ********************/
|
---|
| 4 |
|
---|
| 5 | function toggleSection(sectionID)
|
---|
| 6 | {
|
---|
| 7 | var docElem = document.getElementById("doc" + sectionID);
|
---|
| 8 | var tocElem = document.getElementById("toc" + sectionID);
|
---|
| 9 |
|
---|
| 10 | var tocToggleElem = document.getElementById("ttoggle" + sectionID);
|
---|
| 11 | var docToggleElem = document.getElementById("dtoggle" + sectionID);
|
---|
| 12 |
|
---|
| 13 | if(docElem.style.display == "none")
|
---|
| 14 | {
|
---|
| 15 | docElem.style.display = "block";
|
---|
[25009] | 16 | docToggleElem.setAttribute("src", gs.imageURLs.collapse);
|
---|
[24467] | 17 |
|
---|
| 18 | if(tocToggleElem)
|
---|
| 19 | {
|
---|
[25009] | 20 | tocToggleElem.setAttribute("src", gs.imageURLs.collapse);
|
---|
[24467] | 21 | }
|
---|
| 22 |
|
---|
| 23 | if(tocElem)
|
---|
| 24 | {
|
---|
| 25 | tocElem.style.display = "block";
|
---|
| 26 | }
|
---|
| 27 | }
|
---|
| 28 | else
|
---|
| 29 | {
|
---|
| 30 | docElem.style.display = "none";
|
---|
| 31 |
|
---|
| 32 | //Use the page image if this is a leaf node and the chapter image if it not
|
---|
[25009] | 33 | docToggleElem.setAttribute("src", gs.imageURLs.expand);
|
---|
[24467] | 34 |
|
---|
| 35 | if(tocToggleElem)
|
---|
| 36 | {
|
---|
[25009] | 37 | tocToggleElem.setAttribute("src", gs.imageURLs.expand);
|
---|
[24467] | 38 | }
|
---|
| 39 |
|
---|
| 40 | if(tocElem)
|
---|
| 41 | {
|
---|
| 42 | tocElem.style.display = "none";
|
---|
| 43 | }
|
---|
| 44 | }
|
---|
| 45 | }
|
---|
| 46 |
|
---|
| 47 | function isExpanded(sectionID)
|
---|
| 48 | {
|
---|
| 49 | var docElem = document.getElementById("doc" + sectionID);
|
---|
| 50 | if(docElem.style.display == "block")
|
---|
| 51 | {
|
---|
| 52 | return true;
|
---|
| 53 | }
|
---|
| 54 | return false;
|
---|
| 55 | }
|
---|
| 56 |
|
---|
| 57 | function isParentOf(parent, child)
|
---|
| 58 | {
|
---|
| 59 | if(child.indexOf(parent) != -1 && child.length > parent.length && child[parent.length] == '.')
|
---|
| 60 | {
|
---|
| 61 | return true;
|
---|
| 62 | }
|
---|
| 63 | return false;
|
---|
| 64 | }
|
---|
| 65 |
|
---|
[24655] | 66 | function minimizeSidebar()
|
---|
| 67 | {
|
---|
| 68 | var coverImage = document.getElementById("coverImage");
|
---|
[25009] | 69 | var toc = document.getElementById("contentsArea");
|
---|
[24655] | 70 | var maxLink = document.getElementById("sidebarMaximizeButton");
|
---|
| 71 | var minLink = document.getElementById("sidebarMinimizeButton");
|
---|
| 72 |
|
---|
| 73 | if(coverImage)
|
---|
| 74 | {
|
---|
| 75 | coverImage.style.display = "none";
|
---|
| 76 | }
|
---|
| 77 |
|
---|
| 78 | if(toc)
|
---|
| 79 | {
|
---|
| 80 | toc.style.display = "none";
|
---|
| 81 | }
|
---|
| 82 |
|
---|
| 83 | maxLink.style.display = "block";
|
---|
| 84 | minLink.style.display = "none";
|
---|
| 85 | }
|
---|
| 86 |
|
---|
| 87 | function maximizeSidebar()
|
---|
| 88 | {
|
---|
| 89 | var coverImage = document.getElementById("coverImage");
|
---|
[25009] | 90 | var toc = document.getElementById("contentsArea");
|
---|
[24655] | 91 | var maxLink = document.getElementById("sidebarMaximizeButton");
|
---|
| 92 | var minLink = document.getElementById("sidebarMinimizeButton");
|
---|
| 93 |
|
---|
| 94 | if(coverImage)
|
---|
| 95 | {
|
---|
| 96 | coverImage.style.display = "block";
|
---|
| 97 | }
|
---|
| 98 |
|
---|
| 99 | if(toc)
|
---|
| 100 | {
|
---|
| 101 | toc.style.display = "block";
|
---|
| 102 | }
|
---|
| 103 |
|
---|
| 104 | maxLink.style.display = "none";
|
---|
| 105 | minLink.style.display = "block";
|
---|
| 106 | }
|
---|
| 107 |
|
---|
[25009] | 108 | /**********************
|
---|
| 109 | * PAGED-IMAGE SCRIPTS *
|
---|
| 110 | **********************/
|
---|
| 111 |
|
---|
| 112 | function changePage(href)
|
---|
| 113 | {
|
---|
| 114 | var ajax = new gs.functions.ajaxRequest();
|
---|
| 115 | ajax.open("GET", href + "&excerptid=gs-document");
|
---|
| 116 | ajax.onreadystatechange = function()
|
---|
| 117 | {
|
---|
| 118 | if(ajax.readyState == 4 && ajax.status == 200)
|
---|
| 119 | {
|
---|
| 120 | var contentElem = document.getElementById("gs-document");
|
---|
| 121 | contentElem.innerHTML = ajax.responseText;
|
---|
| 122 | }
|
---|
| 123 | }
|
---|
| 124 | ajax.send();
|
---|
| 125 | }
|
---|
| 126 |
|
---|
| 127 | function changeView()
|
---|
| 128 | {
|
---|
| 129 | var viewList = document.getElementById("viewSelection");
|
---|
| 130 | var currentVal = viewList.value;
|
---|
| 131 |
|
---|
| 132 | var view;
|
---|
| 133 | if(currentVal == "Image view")
|
---|
| 134 | {
|
---|
| 135 | setImageVisible(true);
|
---|
| 136 | setTextVisible(false);
|
---|
| 137 | view = "image";
|
---|
| 138 | }
|
---|
| 139 | else if(currentVal == "Text view")
|
---|
| 140 | {
|
---|
| 141 | setImageVisible(false);
|
---|
| 142 | setTextVisible(true);
|
---|
| 143 | view = "text";
|
---|
| 144 | }
|
---|
| 145 | else
|
---|
| 146 | {
|
---|
| 147 | setImageVisible(true);
|
---|
| 148 | setTextVisible(true);
|
---|
| 149 | view = "";
|
---|
| 150 | }
|
---|
| 151 |
|
---|
| 152 | var ajax = gs.functions.ajaxRequest();
|
---|
| 153 | ajax.open("GET", gs.xsltParams.library_name + "?a=d&view=" + view + "&c=" + gs.cgiParams.c);
|
---|
| 154 | ajax.send();
|
---|
| 155 | }
|
---|
| 156 |
|
---|
| 157 | function setImageVisible(visible)
|
---|
| 158 | {
|
---|
| 159 | var image = document.getElementById("gs-document-image");
|
---|
| 160 | if(visible)
|
---|
| 161 | {
|
---|
| 162 | image.setAttribute("class", image.getAttribute("class").replace(/\bhidden\b/g, ""));
|
---|
| 163 | }
|
---|
| 164 | else
|
---|
| 165 | {
|
---|
| 166 | if(image.getAttribute("class").search(/\bhidden\b/) == -1)
|
---|
| 167 | {
|
---|
| 168 | image.setAttribute("class", image.getAttribute("class") + " hidden");
|
---|
| 169 | }
|
---|
| 170 | }
|
---|
| 171 | }
|
---|
| 172 |
|
---|
| 173 | function setTextVisible(visible)
|
---|
| 174 | {
|
---|
| 175 | var text = document.getElementById("gs-document-text");
|
---|
| 176 | if(visible)
|
---|
| 177 | {
|
---|
| 178 | text.setAttribute("class", text.getAttribute("class").replace(/\bhidden\b/g, ""));
|
---|
| 179 | }
|
---|
| 180 | else
|
---|
| 181 | {
|
---|
| 182 | if(text.getAttribute("class").search(/\bhidden\b/) == -1)
|
---|
| 183 | {
|
---|
| 184 | text.setAttribute("class", text.getAttribute("class") + " hidden");
|
---|
| 185 | }
|
---|
| 186 | }
|
---|
| 187 | }
|
---|
| 188 |
|
---|
| 189 | function retrieveTableOfContents()
|
---|
| 190 | {
|
---|
| 191 | var ajax = gs.functions.ajaxRequest();
|
---|
| 192 |
|
---|
| 193 | ajax.open("GET", gs.xsltParams.library_name + "?a=d&ed=1&c=" + gs.cgiParams.c + "&d=" + gs.cgiParams.d + "&excerptid=tableOfContents");
|
---|
| 194 | ajax.onreadystatechange = function()
|
---|
| 195 | {
|
---|
| 196 | if(ajax.readyState == 4 && ajax.status == 200)
|
---|
| 197 | {
|
---|
| 198 | document.getElementById("contentsArea").innerHTML = document.getElementById("contentsArea").innerHTML + ajax.responseText;
|
---|
| 199 | replaceLinksWithSlider();
|
---|
| 200 | }
|
---|
| 201 | }
|
---|
| 202 | ajax.send();
|
---|
| 203 | }
|
---|
| 204 |
|
---|
| 205 | function replaceLinksWithSlider()
|
---|
| 206 | {
|
---|
| 207 | var tableOfContents = document.getElementById("tableOfContents");
|
---|
| 208 | var liElems = tableOfContents.getElementsByTagName("LI");
|
---|
| 209 |
|
---|
| 210 | var leafSections = new Array();
|
---|
| 211 | for (var i = 0; i < liElems.length; i++)
|
---|
| 212 | {
|
---|
| 213 | var section = liElems[i];
|
---|
| 214 | var add = true;
|
---|
| 215 | for(var j = 0; j < leafSections.length; j++)
|
---|
| 216 | {
|
---|
| 217 | if(leafSections[j] == undefined){continue;}
|
---|
| 218 |
|
---|
| 219 | var leaf = leafSections[j];
|
---|
| 220 | if(leaf.getAttribute("id").search(section.getAttribute("id")) != -1)
|
---|
| 221 | {
|
---|
| 222 | add = false;
|
---|
| 223 | }
|
---|
| 224 |
|
---|
| 225 | if(section.getAttribute("id").search(leaf.getAttribute("id")) != -1)
|
---|
| 226 | {
|
---|
| 227 | delete leafSections[j];
|
---|
| 228 | }
|
---|
| 229 | }
|
---|
| 230 |
|
---|
| 231 | if(add)
|
---|
| 232 | {
|
---|
| 233 | leafSections.push(section);
|
---|
| 234 | }
|
---|
| 235 | }
|
---|
| 236 |
|
---|
| 237 | for(var i = 0 ; i < leafSections.length; i++)
|
---|
| 238 | {
|
---|
| 239 | if(leafSections[i] == undefined){continue;}
|
---|
| 240 | leafSections[i].style.display = "none";
|
---|
| 241 | var links = leafSections[i].getElementsByTagName("A");
|
---|
| 242 | var widget = new SliderWidget(links);
|
---|
| 243 | leafSections[i].parentNode.insertBefore(widget.getElem(), leafSections[i]);
|
---|
| 244 | }
|
---|
| 245 | }
|
---|
| 246 |
|
---|
| 247 | function SliderWidget(_links)
|
---|
| 248 | {
|
---|
| 249 | //****************
|
---|
| 250 | //MEMBER VARIABLES
|
---|
| 251 | //****************
|
---|
| 252 |
|
---|
| 253 | //The container for the widget
|
---|
| 254 | var _mainDiv = document.createElement("DIV");
|
---|
| 255 | _mainDiv.setAttribute("class", "pageSlider");
|
---|
| 256 |
|
---|
| 257 | //The table of images
|
---|
| 258 | var _linkTable = document.createElement("TABLE");
|
---|
| 259 | _mainDiv.appendChild(_linkTable);
|
---|
| 260 | _linkTable.style.width = (75 * _links.length) + "px";
|
---|
| 261 |
|
---|
| 262 | //The image row of the table
|
---|
| 263 | var _linkRow = document.createElement("TR");
|
---|
| 264 | _linkTable.appendChild(_linkRow);
|
---|
| 265 |
|
---|
| 266 | //The label row
|
---|
| 267 | var _numberRow = document.createElement("TR");
|
---|
| 268 | _linkTable.appendChild(_numberRow);
|
---|
| 269 |
|
---|
| 270 | //****************
|
---|
| 271 | //PUBLIC FUNCTIONS
|
---|
| 272 | //****************
|
---|
| 273 |
|
---|
| 274 | //Function that returns the widget element
|
---|
| 275 | this.getElem = function()
|
---|
| 276 | {
|
---|
| 277 | return _mainDiv;
|
---|
| 278 | }
|
---|
| 279 |
|
---|
| 280 | //*****************
|
---|
| 281 | //PRIVATE FUNCTIONS
|
---|
| 282 | //*****************
|
---|
| 283 |
|
---|
| 284 | var getImage = function(page)
|
---|
| 285 | {
|
---|
| 286 | var ajax = gs.functions.ajaxRequest();
|
---|
| 287 |
|
---|
| 288 | var href = page.getAttribute("href");
|
---|
| 289 | //ajax.open("GET", href + "&excerptid=meta&dmd=true");
|
---|
| 290 | var template = '<xsl:template match="/"><html><gsf:metadata name="thumbicon"/></html></xsl:template>';
|
---|
| 291 | ajax.open("GET", href + "&ilt=" + template.replace(" ", "%20"));
|
---|
| 292 | ajax.onreadystatechange = function()
|
---|
| 293 | {
|
---|
| 294 | if(ajax.readyState == 4 && ajax.status == 200)
|
---|
| 295 | {
|
---|
| 296 | var text = ajax.responseText;
|
---|
| 297 |
|
---|
| 298 | var start = text.indexOf("<img", text);
|
---|
| 299 | if(start == -1)
|
---|
| 300 | {
|
---|
| 301 | page.isLoading = false;
|
---|
| 302 | page.noImage = true;
|
---|
| 303 | page.image.setAttribute("src", gs.imageURLs.blank);
|
---|
| 304 | return;
|
---|
| 305 | }
|
---|
| 306 | var end = text.indexOf(">", start) + 4;
|
---|
| 307 |
|
---|
| 308 | var image = text.substring(start, end);
|
---|
| 309 | image = image.replace("[parent(Top):assocfilepath]", gs.documentMetadata.assocfilepath);
|
---|
| 310 | page.link.innerHTML = image;
|
---|
| 311 |
|
---|
| 312 | page.isLoading = false;
|
---|
| 313 | page.imageLoaded = true;
|
---|
| 314 | }
|
---|
| 315 | else if (ajax.readyState == 4 && !page.failed)
|
---|
| 316 | {
|
---|
| 317 | page.failed = true;
|
---|
| 318 | getImage(page);
|
---|
| 319 | }
|
---|
| 320 | }
|
---|
| 321 | ajax.send();
|
---|
| 322 | }
|
---|
| 323 |
|
---|
| 324 | var startCheckFunction = function()
|
---|
| 325 | {
|
---|
| 326 | var checkFunction = function()
|
---|
| 327 | {
|
---|
| 328 | var widgetLeft = _mainDiv.scrollLeft;
|
---|
| 329 | var widgetRight = _mainDiv.clientWidth + _mainDiv.scrollLeft;
|
---|
| 330 |
|
---|
| 331 | var visiblePages = new Array();
|
---|
| 332 | for(var i = 0; i < _links.length; i++)
|
---|
| 333 | {
|
---|
| 334 | var current = _links[i].cell;
|
---|
| 335 | var currentLeft = current.offsetLeft;
|
---|
| 336 | var currentRight = currentLeft + current.clientWidth;
|
---|
| 337 | if(currentRight > widgetLeft && currentLeft < widgetRight)
|
---|
| 338 | {
|
---|
| 339 | visiblePages.push(_links[i]);
|
---|
| 340 | }
|
---|
| 341 | }
|
---|
| 342 |
|
---|
| 343 | for(var i = 0; i < visiblePages.length; i++)
|
---|
| 344 | {
|
---|
| 345 | var page = visiblePages[i];
|
---|
| 346 | if(!page || page.imageLoaded || page.noImage || page.isLoading)
|
---|
| 347 | {
|
---|
| 348 | continue;
|
---|
| 349 | }
|
---|
| 350 |
|
---|
| 351 | page.isLoading = true;
|
---|
| 352 | getImage(page);
|
---|
| 353 | }
|
---|
| 354 | }
|
---|
| 355 | setInterval(checkFunction, 1000);
|
---|
| 356 | }
|
---|
| 357 |
|
---|
| 358 | //***********
|
---|
| 359 | //CONSTRUCTOR
|
---|
| 360 | //***********
|
---|
| 361 |
|
---|
| 362 | for(var i = 0; i < _links.length; i++)
|
---|
| 363 | {
|
---|
| 364 | var col = document.createElement("TD");
|
---|
| 365 | _linkRow.appendChild(col);
|
---|
| 366 | col.setAttribute("class", "pageSliderCol");
|
---|
| 367 | _links[i].cell = col;
|
---|
| 368 |
|
---|
| 369 | var link = document.createElement("A");
|
---|
| 370 | col.appendChild(link);
|
---|
| 371 | _links[i].link = link;
|
---|
| 372 | var href = _links[i].getAttribute("href");
|
---|
| 373 | link.setAttribute("href", "javascript:changePage(\"" + href + "\");");
|
---|
| 374 |
|
---|
| 375 | var image = document.createElement("IMG");
|
---|
| 376 | link.appendChild(image);
|
---|
| 377 | image.setAttribute("src", gs.imageURLs.loading);
|
---|
| 378 | _links[i].image = image;
|
---|
| 379 |
|
---|
| 380 | var spacer = document.createElement("TD");
|
---|
| 381 | _linkRow.appendChild(spacer);
|
---|
| 382 | spacer.setAttribute("class", "pageSliderSpacer");
|
---|
| 383 |
|
---|
| 384 | var num = document.createElement("TD");
|
---|
| 385 | _numberRow.appendChild(num);
|
---|
| 386 | num.innerHTML = "Page " + (i + 1);
|
---|
| 387 | num.style.textAlign = "center";
|
---|
| 388 |
|
---|
| 389 | var spacer = document.createElement("TD");
|
---|
| 390 | _numberRow.appendChild(spacer);
|
---|
| 391 | spacer.setAttribute("class", "pageSliderSpacer");
|
---|
| 392 | }
|
---|
| 393 |
|
---|
| 394 | startCheckFunction();
|
---|
| 395 | }
|
---|
| 396 |
|
---|
[24467] | 397 | /***********************
|
---|
| 398 | * HIGHLIGHTING SCRIPTS *
|
---|
| 399 | ***********************/
|
---|
| 400 | function addHighlight()
|
---|
| 401 | {
|
---|
| 402 | var spans = document.getElementsByTagName("span");
|
---|
| 403 | for(var i = 0; i < spans.length; i++)
|
---|
| 404 | {
|
---|
| 405 | var currentSpan = spans[i];
|
---|
| 406 | if(currentSpan.getAttribute("class") == "noTermHighlight")
|
---|
| 407 | {
|
---|
| 408 | currentSpan.setAttribute("class", "termHighlight");
|
---|
| 409 | }
|
---|
| 410 | }
|
---|
| 411 |
|
---|
| 412 | var option = document.getElementById("highlightOption");
|
---|
| 413 | option.setAttribute("onclick", "removeHighlight();");
|
---|
| 414 | }
|
---|
| 415 |
|
---|
| 416 | function removeHighlight()
|
---|
| 417 | {
|
---|
| 418 | var spans = document.getElementsByTagName("span");
|
---|
| 419 | for(var i = 0; i < spans.length; i++)
|
---|
| 420 | {
|
---|
| 421 | var currentSpan = spans[i];
|
---|
| 422 | if(currentSpan.getAttribute("class") == "termHighlight")
|
---|
| 423 | {
|
---|
| 424 | currentSpan.setAttribute("class", "noTermHighlight");
|
---|
| 425 | }
|
---|
| 426 | }
|
---|
| 427 |
|
---|
| 428 | var option = document.getElementById("highlightOption");
|
---|
| 429 | option.setAttribute("onclick", "addHighlight();");
|
---|
| 430 | }
|
---|
| 431 |
|
---|
| 432 | /**************************
|
---|
| 433 | * REALISTIC BOOKS SCRIPTS *
|
---|
| 434 | **************************/
|
---|
| 435 |
|
---|
| 436 | function bookInit()
|
---|
| 437 | {
|
---|
| 438 | loadBook();
|
---|
| 439 | hideText();
|
---|
| 440 | showBook();
|
---|
| 441 | swapLinkJavascript(false);
|
---|
| 442 | }
|
---|
| 443 |
|
---|
| 444 | function hideText()
|
---|
| 445 | {
|
---|
| 446 | var textDiv = document.getElementById("gs-document-text");
|
---|
| 447 | textDiv.style.visibility = "hidden";
|
---|
| 448 | }
|
---|
| 449 |
|
---|
| 450 | function showText()
|
---|
| 451 | {
|
---|
| 452 | var textDiv = document.getElementById("gs-document-text");
|
---|
| 453 | textDiv.style.visibility = "visible";
|
---|
| 454 | }
|
---|
| 455 |
|
---|
| 456 | function hideBook()
|
---|
| 457 | {
|
---|
| 458 | var bookDiv = document.getElementById("bookdiv");
|
---|
| 459 | bookDiv.style.visibility = "hidden";
|
---|
| 460 | bookDiv.style.height = "0px";
|
---|
| 461 |
|
---|
| 462 | var bookObject = document.getElementById("bookObject");
|
---|
| 463 | bookObject.style.visibility = "hidden";
|
---|
| 464 | bookObject.style.height = "0px";
|
---|
| 465 |
|
---|
| 466 | var bookEmbed = document.getElementById("bookEmbed");
|
---|
| 467 | bookEmbed.style.visibility = "hidden";
|
---|
| 468 | bookEmbed.style.height = "0px";
|
---|
| 469 | }
|
---|
| 470 |
|
---|
| 471 | function showBook()
|
---|
| 472 | {
|
---|
| 473 | var bookDiv = document.getElementById("bookdiv");
|
---|
| 474 | bookDiv.style.visibility = "visible";
|
---|
| 475 | bookDiv.style.height = "600px";
|
---|
| 476 |
|
---|
| 477 | var bookObject = document.getElementById("bookObject");
|
---|
| 478 | bookObject.style.visibility = "visible";
|
---|
| 479 | bookObject.style.height = "600px";
|
---|
| 480 |
|
---|
| 481 | var bookEmbed = document.getElementById("bookEmbed");
|
---|
| 482 | bookEmbed.style.visibility = "visible";
|
---|
| 483 | bookEmbed.style.height = "600px";
|
---|
| 484 | }
|
---|
| 485 |
|
---|
| 486 | function swapLinkJavascript(rbOn)
|
---|
| 487 | {
|
---|
| 488 | var option = document.getElementById("rbOption");
|
---|
| 489 | if(rbOn)
|
---|
| 490 | {
|
---|
| 491 | option.setAttribute("onclick", "hideText(); showBook(); swapLinkJavascript(false);");
|
---|
| 492 | }
|
---|
| 493 | else
|
---|
| 494 | {
|
---|
| 495 | option.setAttribute("onclick", "hideBook(); showText(); swapLinkJavascript(true);");
|
---|
| 496 | }
|
---|
| 497 | }
|
---|
| 498 |
|
---|
| 499 | //Helper function to create param elements
|
---|
| 500 | function createParam(name, value)
|
---|
| 501 | {
|
---|
| 502 | var param = document.createElement("PARAM");
|
---|
| 503 | param.setAttribute("name", name);
|
---|
| 504 | param.setAttribute("value", value);
|
---|
| 505 | return param;
|
---|
| 506 | }
|
---|
| 507 |
|
---|
| 508 | function loadBook()
|
---|
| 509 | {
|
---|
| 510 | var doc_url = document.URL;
|
---|
| 511 | doc_url = doc_url.replace(/(&|\?)book=[a-z]+/gi,'');
|
---|
| 512 | doc_url += '&book=flashxml';
|
---|
| 513 |
|
---|
| 514 | var img_cover = gs.collectionMetadata.httpPath + '/index/assoc/' + gs.documentMetadata.assocfilepath + '/cover.jpg';
|
---|
| 515 |
|
---|
| 516 | var flash_plug_html = ""
|
---|
| 517 | flash_plug_html += '<OBJECT align="middle" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" \n';
|
---|
| 518 | flash_plug_html += ' height="600px" id="bookObject" swLiveConnect="true" \n';
|
---|
| 519 | flash_plug_html += ' codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" \n';
|
---|
| 520 | flash_plug_html += ' width="70%">\n';
|
---|
| 521 | flash_plug_html += ' <PARAM name="allowScriptAccess" value="always" />\n';
|
---|
| 522 | flash_plug_html += ' <PARAM name="movie" value="Book.swf';
|
---|
| 523 | flash_plug_html += '?src_image=' + escape(img_cover);
|
---|
| 524 | flash_plug_html += '&doc_url=' + escape(doc_url)
|
---|
| 525 | flash_plug_html += '" />\n';
|
---|
| 526 | flash_plug_html += ' <PARAM name="quality" value="high" />\n';
|
---|
| 527 | flash_plug_html += ' <PARAM name="bgcolor" value="#FFFFFF" />\n';
|
---|
| 528 | flash_plug_html += ' <EMBED align="middle" \n';
|
---|
| 529 | flash_plug_html += ' allowScriptAccess="always" swLiveConnect="true" \n';
|
---|
| 530 | flash_plug_html += ' bgcolor="#FFFFFF" height="600px" name="Book" \n';
|
---|
| 531 | flash_plug_html += ' pluginspage="http://www.macromedia.com/go/getflashplayer" \n';
|
---|
| 532 | flash_plug_html += ' quality="high" id="bookEmbed"\n';
|
---|
| 533 | flash_plug_html += ' src="Book.swf';
|
---|
| 534 | flash_plug_html += '?src_image=' + escape(img_cover);
|
---|
| 535 | flash_plug_html += '&doc_url=' + escape(doc_url);
|
---|
| 536 | flash_plug_html += '"\n';
|
---|
| 537 | flash_plug_html += ' type="application/x-shockwave-flash" width="70%" />\n';
|
---|
| 538 | flash_plug_html += '</OBJECT>\n';
|
---|
| 539 | var flash_div = document.getElementById("bookdiv");
|
---|
| 540 | flash_div.innerHTML = flash_plug_html;
|
---|
| 541 | } |
---|