최초등록

This commit is contained in:
sp1000je
2026-02-23 10:01:00 +09:00
commit 7bc9767bf4
3120 changed files with 198447 additions and 0 deletions
+139
View File
@@ -0,0 +1,139 @@
<!--#include virtual="/common/lib/dbcon.asp"-->
<!--#include virtual="/common/lib/func.asp"-->
<%
eb_pk = InputValue(request("eb_pk"))
is_size = InputValue(request("is_size"))
If is_size <> "" then
SESSION("is_size") = is_size
End if
If eb_pk = "" then
sql = "select top 1 eb_pk from ebook ORDER BY eb_code ASC "
Set Rs = Dbcon.Execute (sql)
If Not rs.eof Then
eb_pk = rs("eb_pk")
rs.close : Set rs = nothing
Else
rs.close : Set rs = nothing
Call Back_back("등록된 데이터가 없습니다.")
End If
ElseIf Not( IsNumeric(eb_pk) ) then
Call goMessage_board("잘못된 접속입니다.(101)", "/", "", "" , a_num)
response.end
End if
' 레코드필드
R_Fields = "eb_idx, eb_subject, eb_skin, eb_logoimg, eb_wdate, eb_mdate, eb_chk, eb_viewtype"
R_tablename_str = "ebook "
R_WHERE_str = " WHERE eb_pk= '"&eb_pk & "'"
Call SelectQuery (R_Fields, R_tablename_str, R_WHERE_str)
' 테이블 기본 환경설정 ********************************************************************************
table = "ebook_page" ' 테이블명
idx_field = "ebp_idx" ' 기본키
oreder_filed = "ebp_code ASC" ' 정렬기준 필드
Query_Fields = "ebp_idx, ebp_subject, ebp_code, ebp_pageimg, ebp_wdate, ebp_mdate, ebp_chk, eb_pk" ' 불러올 필드
' ****************************************************************************************************
Query_OrderBy = " ORDER BY "&oreder_filed
' ---------------------------------------------------------------
' ---------------조합 쿼리문------------------------------------
v_keyword = InputValue(request("p_keyword"))
If v_keyword <> "" then
search_str = " AND ebp_subject like '%"&v_keyword&"%'"
End if
' -----------------------------리스트 출력 쿼리문 생성-----------------------------
sql = "select "&Query_Fields&" from "&table&" WHERE eb_pk = "&eb_pk&""
sql = sql & search_str & search_str2 & Query_OrderBy
Set Rs = Dbcon.Execute (sql)
If Not rs.eof Then
vData = rs.getrows()
vCnt = UBound(vData,2)
Else
vCnt = -1
End If
rs.close : Set rs = nothing
' ---------------------------------------------------------------------------------
If vCnt>-1 Then
zz = 1
flippingBook_pages = ""
flippingBook_contents = ""
For i=0 To vCnt
' 필드갯수만큼 ($Query_Fields).가지고온다..
Call arr2Value(Query_Fields, "vData", i)
If zz <> 1 Then flippingBook_pages = flippingBook_pages&", "
If ebp_pageimg = "" then
flippingBook_pages = flippingBook_pages & "''"
else
flippingBook_pages = flippingBook_pages & "'/data/ebook/"&eb_pk&"/"&ebp_pageimg&"' "
End if
If zz <> 1 Then flippingBook_contents = flippingBook_contents&", "
flippingBook_contents = flippingBook_contents & " [ '"&ebp_subject&"', "&zz&" ] "
zz = zz + 1
next
End if
If trim(eb_skin)="1" Then
%><!--#include virtual="/content/ebook/skin1/index.asp"--><%
ElseIf trim(eb_skin)="2" Then
%><!--#include virtual="/content/ebook/skin2/index.asp"--><%
ElseIf trim(eb_skin)="3" Then
%><!--#include virtual="/content/ebook/skin3/index.asp"--><%
ElseIf trim(eb_skin)="4" Then
%><!--#include virtual="/content/ebook/skin4/index.asp"--><%
ElseIf trim(eb_skin)="5" Then
%><!--#include virtual="/content/ebook/skin5/index.asp"--><%
ElseIf trim(eb_skin)="6" Then
%><!--#include virtual="/content/ebook/skin6/index.asp"--><%
End if
%>
+136
View File
@@ -0,0 +1,136 @@
@charset "utf-8";
html, body{
padding: 0px;
margin: 0px;
font-family: gulim, Arial, Helvetica, sans-serif;
font-size: 12px;
color: #666666;
font-weight: bold;
}
ul,li,img{margin:0;padding:0;border:0;list-style:none;}
ol, ul, li {
list-style-image:none;
list-style-position:outside;
list-style-type:none;
}
select{font-size: 12px;}
#fbFooter {
height: 49px;
background-color: #000000;
background-image: url('../img/footerBackground.gif');
background-repeat: repeat-x;
}
.fbPaginationMinor {
color: #666666;
letter-spacing:-1px;
}
.fbPaginationMinor2 {
color: #666666;
margin-right: 10px;
}
#fbContents {
float: right;
margin-top: 11px;
}
#fbContents li {float:left;}
#fbContents2 {
float: right;
margin-top: 11px;
margin-right: 10px;
}
#fbContents2 li {float:left;}
#fbContentsMenu {
margin-right: 10px;
}
#fbMenu {
float: right;
margin-top: 5px;
margin-right: 10px;
}
#logo {
float: left;
}
#content_move {
float: left;
margin-left:10px;
margin-top:12px;
}
#content_move select {
background-color:#4F79BE;
color:#ffffff;
font-weight: bold;
}
.div {
padding-left:4px;
padding-right:4px;
}
#altmsg {
position: absolute;
background-color:#000000;
width:100%;j
padding:50px 0 50px 0;
opacity: 0.5;
filter: alpha(opacity=50);
text-align:center;
}
#altmsg:hover {
opacity: 0.8;
filter: alpha(opacity=80);
}
a.altlink:link {
color: #FFFFFF;
}
a.altlink:visited {
color: #DDDDDD;
}
a.altlink:hover{
color: #FFFFFF;
}
#helpTop {
width:100%;
height: 39px;
background-color: #F1F1F1;
background-image: url('../img/help_titbg.gif');
}
#helpleft {
float:left;
padding:8px;
}
#helpright {
float:right;
}
#helpCon {
text-align:center;
padding:14px;
}
#helpCon li {
padding-bottom:14px;
}
Binary file not shown.
+33
View File
@@ -0,0 +1,33 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>이용방법</title>
<link href="css/common.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="helpTop">
<div id="helpleft"><img src="img/help_tit.gif" width="58" height="21" alt="이용방법" /></div>
<div id="helpright"><img src="img/help_close.gif" width="30" height="39" alt="창닫기" onclick="window.close();" style="cursor:pointer;" /></div>
</div>
<div id="helpCon">
<ul>
<li><img src="img/help_con1.gif" width="334" height="116" alt="화면 확대/축소
마우스 왼쪽 버튼을 더블클릭하면 확대 및 축소 됩니다." /></li>
<li><img src="img/help_con2.gif" width="334" height="116" alt="페이지이동
페이지의 우측하단을 클릭 또는 드래그하시면 다음페이지로 이동 됩니다.
페이지의 좌측하단을 클릭 또는 드래그하시면 이전페이지로 이동 됩니다." /></li>
<li><img src="img/help_con3.gif" width="334" height="116" alt="페이지 확대시 화면 이동
페이지 확대시 드래그 또는 상하좌우 스크롤 버튼을 이용하면 이동 됩니다." /></li>
<li><img src="img/help_con4.gif" width="334" height="122" alt="다른 이북이동, 페이지바로이동, 이전페이지, 다음페이지, 확대/축소, 인쇄" /></li>
</ul>
</div>
</body>
</html>
Binary file not shown.

After

Width:  |  Height:  |  Size: 753 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 125 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 120 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 759 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 817 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 956 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 273 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 893 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 684 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 303 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

