var GradeCount=0; drawMenuTable(); drawInputTable(); var follow = document.getElementById("menubar"); var inputElem = document.getElementById("inputBox"); follow.y=50; inputElem.y=200; setInterval('play()',30); var isIE=false; if (navigator.appName=="Microsoft Internet Explorer") {isIE = true}; var isHighLight=false; function drawMenuTable(){ document.writeln(''); document.writeln(''); document.writeln(''); document.writeln(''); document.writeln(''); } function drawInputTable(){ document.writeln(''); document.writeln(''); document.writeln(''); document.writeln(''); document.writeln(''); } //Hide Note inputTextArea function hideme(myid) { document.getElementById(myid).style.visibility='hidden'; } function showInputBox() { getSelectTxt(); var inputElem = document.getElementById("inputBox"); inputElem.style.display = ''; } function ShowThisWord() { redirect(); } //Copy the select word function getSelectTxt() { isShow=true; if(isIE) { if (document.selection.type!="none") { sel = document.selection.createRange(); document.getElementById("textdo").innerHTML = sel.text; document.getElementById("keyword").value = sel.text; document.getElementById("targeturl").value = location.href; var str=sel.text; if(str.length > 30) { hideme("inputBox"); isShow=false; alert("["+str+"]\n\nSelect over 30 charactors ,please select again!"); } else if(str.length==0) { hideme("inputBox"); isShow=false; alert("you did not select any charactor"); } for(var i=0;i30) { hideme("inputBox"); isShow=false; alert("["+str+"]\n\nSelect over 30 charactors ,please select again!"); } else if(str.length==0) { hideme("inputBox"); isShow=false; alert("you did not select any charactor"); } for(var i=0;i0) { var hc = function(s){return document.createElement(s);} var urlText = hc('input'); with(urlText){name='url';value=location.href;type='hidden';} var selectText = hc('input'); with(selectText){name='selText';value=str;}type='hidden'; var form = hc('form'); with(form) { name='myForm'; style.display = 'none'; appendChild(urlText); appendChild(selectText); method = 'POST'; action = 'http://tlh-image.lias.nccu.edu.tw:80/~dspace/cckate/SaveUnderline.php'; } for (var i = document.childNodes.length - 1; i >= 0 ; --i) { if (document.childNodes[i].nodeType == 1) { document.childNodes[i].appendChild(form); break; } } form.submit(); } } function redirect() { if(isIE) { if (document.selection.type!="none") { sel = document.selection.createRange(); var str=sel.text; for(var i=0;i') if (thetitle.length>1){ thetitles='' for (i=0;i'+text+'') document.tooltip.document.close() document.tooltip.left=e.pageX+5 document.tooltip.top=e.pageY+5 document.tooltip.visibility="show" } } //Hide tip function hidetip(){ if (document.layers) document.tooltip.visibility="hidden"; } function replaceAll() { } var keywordAr=new Array() var IdNumberAr=new Array() //replace keyword function replaceKeyWord(a,keywd,notewd,type) { var a; for (var i=0;i 0 ? 1 : -1) * Math.ceil(Math.abs(dy)); follow.style.top = follow.offsetTop + dy + 'px'; } var inputElem_y = (typeof(inputElem.y) == 'string' ? eval(inputElem.y) : inputElem.y); if(inputElem.offsetTop != (document.documentElement.scrollTop + inputElem_y)) { var dEy = (document.documentElement.scrollTop + inputElem_y - inputElem.offsetTop) * 0.15; dEy = (dEy > 0 ? 1 : -1) * Math.ceil(Math.abs(dEy)); inputElem.style.top = inputElem.offsetTop + dEy + 'px'; } follow.style.display = ''; } replaceAll(); //------------------------------------------- //Pudding Function function toggleMenuTable(toggleID, titleID, flag) { //var ob = document.getElementById(id) if (document.getElementById(toggleID).style.display == "none") { document.getElementById(toggleID).style.display = "block"; document.getElementById(titleID).style.fontSize = "12pt"; //document.getElementById(titleID).style.paddingRight = "10px"; document.getElementById(titleID).innerHTML = "Annotation tool"; flag.innerHTML = "-"; } else { document.getElementById(toggleID).style.display = "none"; document.getElementById(titleID).style.fontSize = "8pt"; //document.getElementById(titleID).style.paddingRight = "0"; document.getElementById(titleID).innerHTML = "Annotation
tool"; flag.innerHTML = "+"; } }