function et_findXLoc(obj){var left=0;if(obj.offsetParent){while(obj.offsetParent){left+=obj.offsetLeft;obj=obj.offsetParent;}}else if(obj.x)left+=obj.x;return left;}function et_findYLoc(obj){var top=0;if(obj.offsetParent){while(obj.offsetParent){top+=obj.offsetTop;obj=obj.offsetParent;}}else if(obj.y)top+=obj.y;return top;}function et_clientWidth(){return et_filterResults(window.innerWidth?window.innerWidth:0,document.documentElement?document.documentElement.clientWidth:0,document.body?document.body.clientWidth:0);}function et_clientHeight(){return et_filterResults(window.innerHeight?window.innerHeight:0,document.documentElement?document.documentElement.clientHeight:0,document.body?document.body.clientHeight:0);}function et_scrollLeft(){return et_filterResults(window.pageXOffset?window.pageXOffset:0,document.documentElement?document.documentElement.scrollLeft:0,document.body?document.body.scrollLeft:0);}function et_scrollTop(){return et_filterResults(window.pageYOffset?window.pageYOffset:0,document.documentElement?document.documentElement.scrollTop:0,document.body?document.body.scrollTop:0);}function et_filterQuotes(msg){var ret="";for(var i=0;i<msg.length;i++){var cur=msg.charAt(i);if(cur=='‘'||cur=='’')ret+='\'';else if(cur=='“'||cur=='”')ret+='"';else ret+=cur;}return ret;}function et_filterResults(n_win,n_docel,n_body){var n_result=n_win?n_win:0;if(n_docel&&(!n_result||(n_result>n_docel)))n_result=n_docel;return n_body&&(!n_result||(n_result>n_body))?n_body:n_result;}function et_sizeWindowHeightToElement(elemId,padding){var width=et_clientWidth();var height=et_clientHeight();var elem=document.getElementById(elemId);var destHeight=elem.offsetHeight+(padding*2);var sizeHeight=destHeight-height;self.resizeBy(0,sizeHeight);}function et_getElementsByClassName(oElm,strTagName,strClassName){var arrElements=(strTagName=="*"&&oElm.all)?oElm.all:oElm.getElementsByTagName(strTagName);var arrReturnElements=new Array();strClassName=strClassName.replace(/\-/g,"\\-");var oRegExp=new RegExp("(^|\\s)"+strClassName+"(\\s|$)");var oElement;for(var i=0;i<arrElements.length;i++){oElement=arrElements[i];if(oRegExp.test(oElement.className)){arrReturnElements.push(oElement);}}return(arrReturnElements)}function hasInSubTree(parent,child){var inBranch=false;for(var i=0;i<parent.childNodes.length;i++){var cchild=parent.childNodes[i];if(cchild==child)return true;else inBranch=inBranch||hasInSubTree(cchild,child);}return inBranch;}function et_findChild(start,tagName,className){for(var i=0;i<start.childNodes.length;i++){var node=start.childNodes[i];if(node.nodeType!=3&&node.tagName==tagName){if(!className||node.className==className)return node;}}}function et_findInTree(start,tagName,className){if((start.nodeType!=3&&start.tagName==tagName)&&(!className||start.className==className)){return start;}else{var val=null;for(var i=0;i<start.childNodes.length;i++){var node=start.childNodes[i];val=et_findInTree(node,tagName,className);if(val)break;}if(val)return val;else return null;}}function et_findParent(child,tagName,className){if(child){if(child.tagName==tagName&&(!className||className==child.className)){return child;}else{return et_findParent(child.parentNode,tagName,className);}}return null;}function et_getEventController(evt){var event=(evt)?evt:window.event;var source=(event.target)?event.target:event.srcElement;return et_findControllerNode(source);}function et_findControllerNode(start){if(start&&start.controller){return start;}var curNode=start;while(curNode){var parent=curNode.parentNode;if(parent&&parent.controller)return parent;curNode=parent;}return null;}function et_setControllerNode(elem,controller){if(elem){if(controller)elem.controller=controller;else elem.controller=this;}}function et_setupLink(element,controller,onclick){var elem=element;if(!element.nodeType)elem=document.getElementById(element);if(elem){elem.controller=controller;if(elem.href)elem.href='javascript:void(0);';elem.onclick=onclick;elem.style.cursor='pointer';}}function et_findEventSource(evt,findController){var event=(evt)?evt:window.event;var source=(event.target)?event.target:event.srcElement;if(findController)return et_findControllerNode(source);else return source;}function trim(str,chars){if(!str)return"";return ltrim(rtrim(str,chars),chars);}function ltrim(str,chars){return str.replace(/^\s+/,"");}function rtrim(str,chars){chars=chars||"\\s";return str.replace(new RegExp("["+chars+"]+$","g"),"");}function et_setObjectOpacity(opacity,object){object=object.style;object.opacity=(opacity/100);object.MozOpacity=(opacity/100);object.KhtmlOpacity=(opacity/100);object.filter="alpha(opacity="+opacity+")";}function et_findImage(root){for(var i=0;i<root.childNodes.length;i++){var cur=root.childNodes[i];if(cur.tagName&&cur.tagName=="IMG"){return cur;}}}function et_findText(root){for(var i=0;i<root.childNodes.length;i++){var cur=root.childNodes[i];if(cur.nodeType==3&&trim(cur.nodeValue).length>0){return cur;}}}function et_clearText(root){for(var i=0;i<root.childNodes.length;i++){var cur=root.childNodes[i];if(cur.nodeType==3&&trim(cur.nodeValue).length>0){cur.nodeValue="";}}}function et_confirmDelete(obj){return confirm("Are you sure you want to "+obj.title+"?");}function et_enodeUrl(url){url=url.replace(/\r\n/g,"\n");var utftext="";for(var n=0;n<url.length;n++){var c=url.charCodeAt(n);if(c<128){utftext+=String.fromCharCode(c);}else if((c>127)&&(c<2048)){utftext+=String.fromCharCode((c>>6)|192);utftext+=String.fromCharCode((c&63)|128);}else{utftext+=String.fromCharCode((c>>12)|224);utftext+=String.fromCharCode(((c>>6)&63)|128);utftext+=String.fromCharCode((c&63)|128);}}return utftext;}function et_createElement(tagName,className,id){var elem=document.createElement(tagName);if(className)elem.className=className;if(id)elem.id=id;return elem;}function et_createImage(source,height,width,alt){var image=document.createElement('img');image.border=0;image.src=source;if(height)image.height=height;if(width)image.width=width;if(alt)image.alt=alt;return image;}function et_createAnchor(href,text,title,className,id){var anchor=document.createElement('A');anchor.href=href;if(text)anchor.appendChild(document.createTextNode(text));if(title)anchor.title=title;if(id)anchor.id=id;if(className)anchor.className=className;return anchor;}function et_addLoadEvent(func){var oldonload=window.onload;if(typeof window.onload!='function'){window.onload=func;}else{window.onload=function(){if(oldonload){oldonload();}func();}}}function et_stopBubble(evt){if(!evt)var evt=window.event;evt.cancelBubble=true;if(evt.stopPropagation)evt.stopPropagation();}