+194
View File
@@ -0,0 +1,194 @@
<%
If Not( IsObject(Dbcon) ) Then
querystring = "msg=" & server.urlencode("잘못된 페이지 요청입니다.")
querystring = querystring & "&prepage=" & server.urlencode(prepage)
querystring = querystring & "&ok=" & server.urlencode(ok)
querystring = querystring & "&no=" & server.urlencode(no)
querystring = querystring & "&a_num=" & server.urlencode(a_num)
response.redirect "/content/board/message.asp?" & querystring
response.end
End if
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title></title>
<link href="/content/ebook/skin1/css/common.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="/content/ebook/skin1/js/liquid.js"></script>
<script type="text/javascript" src="/content/ebook/skin1/js/swfobject.js"></script>
<script type="text/javascript" src="/content/ebook/skin1/js/ebook.js"></script>
<script type="text/javascript">
<!--
flippingBook.pages = [
<%=flippingBook_pages%>
];
flippingBook.contents = [
<%=flippingBook_contents%>
];
flippingBook.settings.bookWidth = 840;
flippingBook.settings.bookHeight = 594;
flippingBook.settings.pageBackgroundColor = 0xffffff; //페이지배경색상
flippingBook.settings.backgroundColor = 0x4D4D4D; //배경색상
flippingBook.settings.zoomUIColor = 0xffffff; //스크롤색상
flippingBook.settings.useCustomCursors = true;
flippingBook.settings.dropShadowEnabled = false,
flippingBook.settings.zoomImageWidth = 880;
flippingBook.settings.zoomImageHeight = 1245;
flippingBook.settings.downloadURL = "";
flippingBook.settings.zoomPath = "/data/ebook/<%=eb_pk%>/";
flippingBook.settings.flipSound = "/content/ebook/skin1/sounds/01.mp3";
flippingBook.settings.staticShadowsDepth = "<%=eb_viewtype%>";
flippingBook.create();
function ebook_size() {
is_size = document.getElementById('frm_sch').is_size.value;
if(is_size == "max"){//1024
min();
}else if(is_size == "min"){
max();
}
}
function max() {
document.getElementById('frm_sch').is_size.value = "max";
self.moveTo(0,0);
self.resizeTo(screen.availWidth,screen.availHeight);
}
function min() {
document.getElementById('frm_sch').is_size.value = "min";
self.moveTo(0,0);
self.resizeTo(1024,768);
}
function go_ebook_url(eb_pk){
document.location.href="/content/ebook/index.asp?eb_pk="+eb_pk;
}
function ebook_go1(url){
location.href = url;
}
//-->
</script>
</head>
<body>
<form id="frm_sch" action="/content/ebook/index.asp?eb_pk=<%=eb_pk%>" method="post">
<div>
<input type="hidden" name="is_size" value="<%=SESSION("is_size")%>" />
</div>
<div id="fbFooter">
<div id="logo">
<%If eb_logoimg <> "" then%>
<img src="/data/ebook/logo/<%=eb_logoimg%>" alt="" />
<%End if%>
</div>
<div id="content_move">
<select onchange = "go_ebook_url(this.value);">
<%
R_Fields_code = "eb_subject, eb_pk"
SQL = "Select "&R_Fields_code&" FROM ebook WHERE eb_chk = 'Y' ORDER BY eb_code ASC"
Set Rs = Dbcon.Execute (SQL)
Do While Not rs.eof
eb_pk_str = rs("eb_pk")
eb_subject = rs("eb_subject")
%>
<option value="<%=eb_pk_str%>" <%=chkSelect(eb_pk, eb_pk_str)%>><%=eb_subject%></option>
<%
rs.movenext
Loop
rs.close : Set rs = Nothing
Dbcon.close : Set Dbcon = nothing
%>
</select>
</div>
<div id="fbMenu">
<img src="/content/ebook/skin1/img/btnPrevious.gif" width="31" height="33" border="0" id="fbBackButton" alt="이전페이지" /><img src="/content/ebook/skin1/img/btnNext.gif" width="31" height="33" border="0" id="fbForwardButton" alt="다음페이지" />
<img src="/content/ebook/skin1/img/btnDiv.gif" width="7" height="33" border="0" class="div" alt="" />
<img src="/content/ebook/skin1/img/btnZoom.gif" width="31" height="33" border="0" id="fbZoomButton" alt="확대/축소" /><img src="/content/ebook/skin1/img/btnPrint.gif" width="31" height="33" border="0" id="fbPrintButton" alt="인쇄" /><img src="/content/ebook/skin1/img/btnHelp.gif" width="31" height="33" border="0" id="fbHelpButton" alt="이용방법" onclick="window.open('/content/ebook/skin1/help.html','help','width=392,height=593');" style="cursor:pointer;" />
<img src="/content/ebook/skin1/img/btnDiv.gif" width="7" height="33" border="0" class="div" alt="" />
<img src="/content/ebook/skin1/img/btnMax.gif" width="21" height="33" border="0" alt="최대화" onclick="ebook_size();" style="cursor:pointer;" /><img src="/content/ebook/skin1/img/btnClose.gif" width="21" height="33" border="0" alt="닫기" onclick="window.close();" style="cursor:pointer;" />
</div>
<div id="fbContents">
<ul>
<li style="padding-top:3px;"><span class="fbPaginationMinor">페이지</span></li>
<li style="padding-top:3px;"><span id="fbCurrentPages">1</span></li>
<li style="padding-top:3px;"><span id="fbTotalPages" class="fbPaginationMinor2"></span></li>
<li>
<select id="fbContentsMenu" name="fbContentsMenu" title="페이지이동">
<option></option>
</select>
</li>
</ul>
</div>
<div id="fbContents2">
<ul>
<li><input type="text" size="10" title="검색어를 입력하세요" id="p_keyword" name="p_keyword" value="<%=v_keyword%>" style="height:14px;font-size:11px;"></li>
<li style="padding-left:3px;"><input type="image" src="/content/ebook/skin1/img/btnSearch.gif" alt="검색" /></li>
<li style="padding-left:4px;"><a href="javascript:;" onclick="ebook_go1('/content/ebook/index.asp?eb_pk=<%=eb_pk%>');"><img src="/content/ebook/skin1/img/btnTotalview.gif" alt="전체보기" /></a></li>
<li style="padding-left:5px;"><img src="/content/ebook/skin1/img/btnDiv2.gif" width="7" height="22" border="0" class="div" alt="" /></li>
</ul>
</div>
</div>
<div id="fbContainer">
<div id="altmsg"><a class="altlink" href="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash">Download Adobe Flash Player.</a></div>
</div>
<%If eb_size = "max" then%>
<script LANGUAGE="JavaScript">
<!--
max();
//-->
</script>
<%End if%>
</form>
</body>
</html>
+44
View File
@@ -0,0 +1,44 @@
flippingBook.pages = [
"/data/ebook/ebook_1/page-001.jpg",
"/data/ebook/ebook_1/page-002.jpg",
"/data/ebook/ebook_1/page-003.jpg",
"/data/ebook/ebook_1/page-004.jpg"
];
flippingBook.contents = [
[ "목차", 1 ],
[ "2 페이지", 2 ],
[ "3 페이지", 3 ],
[ "4 페이지", 4 ],
[ "5 페이지", 5 ]
];
// define custom book settings here
flippingBook.settings.bookWidth = 826;
flippingBook.settings.bookHeight = 584;
flippingBook.settings.pageBackgroundColor = 0xffffff; //페이지배경색상
flippingBook.settings.backgroundColor = 0x4D4D4D; //배경색상
flippingBook.settings.zoomUIColor = 0xffffff; //스크롤색상
flippingBook.settings.useCustomCursors = true;
flippingBook.settings.dropShadowEnabled = false,
flippingBook.settings.zoomImageWidth = 992;
flippingBook.settings.zoomImageHeight = 1403;
flippingBook.settings.downloadURL = "";
flippingBook.settings.zoomPath = "/data/ebook/ebook_1/large/";
flippingBook.settings.flipSound = "sounds/01.mp3";
// default settings can be found in the flippingbook.js file
flippingBook.create();
function max() {
self.moveTo(0,0);
self.resizeTo(screen.availWidth,screen.availHeight);
}
+314
View File
@@ -0,0 +1,314 @@
function FlippingBook() {
this.pages = [];
this.zoomPages = [];
this.printPages = [];
this.contents = [];
this.stageWidth = "100%";
this.stageHeight = "100%";
this.settings = {
bookWidth: 640,
bookHeight: 480,
pagesSet: this.pages,
zoomPagesSet: this.zoomPages,
printPagesSet: this.printPages,
scaleContent: true,
preserveProportions: false,
centerContent: true,
hardcover: false,
hardcoverThickness: 3,
hardcoverEdgeColor: 0xFFFFFF,
highlightHardcover: true,
frameWidth: 0,
frameColor: 0xFFFFFF,
frameAlpha: 100,
firstPageNumber: 1,
autoFlipSize: 50,
navigationFlipOffset: 30,
flipOnClick: true,
handOverCorner: true,
handOverPage: true,
alwaysOpened: true, //항상 페이지오픈
staticShadowsType: "Symmetric", // Asymmetric, Symmetric, Default
staticShadowsDepth: 1,
staticShadowsLightColor: 0xFFFFFF, // works for "Symmetric" shadows only
staticShadowsDarkColor: 0x000000,
dynamicShadowsDepth: 1,
dynamicShadowsLightColor: 0xFFFFFF, // works for "dark" pages only
dynamicShadowsDarkColor: 0x000000,
moveSpeed: 2,
closeSpeed: 3,
gotoSpeed: 3,
rigidPageSpeed: 5,
flipSound: "",
hardcoverSound: "",
preloaderType: "Line", // "Progress Bar", "Round", "Thin", "Dots", "Gradient Wheel", "Gear Wheel", "Line", "Animated Book", "None"
pageBackgroundColor: 0x99CCFF,
loadOnDemand: true,
allowPagesUnload: true,
showUnderlyingPages: false,
playOnDemand: true,
freezeOnFlip: false,
darkPages: false,
smoothPages: false,
rigidPages: false,
flipCornerStyle: "first page only",// "first page only", "each page", "manually"
flipCornerPosition: "bottom-right",// "bottom-right","top-right","bottom-left","top-left"
flipCornerAmount: 50,
flipCornerAngle: 20,
flipCornerRelease: true,
flipCornerVibrate: true,
flipCornerPlaySound: false,
zoomEnabled: true,
zoomPath: "",
zoomImageWidth: 900,
zoomImageHeight: 1165,
zoomOnClick: true,
zoomUIColor: 0x8f9ea6,
zoomHint: "더블클릭하시면 확대/축소됩니다",
zoomHintEnabled: true,
centerBook: true,
useCustomCursors: true,
dropShadowEnabled: true,
dropShadowHideWhenFlipping: true,
backgroundColor: 0xFFFFFF,
backgroundImagePlacement: "fit", // "top left", "center", "fit"
printEnabled: true,
printTitle: "인쇄 페이지",
downloadURL: "",
downloadTitle: "다운로드 PDF",
downloadSize: "Size: 4.7 Mb",
downloadComplete: "Complete",
extXML: ""
};
this.containerId = "fbContainer";
this.forwardButtonId = "fbForwardButton";
this.backButtonId = "fbBackButton";
this.zoomButtonId = "fbZoomButton";
this.printButtonId = "fbPrintButton";
this.downloadButtonId = "fbDownloadButton";
this.currentPagesId = "fbCurrentPages";
this.totalPagesId = "fbTotalPages";
this.contentsMenuId = "fbContentsMenu";
};
FlippingBook.prototype.create = function(){
this.settings.pagesSet = this.pages;
this.settings.zoomPagesSet = this.zoomPages;
this.settings.printPagesSet = this.printPages;
if( location.hash.substr(1) != "" )
this.settings.firstPageNumber = location.hash.substr(1);
this.addLoadEvent( this.onWindowLoad );
swfobject.embedSWF("/content/ebook/skin1/ebook.swf", this.containerId, this.stageWidth, this.stageHeight, "8.0.0", "/content/ebook/skin1/js/expressInstall.swf", this.settings, {allowScriptAccess: "always", bgcolor: "#" + this.settings.backgroundColor.toString( 16 ) });
}
FlippingBook.prototype.getFlippingBookReference = function() {
return this.getObjectReference( this.containerId );
}
FlippingBook.prototype.getObjectReference = function( id ) {
return document.getElementById( id );
}
FlippingBook.prototype.flipForward = function() {
flippingBook.getFlippingBookReference().flipForward();
}
FlippingBook.prototype.flipBack = function() {
flippingBook.getFlippingBookReference().flipBack();
}
FlippingBook.prototype.zoomButtonClick = function() {
if( flippingBook.getFlippingBookReference().isZoomedIn() )
flippingBook.zoomOut();
else
flippingBook.zoomIn();
}
FlippingBook.prototype.zoomIn = function() {
this.getFlippingBookReference().zoomIn();
}
FlippingBook.prototype.zoomOut = function() {
this.getFlippingBookReference().zoomOut();
}
FlippingBook.prototype.print = function() {
flippingBook.getFlippingBookReference().print();
}
FlippingBook.prototype.downloadFile = function() {
if( flippingBook.settings.downloadURL )
flippingBook.getFlippingBookReference().downloadFile();
}
FlippingBook.prototype.onWindowLoad = function(){
var forwardButton = flippingBook.getObjectReference( flippingBook.forwardButtonId );
if( forwardButton ){
forwardButton.style.cursor = "pointer";
forwardButton.onclick = flippingBook.flipForward;
}
var backButton = flippingBook.getObjectReference( flippingBook.backButtonId );
if( backButton ){
backButton.style.cursor = "pointer";
backButton.onclick = flippingBook.flipBack;
}
var zoomButton = flippingBook.getObjectReference( flippingBook.zoomButtonId );
if( zoomButton ){
zoomButton.style.cursor = "pointer";
zoomButton.onclick = flippingBook.zoomButtonClick;
}
var printButton = flippingBook.getObjectReference( flippingBook.printButtonId );
if( printButton ){
printButton.style.cursor = "pointer";
printButton.onclick = flippingBook.print;
}
var downloadButton = flippingBook.getObjectReference( flippingBook.downloadButtonId );
if( downloadButton ){
downloadButton.style.cursor = "pointer";
downloadButton.onclick = flippingBook.downloadFile;
}
flippingBook.buildContentsMenu();
}
FlippingBook.prototype.onPutPage = function( leftPageNumber, rightPageNumber ){
this.updatePagination( leftPageNumber, rightPageNumber );
this.updateContentsMenu( leftPageNumber, rightPageNumber );
}
FlippingBook.prototype.updatePagination = function( leftPageNumber, rightPageNumber ){
var leftPageExists = ( leftPageNumber != undefined );
var rightPageExists = ( rightPageNumber != undefined );
var pageNumberString = leftPageNumber + "-" + rightPageNumber;
if( !leftPageExists )
pageNumberString = rightPageNumber;
if( !rightPageExists )
pageNumberString = leftPageNumber;
this.getObjectReference( this.currentPagesId ).innerHTML = pageNumberString;
this.getObjectReference( this.totalPagesId ).innerHTML = " / " + this.getFlippingBookReference().totalPages();
}
FlippingBook.prototype.buildContentsMenu = function(){
var contentsSelect = this.getObjectReference( this.contentsMenuId );
if( contentsSelect ){
for( var i = 0; i < this.contents.length; i++ )
contentsSelect.options[i] = new Option(this.contents[i][0], this.contents[i][1]);
contentsSelect.onchange = this.onContentsChange;
}
}
FlippingBook.prototype.onContentsChange = function(){
var contentsSelect = flippingBook.getObjectReference( flippingBook.contentsMenuId );
var pageNumber = contentsSelect.options[contentsSelect.selectedIndex].value;
if( pageNumber )
flippingBook.getFlippingBookReference().flipGotoPage( pageNumber );
}
FlippingBook.prototype.updateContentsMenu = function( leftPageNumber, rightPageNumber ){
var contentsSelect = flippingBook.getObjectReference( flippingBook.contentsMenuId );
if( contentsSelect ){
for( var i = 0; i < this.contents.length - 1; i++ ){
var minPage = contentsSelect.options[i].value;
var maxPage = contentsSelect.options[i+1].value;
var leftOK = false;
var rightOK = false;
if( leftPageNumber )
leftOK = ( Number( leftPageNumber ) >= minPage && Number( leftPageNumber ) <= maxPage );
else
leftOK = true;
if( rightPageNumber )
rightOK = ( Number( rightPageNumber ) >= minPage && Number( rightPageNumber ) <= maxPage );
else
rightOK = true;
if( leftOK && rightOK )
break;
}
contentsSelect.selectedIndex = i;
}
}
FlippingBook.prototype.getWindowHeight = function() {
var windowHeight = 0;
if (typeof(window.innerHeight) == 'number' ) {
windowHeight=window.innerHeight;
}
else {
if (document.documentElement && document.documentElement.clientHeight) {
windowHeight = document.documentElement.clientHeight;
}
else {
if (document.body&&document.body.clientHeight) {
windowHeight=document.body.clientHeight;
}
}
}
return windowHeight;
}
FlippingBook.prototype.addLoadEvent = function ( fn ) {
if (typeof window.addEventListener != "undefined") {
window.addEventListener("load", fn, false);
}
else if (typeof document.addEventListener != "undefined") {
document.addEventListener("load", fn, false);
}
else if (typeof window.attachEvent != "undefined") {
window.attachEvent("onload", fn);
}
else if (typeof window.onload == "function") {
var fnOld = window.onload;
window.onload = function() {
fnOld();
fn();
};
}
else {
window.onload = fn;
}
}
FlippingBook.prototype.handleWheel = function ( delta ){
this.getFlippingBookReference().onWheelScroll( delta );
}
flippingBook = new FlippingBook();
function wheel(event){
var delta = 0;
if (!event) event = window.event;
if (event.wheelDelta) {
delta = event.wheelDelta/120;
if (window.opera) delta = -delta;
} else if (event.detail) {
delta = -event.detail/3;
}
if (delta)
flippingBook.handleWheel(delta);
if (event.preventDefault)
event.preventDefault();
event.returnValue = false;
}
if (window.addEventListener)
window.addEventListener('DOMMouseScroll', wheel, false);
window.onmousewheel = document.onmousewheel = wheel;
Binary file not shown.
+70
View File
@@ -0,0 +1,70 @@
if( document.documentElement )
bodyStyle = document.documentElement.style;
else if( document.body )
bodyStyle = document.body.style;
bodyStyle.visibility = "hidden";
function sizeContent(){
var windowHeight = getWindowHeight();
var footerHeight = document.getElementById("fbFooter").offsetHeight;
var contentHeight = windowHeight - footerHeight;
document.getElementById("fbContainer").style.height = contentHeight + "px";
var altDiv = document.getElementById("altmsg");
if( altDiv ){
var altH = altDiv.offsetHeight;
var altW = altDiv.offsetWidth;
altDiv.style.top = (contentHeight / 2 - altH /2)+ "px";
altDiv.style.left = (getWindowWidth() / 2 - altW /2)+ "px";
}
if( bodyStyle )
bodyStyle.visibility = "visible";
}
function addEvent( obj, type, fn )
{
if (obj.addEventListener)
obj.addEventListener( type, fn, false );
else if (obj.attachEvent)
{
obj["e"+type+fn] = fn;
obj.attachEvent( "on"+type, function() { obj["e"+type+fn](); } );
}
}
function getWindowHeight() {
var windowHeight=0;
if ( typeof( window.innerHeight ) == 'number' ) {
windowHeight=window.innerHeight;
}
else {
if ( document.documentElement && document.documentElement.clientHeight) {
windowHeight = document.documentElement.clientHeight;
}
else {
if (document.body&&document.body.clientHeight) {
windowHeight=document.body.clientHeight;
}
}
}
return windowHeight;
};
function getWindowWidth() {
var ww = 0;
if (self.innerWidth)
ww = self.innerWidth;
else if (document.documentElement && document.documentElement.clientWidth)
ww = document.documentElement.clientWidth;
else if (document.body)
ww = document.body.clientWidth;
return ww;
}
addEvent( window, "load", sizeContent);
addEvent( window, "resize", sizeContent );
+731
View File
@@ -0,0 +1,731 @@
/*! SWFObject v2.1 <http://code.google.com/p/swfobject/>
Copyright (c) 2007-2008 Geoff Stearns, Michael Williams, and Bobby van der Sluis
This software is released under the MIT License <http://www.opensource.org/licenses/mit-license.php>
*/
var swfobject = function() {
var UNDEF = "undefined",
OBJECT = "object",
SHOCKWAVE_FLASH = "Shockwave Flash",
SHOCKWAVE_FLASH_AX = "ShockwaveFlash.ShockwaveFlash",
FLASH_MIME_TYPE = "application/x-shockwave-flash",
EXPRESS_INSTALL_ID = "SWFObjectExprInst",
win = window,
doc = document,
nav = navigator,
domLoadFnArr = [],
regObjArr = [],
objIdArr = [],
listenersArr = [],
script,
timer = null,
storedAltContent = null,
storedAltContentId = null,
isDomLoaded = false,
isExpressInstallActive = false;
/* Centralized function for browser feature detection
- Proprietary feature detection (conditional compiling) is used to detect Internet Explorer's features
- User agent string detection is only used when no alternative is possible
- Is executed directly for optimal performance
*/
var ua = function() {
var w3cdom = typeof doc.getElementById != UNDEF && typeof doc.getElementsByTagName != UNDEF && typeof doc.createElement != UNDEF,
playerVersion = [0,0,0],
d = null;
if (typeof nav.plugins != UNDEF && typeof nav.plugins[SHOCKWAVE_FLASH] == OBJECT) {
d = nav.plugins[SHOCKWAVE_FLASH].description;
if (d && !(typeof nav.mimeTypes != UNDEF && nav.mimeTypes[FLASH_MIME_TYPE] && !nav.mimeTypes[FLASH_MIME_TYPE].enabledPlugin)) { // navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin indicates whether plug-ins are enabled or disabled in Safari 3+
d = d.replace(/^.*\s+(\S+\s+\S+$)/, "$1");
playerVersion[0] = parseInt(d.replace(/^(.*)\..*$/, "$1"), 10);
playerVersion[1] = parseInt(d.replace(/^.*\.(.*)\s.*$/, "$1"), 10);
playerVersion[2] = /r/.test(d) ? parseInt(d.replace(/^.*r(.*)$/, "$1"), 10) : 0;
}
}
else if (typeof win.ActiveXObject != UNDEF) {
var a = null, fp6Crash = false;
try {
a = new ActiveXObject(SHOCKWAVE_FLASH_AX + ".7");
}
catch(e) {
try {
a = new ActiveXObject(SHOCKWAVE_FLASH_AX + ".6");
playerVersion = [6,0,21];
a.AllowScriptAccess = "always"; // Introduced in fp6.0.47
}
catch(e) {
if (playerVersion[0] == 6) {
fp6Crash = true;
}
}
if (!fp6Crash) {
try {
a = new ActiveXObject(SHOCKWAVE_FLASH_AX);
}
catch(e) {}
}
}
if (!fp6Crash && a) { // a will return null when ActiveX is disabled
try {
d = a.GetVariable("$version"); // Will crash fp6.0.21/23/29
if (d) {
d = d.split(" ")[1].split(",");
playerVersion = [parseInt(d[0], 10), parseInt(d[1], 10), parseInt(d[2], 10)];
}
}
catch(e) {}
}
}
var u = nav.userAgent.toLowerCase(),
p = nav.platform.toLowerCase(),
webkit = /webkit/.test(u) ? parseFloat(u.replace(/^.*webkit\/(\d+(\.\d+)?).*$/, "$1")) : false, // returns either the webkit version or false if not webkit
ie = false,
windows = p ? /win/.test(p) : /win/.test(u),
mac = p ? /mac/.test(p) : /mac/.test(u);
/*@cc_on
ie = true;
@if (@_win32)
windows = true;
@elif (@_mac)
mac = true;
@end
@*/
return { w3cdom:w3cdom, pv:playerVersion, webkit:webkit, ie:ie, win:windows, mac:mac };
}();
/* Cross-browser onDomLoad
- Based on Dean Edwards' solution: http://dean.edwards.name/weblog/2006/06/again/
- Will fire an event as soon as the DOM of a page is loaded (supported by Gecko based browsers - like Firefox -, IE, Opera9+, Safari)
*/
var onDomLoad = function() {
if (!ua.w3cdom) {
return;
}
addDomLoadEvent(main);
if (ua.ie && ua.win) {
try { // Avoid a possible Operation Aborted error
doc.write("<scr" + "ipt id=__ie_ondomload defer=true src=//:></scr" + "ipt>"); // String is split into pieces to avoid Norton AV to add code that can cause errors
script = getElementById("__ie_ondomload");
if (script) {
addListener(script, "onreadystatechange", checkReadyState);
}
}
catch(e) {}
}
if (ua.webkit && typeof doc.readyState != UNDEF) {
timer = setInterval(function() { if (/loaded|complete/.test(doc.readyState)) { callDomLoadFunctions(); }}, 10);
}
if (typeof doc.addEventListener != UNDEF) {
doc.addEventListener("DOMContentLoaded", callDomLoadFunctions, null);
}
addLoadEvent(callDomLoadFunctions);
}();
function checkReadyState() {
if (script.readyState == "complete") {
script.parentNode.removeChild(script);
callDomLoadFunctions();
}
}
function callDomLoadFunctions() {
if (isDomLoaded) {
return;
}
if (ua.ie && ua.win) { // Test if we can really add elements to the DOM; we don't want to fire it too early
var s = createElement("span");
try { // Avoid a possible Operation Aborted error
var t = doc.getElementsByTagName("body")[0].appendChild(s);
t.parentNode.removeChild(t);
}
catch (e) {
return;
}
}
isDomLoaded = true;
if (timer) {
clearInterval(timer);
timer = null;
}
var dl = domLoadFnArr.length;
for (var i = 0; i < dl; i++) {
domLoadFnArr[i]();
}
}
function addDomLoadEvent(fn) {
if (isDomLoaded) {
fn();
}
else {
domLoadFnArr[domLoadFnArr.length] = fn; // Array.push() is only available in IE5.5+
}
}
/* Cross-browser onload
- Based on James Edwards' solution: http://brothercake.com/site/resources/scripts/onload/
- Will fire an event as soon as a web page including all of its assets are loaded
*/
function addLoadEvent(fn) {
if (typeof win.addEventListener != UNDEF) {
win.addEventListener("load", fn, false);
}
else if (typeof doc.addEventListener != UNDEF) {
doc.addEventListener("load", fn, false);
}
else if (typeof win.attachEvent != UNDEF) {
addListener(win, "onload", fn);
}
else if (typeof win.onload == "function") {
var fnOld = win.onload;
win.onload = function() {
fnOld();
fn();
};
}
else {
win.onload = fn;
}
}
/* Main function
- Will preferably execute onDomLoad, otherwise onload (as a fallback)
*/
function main() { // Static publishing only
var rl = regObjArr.length;
for (var i = 0; i < rl; i++) { // For each registered object element
var id = regObjArr[i].id;
if (ua.pv[0] > 0) {
var obj = getElementById(id);
if (obj) {
regObjArr[i].width = obj.getAttribute("width") ? obj.getAttribute("width") : "0";
regObjArr[i].height = obj.getAttribute("height") ? obj.getAttribute("height") : "0";
if (hasPlayerVersion(regObjArr[i].swfVersion)) { // Flash plug-in version >= Flash content version: Houston, we have a match!
if (ua.webkit && ua.webkit < 312) { // Older webkit engines ignore the object element's nested param elements
fixParams(obj);
}
setVisibility(id, true);
}
else if (regObjArr[i].expressInstall && !isExpressInstallActive && hasPlayerVersion("6.0.65") && (ua.win || ua.mac)) { // Show the Adobe Express Install dialog if set by the web page author and if supported (fp6.0.65+ on Win/Mac OS only)
showExpressInstall(regObjArr[i]);
}
else { // Flash plug-in and Flash content version mismatch: display alternative content instead of Flash content
displayAltContent(obj);
}
}
}
else { // If no fp is installed, we let the object element do its job (show alternative content)
setVisibility(id, true);
}
}
}
/* Fix nested param elements, which are ignored by older webkit engines
- This includes Safari up to and including version 1.2.2 on Mac OS 10.3
- Fall back to the proprietary embed element
*/
function fixParams(obj) {
var nestedObj = obj.getElementsByTagName(OBJECT)[0];
if (nestedObj) {
var e = createElement("embed"), a = nestedObj.attributes;
if (a) {
var al = a.length;
for (var i = 0; i < al; i++) {
if (a[i].nodeName == "DATA") {
e.setAttribute("src", a[i].nodeValue);
}
else {
e.setAttribute(a[i].nodeName, a[i].nodeValue);
}
}
}
var c = nestedObj.childNodes;
if (c) {
var cl = c.length;
for (var j = 0; j < cl; j++) {
if (c[j].nodeType == 1 && c[j].nodeName == "PARAM") {
e.setAttribute(c[j].getAttribute("name"), c[j].getAttribute("value"));
}
}
}
obj.parentNode.replaceChild(e, obj);
}
}
/* Show the Adobe Express Install dialog
- Reference: http://www.adobe.com/cfusion/knowledgebase/index.cfm?id=6a253b75
*/
function showExpressInstall(regObj) {
isExpressInstallActive = true;
var obj = getElementById(regObj.id);
if (obj) {
if (regObj.altContentId) {
var ac = getElementById(regObj.altContentId);
if (ac) {
storedAltContent = ac;
storedAltContentId = regObj.altContentId;
}
}
else {
storedAltContent = abstractAltContent(obj);
}
if (!(/%$/.test(regObj.width)) && parseInt(regObj.width, 10) < 310) {
regObj.width = "310";
}
if (!(/%$/.test(regObj.height)) && parseInt(regObj.height, 10) < 137) {
regObj.height = "137";
}
doc.title = doc.title.slice(0, 47) + " - Flash Player Installation";
var pt = ua.ie && ua.win ? "ActiveX" : "PlugIn",
dt = doc.title,
fv = "MMredirectURL=" + win.location + "&MMplayerType=" + pt + "&MMdoctitle=" + dt,
replaceId = regObj.id;
// For IE when a SWF is loading (AND: not available in cache) wait for the onload event to fire to remove the original object element
// In IE you cannot properly cancel a loading SWF file without breaking browser load references, also obj.onreadystatechange doesn't work
if (ua.ie && ua.win && obj.readyState != 4) {
var newObj = createElement("div");
replaceId += "SWFObjectNew";
newObj.setAttribute("id", replaceId);
obj.parentNode.insertBefore(newObj, obj); // Insert placeholder div that will be replaced by the object element that loads expressinstall.swf
obj.style.display = "none";
var fn = function() {
obj.parentNode.removeChild(obj);
};
addListener(win, "onload", fn);
}
createSWF({ data:regObj.expressInstall, id:EXPRESS_INSTALL_ID, width:regObj.width, height:regObj.height }, { flashvars:fv }, replaceId);
}
}
/* Functions to abstract and display alternative content
*/
function displayAltContent(obj) {
if (ua.ie && ua.win && obj.readyState != 4) {
// For IE when a SWF is loading (AND: not available in cache) wait for the onload event to fire to remove the original object element
// In IE you cannot properly cancel a loading SWF file without breaking browser load references, also obj.onreadystatechange doesn't work
var el = createElement("div");
obj.parentNode.insertBefore(el, obj); // Insert placeholder div that will be replaced by the alternative content
el.parentNode.replaceChild(abstractAltContent(obj), el);
obj.style.display = "none";
var fn = function() {
obj.parentNode.removeChild(obj);
};
addListener(win, "onload", fn);
}
else {
obj.parentNode.replaceChild(abstractAltContent(obj), obj);
}
}
function abstractAltContent(obj) {
var ac = createElement("div");
if (ua.win && ua.ie) {
ac.innerHTML = obj.innerHTML;
}
else {
var nestedObj = obj.getElementsByTagName(OBJECT)[0];
if (nestedObj) {
var c = nestedObj.childNodes;
if (c) {
var cl = c.length;
for (var i = 0; i < cl; i++) {
if (!(c[i].nodeType == 1 && c[i].nodeName == "PARAM") && !(c[i].nodeType == 8)) {
ac.appendChild(c[i].cloneNode(true));
}
}
}
}
}
return ac;
}
/* Cross-browser dynamic SWF creation
*/
function createSWF(attObj, parObj, id) {
var r, el = getElementById(id);
if (el) {
if (typeof attObj.id == UNDEF) { // if no 'id' is defined for the object element, it will inherit the 'id' from the alternative content
attObj.id = id;
}
if (ua.ie && ua.win) { // IE, the object element and W3C DOM methods do not combine: fall back to outerHTML
var att = "";
for (var i in attObj) {
if (attObj[i] != Object.prototype[i]) { // Filter out prototype additions from other potential libraries, like Object.prototype.toJSONString = function() {}
if (i.toLowerCase() == "data") {
parObj.movie = attObj[i];
}
else if (i.toLowerCase() == "styleclass") { // 'class' is an ECMA4 reserved keyword
att += ' class="' + attObj[i] + '"';
}
else if (i.toLowerCase() != "classid") {
att += ' ' + i + '="' + attObj[i] + '"';
}
}
}
var par = "";
for (var j in parObj) {
if (parObj[j] != Object.prototype[j]) { // Filter out prototype additions from other potential libraries
par += '<param name="' + j + '" value="' + parObj[j] + '" />';
}
}
el.outerHTML = '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"' + att + '>' + par + '</object>';
objIdArr[objIdArr.length] = attObj.id; // Stored to fix object 'leaks' on unload (dynamic publishing only)
r = getElementById(attObj.id);
}
else if (ua.webkit && ua.webkit < 312) { // Older webkit engines ignore the object element's nested param elements: fall back to the proprietary embed element
var e = createElement("embed");
e.setAttribute("type", FLASH_MIME_TYPE);
for (var k in attObj) {
if (attObj[k] != Object.prototype[k]) { // Filter out prototype additions from other potential libraries
if (k.toLowerCase() == "data") {
e.setAttribute("src", attObj[k]);
}
else if (k.toLowerCase() == "styleclass") { // 'class' is an ECMA4 reserved keyword
e.setAttribute("class", attObj[k]);
}
else if (k.toLowerCase() != "classid") { // Filter out IE specific attribute
e.setAttribute(k, attObj[k]);
}
}
}
for (var l in parObj) {
if (parObj[l] != Object.prototype[l]) { // Filter out prototype additions from other potential libraries
if (l.toLowerCase() != "movie") { // Filter out IE specific param element
e.setAttribute(l, parObj[l]);
}
}
}
el.parentNode.replaceChild(e, el);
r = e;
}
else { // Well-behaving browsers
var o = createElement(OBJECT);
o.setAttribute("type", FLASH_MIME_TYPE);
for (var m in attObj) {
if (attObj[m] != Object.prototype[m]) { // Filter out prototype additions from other potential libraries
if (m.toLowerCase() == "styleclass") { // 'class' is an ECMA4 reserved keyword
o.setAttribute("class", attObj[m]);
}
else if (m.toLowerCase() != "classid") { // Filter out IE specific attribute
o.setAttribute(m, attObj[m]);
}
}
}
for (var n in parObj) {
if (parObj[n] != Object.prototype[n] && n.toLowerCase() != "movie") { // Filter out prototype additions from other potential libraries and IE specific param element
createObjParam(o, n, parObj[n]);
}
}
el.parentNode.replaceChild(o, el);
r = o;
}
}
return r;
}
function createObjParam(el, pName, pValue) {
var p = createElement("param");
p.setAttribute("name", pName);
p.setAttribute("value", pValue);
el.appendChild(p);
}
/* Cross-browser SWF removal
- Especially needed to safely and completely remove a SWF in Internet Explorer
*/
function removeSWF(id) {
var obj = getElementById(id);
if (obj && (obj.nodeName == "OBJECT" || obj.nodeName == "EMBED")) {
if (ua.ie && ua.win) {
if (obj.readyState == 4) {
removeObjectInIE(id);
}
else {
win.attachEvent("onload", function() {
removeObjectInIE(id);
});
}
}
else {
obj.parentNode.removeChild(obj);
}
}
}
function removeObjectInIE(id) {
var obj = getElementById(id);
if (obj) {
for (var i in obj) {
if (typeof obj[i] == "function") {
obj[i] = null;
}
}
obj.parentNode.removeChild(obj);
}
}
/* Functions to optimize JavaScript compression
*/
function getElementById(id) {
var el = null;
try {
el = doc.getElementById(id);
}
catch (e) {}
return el;
}
function createElement(el) {
return doc.createElement(el);
}
/* Updated attachEvent function for Internet Explorer
- Stores attachEvent information in an Array, so on unload the detachEvent functions can be called to avoid memory leaks
*/
function addListener(target, eventType, fn) {
target.attachEvent(eventType, fn);
listenersArr[listenersArr.length] = [target, eventType, fn];
}
/* Flash Player and SWF content version matching
*/
function hasPlayerVersion(rv) {
var pv = ua.pv, v = rv.split(".");
v[0] = parseInt(v[0], 10);
v[1] = parseInt(v[1], 10) || 0; // supports short notation, e.g. "9" instead of "9.0.0"
v[2] = parseInt(v[2], 10) || 0;
return (pv[0] > v[0] || (pv[0] == v[0] && pv[1] > v[1]) || (pv[0] == v[0] && pv[1] == v[1] && pv[2] >= v[2])) ? true : false;
}
/* Cross-browser dynamic CSS creation
- Based on Bobby van der Sluis' solution: http://www.bobbyvandersluis.com/articles/dynamicCSS.php
*/
function createCSS(sel, decl) {
if (ua.ie && ua.mac) {
return;
}
var h = doc.getElementsByTagName("head")[0], s = createElement("style");
s.setAttribute("type", "text/css");
s.setAttribute("media", "screen");
if (!(ua.ie && ua.win) && typeof doc.createTextNode != UNDEF) {
s.appendChild(doc.createTextNode(sel + " {" + decl + "}"));
}
h.appendChild(s);
if (ua.ie && ua.win && typeof doc.styleSheets != UNDEF && doc.styleSheets.length > 0) {
var ls = doc.styleSheets[doc.styleSheets.length - 1];
if (typeof ls.addRule == OBJECT) {
ls.addRule(sel, decl);
}
}
}
function setVisibility(id, isVisible) {
var v = isVisible ? "visible" : "hidden";
if (isDomLoaded && getElementById(id)) {
getElementById(id).style.visibility = v;
}
else {
createCSS("#" + id, "visibility:" + v);
}
}
/* Filter to avoid XSS attacks
*/
function urlEncodeIfNecessary(s) {
var regex = /[\\\"<>\.;]/;
var hasBadChars = regex.exec(s) != null;
return hasBadChars ? encodeURIComponent(s) : s;
}
/* Release memory to avoid memory leaks caused by closures, fix hanging audio/video threads and force open sockets/NetConnections to disconnect (Internet Explorer only)
*/
var cleanup = function() {
if (ua.ie && ua.win) {
window.attachEvent("onunload", function() {
// remove listeners to avoid memory leaks
var ll = listenersArr.length;
for (var i = 0; i < ll; i++) {
listenersArr[i][0].detachEvent(listenersArr[i][1], listenersArr[i][2]);
}
// cleanup dynamically embedded objects to fix audio/video threads and force open sockets and NetConnections to disconnect
var il = objIdArr.length;
for (var j = 0; j < il; j++) {
removeSWF(objIdArr[j]);
}
// cleanup library's main closures to avoid memory leaks
for (var k in ua) {
ua[k] = null;
}
ua = null;
for (var l in swfobject) {
swfobject[l] = null;
}
swfobject = null;
});
}
}();
return {
/* Public API
- Reference: http://code.google.com/p/swfobject/wiki/SWFObject_2_0_documentation
*/
registerObject: function(objectIdStr, swfVersionStr, xiSwfUrlStr) {
if (!ua.w3cdom || !objectIdStr || !swfVersionStr) {
return;
}
var regObj = {};
regObj.id = objectIdStr;
regObj.swfVersion = swfVersionStr;
regObj.expressInstall = xiSwfUrlStr ? xiSwfUrlStr : false;
regObjArr[regObjArr.length] = regObj;
setVisibility(objectIdStr, false);
},
getObjectById: function(objectIdStr) {
var r = null;
if (ua.w3cdom) {
var o = getElementById(objectIdStr);
if (o) {
var n = o.getElementsByTagName(OBJECT)[0];
if (!n || (n && typeof o.SetVariable != UNDEF)) {
r = o;
}
else if (typeof n.SetVariable != UNDEF) {
r = n;
}
}
}
return r;
},
embedSWF: function(swfUrlStr, replaceElemIdStr, widthStr, heightStr, swfVersionStr, xiSwfUrlStr, flashvarsObj, parObj, attObj) {
if (!ua.w3cdom || !swfUrlStr || !replaceElemIdStr || !widthStr || !heightStr || !swfVersionStr) {
return;
}
widthStr += ""; // Auto-convert to string
heightStr += "";
if (hasPlayerVersion(swfVersionStr)) {
setVisibility(replaceElemIdStr, false);
var att = {};
if (attObj && typeof attObj === OBJECT) {
for (var i in attObj) {
if (attObj[i] != Object.prototype[i]) { // Filter out prototype additions from other potential libraries
att[i] = attObj[i];
}
}
}
att.data = swfUrlStr;
att.width = widthStr;
att.height = heightStr;
var par = {};
if (parObj && typeof parObj === OBJECT) {
for (var j in parObj) {
if (parObj[j] != Object.prototype[j]) { // Filter out prototype additions from other potential libraries
par[j] = parObj[j];
}
}
}
if (flashvarsObj && typeof flashvarsObj === OBJECT) {
for (var k in flashvarsObj) {
if (flashvarsObj[k] != Object.prototype[k]) { // Filter out prototype additions from other potential libraries
if (typeof par.flashvars != UNDEF) {
par.flashvars += "&" + k + "=" + flashvarsObj[k];
}
else {
par.flashvars = k + "=" + flashvarsObj[k];
}
}
}
}
addDomLoadEvent(function() {
createSWF(att, par, replaceElemIdStr);
if (att.id == replaceElemIdStr) {
setVisibility(replaceElemIdStr, true);
}
});
}
else if (xiSwfUrlStr && !isExpressInstallActive && hasPlayerVersion("6.0.65") && (ua.win || ua.mac)) {
isExpressInstallActive = true; // deferred execution
setVisibility(replaceElemIdStr, false);
addDomLoadEvent(function() {
var regObj = {};
regObj.id = regObj.altContentId = replaceElemIdStr;
regObj.width = widthStr;
regObj.height = heightStr;
regObj.expressInstall = xiSwfUrlStr;
showExpressInstall(regObj);
});
}
},
getFlashPlayerVersion: function() {
return { major:ua.pv[0], minor:ua.pv[1], release:ua.pv[2] };
},
hasFlashPlayerVersion: hasPlayerVersion,
createSWF: function(attObj, parObj, replaceElemIdStr) {
if (ua.w3cdom) {
return createSWF(attObj, parObj, replaceElemIdStr);
}
else {
return undefined;
}
},
removeSWF: function(objElemIdStr) {
if (ua.w3cdom) {
removeSWF(objElemIdStr);
}
},
createCSS: function(sel, decl) {
if (ua.w3cdom) {
createCSS(sel, decl);
}
},
addDomLoadEvent: addDomLoadEvent,
addLoadEvent: addLoadEvent,
getQueryParamValue: function(param) {
var q = doc.location.search || doc.location.hash;
if (param == null) {
return urlEncodeIfNecessary(q);
}
if (q) {
var pairs = q.substring(1).split("&");
for (var i = 0; i < pairs.length; i++) {
if (pairs[i].substring(0, pairs[i].indexOf("=")) == param) {
return urlEncodeIfNecessary(pairs[i].substring((pairs[i].indexOf("=") + 1)));
}
}
}
return "";
},
// For internal usage only
expressInstallCallback: function() {
if (isExpressInstallActive && storedAltContent) {
var obj = getElementById(EXPRESS_INSTALL_ID);
if (obj) {
obj.parentNode.replaceChild(storedAltContent, obj);
if (storedAltContentId) {
setVisibility(storedAltContentId, true);
if (ua.ie && ua.win) {
storedAltContent.style.display = "block";
}
}
storedAltContent = null;
storedAltContentId = null;
isExpressInstallActive = false;
}
}
}
};
}();
Binary file not shown.
Binary file not shown.
Binary file not shown.
+145
View File
@@ -0,0 +1,145 @@
@charset "utf-8";
html, body{
padding: 0px;
margin: 0px;
font-family: gulim, Arial, Helvetica, sans-serif;
font-size: 11px;
color: #E6EBFF;
}
ul,li,img{margin:0;padding:0;border:0;list-style:none;}
ol, ul, li {
list-style-image:none;
list-style-position:outside;
list-style-type:none;
}
select{font-size: 12px;}
#fbFooter {
height: 48px;
background-color: #000000;
background-image: url('../img/footerBackground.gif');
background-repeat: repeat-x;
}
.fbPaginationMinor {
color: #E6EBFF;
letter-spacing:-1px;
font-weight:bold;
}
.fbPaginationMinor2 {
color: #E6EBFF;
font-weight:bold;
margin-right: 10px;
margin-left:5px;
}
#fbCurrentPages{
font-weight:bold;
}
#fbContents {
float: right;
margin-top: 11px;
}
#fbContents li {float:left;}
#fbContents2 {
float: right;
margin-top: 13px;
margin-right: 4px;
}
#fbContents2 li {float:left;}
#fbContentsMenu {
margin-top:3px;
margin-right: 10px;
}
#fbMenu {
float: right;
margin-top: 7px;
margin-right: 10px;
}
#logo {
float: left;
}
#content_move {
float: left;
margin-left:10px;
margin-top:12px;
}
#content_move select {
background-color:#3C4EFF;
color:#ffffff;
font-weight: bold;
}
.div {
padding-left:4px;
padding-right:4px;
}
#altmsg {
position: absolute;
background-color:#000000;
width:100%;j
padding:50px 0 50px 0;
opacity: 0.5;
filter: alpha(opacity=50);
text-align:center;
}
#altmsg:hover {
opacity: 0.8;
filter: alpha(opacity=80);
}
a.altlink:link {
color: #FFFFFF;
}
a.altlink:visited {
color: #DDDDDD;
}
a.altlink:hover{
color: #FFFFFF;
}
#helpTop {
width:100%;
height: 39px;
background-color: #F1F1F1;
background-image: url('../img/help_titbg.gif');
}
#helpleft {
float:left;
padding:8px;
}
#helpright {
float:right;
}
#helpCon {
text-align:center;
padding:14px;
}
#helpCon li {
padding-bottom:14px;
}
Binary file not shown.
+33
View File
@@ -0,0 +1,33 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>이용방법</title>
<link href="css/common.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="helpTop">
<div id="helpleft"><img src="img/help_tit.gif" width="58" height="21" alt="이용방법" /></div>
<div id="helpright"><img src="img/help_close.gif" width="30" height="39" alt="창닫기" onclick="window.close();" style="cursor:pointer;" /></div>
</div>
<div id="helpCon">
<ul>
<li><img src="img/help_con1.gif" width="334" height="116" alt="화면 확대/축소
마우스 왼쪽 버튼을 더블클릭하면 확대 및 축소 됩니다." /></li>
<li><img src="img/help_con2.gif" width="334" height="116" alt="페이지이동
페이지의 우측하단을 클릭 또는 드래그하시면 다음페이지로 이동 됩니다.
페이지의 좌측하단을 클릭 또는 드래그하시면 이전페이지로 이동 됩니다." /></li>
<li><img src="img/help_con3.gif" width="334" height="116" alt="페이지 확대시 화면 이동
페이지 확대시 드래그 또는 상하좌우 스크롤 버튼을 이용하면 이동 됩니다." /></li>
<li><img src="img/help_con4.gif" width="334" height="122" alt="다른 이북이동, 페이지바로이동, 이전페이지, 다음페이지, 확대/축소, 인쇄" /></li>
</ul>
</div>
</body>
</html>
Binary file not shown.

