Subversion Repositories DevTools

Rev

Go to most recent revision | Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
119 ghuddy 1
var displaymode="always"
2
var noteVisibility="hidden"
3
 
4
function initfunction(){
5
	var ie=document.all && !window.opera
6
	var dom=document.getElementById
7
	iebody=(document.compatMode=="CSS1Compat")? document.documentElement : document.body
8
	objref=(dom)? document.getElementById("notebox") : document.all.notebox
9
	var scroll_top=(ie)? iebody.scrollTop : window.pageYOffset
10
	var docwidth=(ie)? iebody.clientWidth : window.innerWidth
11
	docheight=(ie)? iebody.clientHeight: window.innerHeight
12
	var objwidth=objref.offsetWidth
13
	objheight=objref.offsetHeight
14
	if(docheight > 650) {
15
		docheight=650
16
	}
17
	objref.style.left=docwidth/2-objwidth/2+"px"
18
	objref.style.top=scroll_top+docheight/2-objheight/2+"px"
19
	objref.style.visibility=noteVisibility
20
}
21
 
22
function showHideNote() {
23
	if(noteVisibility == "visible") {
24
		noteVisibility="hidden"
25
	}
26
	else {
27
		noteVisibility="visible"
28
	}
29
	objref.style.visibility=noteVisibility
30
}
31
 
32
function saveNote() {
33
	document.forms["noteManagerForm"].submit()
34
}
35
 
36
function saveBlankNote() {
37
	document.getElementById("noteboxcontents").value = ""
38
	document.forms["noteManagerForm"].submit()
39
}
40
 
41
//Mainline
42
if (parseInt(displaymode)!=NaN){
43
	if (window.addEventListener)
44
		window.addEventListener("load", initfunction, false)
45
	else if (window.attachEvent)
46
		window.attachEvent("onload", initfunction)
47
	else if (document.getElementById)
48
		window.onload=initfunction
49
}