obips.HTMLDOM=function(){};obips.HTMLDOM.insertHTMLBeforeEndOfElement=function(d,c){if(d.insertAdjacentHTML){d.insertAdjacentHTML("beforeEnd",c)}else{if(document.createRange){var a=document.createRange();if(d.lastChild){a.setStartBefore(d.lastChild)}else{a.setStartBefore(d)}var b=a.createContextualFragment(c);element.appendChild(b)}}};obips.HTMLDOM.innerHTML=function(d,c){if(d.innerHTML!="undefined"){d.innerHTML=c}else{if(document.createRange){var a=document.createRange();if(d.firstChild){a.setStartBefore(d.firstChild);a.setEndAfter(d.lastChild)}else{a.setStartBefore(d)}var b=a.createContextualFragment(c);d.appendChild(b)}}};obips.HTMLDOM.calculateAbsoluteOffsetLeft=function(b){var a=b.offsetLeft;var c=(b.offsetParent?b.offsetParent:b.parentElement);while(c!=null&&c.tagName!="HTML"){a+=c.offsetLeft;c=(c.offsetParent?c.offsetParent:c.parentElement)}return a};obips.HTMLDOM.calculateAbsoluteOffsetTop=function(b){var a=b.offsetTop;var c=(b.offsetParent?b.offsetParent:b.parentElement);while(c!=null&&c.tagName!="HTML"){a+=c.offsetTop;c=(c.offsetParent?c.offsetParent:c.parentElement)}return a};obips.HTMLDOM.selectOptionByValue=function(a,c){var d=-1;for(var b=0;b<a.options.length;b++){if(a.options[b].value==c){a.selectedIndex=d=b;break}}return d};obips.HTMLDOM.getSelectedOptionValue=function(a){var b=null;if(a.selectedIndex>=0&&a.selectedIndex<a.options.length){b=a.options[a.selectedIndex].value}else{if(a.options.length>0){b=a.options[0].value}else{b=null}}return b};obips.HTMLDOM.removeOptionByValue=function(a,c){for(var b=0;b<a.options.length;b++){if(a.options[b].value==c){a.remove(b);break}}};obips.HTMLDOM.removeChildNodes=function(c){var b=c.childNodes;if(b){for(var a=b.length-1;a>=0;a--){c.removeChild(b[a])}}};obips.HTMLDOM.createNamedElement=function(a,c){var b=null;try{b=document.createElement("<"+a+' name="'+c+'">')}catch(d){if(!b||b.nodeName!=a.toUpperCase()){b=document.createElement(a);b.name=c}}return b};obips.HTMLDOM.getFrameWidth=function(a){a=a||window;var b=null;if(a.innerHeight){b=a.innerWidth}else{if(a.document.documentElement&&a.document.documentElement.clientHeight){b=a.document.documentElement.clientWidth}else{if(a.document.body){b=a.document.body.clientWidth}}}return b};obips.HTMLDOM.getFrameHeight=function(a){a=a||window;var b=null;if(a.innerHeight){b=a.innerHeight}else{if(a.document.documentElement&&a.document.documentElement.clientHeight){b=a.document.documentElement.clientHeight}else{if(a.document.body){b=a.document.body.clientHeight}}}return b};obips.HTMLDOM.getSelectedText=function(){var a=null;if(window.getSelection){a=window.getSelection()}else{if(document.getSelection){a=document.getSelection()}else{if(document.selection){a=document.selection.createRange().text}}}return a};