Subversion Repositories DevTools

Rev

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(docwidth > 1000) {
15
		docwidth=1000
16
	}
17
	if(docheight > 650) {
18
		docheight=650
19
	}
20
	objref.style.left=docwidth/2-objwidth/2+"px"
21
	objref.style.top=scroll_top+docheight/2-objheight/2+"px"
22
	objref.style.visibility=noteVisibility
23
}
24
 
25
function showHideNote() {
26
	if(noteVisibility == "visible") {
27
		noteVisibility="hidden"
28
	}
29
	else {
30
		noteVisibility="visible"
31
	}
32
	objref.style.visibility=noteVisibility
33
}
34
 
35
function saveNote() {
36
	document.forms["noteManagerForm"].submit()
37
}
38
 
39
function saveBlankNote() {
40
	document.getElementById("noteboxcontents").value = ""
41
	document.forms["noteManagerForm"].submit()
42
}
43
 
44
//Mainline
45
if (parseInt(displaymode)!=NaN){
46
	if (window.addEventListener)
47
		window.addEventListener("load", initfunction, false)
48
	else if (window.attachEvent)
49
		window.attachEvent("onload", initfunction)
50
	else if (document.getElementById)
51
		window.onload=initfunction
52
}