function getRef(obj,dontshowerror){ var obj2; if(typeof obj == "string") { obj2 = document.getElementById(obj); } else if(typeof obj == "object") { obj2 = obj; } if(!obj2 && dontshowerror ){ alert("object not found("+obj+")"); } return obj2; } function setStyle(obj, style, value){ getRef(obj).style[style]= value; } function getStyle(obj, style){ return getRef(obj).style[style]; } function setClassName(obj, className){ getRef(obj).className= className; } function getClassName(obj){ return getRef(obj).className; } function setImg(obj, source){ getRef(obj).src=source; } function show(obj,left,top) { if(left){ getRef(obj).style.left=left; } if(top){ getRef(obj).style.top=top; } getRef(obj).style.visibility = 'visible' } function show2(obj,left,top) { obj = getRef(obj); if(left){ obj.style.left=left; } if(top){ obj.style.top=top; } obj.style.visibility = 'visible' obj.style.display = 'block' } function hide(obj) { getRef(obj).style.visibility = 'hidden' } function hide2(obj) { getRef(obj).style.visibility = 'hidden' getRef(obj).style.display = 'none' } function getRealLeft(obj, stopObj) { obj = getRef(obj); if(stopObj) stopObj=getRef(stopObj); else stopObj = null; realLeft = obj.offsetLeft; tempObj = obj.offsetParent; while (tempObj != stopObj) { realLeft += tempObj.offsetLeft; tempObj = tempObj.offsetParent; } return realLeft; } function getRealTop(obj, stopObj, debug) { obj = getRef(obj); if(stopObj) stopObj=getRef(stopObj); else stopObj = null; realTop = obj.offsetTop; tempObj = obj.offsetParent; while (tempObj != stopObj && tempObj != null) { realTop += tempObj.offsetTop; tempObj = tempObj.offsetParent; } return realTop; } function adjustiframe(documentObject){ // if(adjustiframe.arguments.length>1){ // alert('Argument 2'); // } if(typeof documentObject == "string"){ if(document.getElementById(documentObject)){ if(document.getElementById(documentObject).contentWindow){ if(document.getElementById(documentObject).contentWindow.document){ documentObject = document.getElementById(documentObject).contentWindow.document; } } } } if(documentObject){ var iframes = document.getElementsByTagName("iframe"); var doMore=true; for(var i=0; i0){ if(iframes[i].getAttribute('maxheight')){ if(height>parseInt(iframes[i].getAttribute('maxheight'))) height=parseInt(iframes[i].getAttribute('maxheight')); scrolling=true; } iframes[i].style.height = height+"px"; iframes[i].contentWindow.scrollY=0; } } if(iframes[i].getAttribute('resize')=='width' || iframes[i].getAttribute('resize')=='both'){ var width = parseInt(documentObject.body.scrollWidth?documentObject.body.scrollWidth:documentObject.documentElement.scrollWidth); if(width>0){ iframes[i].style.width = width+"px"; iframes[i].contentWindow.scrollX=0; } } iframes[i].setAttribute("scrolling",scrolling?"auto":"no"); } else { iframes[i].setAttribute("scrolling","auto"); doMore=false; } } } if(!doMore){ return; } } if(parent!=window){ if(parent.adjustiframe){ parent.adjustiframe(document); } } } //--Start Value changes-- function changeClass(obj,newClass){ obj = getRef(obj); if(obj.className!= newClass) obj.className= newClass; } function checkIfChanged(obj){ obj = getRef(obj); if(obj.nodeName=="INPUT"){ if(obj.type=="checkbox" || obj.type=="radio"){ return (obj.checked && obj.getAttribute("oldvalue")!="true")||!obj.checked && obj.getAttribute("oldvalue")!="false"; } } else if(obj.nodeName=="SELECT" && obj.multiple){ var oldvalue = obj.getAttribute("oldvalue"); for(var i=0; i0) doEnable = true break; case "select-multiple": for(var i=0; i