After

Width:  |  Height:  |  Size: 616 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 452 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 86 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 82 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 454 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 779 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 891 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 366 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 893 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 684 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 303 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

+179
View File
@@ -0,0 +1,179 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title></title>
<link href="/content/ebook/skin2/css/common.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="/content/ebook/skin2/js/liquid.js"></script>
<script type="text/javascript" src="/content/ebook/skin2/js/swfobject.js"></script>
<script type="text/javascript" src="/content/ebook/skin2/js/ebook.js"></script>
<script type="text/javascript">
<!--
flippingBook.pages = [
<%=flippingBook_pages%>
];
flippingBook.contents = [
<%=flippingBook_contents%>
];
flippingBook.settings.bookWidth = 840;
flippingBook.settings.bookHeight = 594;
flippingBook.settings.pageBackgroundColor = 0xffffff; //페이지배경색상
flippingBook.settings.backgroundColor = 0xD5DDEE; //배경색상
flippingBook.settings.zoomUIColor = 0x959DEF; //스크롤색상
flippingBook.settings.useCustomCursors = true;
flippingBook.settings.dropShadowEnabled = false,
flippingBook.settings.zoomImageWidth = 880;
flippingBook.settings.zoomImageHeight = 1245;
flippingBook.settings.downloadURL = "";
flippingBook.settings.zoomPath = "/data/ebook/<%=eb_pk%>/";
flippingBook.settings.backgroundImage = "/content/ebook/skin2/img/bg.gif";
flippingBook.settings.flipSound = "/content/ebook/skin2/sounds/02.mp3";
flippingBook.settings.staticShadowsDepth = "<%=eb_viewtype%>";
flippingBook.create();
function ebook_size() {
is_size = document.getElementById('frm_sch').is_size.value;
if(is_size == "max"){//1024
min();
}else if(is_size == "min"){
max();
}
}
function max() {
document.getElementById('frm_sch').is_size.value = "max";
self.moveTo(0,0);
self.resizeTo(screen.availWidth,screen.availHeight);
}
function min() {
document.getElementById('frm_sch').is_size.value = "min";
self.moveTo(0,0);
self.resizeTo(1024,768);
}
function go_ebook_url(eb_pk){
document.location.href="/content/ebook/index.asp?eb_pk="+eb_pk;
}
function ebook_go1(url){
location.href = url;
}
//-->
</script>
</head>
<body>
<form id="frm_sch" action="/content/ebook/index.asp?eb_pk=<%=eb_pk%>" method="post">
<div>
<input type="hidden" name="is_size" value="<%=SESSION("is_size")%>" />
</div>
<div id="fbFooter">
<div id="logo">
<%If eb_logoimg <> "" then%>
<img src="/data/ebook/logo/<%=eb_logoimg%>" alt="" />
<%End if%>
</div>
<div id="content_move">
<select onchange = "go_ebook_url(this.value);">
<%
R_Fields_code = "eb_subject, eb_pk"
SQL = "Select "&R_Fields_code&" FROM ebook WHERE eb_chk = 'Y' ORDER BY eb_code ASC"
Set Rs = Dbcon.Execute (SQL)
Do While Not rs.eof
eb_pk_str = rs("eb_pk")
eb_subject = rs("eb_subject")
%>
<option value="<%=eb_pk_str%>" <%=chkSelect(eb_pk, eb_pk_str)%>><%=eb_subject%></option>
<%
rs.movenext
Loop
rs.close : Set rs = Nothing
Dbcon.close : Set Dbcon = nothing
%>
</select>
</div>
<div id="fbMenu">
<img src="/content/ebook/skin2/img/btnPrevious.gif" width="31" height="33" border="0" id="fbBackButton" alt="이전페이지" /><img src="/content/ebook/skin2/img/btnNext.gif" width="31" height="33" border="0" id="fbForwardButton" alt="다음페이지" />
<img src="/content/ebook/skin2/img/btnDiv.gif" width="6" height="32" border="0" class="div" alt="" />
<img src="/content/ebook/skin2/img/btnZoom.gif" width="76" height="33" border="0" id="fbZoomButton" alt="확대/축소" /><img src="/content/ebook/skin2/img/btnPrint.gif" width="52" height="33" border="0" id="fbPrintButton" alt="인쇄" /><img src="/content/ebook/skin2/img/btnHelp.gif" width="72" height="33" border="0" id="fbHelpButton" alt="이용방법" onclick="window.open('/content/ebook/skin2/help.html','help','width=392,height=593');" style="cursor:pointer;" />
<img src="/content/ebook/skin2/img/btnDiv.gif" width="6" height="32" border="0" class="div" alt="" />
<img src="/content/ebook/skin2/img/btnMax.gif" width="21" height="33" border="0" alt="최대화" onclick="ebook_size();" style="cursor:pointer;" /><img src="/content/ebook/skin2/img/btnClose.gif" width="21" height="33" border="0" alt="닫기" onclick="window.close();" style="cursor:pointer;" />
</div>
<div id="fbContents">
<ul>
<li style="padding-top:8px;"><span class="fbPaginationMinor">P</span></li>
<li style="padding-top:8px;"><span id="fbCurrentPages">1</span></li>
<li style="padding-top:8px;"><span id="fbTotalPages" class="fbPaginationMinor2"></span></li>
<li>
<select id="fbContentsMenu" name="fbContentsMenu" title="페이지이동">
<option></option>
</select>
</li>
</ul>
</div>
<div id="fbContents2">
<ul>
<li><input type="text" size="10" title="검색어를 입력하세요" id="p_keyword" name="p_keyword" value="<%=v_keyword%>" style="height:14px;font-size:11px;border:1px solid #99A3FE;"></li>
<li style="padding-left:3px;"><input type="image" src="/content/ebook/skin2/img/btnSearch.gif" alt="검색" /></li>
<li style="padding-left:4px;"><a href="javascript:;" onclick="ebook_go1('/content/ebook/index.asp?eb_pk=<%=eb_pk%>');"><img src="/content/ebook/skin2/img/btnTotalview.gif" alt="전체보기" /></a></li>
<li style="padding-left:3px;"><img src="/content/ebook/skin2/img/btnDiv2.gif" width="6" height="22" border="0" class="div" alt="" /></li>
</ul>
</div>
</div>
<div id="fbContainer">
<div id="altmsg"><a class="altlink" href="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash">Download Adobe Flash Player.</a></div>
</div>
<%If eb_size = "max" then%>
<script LANGUAGE="JavaScript">
<!--
max();
//-->
</script>
<%End if%>
</body>
</html>
+44
View File
@@ -0,0 +1,44 @@
flippingBook.pages = [
"/data/ebook/ebook_1/page-001.jpg",
"/data/ebook/ebook_1/page-002.jpg",
"/data/ebook/ebook_1/page-003.jpg",
"/data/ebook/ebook_1/page-004.jpg"
];
flippingBook.contents = [
[ "목차", 1 ],
[ "2 페이지", 2 ],
[ "3 페이지", 3 ],
[ "4 페이지", 4 ]
];
// define custom book settings here
flippingBook.settings.bookWidth = 826;
flippingBook.settings.bookHeight = 584;
flippingBook.settings.pageBackgroundColor = 0xffffff; //페이지배경색상
flippingBook.settings.backgroundColor = 0xD5DDEE; //배경색상
flippingBook.settings.zoomUIColor = 0x959DEF; //스크롤색상
flippingBook.settings.useCustomCursors = true;
flippingBook.settings.dropShadowEnabled = false,
flippingBook.settings.zoomImageWidth = 992;
flippingBook.settings.zoomImageHeight = 1403;
flippingBook.settings.downloadURL = "";
flippingBook.settings.zoomPath = "/data/ebook/ebook_1/large/";
flippingBook.settings.backgroundImage = "img/bg.gif";
flippingBook.settings.flipSound = "sounds/02.mp3";
// default settings can be found in the flippingbook.js file
flippingBook.create();
function max() {
self.moveTo(0,0);
self.resizeTo(screen.availWidth,screen.availHeight);
}
+314
View File
@@ -0,0 +1,314 @@
function FlippingBook() {
this.pages = [];
this.zoomPages = [];
this.printPages = [];
this.contents = [];
this.stageWidth = "100%";
this.stageHeight = "100%";
this.settings = {
bookWidth: 640,
bookHeight: 480,
pagesSet: this.pages,
zoomPagesSet: this.zoomPages,
printPagesSet: this.printPages,
scaleContent: true,
preserveProportions: false,
centerContent: true,
hardcover: false,
hardcoverThickness: 3,
hardcoverEdgeColor: 0xFFFFFF,
highlightHardcover: true,
frameWidth: 0,
frameColor: 0xFFFFFF,
frameAlpha: 100,
firstPageNumber: 1,
autoFlipSize: 50,
navigationFlipOffset: 30,
flipOnClick: true,
handOverCorner: true,
handOverPage: true,
alwaysOpened: true, //항상 페이지오픈
staticShadowsType: "Symmetric", // Asymmetric, Symmetric, Default
staticShadowsDepth: 1,
staticShadowsLightColor: 0xFFFFFF, // works for "Symmetric" shadows only
staticShadowsDarkColor: 0x000000,
dynamicShadowsDepth: 1,
dynamicShadowsLightColor: 0xFFFFFF, // works for "dark" pages only
dynamicShadowsDarkColor: 0x000000,
moveSpeed: 2,
closeSpeed: 3,
gotoSpeed: 3,
rigidPageSpeed: 5,
flipSound: "",
hardcoverSound: "",
preloaderType: "Line", // "Progress Bar", "Round", "Thin", "Dots", "Gradient Wheel", "Gear Wheel", "Line", "Animated Book", "None"
pageBackgroundColor: 0x99CCFF,
loadOnDemand: true,
allowPagesUnload: true,
showUnderlyingPages: false,
playOnDemand: true,
freezeOnFlip: false,
darkPages: false,
smoothPages: false,
rigidPages: false,
flipCornerStyle: "first page only",// "first page only", "each page", "manually"
flipCornerPosition: "bottom-right",// "bottom-right","top-right","bottom-left","top-left"
flipCornerAmount: 50,
flipCornerAngle: 20,
flipCornerRelease: true,
flipCornerVibrate: true,
flipCornerPlaySound: false,
zoomEnabled: true,
zoomPath: "",
zoomImageWidth: 900,
zoomImageHeight: 1165,
zoomOnClick: true,
zoomUIColor: 0x8f9ea6,
zoomHint: "더블클릭하시면 확대/축소됩니다",
zoomHintEnabled: true,
centerBook: true,
useCustomCursors: true,
dropShadowEnabled: true,
dropShadowHideWhenFlipping: true,
backgroundColor: 0xFFFFFF,
backgroundImagePlacement: "fit", // "top left", "center", "fit"
printEnabled: true,
printTitle: "인쇄 페이지",
downloadURL: "",
downloadTitle: "다운로드 PDF",
downloadSize: "Size: 4.7 Mb",
downloadComplete: "Complete",
extXML: ""
};
this.containerId = "fbContainer";
this.forwardButtonId = "fbForwardButton";
this.backButtonId = "fbBackButton";
this.zoomButtonId = "fbZoomButton";
this.printButtonId = "fbPrintButton";
this.downloadButtonId = "fbDownloadButton";
this.currentPagesId = "fbCurrentPages";
this.totalPagesId = "fbTotalPages";
this.contentsMenuId = "fbContentsMenu";
};
FlippingBook.prototype.create = function(){
this.settings.pagesSet = this.pages;
this.settings.zoomPagesSet = this.zoomPages;
this.settings.printPagesSet = this.printPages;
if( location.hash.substr(1) != "" )
this.settings.firstPageNumber = location.hash.substr(1);
this.addLoadEvent( this.onWindowLoad );
swfobject.embedSWF("/content/ebook/skin2/ebook.swf", this.containerId, this.stageWidth, this.stageHeight, "8.0.0", "/content/ebook/skin2/js/expressInstall.swf", this.settings, {allowScriptAccess: "always", bgcolor: "#" + this.settings.backgroundColor.toString( 16 ) });
}
FlippingBook.prototype.getFlippingBookReference = function() {
return this.getObjectReference( this.containerId );
}
FlippingBook.prototype.getObjectReference = function( id ) {
return document.getElementById( id );
}
FlippingBook.prototype.flipForward = function() {
flippingBook.getFlippingBookReference().flipForward();
}
FlippingBook.prototype.flipBack = function() {
flippingBook.getFlippingBookReference().flipBack();
}
FlippingBook.prototype.zoomButtonClick = function() {
if( flippingBook.getFlippingBookReference().isZoomedIn() )
flippingBook.zoomOut();
else
flippingBook.zoomIn();
}
FlippingBook.prototype.zoomIn = function() {
this.getFlippingBookReference().zoomIn();
}
FlippingBook.prototype.zoomOut = function() {
this.getFlippingBookReference().zoomOut();
}
FlippingBook.prototype.print = function() {
flippingBook.getFlippingBookReference().print();
}
FlippingBook.prototype.downloadFile = function() {
if( flippingBook.settings.downloadURL )
flippingBook.getFlippingBookReference().downloadFile();
}
FlippingBook.prototype.onWindowLoad = function(){
var forwardButton = flippingBook.getObjectReference( flippingBook.forwardButtonId );
if( forwardButton ){
forwardButton.style.cursor = "pointer";
forwardButton.onclick = flippingBook.flipForward;
}
var backButton = flippingBook.getObjectReference( flippingBook.backButtonId );
if( backButton ){
backButton.style.cursor = "pointer";
backButton.onclick = flippingBook.flipBack;
}
var zoomButton = flippingBook.getObjectReference( flippingBook.zoomButtonId );
if( zoomButton ){
zoomButton.style.cursor = "pointer";
zoomButton.onclick = flippingBook.zoomButtonClick;
}
var printButton = flippingBook.getObjectReference( flippingBook.printButtonId );
if( printButton ){
printButton.style.cursor = "pointer";
printButton.onclick = flippingBook.print;
}
var downloadButton = flippingBook.getObjectReference( flippingBook.downloadButtonId );
if( downloadButton ){
downloadButton.style.cursor = "pointer";
downloadButton.onclick = flippingBook.downloadFile;
}
flippingBook.buildContentsMenu();
}
FlippingBook.prototype.onPutPage = function( leftPageNumber, rightPageNumber ){
this.updatePagination( leftPageNumber, rightPageNumber );
this.updateContentsMenu( leftPageNumber, rightPageNumber );
}
FlippingBook.prototype.updatePagination = function( leftPageNumber, rightPageNumber ){
var leftPageExists = ( leftPageNumber != undefined );
var rightPageExists = ( rightPageNumber != undefined );
var pageNumberString = leftPageNumber + "-" + rightPageNumber;
if( !leftPageExists )
pageNumberString = rightPageNumber;
if( !rightPageExists )
pageNumberString = leftPageNumber;
this.getObjectReference( this.currentPagesId ).innerHTML = pageNumberString;
this.getObjectReference( this.totalPagesId ).innerHTML = " / " + this.getFlippingBookReference().totalPages();
}
FlippingBook.prototype.buildContentsMenu = function(){
var contentsSelect = this.getObjectReference( this.contentsMenuId );
if( contentsSelect ){
for( var i = 0; i < this.contents.length; i++ )
contentsSelect.options[i] = new Option(this.contents[i][0], this.contents[i][1]);
contentsSelect.onchange = this.onContentsChange;
}
}
FlippingBook.prototype.onContentsChange = function(){
var contentsSelect = flippingBook.getObjectReference( flippingBook.contentsMenuId );
var pageNumber = contentsSelect.options[contentsSelect.selectedIndex].value;
if( pageNumber )
flippingBook.getFlippingBookReference().flipGotoPage( pageNumber );
}
FlippingBook.prototype.updateContentsMenu = function( leftPageNumber, rightPageNumber ){
var contentsSelect = flippingBook.getObjectReference( flippingBook.contentsMenuId );
if( contentsSelect ){
for( var i = 0; i < this.contents.length - 1; i++ ){
var minPage = contentsSelect.options[i].value;
var maxPage = contentsSelect.options[i+1].value;
var leftOK = false;
var rightOK = false;
if( leftPageNumber )
leftOK = ( Number( leftPageNumber ) >= minPage && Number( leftPageNumber ) <= maxPage );
else
leftOK = true;
if( rightPageNumber )
rightOK = ( Number( rightPageNumber ) >= minPage && Number( rightPageNumber ) <= maxPage );
else
rightOK = true;
if( leftOK && rightOK )
break;
}
contentsSelect.selectedIndex = i;
}
}
FlippingBook.prototype.getWindowHeight = function() {
var windowHeight = 0;
if (typeof(window.innerHeight) == 'number' ) {
windowHeight=window.innerHeight;
}
else {
if (document.documentElement && document.documentElement.clientHeight) {
windowHeight = document.documentElement.clientHeight;
}
else {
if (document.body&&document.body.clientHeight) {
windowHeight=document.body.clientHeight;
}
}
}
return windowHeight;
}
FlippingBook.prototype.addLoadEvent = function ( fn ) {
if (typeof window.addEventListener != "undefined") {
window.addEventListener("load", fn, false);
}
else if (typeof document.addEventListener != "undefined") {
document.addEventListener("load", fn, false);
}
else if (typeof window.attachEvent != "undefined") {
window.attachEvent("onload", fn);
}
else if (typeof window.onload == "function") {
var fnOld = window.onload;
window.onload = function() {
fnOld();
fn();
};
}
else {
window.onload = fn;
}
}
FlippingBook.prototype.handleWheel = function ( delta ){
this.getFlippingBookReference().onWheelScroll( delta );
}
flippingBook = new FlippingBook();
function wheel(event){
var delta = 0;
if (!event) event = window.event;
if (event.wheelDelta) {
delta = event.wheelDelta/120;
if (window.opera) delta = -delta;
} else if (event.detail) {
delta = -event.detail/3;
}
if (delta)
flippingBook.handleWheel(delta);
if (event.preventDefault)
event.preventDefault();
event.returnValue = false;
}
if (window.addEventListener)
window.addEventListener('DOMMouseScroll', wheel, false);
window.onmousewheel = document.onmousewheel = wheel;
Binary file not shown.
+70
View File
@@ -0,0 +1,70 @@
if( document.documentElement )
bodyStyle = document.documentElement.style;
else if( document.body )
bodyStyle = document.body.style;
bodyStyle.visibility = "hidden";
function sizeContent(){
var windowHeight = getWindowHeight();
var footerHeight = document.getElementById("fbFooter").offsetHeight;
var contentHeight = windowHeight - footerHeight;
document.getElementById("fbContainer").style.height = contentHeight + "px";
var altDiv = document.getElementById("altmsg");
if( altDiv ){
var altH = altDiv.offsetHeight;
var altW = altDiv.offsetWidth;
altDiv.style.top = (contentHeight / 2 - altH /2)+ "px";
altDiv.style.left = (getWindowWidth() / 2 - altW /2)+ "px";
}
if( bodyStyle )
bodyStyle.visibility = "visible";
}
function addEvent( obj, type, fn )
{
if (obj.addEventListener)
obj.addEventListener( type, fn, false );
else if (obj.attachEvent)
{
obj["e"+type+fn] = fn;
obj.attachEvent( "on"+type, function() { obj["e"+type+fn](); } );
}
}
function getWindowHeight() {
var windowHeight=0;
if ( typeof( window.innerHeight ) == 'number' ) {
windowHeight=window.innerHeight;
}
else {
if ( document.documentElement && document.documentElement.clientHeight) {
windowHeight = document.documentElement.clientHeight;
}
else {
if (document.body&&document.body.clientHeight) {
windowHeight=document.body.clientHeight;
}
}
}
return windowHeight;
};
function getWindowWidth() {
var ww = 0;
if (self.innerWidth)
ww = self.innerWidth;
else if (document.documentElement && document.documentElement.clientWidth)
ww = document.documentElement.clientWidth;
else if (document.body)
ww = document.body.clientWidth;
return ww;
}
addEvent( window, "load", sizeContent);
addEvent( window, "resize", sizeContent );
+731
View File
@@ -0,0 +1,731 @@
/*! SWFObject v2.1 <http://code.google.com/p/swfobject/>
Copyright (c) 2007-2008 Geoff Stearns, Michael Williams, and Bobby van der Sluis
This software is released under the MIT License <http://www.opensource.org/licenses/mit-license.php>
*/
var swfobject = function() {
var UNDEF = "undefined",
OBJECT = "object",
SHOCKWAVE_FLASH = "Shockwave Flash",
SHOCKWAVE_FLASH_AX = "ShockwaveFlash.ShockwaveFlash",
FLASH_MIME_TYPE = "application/x-shockwave-flash",
EXPRESS_INSTALL_ID = "SWFObjectExprInst",
win = window,
doc = document,
nav = navigator,
domLoadFnArr = [],
regObjArr = [],
objIdArr = [],
listenersArr = [],
script,
timer = null,
storedAltContent = null,
storedAltContentId = null,
isDomLoaded = false,
isExpressInstallActive = false;
/* Centralized function for browser feature detection
- Proprietary feature detection (conditional compiling) is used to detect Internet Explorer's features
- User agent string detection is only used when no alternative is possible
- Is executed directly for optimal performance
*/
var ua = function() {
var w3cdom = typeof doc.getElementById != UNDEF && typeof doc.getElementsByTagName != UNDEF && typeof doc.createElement != UNDEF,
playerVersion = [0,0,0],
d = null;
if (typeof nav.plugins != UNDEF && typeof nav.plugins[SHOCKWAVE_FLASH] == OBJECT) {
d = nav.plugins[SHOCKWAVE_FLASH].description;
if (d && !(typeof nav.mimeTypes != UNDEF && nav.mimeTypes[FLASH_MIME_TYPE] && !nav.mimeTypes[FLASH_MIME_TYPE].enabledPlugin)) { // navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin indicates whether plug-ins are enabled or disabled in Safari 3+
d = d.replace(/^.*\s+(\S+\s+\S+$)/, "$1");
playerVersion[0] = parseInt(d.replace(/^(.*)\..*$/, "$1"), 10);
playerVersion[1] = parseInt(d.replace(/^.*\.(.*)\s.*$/, "$1"), 10);
playerVersion[2] = /r/.test(d) ? parseInt(d.replace(/^.*r(.*)$/, "$1"), 10) : 0;
}
}
else if (typeof win.ActiveXObject != UNDEF) {
var a = null, fp6Crash = false;
try {
a = new ActiveXObject(SHOCKWAVE_FLASH_AX + ".7");
}
catch(e) {
try {
a = new ActiveXObject(SHOCKWAVE_FLASH_AX + ".6");
playerVersion = [6,0,21];
a.AllowScriptAccess = "always"; // Introduced in fp6.0.47
}
catch(e) {
if (playerVersion[0] == 6) {
fp6Crash = true;
}
}
if (!fp6Crash) {
try {
a = new ActiveXObject(SHOCKWAVE_FLASH_AX);
}
catch(e) {}
}
}
if (!fp6Crash && a) { // a will return null when ActiveX is disabled
try {
d = a.GetVariable("$version"); // Will crash fp6.0.21/23/29
if (d) {
d = d.split(" ")[1].split(",");
playerVersion = [parseInt(d[0], 10), parseInt(d[1], 10), parseInt(d[2], 10)];
}
}
catch(e) {}
}
}
var u = nav.userAgent.toLowerCase(),
p = nav.platform.toLowerCase(),
webkit = /webkit/.test(u) ? parseFloat(u.replace(/^.*webkit\/(\d+(\.\d+)?).*$/, "$1")) : false, // returns either the webkit version or false if not webkit
ie = false,
windows = p ? /win/.test(p) : /win/.test(u),
mac = p ? /mac/.test(p) : /mac/.test(u);
/*@cc_on
ie = true;
@if (@_win32)
windows = true;
@elif (@_mac)
mac = true;
@end
@*/
return { w3cdom:w3cdom, pv:playerVersion, webkit:webkit, ie:ie, win:windows, mac:mac };
}();
/* Cross-browser onDomLoad
- Based on Dean Edwards' solution: http://dean.edwards.name/weblog/2006/06/again/
- Will fire an event as soon as the DOM of a page is loaded (supported by Gecko based browsers - like Firefox -, IE, Opera9+, Safari)
*/
var onDomLoad = function() {
if (!ua.w3cdom) {
return;
}
addDomLoadEvent(main);
if (ua.ie && ua.win) {
try { // Avoid a possible Operation Aborted error
doc.write("<scr" + "ipt id=__ie_ondomload defer=true src=//:></scr" + "ipt>"); // String is split into pieces to avoid Norton AV to add code that can cause errors
script = getElementById("__ie_ondomload");
if (script) {
addListener(script, "onreadystatechange", checkReadyState);
}
}
catch(e) {}
}
if (ua.webkit && typeof doc.readyState != UNDEF) {
timer = setInterval(function() { if (/loaded|complete/.test(doc.readyState)) { callDomLoadFunctions(); }}, 10);
}
if (typeof doc.addEventListener != UNDEF) {
doc.addEventListener("DOMContentLoaded", callDomLoadFunctions, null);
}
addLoadEvent(callDomLoadFunctions);
}();
function checkReadyState() {
if (script.readyState == "complete") {
script.parentNode.removeChild(script);
callDomLoadFunctions();
}
}
function callDomLoadFunctions() {
if (isDomLoaded) {
return;
}
if (ua.ie && ua.win) { // Test if we can really add elements to the DOM; we don't want to fire it too early
var s = createElement("span");
try { // Avoid a possible Operation Aborted error
var t = doc.getElementsByTagName("body")[0].appendChild(s);
t.parentNode.removeChild(t);
}
catch (e) {
return;
}
}
isDomLoaded = true;
if (timer) {
clearInterval(timer);
timer = null;
}
var dl = domLoadFnArr.length;
for (var i = 0; i < dl; i++) {
domLoadFnArr[i]();
}
}
function addDomLoadEvent(fn) {
if (isDomLoaded) {
fn();
}
else {
domLoadFnArr[domLoadFnArr.length] = fn; // Array.push() is only available in IE5.5+
}
}
/* Cross-browser onload
- Based on James Edwards' solution: http://brothercake.com/site/resources/scripts/onload/
- Will fire an event as soon as a web page including all of its assets are loaded
*/
function addLoadEvent(fn) {
if (typeof win.addEventListener != UNDEF) {
win.addEventListener("load", fn, false);
}
else if (typeof doc.addEventListener != UNDEF) {
doc.addEventListener("load", fn, false);
}
else if (typeof win.attachEvent != UNDEF) {
addListener(win, "onload", fn);
}
else if (typeof win.onload == "function") {
var fnOld = win.onload;
win.onload = function() {
fnOld();
fn();
};
}
else {
win.onload = fn;
}
}
/* Main function
- Will preferably execute onDomLoad, otherwise onload (as a fallback)
*/
function main() { // Static publishing only
var rl = regObjArr.length;
for (var i = 0; i < rl; i++) { // For each registered object element
var id = regObjArr[i].id;
if (ua.pv[0] > 0) {
var obj = getElementById(id);
if (obj) {
regObjArr[i].width = obj.getAttribute("width") ? obj.getAttribute("width") : "0";
regObjArr[i].height = obj.getAttribute("height") ? obj.getAttribute("height") : "0";
if (hasPlayerVersion(regObjArr[i].swfVersion)) { // Flash plug-in version >= Flash content version: Houston, we have a match!
if (ua.webkit && ua.webkit < 312) { // Older webkit engines ignore the object element's nested param elements
fixParams(obj);
}
setVisibility(id, true);
}
else if (regObjArr[i].expressInstall && !isExpressInstallActive && hasPlayerVersion("6.0.65") && (ua.win || ua.mac)) { // Show the Adobe Express Install dialog if set by the web page author and if supported (fp6.0.65+ on Win/Mac OS only)
showExpressInstall(regObjArr[i]);
}
else { // Flash plug-in and Flash content version mismatch: display alternative content instead of Flash content
displayAltContent(obj);
}
}
}
else { // If no fp is installed, we let the object element do its job (show alternative content)
setVisibility(id, true);
}
}
}
/* Fix nested param elements, which are ignored by older webkit engines
- This includes Safari up to and including version 1.2.2 on Mac OS 10.3
- Fall back to the proprietary embed element
*/
function fixParams(obj) {
var nestedObj = obj.getElementsByTagName(OBJECT)[0];
if (nestedObj) {
var e = createElement("embed"), a = nestedObj.attributes;
if (a) {
var al = a.length;
for (var i = 0; i < al; i++) {
if (a[i].nodeName == "DATA") {
e.setAttribute("src", a[i].nodeValue);
}
else {
e.setAttribute(a[i].nodeName, a[i].nodeValue);
}
}
}
var c = nestedObj.childNodes;
if (c) {
var cl = c.length;
for (var j = 0; j < cl; j++) {
if (c[j].nodeType == 1 && c[j].nodeName == "PARAM") {
e.setAttribute(c[j].getAttribute("name"), c[j].getAttribute("value"));
}
}
}
obj.parentNode.replaceChild(e, obj);
}
}
/* Show the Adobe Express Install dialog
- Reference: http://www.adobe.com/cfusion/knowledgebase/index.cfm?id=6a253b75
*/
function showExpressInstall(regObj) {
isExpressInstallActive = true;
var obj = getElementById(regObj.id);
if (obj) {
if (regObj.altContentId) {
var ac = getElementById(regObj.altContentId);
if (ac) {
storedAltContent = ac;
storedAltContentId = regObj.altContentId;
}
}
else {
storedAltContent = abstractAltContent(obj);
}
if (!(/%$/.test(regObj.width)) && parseInt(regObj.width, 10) < 310) {
regObj.width = "310";
}
if (!(/%$/.test(regObj.height)) && parseInt(regObj.height, 10) < 137) {
regObj.height = "137";
}
doc.title = doc.title.slice(0, 47) + " - Flash Player Installation";
var pt = ua.ie && ua.win ? "ActiveX" : "PlugIn",
dt = doc.title,
fv = "MMredirectURL=" + win.location + "&MMplayerType=" + pt + "&MMdoctitle=" + dt,
replaceId = regObj.id;
// For IE when a SWF is loading (AND: not available in cache) wait for the onload event to fire to remove the original object element
// In IE you cannot properly cancel a loading SWF file without breaking browser load references, also obj.onreadystatechange doesn't work
if (ua.ie && ua.win && obj.readyState != 4) {
var newObj = createElement("div");
replaceId += "SWFObjectNew";
newObj.setAttribute("id", replaceId);
obj.parentNode.insertBefore(newObj, obj); // Insert placeholder div that will be replaced by the object element that loads expressinstall.swf
obj.style.display = "none";
var fn = function() {
obj.parentNode.removeChild(obj);
};
addListener(win, "onload", fn);
}
createSWF({ data:regObj.expressInstall, id:EXPRESS_INSTALL_ID, width:regObj.width, height:regObj.height }, { flashvars:fv }, replaceId);
}
}
/* Functions to abstract and display alternative content
*/
function displayAltContent(obj) {
if (ua.ie && ua.win && obj.readyState != 4) {
// For IE when a SWF is loading (AND: not available in cache) wait for the onload event to fire to remove the original object element
// In IE you cannot properly cancel a loading SWF file without breaking browser load references, also obj.onreadystatechange doesn't work
var el = createElement("div");
obj.parentNode.insertBefore(el, obj); // Insert placeholder div that will be replaced by the alternative content
el.parentNode.replaceChild(abstractAltContent(obj), el);
obj.style.display = "none";
var fn = function() {
obj.parentNode.removeChild(obj);
};
addListener(win, "onload", fn);
}
else {
obj.parentNode.replaceChild(abstractAltContent(obj), obj);
}
}
function abstractAltContent(obj) {
var ac = createElement("div");
if (ua.win && ua.ie) {
ac.innerHTML = obj.innerHTML;
}
else {
var nestedObj = obj.getElementsByTagName(OBJECT)[0];
if (nestedObj) {
var c = nestedObj.childNodes;
if (c) {
var cl = c.length;
for (var i = 0; i < cl; i++) {
if (!(c[i].nodeType == 1 && c[i].nodeName == "PARAM") && !(c[i].nodeType == 8)) {
ac.appendChild(c[i].cloneNode(true));
}
}
}
}
}
return ac;
}
/* Cross-browser dynamic SWF creation
*/
function createSWF(attObj, parObj, id) {
var r, el = getElementById(id);
if (el) {
if (typeof attObj.id == UNDEF) { // if no 'id' is defined for the object element, it will inherit the 'id' from the alternative content
attObj.id = id;
}
if (ua.ie && ua.win) { // IE, the object element and W3C DOM methods do not combine: fall back to outerHTML
var att = "";
for (var i in attObj) {
if (attObj[i] != Object.prototype[i]) { // Filter out prototype additions from other potential libraries, like Object.prototype.toJSONString = function() {}
if (i.toLowerCase() == "data") {
parObj.movie = attObj[i];
}
else if (i.toLowerCase() == "styleclass") { // 'class' is an ECMA4 reserved keyword
att += ' class="' + attObj[i] + '"';
}
else if (i.toLowerCase() != "classid") {
att += ' ' + i + '="' + attObj[i] + '"';
}
}
}
var par = "";
for (var j in parObj) {
if (parObj[j] != Object.prototype[j]) { // Filter out prototype additions from other potential libraries
par += '<param name="' + j + '" value="' + parObj[j] + '" />';
}
}
el.outerHTML = '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"' + att + '>' + par + '</object>';
objIdArr[objIdArr.length] = attObj.id; // Stored to fix object 'leaks' on unload (dynamic publishing only)
r = getElementById(attObj.id);
}
else if (ua.webkit && ua.webkit < 312) { // Older webkit engines ignore the object element's nested param elements: fall back to the proprietary embed element
var e = createElement("embed");
e.setAttribute("type", FLASH_MIME_TYPE);
for (var k in attObj) {
if (attObj[k] != Object.prototype[k]) { // Filter out prototype additions from other potential libraries
if (k.toLowerCase() == "data") {
e.setAttribute("src", attObj[k]);
}
else if (k.toLowerCase() == "styleclass") { // 'class' is an ECMA4 reserved keyword
e.setAttribute("class", attObj[k]);
}
else if (k.toLowerCase() != "classid") { // Filter out IE specific attribute
e.setAttribute(k, attObj[k]);
}
}
}
for (var l in parObj) {
if (parObj[l] != Object.prototype[l]) { // Filter out prototype additions from other potential libraries
if (l.toLowerCase() != "movie") { // Filter out IE specific param element
e.setAttribute(l, parObj[l]);
}
}
}
el.parentNode.replaceChild(e, el);
r = e;
}
else { // Well-behaving browsers
var o = createElement(OBJECT);
o.setAttribute("type", FLASH_MIME_TYPE);
for (var m in attObj) {
if (attObj[m] != Object.prototype[m]) { // Filter out prototype additions from other potential libraries
if (m.toLowerCase() == "styleclass") { // 'class' is an ECMA4 reserved keyword
o.setAttribute("class", attObj[m]);
}
else if (m.toLowerCase() != "classid") { // Filter out IE specific attribute
o.setAttribute(m, attObj[m]);
}
}
}
for (var n in parObj) {
if (parObj[n] != Object.prototype[n] && n.toLowerCase() != "movie") { // Filter out prototype additions from other potential libraries and IE specific param element
createObjParam(o, n, parObj[n]);
}
}
el.parentNode.replaceChild(o, el);
r = o;
}
}
return r;
}
function createObjParam(el, pName, pValue) {
var p = createElement("param");
p.setAttribute("name", pName);
p.setAttribute("value", pValue);
el.appendChild(p);
}
/* Cross-browser SWF removal
- Especially needed to safely and completely remove a SWF in Internet Explorer
*/
function removeSWF(id) {
var obj = getElementById(id);
if (obj && (obj.nodeName == "OBJECT" || obj.nodeName == "EMBED")) {
if (ua.ie && ua.win) {
if (obj.readyState == 4) {
removeObjectInIE(id);
}
else {
win.attachEvent("onload", function() {
removeObjectInIE(id);
});
}
}
else {
obj.parentNode.removeChild(obj);
}
}
}
function removeObjectInIE(id) {
var obj = getElementById(id);
if (obj) {
for (var i in obj) {
if (typeof obj[i] == "function") {
obj[i] = null;
}
}
obj.parentNode.removeChild(obj);
}
}
/* Functions to optimize JavaScript compression
*/
function getElementById(id) {
var el = null;
try {
el = doc.getElementById(id);
}
catch (e) {}
return el;
}
function createElement(el) {
return doc.createElement(el);
}
/* Updated attachEvent function for Internet Explorer
- Stores attachEvent information in an Array, so on unload the detachEvent functions can be called to avoid memory leaks
*/
function addListener(target, eventType, fn) {
target.attachEvent(eventType, fn);
listenersArr[listenersArr.length] = [target, eventType, fn];
}
/* Flash Player and SWF content version matching
*/
function hasPlayerVersion(rv) {
var pv = ua.pv, v = rv.split(".");
v[0] = parseInt(v[0], 10);
v[1] = parseInt(v[1], 10) || 0; // supports short notation, e.g. "9" instead of "9.0.0"
v[2] = parseInt(v[2], 10) || 0;
return (pv[0] > v[0] || (pv[0] == v[0] && pv[1] > v[1]) || (pv[0] == v[0] && pv[1] == v[1] && pv[2] >= v[2])) ? true : false;
}
/* Cross-browser dynamic CSS creation
- Based on Bobby van der Sluis' solution: http://www.bobbyvandersluis.com/articles/dynamicCSS.php
*/
function createCSS(sel, decl) {
if (ua.ie && ua.mac) {
return;
}
var h = doc.getElementsByTagName("head")[0], s = createElement("style");
s.setAttribute("type", "text/css");
s.setAttribute("media", "screen");
if (!(ua.ie && ua.win) && typeof doc.createTextNode != UNDEF) {
s.appendChild(doc.createTextNode(sel + " {" + decl + "}"));
}
h.appendChild(s);
if (ua.ie && ua.win && typeof doc.styleSheets != UNDEF && doc.styleSheets.length > 0) {
var ls = doc.styleSheets[doc.styleSheets.length - 1];
if (typeof ls.addRule == OBJECT) {
ls.addRule(sel, decl);
}
}
}
function setVisibility(id, isVisible) {
var v = isVisible ? "visible" : "hidden";
if (isDomLoaded && getElementById(id)) {
getElementById(id).style.visibility = v;
}
else {
createCSS("#" + id, "visibility:" + v);
}
}
/* Filter to avoid XSS attacks
*/
function urlEncodeIfNecessary(s) {
var regex = /[\\\"<>\.;]/;
var hasBadChars = regex.exec(s) != null;
return hasBadChars ? encodeURIComponent(s) : s;
}
/* Release memory to avoid memory leaks caused by closures, fix hanging audio/video threads and force open sockets/NetConnections to disconnect (Internet Explorer only)
*/
var cleanup = function() {
if (ua.ie && ua.win) {
window.attachEvent("onunload", function() {
// remove listeners to avoid memory leaks
var ll = listenersArr.length;
for (var i = 0; i < ll; i++) {
listenersArr[i][0].detachEvent(listenersArr[i][1], listenersArr[i][2]);
}
// cleanup dynamically embedded objects to fix audio/video threads and force open sockets and NetConnections to disconnect
var il = objIdArr.length;
for (var j = 0; j < il; j++) {
removeSWF(objIdArr[j]);
}
// cleanup library's main closures to avoid memory leaks
for (var k in ua) {
ua[k] = null;
}
ua = null;
for (var l in swfobject) {
swfobject[l] = null;
}
swfobject = null;
});
}
}();
return {
/* Public API
- Reference: http://code.google.com/p/swfobject/wiki/SWFObject_2_0_documentation
*/
registerObject: function(objectIdStr, swfVersionStr, xiSwfUrlStr) {
if (!ua.w3cdom || !objectIdStr || !swfVersionStr) {
return;
}
var regObj = {};
regObj.id = objectIdStr;
regObj.swfVersion = swfVersionStr;
regObj.expressInstall = xiSwfUrlStr ? xiSwfUrlStr : false;
regObjArr[regObjArr.length] = regObj;
setVisibility(objectIdStr, false);
},
getObjectById: function(objectIdStr) {
var r = null;
if (ua.w3cdom) {
var o = getElementById(objectIdStr);
if (o) {
var n = o.getElementsByTagName(OBJECT)[0];
if (!n || (n && typeof o.SetVariable != UNDEF)) {
r = o;
}
else if (typeof n.SetVariable != UNDEF) {
r = n;
}
}
}
return r;
},
embedSWF: function(swfUrlStr, replaceElemIdStr, widthStr, heightStr, swfVersionStr, xiSwfUrlStr, flashvarsObj, parObj, attObj) {
if (!ua.w3cdom || !swfUrlStr || !replaceElemIdStr || !widthStr || !heightStr || !swfVersionStr) {
return;
}
widthStr += ""; // Auto-convert to string
heightStr += "";
if (hasPlayerVersion(swfVersionStr)) {
setVisibility(replaceElemIdStr, false);
var att = {};
if (attObj && typeof attObj === OBJECT) {
for (var i in attObj) {
if (attObj[i] != Object.prototype[i]) { // Filter out prototype additions from other potential libraries
att[i] = attObj[i];
}
}
}
att.data = swfUrlStr;
att.width = widthStr;
att.height = heightStr;
var par = {};
if (parObj && typeof parObj === OBJECT) {
for (var j in parObj) {
if (parObj[j] != Object.prototype[j]) { // Filter out prototype additions from other potential libraries
par[j] = parObj[j];
}
}
}
if (flashvarsObj && typeof flashvarsObj === OBJECT) {
for (var k in flashvarsObj) {
if (flashvarsObj[k] != Object.prototype[k]) { // Filter out prototype additions from other potential libraries
if (typeof par.flashvars != UNDEF) {
par.flashvars += "&" + k + "=" + flashvarsObj[k];
}
else {
par.flashvars = k + "=" + flashvarsObj[k];
}
}
}
}
addDomLoadEvent(function() {
createSWF(att, par, replaceElemIdStr);
if (att.id == replaceElemIdStr) {
setVisibility(replaceElemIdStr, true);
}
});
}
else if (xiSwfUrlStr && !isExpressInstallActive && hasPlayerVersion("6.0.65") && (ua.win || ua.mac)) {
isExpressInstallActive = true; // deferred execution
setVisibility(replaceElemIdStr, false);
addDomLoadEvent(function() {
var regObj = {};
regObj.id = regObj.altContentId = replaceElemIdStr;
regObj.width = widthStr;
regObj.height = heightStr;
regObj.expressInstall = xiSwfUrlStr;
showExpressInstall(regObj);
});
}
},
getFlashPlayerVersion: function() {
return { major:ua.pv[0], minor:ua.pv[1], release:ua.pv[2] };
},
hasFlashPlayerVersion: hasPlayerVersion,
createSWF: function(attObj, parObj, replaceElemIdStr) {
if (ua.w3cdom) {
return createSWF(attObj, parObj, replaceElemIdStr);
}
else {
return undefined;
}
},
removeSWF: function(objElemIdStr) {
if (ua.w3cdom) {
removeSWF(objElemIdStr);
}
},
createCSS: function(sel, decl) {
if (ua.w3cdom) {
createCSS(sel, decl);
}
},
addDomLoadEvent: addDomLoadEvent,
addLoadEvent: addLoadEvent,
getQueryParamValue: function(param) {
var q = doc.location.search || doc.location.hash;
if (param == null) {
return urlEncodeIfNecessary(q);
}
if (q) {
var pairs = q.substring(1).split("&");
for (var i = 0; i < pairs.length; i++) {
if (pairs[i].substring(0, pairs[i].indexOf("=")) == param) {
return urlEncodeIfNecessary(pairs[i].substring((pairs[i].indexOf("=") + 1)));
}
}
}
return "";
},
// For internal usage only
expressInstallCallback: function() {
if (isExpressInstallActive && storedAltContent) {
var obj = getElementById(EXPRESS_INSTALL_ID);
if (obj) {
obj.parentNode.replaceChild(storedAltContent, obj);
if (storedAltContentId) {
setVisibility(storedAltContentId, true);
if (ua.ie && ua.win) {
storedAltContent.style.display = "block";
}
}
storedAltContent = null;
storedAltContentId = null;
isExpressInstallActive = false;
}
}
}
};
}();
Binary file not shown.
Binary file not shown.
Binary file not shown.
+142
View File
@@ -0,0 +1,142 @@
@charset "utf-8";
html, body{
padding: 0px;
margin: 0px;
font-family: gulim, Arial, Helvetica, sans-serif;
font-size: 11px;
color: #FFFFFF;
}
ul,li,img{margin:0;padding:0;border:0;list-style:none;}
ol, ul, li {
list-style-image:none;
list-style-position:outside;
list-style-type:none;
}
select{font-size: 12px;}
#fbFooter {
height: 54px;
background-color: #000000;
background-image: url('../img/footerBackground.gif');
background-repeat: repeat-x;
}
.fbPaginationMinor {
color: #FFFFFF;
letter-spacing:-1px;
font-weight:bold;
}
.fbPaginationMinor2 {
color: #FFFFFF;
font-weight:bold;
margin-right: 10px;
margin-left:5px;
}
#fbCurrentPages{
font-weight:bold;
}
#fbContents {
float: right;
margin-top: 11px;
}
#fbContents li {float:left;}
#fbContents2 {
float: right;
margin-top: 14px;
margin-right: 4px;
}
#fbContents2 li {float:left;}
#fbContentsMenu {
margin-top:3px;
margin-right: 10px;
}
#fbMenu {
float: right;
margin-top: 7px;
margin-right: 10px;
}
#logo {
float: left;
}
#content_move {
float: left;
margin-left:10px;
margin-top:12px;
}
#content_move select {
background-color:#632719;
color:#ffffff;
font-weight: bold;
}
.div {
padding-left:4px;
padding-right:4px;
}
#altmsg {
position: absolute;
background-color:#000000;
width:100%;j
padding:50px 0 50px 0;
opacity: 0.5;
filter: alpha(opacity=50);
text-align:center;
}
#altmsg:hover {
opacity: 0.8;
filter: alpha(opacity=80);
}
a.altlink:link {
color: #FFFFFF;
}
a.altlink:visited {
color: #DDDDDD;
}
a.altlink:hover{
color: #FFFFFF;
}
#helpTop {
width:100%;
height: 39px;
background-color: #F1F1F1;
background-image: url('../img/help_titbg.gif');
}
#helpleft {
float:left;
padding:8px;
}
#helpright {
float:right;
}
#helpCon {
text-align:center;
padding:14px;
}
#helpCon li {
padding-bottom:14px;
}
Binary file not shown.
+33
View File
@@ -0,0 +1,33 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>이용방법</title>
<link href="css/common.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="helpTop">
<div id="helpleft"><img src="img/help_tit.gif" width="58" height="21" alt="이용방법" /></div>
<div id="helpright"><img src="img/help_close.gif" width="30" height="39" alt="창닫기" onclick="window.close();" style="cursor:pointer;" /></div>
</div>
<div id="helpCon">
<ul>
<li><img src="img/help_con1.gif" width="334" height="116" alt="화면 확대/축소
마우스 왼쪽 버튼을 더블클릭하면 확대 및 축소 됩니다." /></li>
<li><img src="img/help_con2.gif" width="334" height="116" alt="페이지이동
페이지의 우측하단을 클릭 또는 드래그하시면 다음페이지로 이동 됩니다.
페이지의 좌측하단을 클릭 또는 드래그하시면 이전페이지로 이동 됩니다." /></li>
<li><img src="img/help_con3.gif" width="334" height="116" alt="페이지 확대시 화면 이동
페이지 확대시 드래그 또는 상하좌우 스크롤 버튼을 이용하면 이동 됩니다." /></li>
<li><img src="img/help_con4.gif" width="334" height="122" alt="다른 이북이동, 페이지바로이동, 이전페이지, 다음페이지, 확대/축소, 인쇄" /></li>
</ul>
</div>
</body>
</html>
Binary file not shown.

