Skip to main content
summaryrefslogtreecommitdiffstats
blob: 57c161d534063c65b15f81a1d5f9b4468ff639d9 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
/*
 * (c) Copyright IBM Corp. 2000, 2002.
 * All Rights Reserved.
 */
 
var isMozilla = navigator.userAgent.indexOf('Mozilla') != -1 && parseInt(navigator.appVersion.substring(0,1)) >= 5;
var isIE = navigator.userAgent.indexOf('MSIE') != -1;

var navVisible = true;
	
function goBack(button) {
	parent.history.back();
	if (isIE && button && document.getElementById(button)){
		document.getElementById(button).blur();
	}
}

function goForward(button) {
	parent.history.forward();
	if (isIE && button && document.getElementById(button)){
		document.getElementById(button).blur();
	}
}


function bookmarkPage(button)
{
	// Currently we pick up the url from the content page.
	// If the page is from outside the help domain, a script
	// exception is thrown. We need to catch it and ignore it.
	try
	{
		// use the url from plugin id only
		var url = parent.ContentViewFrame.location.href;
		var i = url.indexOf("/topic/");
		if (i >=0 )
			url = url.substring(i+6);
		// remove any query string
		i = url.indexOf("?");
		if (i >= 0)
			url = url.substring(0, i);
			
		var title = parent.ContentViewFrame.document.title;
		if (title == null || title == "")
			title = url;

		/********** HARD CODED VIEW NAME *************/
		parent.parent.NavFrame.ViewsFrame.bookmarks.ViewFrame.location.replace("bookmarksView.jsp?operation=add&bookmark="+url+"&title="+escape(title));
	}catch (e) {}
	if (isIE && button && document.getElementById(button)){
		document.getElementById(button).blur();
	}
}

function resynch(button)
{
	try
	{
		var topic = parent.ContentViewFrame.window.location.href;
		// remove the query, if any
		var i = topic.indexOf('?');
		if (i != -1)
			topic = topic.substring(0, i);
		parent.parent.NavFrame.displayTocFor(topic);
	}
	catch(e)
	{
	}
	if (isIE && button && document.getElementById(button)){
		document.getElementById(button).blur();
	}
}

function printContent(button)
{
	parent.ContentViewFrame.focus();
	parent.ContentViewFrame.print();
	if (isIE && button && document.getElementById(button)){
		document.getElementById(button).blur();
	}
}

function setTitle(label)
{
	if( label == null) label = "";
	var title = document.getElementById("titleText");
	var text = title.lastChild;
	text.nodeValue = " "+label;
}

Back to the top