home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Thomson (Residential)
/
TGSTPv7203.iso
/
mac
/
Documentation
/
HTML
/
TG780-BUS_pt
/
wwhelp
/
wwhimpl
/
common
/
scripts
/
controls.js
< prev
next >
Wrap
Text File
|
2007-10-04
|
16KB
|
502 lines
// Copyright (c) 2000-2001 Quadralay Corporation. All rights reserved.
//
var sPageNavTitle = "Thomson Help";
function WWHControls_Object()
{
this.mSyncPrevNext = new Array(null, null, null);
this.fSansNavigation = WWHControls_SansNavigation;
this.fLeftHTML = WWHControls_LeftHTML;
this.fRightHTML = WWHControls_RightHTML;
this.fUpdateHREF = WWHControls_UpdateHREF;
this.fSyncTOC = WWHControls_SyncTOC;
this.fPrevious = WWHControls_Previous;
this.fNext = WWHControls_Next;
this.fRelatedTopics = WWHControls_RelatedTopics;
this.fEmail = WWHControls_Email;
this.fPrint = WWHControls_Print;
this.fBookmark = WWHControls_Bookmark;
this.fBookmarkData = WWHControls_BookmarkData;
this.fBookmarkLink = WWHControls_BookmarkLink;
}
function WWHControls_SansNavigation()
{
var bSansNavigation = false;
if (typeof WWHFrame.WWHNavigationFrame == "undefined")
{
bSansNavigation = true;
}
return bSansNavigation;
}
function WWHControls_LeftHTML()
{
var HTML = "";
var Settings = WWHFrame.WWHHelp.mSettings;
if (Settings.mbEmailEnabled)
{
Settings.mbEmailEnabled = ((typeof Settings.mEmailAddress == "string") &&
(Settings.mEmailAddress.length > 0));
}
if (Settings.mbPrintEnabled)
{
Settings.mbPrintEnabled = ((typeof WWHFrame.WWHContentFrame.WWHDocumentFrame.focus != "undefined") &&
(typeof WWHFrame.WWHContentFrame.WWHDocumentFrame.print != "undefined"))
}
//------------------------------------------------- Edited by Jimmy Clauwaert (Begin) ----------------------------------------------------------
//wave
HTML = '<table border="0" cellpadding="0" cellspacing="0" width="100%" ><tr><td align="left" width="100%">';
HTML += '<table style="menuBar" border="0" cellpadding="0" cellspacing="0">';
HTML += '<tr>';
//------------------------------------------------- Edited by Jimmy Clauwaert (End) ----------------------------------------------------------
// Display controls
//
// Return to Home
query = location.search.substring(1);
i = query.indexOf('?') + 1;
urlParameters=query.substring(i, query.length);
numberOfCells=0;
if ((top.tr[currentLang][4]!='')) {
HTML += "<td class=\"menuItem\"><a href=\"../../../../wwhelp.htm?"+urlParameters+"\" target=\"_top\"><img src=\"../images/home.gif\" border=\"0\" alt=\""+top.tr[currentLang][4]+"\"></a>";
HTML += "</td>";
numberOfCells++;
}
//Previous
HTML += '<td class="menuItem">';
HTML += "<a href=\"javascript:WWHFrame.WWHControls.fPrevious();\">";
HTML += "<img name=\"WWHPrevIcon\" alt=\"" + WWHFrame.WWHHelp.mMessages.mPrevIconLabel + "\" border=\"0\" src=\"../images/prevx.gif\">";
HTML += "</a>";
HTML += "</td>";
//Next
HTML += '<td class="menuItem">';
HTML += "<a href=\"javascript:WWHFrame.WWHControls.fNext();\">";
HTML += "<img name=\"WWHNextIcon\" alt=\"" + WWHFrame.WWHHelp.mMessages.mNextIconLabel + "\" border=\"0\" src=\"../images/nextx.gif\">";
HTML += "</a>";
HTML += "</td>";
//Return to Product Selection
if ((top.tr[currentLang][5][1]!='')&&(top.showReturnButton)) {
HTML += '<td class="menuItem">';
HTML += "<a href=\""+"../../../../"+top.tr[currentLang][5][1]+"?lang="+top.langCode[top.currentLang]+"\" target=\"_top\"><img src=\"../images/return.gif\" border=\"0\" alt=\""+top.tr[currentLang][5][0]+"\"></a>";
HTML +="</td>";
numberOfCells++;
}
//Sync
HTML += '<td class="menuItem" valign="middle">';
HTML += "<a href=\"javascript:WWHFrame.WWHControls.fSyncTOC();\">";
HTML += "<img name=\"WWHSyncIcon\" alt=\"" + WWHFrame.WWHHelp.mMessages.mSyncIconLabel + "\" border=\"0\" src=\"../images/syncx.gif\">";
HTML += "</a>";
HTML += "</td>";
numberOfCells++;
if (Settings.mbEmailEnabled)
{
HTML += ' <td class="menuItem" width="23">';
HTML += " <a href=\"javascript:WWHFrame.WWHControls.fEmail();\">\n";
HTML += " <img name=\"WWHEmailIcon\" alt=\"" + WWHFrame.WWHHelp.mMessages.mEmailIconLabel + "\" border=\"0\" src=\"../images/emailx.gif\" width=\"23\" height=\"15\">\n";
HTML += " </a>\n";
HTML += " </td>\n";
numberOfCells++;
}
if (Settings.mbPrintEnabled)
{
HTML += '<td class="menuItem">';
HTML += "<a href=\"javascript:WWHFrame.WWHControls.fPrint();\">";
HTML += "<img name=\"WWHPrintIcon\" alt=\"" + WWHFrame.WWHHelp.mMessages.mPrintIconLabel + "\" border=\"0\" src=\"../images/print.gif\">";
HTML += "</a>";
HTML += "</td>";
numberOfCells++;
}
//------------------------------------------------- Edited by Jimmy Clauwaert (Begin) ----------------------------------------------------------
if ((top.currentPDF!="")&&(top.showPDF)) {
HTML += '<td class="menuItem">';
HTML += "<a href=\""+'../../../../'+top.currentPDF+"\" target=\"_blank\"><img alt=\""+top.tr[top.currentLang][0]+"\" src=\"../images/pdf.gif\" border=\"0\" /></a>";
HTML += "</a>";
HTML += "</td>";
numberOfCells++;
}
if (top.tr[top.currentLang][6][1]!="") {
HTML += '<td class="menuItem" style="padding-right:20px">';
HTML += "<a href=\""+'../../../../'+top.tr[top.currentLang][6][1]+"\" target=\"_blank\"><img alt=\""+top.tr[top.currentLang][6][0]+"\" src=\"../images/help.gif\" border=\"0\" /></a>";
HTML += "</a>";
HTML += "</td>";
numberOfCells++;
}
HTML += '<td width="100%" style="text-align:left;padding:0px"><img style="border-style:none" src="../images/barend_left.gif"></td>';
HTML += "<td style=\"vertical-align:bottom;padding-right:20px\"><a target=\"_blank\" href=\"http://www.thomson-broadband.com\"><img style=\"border-style:none\" src=\"../images/Thomson.gif\" alt=\"thomson-broadband.com\"></a></td>";
//Colored line
HTML +="</tr></table>";
HTML += "</td>";
HTML += "</tr>";
HTML += "<tr><td>";
HTML +="<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" class=\"breadcrumb\" width=\"100%\"><tr>";
HTML+="<td width=\"100%\">";
//------------------------------------------------- Edited by Jimmy Clauwaert (End) ----------------------------------------------------------
HTML += top.currentChapter;
if (top.currentSection!="") {
HTML +=" > ";
HTML +="<a href=\"../../../../about.html\" target=\"WWHDocumentFrame\">"+top.currentSection+"</a>";
if (top.currentMap!="") {
HTML +="<span> > </span>";
HTML +=top.currentMap;
}
}
HTML += " </td>";
HTML += "</tr>";
HTML += "</table>";
HTML += "</td></tr></table>";
return (HTML);
}
function WWHControls_RightHTML()
{
var HTML = "";
var Settings = WWHFrame.WWHHelp.mSettings;
// Confirm controls can be displayed
//
// Display controls
//
HTML += "<table border=0 cellpadding=0 cellspacing=0 height=\"14\" width=\"100%\"><tr><td height=\"14\"></td></tr></table>";
HTML += "<table border=\"0\" bgcolor=\"#E5E5E5\" width=\"100%\" height=\"23\"><tr><td align=\"right\" width=\"100%\">";
HTML += "<table border=0 cellpadding=1 cellspacing=0>";
HTML += "<tr>";
if (Settings.mbRelatedTopicsEnabled)
{
HTML += " <td width=\"23\">\n";
HTML += " <a href=\"javascript:WWHFrame.WWHControls.fRelatedTopics();\">\n";
HTML += " <img name=\"WWHRelatedTopicsIcon\" alt=\"" + WWHFrame.WWHHelp.mMessages.mRelatedTopicsIconLabel + "\" border=\"0\" src=\"../images/relatedx.gif\" width=\"23\" height=\"15\">\n";
HTML += " </a>\n";
HTML += " </td>\n";
}
if (Settings.mbBookmarkEnabled)
{
HTML += " <td width=\"23\">\n";
HTML += " <a href=\"javascript:WWHFrame.WWHControls.fBookmark();\">\n";
HTML += " <img name=\"WWHBookmarkIcon\" alt=\"" + WWHFrame.WWHHelp.mMessages.mBookmarkIconLabel + "\" border=\"0\" src=\"../images/bkmarkx.gif\" width=\"23\" height=\"15\">\n";
HTML += " </a>\n";
HTML += " </td>\n";
}
HTML += "</tr>";
HTML += "</table>";
HTML += "</td></tr></table>";
return HTML;
}
function WWHControls_UpdateHREF(ParamHREF)
{
var DocumentBookmark = "";
var ControlsDocument;
var Settings = WWHFrame.WWHHelp.mSettings;
var Prefix = WWHFrame.WWHHelp.mHelpURLPrefix;
var IconURL;
// Update sync/prev/next array
//
this.mSyncPrevNext = WWHFrame.WWHHelp.fGetSyncPrevNext(ParamHREF);
// Process left control frame
//
ControlsDocument = eval("WWHFrame.WWHContentFrame.WWHPageNavFrame.WWHControlsLeftFrame.document");
// Set Sync Icon
//
if (this.fSansNavigation())
{
; // Nothing to do
}
else if (Settings.mbSyncContentsEnabled)
{
if (this.mSyncPrevNext[0] != null)
{
IconURL = Prefix + "wwhelp/wwhimpl/common/images/sync.gif";
}
else
{
IconURL = Prefix + "wwhelp/wwhimpl/common/images/syncx.gif";
}
//ControlsDocument.images["WWHSyncIcon"].src = IconURL;
}
// Set E-Mail Icon
//
if (Settings.mbEmailEnabled)
{
if (this.mSyncPrevNext[0] != null)
{
IconURL = Prefix + "wwhelp/wwhimpl/common/images/email.gif";
}
else
{
IconURL = Prefix + "wwhelp/wwhimpl/common/images/emailx.gif";
}
//ControlsDocument.images["WWHEmailIcon"].src = IconURL;
}
// Set Print Icon
//
if (Settings.mbPrintEnabled)
{
if (this.mSyncPrevNext[0] != null)
{
IconURL = Prefix + "wwhelp/wwhimpl/common/images/print.gif";
}
else
{
IconURL = Prefix + "wwhelp/wwhimpl/common/images/printx.gif";
}
//ControlsDocument.images["WWHPrintIcon"].src = IconURL;
}
// Set Previous Icon
//
if (Settings.mbPrevEnabled)
{
if (this.mSyncPrevNext[1] != null)
{
IconURL = Prefix + "wwhelp/wwhimpl/common/images/prev.gif";
}
else
{
IconURL = Prefix + "wwhelp/wwhimpl/common/images/prevx.gif";
}
//ControlsDocument.images["WWHPrevIcon"].src = IconURL;
}
// Set Next Icon
//
if (Settings.mbNextEnabled)
{
if (this.mSyncPrevNext[2] != null)
{
IconURL = Prefix + "wwhelp/wwhimpl/common/images/next.gif";
}
else
{
IconURL = Prefix + "wwhelp/wwhimpl/common/images/nextx.gif";
}
//ControlsDocument.images["WWHNextIcon"].src = IconURL;
}
// Process right control frame
//
ControlsDocument = eval("WWHFrame.WWHContentFrame.WWHPageNavFrame.WWHControlsRightFrame.document");
// Set Related Topics Icon
//
if (Settings.mbRelatedTopicsEnabled)
{
if (typeof WWHFrame.WWHContentFrame.WWHDocumentFrame.WWHDefineRelatedTopics == "function")
{
IconURL = Prefix + "wwhelp/wwhimpl/common/images/related.gif";
}
else
{
IconURL = Prefix + "wwhelp/wwhimpl/common/images/relatedx.gif";
}
//ControlsDocument.images["WWHRelatedTopicsIcon"].src = IconURL;
}
// Set Bookmark Icon
//
if (Settings.mbBookmarkEnabled)
{
if (this.mSyncPrevNext[0] != null)
{
IconURL = Prefix + "wwhelp/wwhimpl/common/images/bkmark.gif";
}
else
{
IconURL = Prefix + "wwhelp/wwhimpl/common/images/bkmarkx.gif";
}
//ControlsDocument.images["WWHBookmarkIcon"].src = IconURL;
}
}
function WWHControls_SyncTOC()
{
var URL = WWHStringUtilities_NormalizeURL(WWHFrame.WWHContentFrame.WWHDocumentFrame.location.href);
// Show navigation or reveal in TOC?
//
if (this.fSansNavigation())
{
WWHFrame.WWHHandler.fSyncTOC(URL);
}
else
{
if (this.mSyncPrevNext[0] != null)
{
WWHFrame.WWHHandler.fSyncTOC(URL);
}
}
}
function WWHControls_Previous()
{
if (this.mSyncPrevNext[1] != null)
{
WWHFrame.WWHHelp.fSetDocumentHREF(this.mSyncPrevNext[1], false);
}
}
function WWHControls_Next()
{
if (this.mSyncPrevNext[2] != null)
{
WWHFrame.WWHHelp.fSetDocumentHREF(this.mSyncPrevNext[2], false);
}
}
function WWHControls_RelatedTopics()
{
if (typeof WWHFrame.WWHContentFrame.WWHDocumentFrame.WWHDefineRelatedTopics == "function")
{
WWHFrame.WWHRelatedTopics.fShow();
}
}
function WWHControls_Email()
{
if (this.mSyncPrevNext[0] != null)
{
WWHFrame.WWHContentFrame.WWHDocumentFrame.location = "mailto:" + WWHFrame.WWHHelp.mSettings.mEmailAddress + "?subject=Feedback: " + escape(this.mSyncPrevNext[0]);
}
}
function WWHControls_Print()
{
if (this.mSyncPrevNext[0] != null)
{
WWHFrame.WWHContentFrame.WWHDocumentFrame.focus();
WWHFrame.WWHContentFrame.WWHDocumentFrame.print();
}
}
function WWHControls_Bookmark()
{
if (this.mSyncPrevNext[0] != null)
{
var BookmarkData;
BookmarkData = this.fBookmarkData();
if ((BookmarkData[0] != null) &&
(BookmarkData[1] != null))
{
if ((WWHFrame.WWHBrowserInfo.mBrowser == 2) && // Shorthand for IE
( ! WWHFrame.WWHBrowserInfo.mbMacIE45))
{
window.external.AddFavorite(BookmarkData[1], BookmarkData[0]);
}
else
{
var Window;
Window = window.open(WWHFrame.WWHHelp.mHelpURLPrefix + "wwhelp/wwhimpl/common/html/bookmark.htm", "WWHBookmarkLinkWindow", "width=400,height=20");
Window.document.open();
Window.document.writeln("<p>" + WWHFrame.WWHHelp.mMessages.mBookmarkLinkMessage + "</p>");
Window.document.writeln("<p>" + this.fBookmarkLink() + "</p>");
Window.document.close();
}
}
}
}
function WWHControls_BookmarkData()
{
var BookmarkData = new Array(null, null);
if (this.mSyncPrevNext[0] != null)
{
var DocumentURL;
// Determine bookmark link
//
DocumentURL = WWHFrame.WWHHelp.fGetBookFileHREF(this.mSyncPrevNext[0]);
if (DocumentURL != null)
{
var DocumentTitle;
var ResetEverything;
var DocumentBookmarkURL;
DocumentTitle = WWHFrame.WWHHelp.fHREFToTitle(this.mSyncPrevNext[0]);
if ((WWHFrame.WWHBrowserInfo.mBrowser == 1) || // Shorthand for Netscape
(WWHFrame.WWHBrowserInfo.mBrowser == 4)) // Shorthand for Netscape 6.0
{
ResetEverything = "y=eval("document.open();document.writeln('<a href=\\""+x+"\\">"+x+"</a>');document.close();")";
}
else
{
ResetEverything = "location=x";
}
DocumentBookmarkURL = WWHFrame.WWHHelp.mHelpURLPrefix + "wwhelp/wwhimpl/common/html/wwhelp.htm?href=" + WWHStringUtilities_RestoreEscapedSpaces(DocumentURL);
if (this.fSansNavigation())
{
DocumentBookmarkURL += "&single=true"
}
DocumentBookmarkURL = "javascript:x=unescape('" + escape(DocumentBookmarkURL) + "');if(typeof window.WWHFrame!='undefined'){window.WWHFrame.WWHHelp.fSetContextDocument(x);}else{" + ResetEverything + ";}";
// Set bookmark data
//
BookmarkData[0] = DocumentTitle;
BookmarkData[1] = DocumentBookmarkURL;
}
}
return BookmarkData;
}
function WWHControls_BookmarkLink()
{
var BookmarkLink = "";
var BookmarkData = this.fBookmarkData();
if ((BookmarkData[0] != null) &&
(BookmarkData[1] != null))
{
BookmarkLink = "<a href=\"" + BookmarkData[1] + "\">" + BookmarkData[0] + "</a>";
}
return BookmarkLink;
}