After

Width:  |  Height:  |  Size: 981 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 83 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 79 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 768 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 666 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 77 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 893 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 684 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 303 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.7 KiB

+180
View File
@@ -0,0 +1,180 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title></title>
<link href="/content/ebook/skin3/css/common.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="/content/ebook/skin3/js/liquid.js"></script>
<script type="text/javascript" src="/content/ebook/skin3/js/swfobject.js"></script>
<script type="text/javascript" src="/content/ebook/skin3/js/ebook.js"></script>
<script type="text/javascript">
<!--
flippingBook.pages = [
<%=flippingBook_pages%>
];
flippingBook.contents = [
<%=flippingBook_contents%>
];
flippingBook.settings.bookWidth = 840;
flippingBook.settings.bookHeight = 594;
flippingBook.settings.pageBackgroundColor = 0xffffff; //페이지배경색상
flippingBook.settings.backgroundColor = 0xDDD3C5; //배경색상
flippingBook.settings.zoomUIColor = 0xC7A097; //스크롤색상
flippingBook.settings.useCustomCursors = true;
flippingBook.settings.dropShadowEnabled = false,
flippingBook.settings.zoomImageWidth = 880;
flippingBook.settings.zoomImageHeight = 1245;
flippingBook.settings.downloadURL = "";
flippingBook.settings.zoomPath = "/data/ebook/<%=eb_pk%>/";
flippingBook.settings.backgroundImage = "/content/ebook/skin3/img/bg.gif";
flippingBook.settings.flipSound = "/content/ebook/skin3/sounds/03.mp3";
flippingBook.settings.staticShadowsDepth = "<%=eb_viewtype%>";
flippingBook.create();
function ebook_size() {
is_size = document.getElementById('frm_sch').is_size.value;
if(is_size == "max"){//1024
min();
}else if(is_size == "min"){
max();
}
}
function max() {
document.getElementById('frm_sch').is_size.value = "max";
self.moveTo(0,0);
self.resizeTo(screen.availWidth,screen.availHeight);
}
function min() {
document.getElementById('frm_sch').is_size.value = "min";
self.moveTo(0,0);
self.resizeTo(1024,768);
}
function go_ebook_url(eb_pk){
document.location.href="/content/ebook/index.asp?eb_pk="+eb_pk;
}
function ebook_go1(url){
location.href = url;
}
//-->
</script>
</head>
<body>
<form id="frm_sch" action="/content/ebook/index.asp?eb_pk=<%=eb_pk%>" method="post">
<div>
<input type="hidden" name="is_size" value="<%=SESSION("is_size")%>" />
</div>
<div id="fbFooter">
<div id="logo">
<%If eb_logoimg <> "" then%>
<img src="/data/ebook/logo/<%=eb_logoimg%>" alt="" />
<%End if%>
</div>
<div id="content_move">
<select onchange = "go_ebook_url(this.value);">
<%
R_Fields_code = "eb_subject, eb_pk"
SQL = "Select "&R_Fields_code&" FROM ebook WHERE eb_chk = 'Y' ORDER BY eb_code ASC"
Set Rs = Dbcon.Execute (SQL)
Do While Not rs.eof
eb_pk_str = rs("eb_pk")
eb_subject = rs("eb_subject")
%>
<option value="<%=eb_pk_str%>" <%=chkSelect(eb_pk, eb_pk_str)%>><%=eb_subject%></option>
<%
rs.movenext
Loop
rs.close : Set rs = Nothing
Dbcon.close : Set Dbcon = nothing
%>
</select>
</div>
<div id="fbMenu">
<img src="/content/ebook/skin3/img/btnPrevious.gif" width="31" height="33" border="0" id="fbBackButton" alt="이전페이지" /><img src="/content/ebook/skin3/img/btnNext.gif" width="31" height="33" border="0" id="fbForwardButton" alt="다음페이지" />
<img src="/content/ebook/skin3/img/btnDiv.gif" width="6" height="32" border="0" class="div" alt="" />
<img src="/content/ebook/skin3/img/btnZoom.gif" width="77" height="33" border="0" id="fbZoomButton" alt="확대/축소" /><img src="/content/ebook/skin3/img/btnPrint.gif" width="53" height="33" border="0" id="fbPrintButton" alt="인쇄" /><img src="/content/ebook/skin3/img/btnHelp.gif" width="73" height="33" border="0" id="fbHelpButton" alt="이용방법" onclick="window.open('/content/ebook/skin3/help.html','help','width=392,height=593');" style="cursor:pointer;" />
<img src="/content/ebook/skin3/img/btnDiv.gif" width="6" height="32" border="0" class="div" alt="" />
<img src="/content/ebook/skin3/img/btnMax.gif" width="21" height="33" border="0" alt="최대화" onclick="ebook_size();" style="cursor:pointer;" /><img src="/content/ebook/skin3/img/btnClose.gif" width="21" height="33" border="0" alt="닫기" onclick="window.close();" style="cursor:pointer;" />
</div>
<div id="fbContents">
<ul>
<li style="padding-top:8px;"><span class="fbPaginationMinor">P</span></li>
<li style="padding-top:8px;"><span id="fbCurrentPages">1</span></li>
<li style="padding-top:8px;"><span id="fbTotalPages" class="fbPaginationMinor2"></span></li>
<li>
<select id="fbContentsMenu" name="fbContentsMenu" title="페이지이동">
<option></option>
</select>
</li>
</ul>
</div>
<div id="fbContents2">
<ul>
<li><input type="text" size="10" title="검색어를 입력하세요" id="p_keyword" name="p_keyword" value="<%=v_keyword%>" style="height:14px;font-size:11px;border:1px solid #E6CBC0;"></li>
<li style="padding-left:3px;"><input type="image" src="/content/ebook/skin3/img/btnSearch.gif" alt="검색" /></li>
<li style="padding-left:4px;"><a href="javascript:;" onclick="ebook_go1('/content/ebook/index.asp?eb_pk=<%=eb_pk%>');"><img src="/content/ebook/skin3/img/btnTotalview.gif" alt="전체보기" /></a></li>
<li style="padding-left:5px;"><img src="/content/ebook/skin3/img/btnDiv2.gif" width="7" height="22" border="0" class="div" alt="" /></li>
</ul>
</div>
</div>
<div id="fbContainer">
<div id="altmsg"><a class="altlink" href="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash">Download Adobe Flash Player.</a></div>
</div>
<%If eb_size = "max" then%>
<script LANGUAGE="JavaScript">
<!--
max();
//-->
</script>
<%End if%>
</body>
</html>
+44
View File
@@ -0,0 +1,44 @@
flippingBook.pages = [
"/data/ebook/ebook_1/page-001.jpg",
"/data/ebook/ebook_1/page-002.jpg",
"/data/ebook/ebook_1/page-003.jpg",
"/data/ebook/ebook_1/page-004.jpg"
];
flippingBook.contents = [
[ "목차", 1 ],
[ "2 페이지", 2 ],
[ "3 페이지", 3 ],
[ "4 페이지", 4 ]
];
// define custom book settings here
flippingBook.settings.bookWidth = 826;
flippingBook.settings.bookHeight = 584;
flippingBook.settings.pageBackgroundColor = 0xffffff; //페이지배경색상
flippingBook.settings.backgroundColor = 0xDDD3C5; //배경색상
flippingBook.settings.zoomUIColor = 0xC7A097; //스크롤색상
flippingBook.settings.useCustomCursors = true;
flippingBook.settings.dropShadowEnabled = false,
flippingBook.settings.zoomImageWidth = 992;
flippingBook.settings.zoomImageHeight = 1403;
flippingBook.settings.downloadURL = "";
flippingBook.settings.zoomPath = "/data/ebook/ebook_1/large/";
flippingBook.settings.backgroundImage = "img/bg.gif";
flippingBook.settings.flipSound = "sounds/03.mp3";
// default settings can be found in the flippingbook.js file
flippingBook.create();
function max() {
self.moveTo(0,0);
self.resizeTo(screen.availWidth,screen.availHeight);
}
+314
View File
@@ -0,0 +1,314 @@
function FlippingBook() {
this.pages = [];
this.zoomPages = [];
this.printPages = [];
this.contents = [];
this.stageWidth = "100%";
this.stageHeight = "100%";
this.settings = {
bookWidth: 640,
bookHeight: 480,
pagesSet: this.pages,
zoomPagesSet: this.zoomPages,
printPagesSet: this.printPages,
scaleContent: true,
preserveProportions: false,
centerContent: true,
hardcover: false,
hardcoverThickness: 3,
hardcoverEdgeColor: 0xFFFFFF,
highlightHardcover: true,
frameWidth: 0,
frameColor: 0xFFFFFF,
frameAlpha: 100,
firstPageNumber: 1,
autoFlipSize: 50,
navigationFlipOffset: 30,
flipOnClick: true,
handOverCorner: true,
handOverPage: true,
alwaysOpened: true, //항상 페이지오픈
staticShadowsType: "Symmetric", // Asymmetric, Symmetric, Default
staticShadowsDepth: 1,
staticShadowsLightColor: 0xFFFFFF, // works for "Symmetric" shadows only
staticShadowsDarkColor: 0x000000,
dynamicShadowsDepth: 1,
dynamicShadowsLightColor: 0xFFFFFF, // works for "dark" pages only
dynamicShadowsDarkColor: 0x000000,
moveSpeed: 2,
closeSpeed: 3,
gotoSpeed: 3,
rigidPageSpeed: 5,
flipSound: "",
hardcoverSound: "",
preloaderType: "Line", // "Progress Bar", "Round", "Thin", "Dots", "Gradient Wheel", "Gear Wheel", "Line", "Animated Book", "None"
pageBackgroundColor: 0x99CCFF,
loadOnDemand: true,
allowPagesUnload: true,
showUnderlyingPages: false,
playOnDemand: true,
freezeOnFlip: false,
darkPages: false,
smoothPages: false,
rigidPages: false,
flipCornerStyle: "first page only",// "first page only", "each page", "manually"
flipCornerPosition: "bottom-right",// "bottom-right","top-right","bottom-left","top-left"
flipCornerAmount: 50,
flipCornerAngle: 20,
flipCornerRelease: true,
flipCornerVibrate: true,
flipCornerPlaySound: false,
zoomEnabled: true,
zoomPath: "",
zoomImageWidth: 900,
zoomImageHeight: 1165,
zoomOnClick: true,
zoomUIColor: 0x8f9ea6,
zoomHint: "더블클릭하시면 확대/축소됩니다",
zoomHintEnabled: true,
centerBook: true,
useCustomCursors: true,
dropShadowEnabled: true,
dropShadowHideWhenFlipping: true,
backgroundColor: 0xFFFFFF,
backgroundImagePlacement: "fit", // "top left", "center", "fit"
printEnabled: true,
printTitle: "인쇄 페이지",
downloadURL: "",
downloadTitle: "다운로드 PDF",
downloadSize: "Size: 4.7 Mb",
downloadComplete: "Complete",
extXML: ""
};
this.containerId = "fbContainer";
this.forwardButtonId = "fbForwardButton";
this.backButtonId = "fbBackButton";
this.zoomButtonId = "fbZoomButton";
this.printButtonId = "fbPrintButton";
this.downloadButtonId = "fbDownloadButton";
this.currentPagesId = "fbCurrentPages";
this.totalPagesId = "fbTotalPages";
this.contentsMenuId = "fbContentsMenu";
};
FlippingBook.prototype.create = function(){
this.settings.pagesSet = this.pages;
this.settings.zoomPagesSet = this.zoomPages;
this.settings.printPagesSet = this.printPages;
if( location.hash.substr(1) != "" )
this.settings.firstPageNumber = location.hash.substr(1);
this.addLoadEvent( this.onWindowLoad );
swfobject.embedSWF("/content/ebook/skin3/ebook.swf", this.containerId, this.stageWidth, this.stageHeight, "8.0.0", "/content/ebook/skin3/js/expressInstall.swf", this.settings, {allowScriptAccess: "always", bgcolor: "#" + this.settings.backgroundColor.toString( 16 ) });
}
FlippingBook.prototype.getFlippingBookReference = function() {
return this.getObjectReference( this.containerId );
}
FlippingBook.prototype.getObjectReference = function( id ) {
return document.getElementById( id );
}
FlippingBook.prototype.flipForward = function() {
flippingBook.getFlippingBookReference().flipForward();
}
FlippingBook.prototype.flipBack = function() {
flippingBook.getFlippingBookReference().flipBack();
}
FlippingBook.prototype.zoomButtonClick = function() {
if( flippingBook.getFlippingBookReference().isZoomedIn() )
flippingBook.zoomOut();
else
flippingBook.zoomIn();
}
FlippingBook.prototype.zoomIn = function() {
this.getFlippingBookReference().zoomIn();
}
FlippingBook.prototype.zoomOut = function() {
this.getFlippingBookReference().zoomOut();
}
FlippingBook.prototype.print = function() {
flippingBook.getFlippingBookReference().print();
}
FlippingBook.prototype.downloadFile = function() {
if( flippingBook.settings.downloadURL )
flippingBook.getFlippingBookReference().downloadFile();
}
FlippingBook.prototype.onWindowLoad = function(){
var forwardButton = flippingBook.getObjectReference( flippingBook.forwardButtonId );
if( forwardButton ){
forwardButton.style.cursor = "pointer";
forwardButton.onclick = flippingBook.flipForward;
}
var backButton = flippingBook.getObjectReference( flippingBook.backButtonId );
if( backButton ){
backButton.style.cursor = "pointer";
backButton.onclick = flippingBook.flipBack;
}
var zoomButton = flippingBook.getObjectReference( flippingBook.zoomButtonId );
if( zoomButton ){
zoomButton.style.cursor = "pointer";
zoomButton.onclick = flippingBook.zoomButtonClick;
}
var printButton = flippingBook.getObjectReference( flippingBook.printButtonId );
if( printButton ){
printButton.style.cursor = "pointer";
printButton.onclick = flippingBook.print;
}
var downloadButton = flippingBook.getObjectReference( flippingBook.downloadButtonId );
if( downloadButton ){
downloadButton.style.cursor = "pointer";
downloadButton.onclick = flippingBook.downloadFile;
}
flippingBook.buildContentsMenu();
}
FlippingBook.prototype.onPutPage = function( leftPageNumber, rightPageNumber ){
this.updatePagination( leftPageNumber, rightPageNumber );
this.updateContentsMenu( leftPageNumber, rightPageNumber );
}
FlippingBook.prototype.updatePagination = function( leftPageNumber, rightPageNumber ){
var leftPageExists = ( leftPageNumber != undefined );
var rightPageExists = ( rightPageNumber != undefined );
var pageNumberString = leftPageNumber + "-" + rightPageNumber;
if( !leftPageExists )
pageNumberString = rightPageNumber;
if( !rightPageExists )
pageNumberString = leftPageNumber;
this.getObjectReference( this.currentPagesId ).innerHTML = pageNumberString;
this.getObjectReference( this.totalPagesId ).innerHTML = " / " + this.getFlippingBookReference().totalPages();
}
FlippingBook.prototype.buildContentsMenu = function(){
var contentsSelect = this.getObjectReference( this.contentsMenuId );
if( contentsSelect ){
for( var i = 0; i < this.contents.length; i++ )
contentsSelect.options[i] = new Option(this.contents[i][0], this.contents[i][1]);
contentsSelect.onchange = this.onContentsChange;
}
}
FlippingBook.prototype.onContentsChange = function(){
var contentsSelect = flippingBook.getObjectReference( flippingBook.contentsMenuId );
var pageNumber = contentsSelect.options[contentsSelect.selectedIndex].value;
if( pageNumber )
flippingBook.getFlippingBookReference().flipGotoPage( pageNumber );
}
FlippingBook.prototype.updateContentsMenu = function( leftPageNumber, rightPageNumber ){
var contentsSelect = flippingBook.getObjectReference( flippingBook.contentsMenuId );
if( contentsSelect ){
for( var i = 0; i < this.contents.length - 1; i++ ){
var minPage = contentsSelect.options[i].value;
var maxPage = contentsSelect.options[i+1].value;
var leftOK = false;
var rightOK = false;
if( leftPageNumber )
leftOK = ( Number( leftPageNumber ) >= minPage && Number( leftPageNumber ) <= maxPage );
else
leftOK = true;
if( rightPageNumber )
rightOK = ( Number( rightPageNumber ) >= minPage && Number( rightPageNumber ) <= maxPage );
else
rightOK = true;
if( leftOK && rightOK )
break;
}
contentsSelect.selectedIndex = i;
}
}
FlippingBook.prototype.getWindowHeight = function() {
var windowHeight = 0;
if (typeof(window.innerHeight) == 'number' ) {
windowHeight=window.innerHeight;
}
else {
if (document.documentElement && document.documentElement.clientHeight) {
windowHeight = document.documentElement.clientHeight;
}
else {
if (document.body&&document.body.clientHeight) {
windowHeight=document.body.clientHeight;
}
}
}
return windowHeight;
}
FlippingBook.prototype.addLoadEvent = function ( fn ) {
if (typeof window.addEventListener != "undefined") {
window.addEventListener("load", fn, false);
}
else if (typeof document.addEventListener != "undefined") {
document.addEventListener("load", fn, false);
}
else if (typeof window.attachEvent != "undefined") {
window.attachEvent("onload", fn);
}
else if (typeof window.onload == "function") {
var fnOld = window.onload;
window.onload = function() {
fnOld();
fn();
};
}
else {
window.onload = fn;
}
}
FlippingBook.prototype.handleWheel = function ( delta ){
this.getFlippingBookReference().onWheelScroll( delta );
}
flippingBook = new FlippingBook();
function wheel(event){
var delta = 0;
if (!event) event = window.event;
if (event.wheelDelta) {
delta = event.wheelDelta/120;
if (window.opera) delta = -delta;
} else if (event.detail) {
delta = -event.detail/3;
}
if (delta)
flippingBook.handleWheel(delta);
if (event.preventDefault)
event.preventDefault();
event.returnValue = false;
}
if (window.addEventListener)
window.addEventListener('DOMMouseScroll', wheel, false);
window.onmousewheel = document.onmousewheel = wheel;
Binary file not shown.
+70
View File
@@ -0,0 +1,70 @@
if( document.documentElement )
bodyStyle = document.documentElement.style;
else if( document.body )
bodyStyle = document.body.style;
bodyStyle.visibility = "hidden";
function sizeContent(){
var windowHeight = getWindowHeight();
var footerHeight = document.getElementById("fbFooter").offsetHeight;
var contentHeight = windowHeight - footerHeight;
document.getElementById("fbContainer").style.height = contentHeight + "px";
var altDiv = document.getElementById("altmsg");
if( altDiv ){
var altH = altDiv.offsetHeight;
var altW = altDiv.offsetWidth;
altDiv.style.top = (contentHeight / 2 - altH /2)+ "px";
altDiv.style.left = (getWindowWidth() / 2 - altW /2)+ "px";
}
if( bodyStyle )
bodyStyle.visibility = "visible";
}
function addEvent( obj, type, fn )
{
if (obj.addEventListener)
obj.addEventListener( type, fn, false );
else if (obj.attachEvent)
{
obj["e"+type+fn] = fn;
obj.attachEvent( "on"+type, function() { obj["e"+type+fn](); } );
}
}
function getWindowHeight() {
var windowHeight=0;
if ( typeof( window.innerHeight ) == 'number' ) {
windowHeight=window.innerHeight;
}
else {
if ( document.documentElement && document.documentElement.clientHeight) {
windowHeight = document.documentElement.clientHeight;
}
else {
if (document.body&&document.body.clientHeight) {
windowHeight=document.body.clientHeight;
}
}
}
return windowHeight;
};
function getWindowWidth() {
var ww = 0;
if (self.innerWidth)
ww = self.innerWidth;
else if (document.documentElement && document.documentElement.clientWidth)
ww = document.documentElement.clientWidth;
else if (document.body)
ww = document.body.clientWidth;
return ww;
}
addEvent( window, "load", sizeContent);
addEvent( window, "resize", sizeContent );
+731
View File
@@ -0,0 +1,731 @@
/*! SWFObject v2.1 <http://code.google.com/p/swfobject/>
Copyright (c) 2007-2008 Geoff Stearns, Michael Williams, and Bobby van der Sluis
This software is released under the MIT License <http://www.opensource.org/licenses/mit-license.php>
*/
var swfobject = function() {
var UNDEF = "undefined",
OBJECT = "object",
SHOCKWAVE_FLASH = "Shockwave Flash",
SHOCKWAVE_FLASH_AX = "ShockwaveFlash.ShockwaveFlash",
FLASH_MIME_TYPE = "application/x-shockwave-flash",
EXPRESS_INSTALL_ID = "SWFObjectExprInst",
win = window,
doc = document,
nav = navigator,
domLoadFnArr = [],
regObjArr = [],
objIdArr = [],
listenersArr = [],
script,
timer = null,
storedAltContent = null,
storedAltContentId = null,
isDomLoaded = false,
isExpressInstallActive = false;
/* Centralized function for browser feature detection
- Proprietary feature detection (conditional compiling) is used to detect Internet Explorer's features
- User agent string detection is only used when no alternative is possible
- Is executed directly for optimal performance
*/
var ua = function() {
var w3cdom = typeof doc.getElementById != UNDEF && typeof doc.getElementsByTagName != UNDEF && typeof doc.createElement != UNDEF,
playerVersion = [0,0,0],
d = null;
if (typeof nav.plugins != UNDEF && typeof nav.plugins[SHOCKWAVE_FLASH] == OBJECT) {
d = nav.plugins[SHOCKWAVE_FLASH].description;
if (d && !(typeof nav.mimeTypes != UNDEF && nav.mimeTypes[FLASH_MIME_TYPE] && !nav.mimeTypes[FLASH_MIME_TYPE].enabledPlugin)) { // navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin indicates whether plug-ins are enabled or disabled in Safari 3+
d = d.replace(/^.*\s+(\S+\s+\S+$)/, "$1");
playerVersion[0] = parseInt(d.replace(/^(.*)\..*$/, "$1"), 10);
playerVersion[1] = parseInt(d.replace(/^.*\.(.*)\s.*$/, "$1"), 10);
playerVersion[2] = /r/.test(d) ? parseInt(d.replace(/^.*r(.*)$/, "$1"), 10) : 0;
}
}
else if (typeof win.ActiveXObject != UNDEF) {
var a = null, fp6Crash = false;
try {
a = new ActiveXObject(SHOCKWAVE_FLASH_AX + ".7");
}
catch(e) {
try {
a = new ActiveXObject(SHOCKWAVE_FLASH_AX + ".6");
playerVersion = [6,0,21];
a.AllowScriptAccess = "always"; // Introduced in fp6.0.47
}
catch(e) {
if (playerVersion[0] == 6) {
fp6Crash = true;
}
}
if (!fp6Crash) {
try {
a = new ActiveXObject(SHOCKWAVE_FLASH_AX);
}
catch(e) {}
}
}
if (!fp6Crash && a) { // a will return null when ActiveX is disabled
try {
d = a.GetVariable("$version"); // Will crash fp6.0.21/23/29
if (d) {
d = d.split(" ")[1].split(",");
playerVersion = [parseInt(d[0], 10), parseInt(d[1], 10), parseInt(d[2], 10)];
}
}
catch(e) {}
}
}
var u = nav.userAgent.toLowerCase(),
p = nav.platform.toLowerCase(),
webkit = /webkit/.test(u) ? parseFloat(u.replace(/^.*webkit\/(\d+(\.\d+)?).*$/, "$1")) : false, // returns either the webkit version or false if not webkit
ie = false,
windows = p ? /win/.test(p) : /win/.test(u),
mac = p ? /mac/.test(p) : /mac/.test(u);
/*@cc_on
ie = true;
@if (@_win32)
windows = true;
@elif (@_mac)
mac = true;
@end
@*/
return { w3cdom:w3cdom, pv:playerVersion, webkit:webkit, ie:ie, win:windows, mac:mac };
}();
/* Cross-browser onDomLoad
- Based on Dean Edwards' solution: http://dean.edwards.name/weblog/2006/06/again/
- Will fire an event as soon as the DOM of a page is loaded (supported by Gecko based browsers - like Firefox -, IE, Opera9+, Safari)
*/
var onDomLoad = function() {
if (!ua.w3cdom) {
return;
}
addDomLoadEvent(main);
if (ua.ie && ua.win) {
try { // Avoid a possible Operation Aborted error
doc.write("<scr" + "ipt id=__ie_ondomload defer=true src=//:></scr" + "ipt>"); // String is split into pieces to avoid Norton AV to add code that can cause errors
script = getElementById("__ie_ondomload");
if (script) {
addListener(script, "onreadystatechange", checkReadyState);
}
}
catch(e) {}
}
if (ua.webkit && typeof doc.readyState != UNDEF) {
timer = setInterval(function() { if (/loaded|complete/.test(doc.readyState)) { callDomLoadFunctions(); }}, 10);
}
if (typeof doc.addEventListener != UNDEF) {
doc.addEventListener("DOMContentLoaded", callDomLoadFunctions, null);
}
addLoadEvent(callDomLoadFunctions);
}();
function checkReadyState() {
if (script.readyState == "complete") {
script.parentNode.removeChild(script);
callDomLoadFunctions();
}
}
function callDomLoadFunctions() {
if (isDomLoaded) {
return;
}
if (ua.ie && ua.win) { // Test if we can really add elements to the DOM; we don't want to fire it too early
var s = createElement("span");
try { // Avoid a possible Operation Aborted error
var t = doc.getElementsByTagName("body")[0].appendChild(s);
t.parentNode.removeChild(t);
}
catch (e) {
return;
}
}
isDomLoaded = true;
if (timer) {
clearInterval(timer);
timer = null;
}
var dl = domLoadFnArr.length;
for (var i = 0; i < dl; i++) {
domLoadFnArr[i]();
}
}
function addDomLoadEvent(fn) {
if (isDomLoaded) {
fn();
}
else {
domLoadFnArr[domLoadFnArr.length] = fn; // Array.push() is only available in IE5.5+
}
}
/* Cross-browser onload
- Based on James Edwards' solution: http://brothercake.com/site/resources/scripts/onload/
- Will fire an event as soon as a web page including all of its assets are loaded
*/
function addLoadEvent(fn) {
if (typeof win.addEventListener != UNDEF) {
win.addEventListener("load", fn, false);
}
else if (typeof doc.addEventListener != UNDEF) {
doc.addEventListener("load", fn, false);
}
else if (typeof win.attachEvent != UNDEF) {
addListener(win, "onload", fn);
}
else if (typeof win.onload == "function") {
var fnOld = win.onload;
win.onload = function() {
fnOld();
fn();
};
}
else {
win.onload = fn;
}
}
/* Main function
- Will preferably execute onDomLoad, otherwise onload (as a fallback)
*/
function main() { // Static publishing only
var rl = regObjArr.length;
for (var i = 0; i < rl; i++) { // For each registered object element
var id = regObjArr[i].id;
if (ua.pv[0] > 0) {
var obj = getElementById(id);
if (obj) {
regObjArr[i].width = obj.getAttribute("width") ? obj.getAttribute("width") : "0";
regObjArr[i].height = obj.getAttribute("height") ? obj.getAttribute("height") : "0";
if (hasPlayerVersion(regObjArr[i].swfVersion)) { // Flash plug-in version >= Flash content version: Houston, we have a match!
if (ua.webkit && ua.webkit < 312) { // Older webkit engines ignore the object element's nested param elements
fixParams(obj);
}
setVisibility(id, true);
}
else if (regObjArr[i].expressInstall && !isExpressInstallActive && hasPlayerVersion("6.0.65") && (ua.win || ua.mac)) { // Show the Adobe Express Install dialog if set by the web page author and if supported (fp6.0.65+ on Win/Mac OS only)
showExpressInstall(regObjArr[i]);
}
else { // Flash plug-in and Flash content version mismatch: display alternative content instead of Flash content
displayAltContent(obj);
}
}
}
else { // If no fp is installed, we let the object element do its job (show alternative content)
setVisibility(id, true);
}
}
}
/* Fix nested param elements, which are ignored by older webkit engines
- This includes Safari up to and including version 1.2.2 on Mac OS 10.3
- Fall back to the proprietary embed element
*/
function fixParams(obj) {
var nestedObj = obj.getElementsByTagName(OBJECT)[0];
if (nestedObj) {
var e = createElement("embed"), a = nestedObj.attributes;
if (a) {
var al = a.length;
for (var i = 0; i < al; i++) {
if (a[i].nodeName == "DATA") {
e.setAttribute("src", a[i].nodeValue);
}
else {
e.setAttribute(a[i].nodeName, a[i].nodeValue);
}
}
}
var c = nestedObj.childNodes;
if (c) {
var cl = c.length;
for (var j = 0; j < cl; j++) {
if (c[j].nodeType == 1 && c[j].nodeName == "PARAM") {
e.setAttribute(c[j].getAttribute("name"), c[j].getAttribute("value"));
}
}
}
obj.parentNode.replaceChild(e, obj);
}
}
/* Show the Adobe Express Install dialog
- Reference: http://www.adobe.com/cfusion/knowledgebase/index.cfm?id=6a253b75
*/
function showExpressInstall(regObj) {
isExpressInstallActive = true;
var obj = getElementById(regObj.id);
if (obj) {
if (regObj.altContentId) {
var ac = getElementById(regObj.altContentId);
if (ac) {
storedAltContent = ac;
storedAltContentId = regObj.altContentId;
}
}
else {
storedAltContent = abstractAltContent(obj);
}
if (!(/%$/.test(regObj.width)) && parseInt(regObj.width, 10) < 310) {
regObj.width = "310";
}
if (!(/%$/.test(regObj.height)) && parseInt(regObj.height, 10) < 137) {
regObj.height = "137";
}
doc.title = doc.title.slice(0, 47) + " - Flash Player Installation";
var pt = ua.ie && ua.win ? "ActiveX" : "PlugIn",
dt = doc.title,
fv = "MMredirectURL=" + win.location + "&MMplayerType=" + pt + "&MMdoctitle=" + dt,
replaceId = regObj.id;
// For IE when a SWF is loading (AND: not available in cache) wait for the onload event to fire to remove the original object element
// In IE you cannot properly cancel a loading SWF file without breaking browser load references, also obj.onreadystatechange doesn't work
if (ua.ie && ua.win && obj.readyState != 4) {
var newObj = createElement("div");
replaceId += "SWFObjectNew";
newObj.setAttribute("id", replaceId);
obj.parentNode.insertBefore(newObj, obj); // Insert placeholder div that will be replaced by the object element that loads expressinstall.swf
obj.style.display = "none";
var fn = function() {
obj.parentNode.removeChild(obj);
};
addListener(win, "onload", fn);
}
createSWF({ data:regObj.expressInstall, id:EXPRESS_INSTALL_ID, width:regObj.width, height:regObj.height }, { flashvars:fv }, replaceId);
}
}
/* Functions to abstract and display alternative content
*/
function displayAltContent(obj) {
if (ua.ie && ua.win && obj.readyState != 4) {
// For IE when a SWF is loading (AND: not available in cache) wait for the onload event to fire to remove the original object element
// In IE you cannot properly cancel a loading SWF file without breaking browser load references, also obj.onreadystatechange doesn't work
var el = createElement("div");
obj.parentNode.insertBefore(el, obj); // Insert placeholder div that will be replaced by the alternative content
el.parentNode.replaceChild(abstractAltContent(obj), el);
obj.style.display = "none";
var fn = function() {
obj.parentNode.removeChild(obj);
};
addListener(win, "onload", fn);
}
else {
obj.parentNode.replaceChild(abstractAltContent(obj), obj);
}
}
function abstractAltContent(obj) {
var ac = createElement("div");
if (ua.win && ua.ie) {
ac.innerHTML = obj.innerHTML;
}
else {
var nestedObj = obj.getElementsByTagName(OBJECT)[0];
if (nestedObj) {
var c = nestedObj.childNodes;
if (c) {
var cl = c.length;
for (var i = 0; i < cl; i++) {
if (!(c[i].nodeType == 1 && c[i].nodeName == "PARAM") && !(c[i].nodeType == 8)) {
ac.appendChild(c[i].cloneNode(true));
}
}
}
}
}
return ac;
}
/* Cross-browser dynamic SWF creation
*/
function createSWF(attObj, parObj, id) {
var r, el = getElementById(id);
if (el) {
if (typeof attObj.id == UNDEF) { // if no 'id' is defined for the object element, it will inherit the 'id' from the alternative content
attObj.id = id;
}
if (ua.ie && ua.win) { // IE, the object element and W3C DOM methods do not combine: fall back to outerHTML
var att = "";
for (var i in attObj) {
if (attObj[i] != Object.prototype[i]) { // Filter out prototype additions from other potential libraries, like Object.prototype.toJSONString = function() {}
if (i.toLowerCase() == "data") {
parObj.movie = attObj[i];
}
else if (i.toLowerCase() == "styleclass") { // 'class' is an ECMA4 reserved keyword
att += ' class="' + attObj[i] + '"';
}
else if (i.toLowerCase() != "classid") {
att += ' ' + i + '="' + attObj[i] + '"';
}
}
}
var par = "";
for (var j in parObj) {
if (parObj[j] != Object.prototype[j]) { // Filter out prototype additions from other potential libraries
par += '<param name="' + j + '" value="' + parObj[j] + '" />';
}
}
el.outerHTML = '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"' + att + '>' + par + '</object>';
objIdArr[objIdArr.length] = attObj.id; // Stored to fix object 'leaks' on unload (dynamic publishing only)
r = getElementById(attObj.id);
}
else if (ua.webkit && ua.webkit < 312) { // Older webkit engines ignore the object element's nested param elements: fall back to the proprietary embed element
var e = createElement("embed");
e.setAttribute("type", FLASH_MIME_TYPE);
for (var k in attObj) {
if (attObj[k] != Object.prototype[k]) { // Filter out prototype additions from other potential libraries
if (k.toLowerCase() == "data") {
e.setAttribute("src", attObj[k]);
}
else if (k.toLowerCase() == "styleclass") { // 'class' is an ECMA4 reserved keyword
e.setAttribute("class", attObj[k]);
}
else if (k.toLowerCase() != "classid") { // Filter out IE specific attribute
e.setAttribute(k, attObj[k]);
}
}
}
for (var l in parObj) {
if (parObj[l] != Object.prototype[l]) { // Filter out prototype additions from other potential libraries
if (l.toLowerCase() != "movie") { // Filter out IE specific param element
e.setAttribute(l, parObj[l]);
}
}
}
el.parentNode.replaceChild(e, el);
r = e;
}
else { // Well-behaving browsers
var o = createElement(OBJECT);
o.setAttribute("type", FLASH_MIME_TYPE);
for (var m in attObj) {
if (attObj[m] != Object.prototype[m]) { // Filter out prototype additions from other potential libraries
if (m.toLowerCase() == "styleclass") { // 'class' is an ECMA4 reserved keyword
o.setAttribute("class", attObj[m]);
}
else if (m.toLowerCase() != "classid") { // Filter out IE specific attribute
o.setAttribute(m, attObj[m]);
}
}
}
for (var n in parObj) {
if (parObj[n] != Object.prototype[n] && n.toLowerCase() != "movie") { // Filter out prototype additions from other potential libraries and IE specific param element
createObjParam(o, n, parObj[n]);
}
}
el.parentNode.replaceChild(o, el);
r = o;
}
}
return r;
}
function createObjParam(el, pName, pValue) {
var p = createElement("param");
p.setAttribute("name", pName);
p.setAttribute("value", pValue);
el.appendChild(p);
}
/* Cross-browser SWF removal
- Especially needed to safely and completely remove a SWF in Internet Explorer
*/
function removeSWF(id) {
var obj = getElementById(id);
if (obj && (obj.nodeName == "OBJECT" || obj.nodeName == "EMBED")) {
if (ua.ie && ua.win) {
if (obj.readyState == 4) {
removeObjectInIE(id);
}
else {
win.attachEvent("onload", function() {
removeObjectInIE(id);
});
}
}
else {
obj.parentNode.removeChild(obj);
}
}
}
function removeObjectInIE(id) {
var obj = getElementById(id);
if (obj) {
for (var i in obj) {
if (typeof obj[i] == "function") {
obj[i] = null;
}
}
obj.parentNode.removeChild(obj);
}
}
/* Functions to optimize JavaScript compression
*/
function getElementById(id) {
var el = null;
try {
el = doc.getElementById(id);
}
catch (e) {}
return el;
}
function createElement(el) {
return doc.createElement(el);
}
/* Updated attachEvent function for Internet Explorer
- Stores attachEvent information in an Array, so on unload the detachEvent functions can be called to avoid memory leaks
*/
function addListener(target, eventType, fn) {
target.attachEvent(eventType, fn);
listenersArr[listenersArr.length] = [target, eventType, fn];
}
/* Flash Player and SWF content version matching
*/
function hasPlayerVersion(rv) {
var pv = ua.pv, v = rv.split(".");
v[0] = parseInt(v[0], 10);
v[1] = parseInt(v[1], 10) || 0; // supports short notation, e.g. "9" instead of "9.0.0"
v[2] = parseInt(v[2], 10) || 0;
return (pv[0] > v[0] || (pv[0] == v[0] && pv[1] > v[1]) || (pv[0] == v[0] && pv[1] == v[1] && pv[2] >= v[2])) ? true : false;
}
/* Cross-browser dynamic CSS creation
- Based on Bobby van der Sluis' solution: http://www.bobbyvandersluis.com/articles/dynamicCSS.php
*/
function createCSS(sel, decl) {
if (ua.ie && ua.mac) {
return;
}
var h = doc.getElementsByTagName("head")[0], s = createElement("style");
s.setAttribute("type", "text/css");
s.setAttribute("media", "screen");
if (!(ua.ie && ua.win) && typeof doc.createTextNode != UNDEF) {
s.appendChild(doc.createTextNode(sel + " {" + decl + "}"));
}
h.appendChild(s);
if (ua.ie && ua.win && typeof doc.styleSheets != UNDEF && doc.styleSheets.length > 0) {
var ls = doc.styleSheets[doc.styleSheets.length - 1];
if (typeof ls.addRule == OBJECT) {
ls.addRule(sel, decl);
}
}
}
function setVisibility(id, isVisible) {
var v = isVisible ? "visible" : "hidden";
if (isDomLoaded && getElementById(id)) {
getElementById(id).style.visibility = v;
}
else {
createCSS("#" + id, "visibility:" + v);
}
}
/* Filter to avoid XSS attacks
*/
function urlEncodeIfNecessary(s) {
var regex = /[\\\"<>\.;]/;
var hasBadChars = regex.exec(s) != null;
return hasBadChars ? encodeURIComponent(s) : s;
}
/* Release memory to avoid memory leaks caused by closures, fix hanging audio/video threads and force open sockets/NetConnections to disconnect (Internet Explorer only)
*/
var cleanup = function() {
if (ua.ie && ua.win) {
window.attachEvent("onunload", function() {
// remove listeners to avoid memory leaks
var ll = listenersArr.length;
for (var i = 0; i < ll; i++) {
listenersArr[i][0].detachEvent(listenersArr[i][1], listenersArr[i][2]);
}
// cleanup dynamically embedded objects to fix audio/video threads and force open sockets and NetConnections to disconnect
var il = objIdArr.length;
for (var j = 0; j < il; j++) {
removeSWF(objIdArr[j]);
}
// cleanup library's main closures to avoid memory leaks
for (var k in ua) {
ua[k] = null;
}
ua = null;
for (var l in swfobject) {
swfobject[l] = null;
}
swfobject = null;
});
}
}();
return {
/* Public API
- Reference: http://code.google.com/p/swfobject/wiki/SWFObject_2_0_documentation
*/
registerObject: function(objectIdStr, swfVersionStr, xiSwfUrlStr) {
if (!ua.w3cdom || !objectIdStr || !swfVersionStr) {
return;
}
var regObj = {};
regObj.id = objectIdStr;
regObj.swfVersion = swfVersionStr;
regObj.expressInstall = xiSwfUrlStr ? xiSwfUrlStr : false;
regObjArr[regObjArr.length] = regObj;
setVisibility(objectIdStr, false);
},
getObjectById: function(objectIdStr) {
var r = null;
if (ua.w3cdom) {
var o = getElementById(objectIdStr);
if (o) {
var n = o.getElementsByTagName(OBJECT)[0];
if (!n || (n && typeof o.SetVariable != UNDEF)) {
r = o;
}
else if (typeof n.SetVariable != UNDEF) {
r = n;
}
}
}
return r;
},
embedSWF: function(swfUrlStr, replaceElemIdStr, widthStr, heightStr, swfVersionStr, xiSwfUrlStr, flashvarsObj, parObj, attObj) {
if (!ua.w3cdom || !swfUrlStr || !replaceElemIdStr || !widthStr || !heightStr || !swfVersionStr) {
return;
}
widthStr += ""; // Auto-convert to string
heightStr += "";
if (hasPlayerVersion(swfVersionStr)) {
setVisibility(replaceElemIdStr, false);
var att = {};
if (attObj && typeof attObj === OBJECT) {
for (var i in attObj) {
if (attObj[i] != Object.prototype[i]) { // Filter out prototype additions from other potential libraries
att[i] = attObj[i];
}
}
}
att.data = swfUrlStr;
att.width = widthStr;
att.height = heightStr;
var par = {};
if (parObj && typeof parObj === OBJECT) {
for (var j in parObj) {
if (parObj[j] != Object.prototype[j]) { // Filter out prototype additions from other potential libraries
par[j] = parObj[j];
}
}
}
if (flashvarsObj && typeof flashvarsObj === OBJECT) {
for (var k in flashvarsObj) {
if (flashvarsObj[k] != Object.prototype[k]) { // Filter out prototype additions from other potential libraries
if (typeof par.flashvars != UNDEF) {
par.flashvars += "&" + k + "=" + flashvarsObj[k];
}
else {
par.flashvars = k + "=" + flashvarsObj[k];
}
}
}
}
addDomLoadEvent(function() {
createSWF(att, par, replaceElemIdStr);
if (att.id == replaceElemIdStr) {
setVisibility(replaceElemIdStr, true);
}
});
}
else if (xiSwfUrlStr && !isExpressInstallActive && hasPlayerVersion("6.0.65") && (ua.win || ua.mac)) {
isExpressInstallActive = true; // deferred execution
setVisibility(replaceElemIdStr, false);
addDomLoadEvent(function() {
var regObj = {};
regObj.id = regObj.altContentId = replaceElemIdStr;
regObj.width = widthStr;
regObj.height = heightStr;
regObj.expressInstall = xiSwfUrlStr;
showExpressInstall(regObj);
});
}
},
getFlashPlayerVersion: function() {
return { major:ua.pv[0], minor:ua.pv[1], release:ua.pv[2] };
},
hasFlashPlayerVersion: hasPlayerVersion,
createSWF: function(attObj, parObj, replaceElemIdStr) {
if (ua.w3cdom) {
return createSWF(attObj, parObj, replaceElemIdStr);
}
else {
return undefined;
}
},
removeSWF: function(objElemIdStr) {
if (ua.w3cdom) {
removeSWF(objElemIdStr);
}
},
createCSS: function(sel, decl) {
if (ua.w3cdom) {
createCSS(sel, decl);
}
},
addDomLoadEvent: addDomLoadEvent,
addLoadEvent: addLoadEvent,
getQueryParamValue: function(param) {
var q = doc.location.search || doc.location.hash;
if (param == null) {
return urlEncodeIfNecessary(q);
}
if (q) {
var pairs = q.substring(1).split("&");
for (var i = 0; i < pairs.length; i++) {
if (pairs[i].substring(0, pairs[i].indexOf("=")) == param) {
return urlEncodeIfNecessary(pairs[i].substring((pairs[i].indexOf("=") + 1)));
}
}
}
return "";
},
// For internal usage only
expressInstallCallback: function() {
if (isExpressInstallActive && storedAltContent) {
var obj = getElementById(EXPRESS_INSTALL_ID);
if (obj) {
obj.parentNode.replaceChild(storedAltContent, obj);
if (storedAltContentId) {
setVisibility(storedAltContentId, true);
if (ua.ie && ua.win) {
storedAltContent.style.display = "block";
}
}
storedAltContent = null;
storedAltContentId = null;
isExpressInstallActive = false;
}
}
}
};
}();
Binary file not shown.
Binary file not shown.
Binary file not shown.
+142
View File
@@ -0,0 +1,142 @@
@charset "utf-8";
html, body{
padding: 0px;
margin: 0px;
font-family: gulim, Arial, Helvetica, sans-serif;
font-size: 11px;
color: #FFFFFF;
}
ul,li,img{margin:0;padding:0;border:0;list-style:none;}
ol, ul, li {
list-style-image:none;
list-style-position:outside;
list-style-type:none;
}
select{font-size: 12px;}
#fbFooter {
height: 54px;
background-color: #000000;
background-image: url('../img/footerBackground.gif');
background-repeat: repeat-x;
}
.fbPaginationMinor {
color: #FFFFFF;
letter-spacing:-1px;
}
.fbPaginationMinor2 {
color: #FFFFFF;
font-weight:bold;
margin-right: 10px;
margin-left:5px;
}
#fbCurrentPages{
font-weight:bold;
}
#fbContents {
float: right;
margin-top: 12px;
}
#fbContents li {float:left;}
#fbContents2 {
float: right;
margin-top: 15px;
margin-right: 4px;
}
#fbContents2 li {float:left;}
#fbContentsMenu {
margin-top:3px;
margin-right: 10px;
}
#fbMenu {
float: right;
margin-top: 9px;
margin-right: 10px;
}
#logo {
float: left;
}
#content_move {
float: left;
margin-left:10px;
margin-top:12px;
}
#content_move select {
background-color:#166E00;
color:#ffffff;
font-weight: bold;
}
.div {
padding-left:4px;
padding-right:4px;
}
#altmsg {
position: absolute;
background-color:#000000;
width:100%;j
padding:50px 0 50px 0;
opacity: 0.5;
filter: alpha(opacity=50);
text-align:center;
}
#altmsg:hover {
opacity: 0.8;
filter: alpha(opacity=80);
}
a.altlink:link {
color: #FFFFFF;
}
a.altlink:visited {
color: #DDDDDD;
}
a.altlink:hover{
color: #FFFFFF;
}
#helpTop {
width:100%;
height: 39px;
background-color: #F1F1F1;
background-image: url('../img/help_titbg.gif');
}
#helpleft {
float:left;
padding:8px;
}
#helpright {
float:right;
}
#helpCon {
text-align:center;
padding:14px;
}
#helpCon li {
padding-bottom:14px;
}

Some files were not shown because too many files have changed in this diff Show More