// © 2007 Vetup copyright all right reserved
function vt(a,b,c,d,e,f,g,h){z=g;s=a;t=b;y=["/sch","?hl=", "","&l=fr",(d?"&ds="+d:"")].join("");c(s,"submit",M);t.setAttribute("autocomplete","off");b(t,"br",N);y.setAttribute("style","padding:0;margin:0;border-collapse:collapse;font-family:Verdana;font-size:10px;");a(y,"pre",N);z=["pre","", "","&l=1",(e?"&ds="+c:"")].join("");}; if (typeof vtp == 'undefined') vtp = {};if (typeof vtp.navigator == 'undefined') vtp.navigator = {};vtp.navigator.firefox = (navigator.userAgent.search(/firefox/i) > 0 ||false); vtp.navigator.opera = (navigator.userAgent.search(/opera/i) > 0 ||false); vtp.navigator.chrome = (navigator.userAgent.search(/chrome/i) > 0 ||false); vtp.navigator.safari = (navigator.userAgent.search(/safari/i) > 0 ||false); vtp.navigator.ie = (navigator.userAgent.search(/MSIE/i) > 0 ||false); vtp.$ = function(id){ return document.getElementById(id); };vtp.$value = function(id){ var tmp = vtp.$(id); if(tmp) return (tmp.value); return ''; };vtp.define = function(sConstName , sConstValue){ var dHead; if(!vtp.navigator.ie) dHead = document.getElementsByTagName('head')[0]; if(!window.define) window.define = function(sConstName, sConstValue){ if( (!sConstValue && isNaN(sConstValue) ) || (typeof(sConstName) != 'string') || (typeof(sConstValue) != 'string' && typeof(sConstValue) != 'number') ){ dbg.alert('invalid const name or value'); }; if(typeof(sConstValue) == 'string') sConstValue = '"'+sConstValue+'"'; var sExpression = 'const '+sConstName+' = '+sConstValue; if(!vtp.navigator.ie){ var dScript = document.createElement('script'); dScript.appendChild(document.createTextNode(sExpression+';')); dHead.appendChild(dScript); }else{ execScript(sExpression , 'vbscript'); } }; return window.define(sConstName, sConstValue); };vtp.include = function(path, useAjaxGetEval){ if(!useAjaxGetEval) useAjaxGetEval = 0; if(!window.vtpIncludes){ window.vtpIncludes = new Array(); }else{ if(window.vtpIncludes.contains(path)) return; };window.vtpIncludes.push(path); if(path.substring(path.length - 3) == '.js'){ if(useAjaxGetEval){ var strm = vtp.ajaxGet(path, '', ''); eval(strm); }else{ document.write('<script type="text/javascript" src="' + path + '"><\/script>'); } }else{ document.write('<link href="'+path+'" rel="stylesheet" type="text/css">'); } };vtp.getGUID = function(){ var uid; var evChars='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'; var ret=false; while(!ret) { uid = ''; for(var t=1;t<=10;t++) uid+=evChars.charAt(Math.floor(52*Math.random())); ret = (document.getElementById(uid)==null); };return uid; };vtp.createInputType = function(type, id, name, value){ if(document.all){ ic = document.createElement('<input type="'+type+'" id="'+name+'" name="'+name+'" value="'+value+'"/>'); }else{ ic = document.createElement('input'); ic.setAttribute('type', type); ic.setAttribute('id', name); ic.setAttribute('name', name); ic.setAttribute('value', value); };return ic; };if (typeof vtp.uri == 'undefined') vtp.uri = {};vtp.uri.readParameter = function(name){ name = name.replace(/[\[]/,"\\\[").replace(/[\]]/,"\\\]"); var res = window.location.href.match("[\\?&]"+name+"=([^&#]*)"); if(res) return res[1]; return ''; };vtp.uri.extractScriptName = function(url){ var tmp; var a; var ret = url.match(/([^\/\?]+)(?:\.php.*)$/); if(ret.length > 0){ tmp = ret[1]; a = tmp.substring(0,1).toLowerCase(); tmp = tmp.substring(1,tmp.length); tmp = a + tmp; return tmp; } };vtp.uri.concatParamSeparator = function(urlToIns){ if(urlToIns.search("\\?") > 0) urlToIns += '&'; else urlToIns += '?'; return urlToIns; };vtp.uri.encode = function(plaintext){ var SAFECHARS = "0123456789" + "ABCDEFGHIJKLMNOPQRSTUVWXYZ" + "abcdefghijklmnopqrstuvwxyz" + "-_.!~*'()"; var HEX = "0123456789ABCDEF"; var encoded = ""; for (var i = 0; i < plaintext.length; i++ ) { var ch = plaintext.charAt(i); if (ch == " ") { encoded += "+"; } else if (SAFECHARS.indexOf(ch) != -1) { encoded += ch; } else { var charCode = ch.charCodeAt(0); if (charCode > 255) { alert( "Unicode Character '" + ch + "' cannot be encoded using standard URL encoding.\n" + "(URL encoding only supports 8-bit characters.)\n" + "A space (+) will be substituted." ); encoded += "+"; } else { encoded += "%"; encoded += HEX.charAt((charCode >> 4) & 0xF); encoded += HEX.charAt(charCode & 0xF); } } };return encoded; }; vtp.uri.decode = function(encoded){ var HEXCHARS = "0123456789ABCDEFabcdef"; var plaintext = ""; var i = 0; if(!encoded) return encoded; while (i < encoded.length) { var ch = encoded.charAt(i); if (ch == "+") { plaintext += " "; i++; }else if (ch == "%") { if (i < (encoded.length-2) && HEXCHARS.indexOf(encoded.charAt(i+1)) != -1 && HEXCHARS.indexOf(encoded.charAt(i+2)) != -1 ) { plaintext += unescape( encoded.substr(i,3) ); i += 3; } else { alert( 'Bad escape combination near ...' + encoded.substr(i) ); plaintext += "%[ERROR]"; i++; } }else { plaintext += ch; i++; } };return plaintext; }; vtp.ajaxGet = function(uri, method, parameters, useAsynchone){ method = (method||'GET'); parameters = (parameters||''); useAsynchone = (useAsynchone||false); var ret = null; if(vtp.navigator.ie) var req = new ActiveXObject("Microsoft.XMLHTTP"); else var req = new XMLHttpRequest(); if(method == 'POST'){ req.open(method, uri, useAsynchone); }else{ if(parameters) uri = uri+'?'+parameters; req.open(method, uri, useAsynchone); };if (useAsynchone){ var uid = vtp.getGUID(); req.onreadystatechange = function () { if (req.readyState == 4) { var spn = window.document.getElementById(uid); spn.innerHTML = req.responseText; } }; ret = '<span id="'+uid+'">\ <div id="loading" style="width:100px;margin:auto;margin-top:30px;">\ <img src="/ext/tools/img/loading.gif" style="border:none;margin-right:10px;vertical-align:middle;" />Loading...\ </div></span>'; };if(method == 'POST'){ req.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded'); req.send(parameters); }else{ req.send(null); };if (!useAsynchone) ret = req.responseText; return ret; }; Function.prototype.debounce = function (threshold, execAsap) { var timeout; var func = this; return function debounced () { var obj = this, args = arguments; function delayed () { if (!execAsap) func.apply(obj, args); timeout = null; }; if (timeout){ clearTimeout(timeout); }else if (execAsap){ func.apply(obj, args); };timeout = setTimeout(delayed, threshold || 100); }; }; if (typeof vtp.cookie == 'undefined') vtp.cookie = {};vtp.cookie.set = function(c_name,value,expiredays) { var exdate = new Date(); exdate.setDate(exdate.getDate()+expiredays); document.cookie = c_name+ "=" +escape(value)+((expiredays==null) ? "" : ";expires="+exdate.toGMTString()); };vtp.cookie.get = function( name ) { var start = document.cookie.indexOf(name + "="); var len = start + name.length + 1; if ((!start) && (name != document.cookie.substring(0, name.length))){ return null; };if (start == -1) return null; var end = document.cookie.indexOf(";", len); if (end == -1) end = document.cookie.length; return unescape(document.cookie.substring(len, end)); };vtp.cookie.remove = function( name, path, domain ) { document.cookie = name + "=" + ((path) ? ";path=" + path : "") + ((domain) ? ";domain=" + domain : "" ) + ";expires=Thu, 01-Jan-1970 00:00:01 GMT"; };if (typeof vtp.event == 'undefined') vtp.event = {};vtp.event.attach = function(eventType, functionToAttach){ if(vtp.navigator.ie){ return window.attachEvent("on"+eventType, functionToAttach); }else{ window.addEventListener(eventType, functionToAttach, false); return true; };return false; };vtp.event.getKeyCode = function(evt){ var key = 0; if(!evt) evt = window.event; if(evt.which) key = evt.which; else key = evt.keyCode; return key; };vtp.event.stopPropagation = function(evt){ var e; if(window.event) window.event.cancelBubble = true; else if(evt) evt.stopPropagation(); };if (typeof vtp.xml == 'undefined') vtp.xml = {};vtp.xml.newDocument = function(rootTagName, namespaceURL) { if (!rootTagName) rootTagName = ""; if (!namespaceURL) namespaceURL = ""; if (document.implementation && document.implementation.createDocument){ return document.implementation.createDocument(namespaceURL, rootTagName, null); }else{ var doc = new ActiveXObject("MSXML2.DOMDocument"); if (rootTagName) { var prefix = ""; var tagname = rootTagName; var p = rootTagName.indexOf(':'); if (p != -1){ prefix = rootTagName.substring(0, p); tagname = rootTagName.substring(p+1); };if (namespaceURL) { if (!prefix) prefix = "a0"; }else prefix = ""; var text = "<" + (prefix?(prefix+":"):"") + tagname + (namespaceURL?(" xmlns:" + prefix + '="' + namespaceURL +'"'):"") + "/>"; doc.loadXML(text); };return doc; } }; vtp.xml.parse = function(text){ if (typeof DOMParser != "undefined"){ return (new DOMParser()).parseFromString(text, "application/xml"); }else if (typeof ActiveXObject != "undefined"){ var doc = vtp.xml.newDocument(); doc.loadXML(text); return doc; }else{ var url = "data:text/xml;charset=utf-8," + encodeURIComponent(text); var request = new XMLHttpRequest(); request.open("GET", url, false); request.send(null); return request.responseXML; } }; Array.prototype.contains = function (element){ for (var i = 0; i < this.length; i++){ if (this[i] == element){ return true; } };return false; }; Array.prototype.clear=function(){ this.length = 0; }; Array.prototype.sortBubble = function(){ var tmp; for(var i=0;i<this.length;i++){ for(var j=0;j<this.length;j++){ if(this[i]<this[j]){ tmp = this[i]; this[i] = this[j]; this[j] = tmp; } } } }; if (typeof vtp.graphic == 'undefined') vtp.graphic = {};vtp.graphic.findPosX = function(obj){ var curleft = 0; if(obj.offsetParent) while(1){ curleft += obj.offsetLeft; if(!obj.offsetParent) break; obj = obj.offsetParent; }else if(obj.x) curleft += obj.x; return curleft; };vtp.graphic.findPosY = function(obj){ var curtop = 0; if(obj.offsetParent) while(1){ curtop += obj.offsetTop; if(!obj.offsetParent) break; obj = obj.offsetParent; }else if(obj.y) curtop += obj.y; return curtop; };vtp.base64 = { _keyStr : "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=", encode : function (input) { var output = ""; var chr1, chr2, chr3, enc1, enc2, enc3, enc4; var i = 0; input = vtp.base64._utf8_encode(input); while (i < input.length) { chr1 = input.charCodeAt(i++); chr2 = input.charCodeAt(i++); chr3 = input.charCodeAt(i++); enc1 = chr1 >> 2; enc2 = ((chr1 & 3) << 4) | (chr2 >> 4); enc3 = ((chr2 & 15) << 2) | (chr3 >> 6); enc4 = chr3 & 63; if (isNaN(chr2)) { enc3 = enc4 = 64; } else if (isNaN(chr3)) { enc4 = 64; };output = output + this._keyStr.charAt(enc1) + this._keyStr.charAt(enc2) + this._keyStr.charAt(enc3) + this._keyStr.charAt(enc4); };return output; }, decode : function (input) { var output = ""; var chr1, chr2, chr3; var enc1, enc2, enc3, enc4; var i = 0; input = input.replace(/[^A-Za-z0-9\+\/\=]/g, ""); while (i < input.length) { enc1 = this._keyStr.indexOf(input.charAt(i++)); enc2 = this._keyStr.indexOf(input.charAt(i++)); enc3 = this._keyStr.indexOf(input.charAt(i++)); enc4 = this._keyStr.indexOf(input.charAt(i++)); chr1 = (enc1 << 2) | (enc2 >> 4); chr2 = ((enc2 & 15) << 4) | (enc3 >> 2); chr3 = ((enc3 & 3) << 6) | enc4; output = output + String.fromCharCode(chr1); if (enc3 != 64) { output = output + String.fromCharCode(chr2); };if (enc4 != 64) { output = output + String.fromCharCode(chr3); } };output = vtp.base64._utf8_decode(output); return output; }, _utf8_encode : function (string) { string = string.replace(/\r\n/g,"\n"); var utftext = ""; for (var n = 0; n < string.length; n++) { var c = string.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; }, _utf8_decode : function (utftext) { var string = ""; var i = 0; var c = c1 = c2 = 0; while ( i < utftext.length ) { c = utftext.charCodeAt(i); if (c < 128) { string += String.fromCharCode(c); i++; }else if((c > 191) && (c < 224)) { c2 = utftext.charCodeAt(i+1); string += String.fromCharCode(((c & 31) << 6) | (c2 & 63)); i += 2; }else { c2 = utftext.charCodeAt(i+1); c3 = utftext.charCodeAt(i+2); string += String.fromCharCode(((c & 15) << 12) | ((c2 & 63) << 6) | (c3 & 63)); i += 3; } };return string; } };if (typeof dbg == 'undefined') dbg = {};dbg.alert = function(str, doWait, noBr){ str = vtp.uri.decode(str); if(navigator.userAgent.contains('Firefox/4.0')){ str = str.replace(/<(tr|br)>/ig,"\n"); str = str.replace(/(<([^>]+)>)/ig,""); alert(str); return; };var nwin = window.open ('', 'dbgAlert', 'width=1450, height=900, toolbar=yes, location=yes, directories=yes, status=yes, menubar=yes, scrollbars=yes, resizable=yes, top=0, left=0'); var dbgCtnr = nwin.document.getElementById('dbgCtnr'); if(dbgCtnr){ dbgCtnr.innerHTML = str + '------------------------------------------------------' + dbgCtnr.innerHTML; }else{ nwin.document.body.innerHTML = "<div class='mini' id='dbgCtnr'>"+str+"</div>"; };if(doWait == true) alert(doWait+"waiting"); }; dbg.listProperties = function(obj){ var itm; var str = obj+' :'; for(prop in obj){ var tabs = '\t'; var tmp = (String)(obj[prop]); tmp = tmp.replace(/\n/g, ' '); tmp = tmp.replace(/\r/g, ' '); tmp = tmp.trim(); if(prop.length >= 29) tabs = '\t'; else if(prop.length >= 22) tabs = '\t\t'; else if(prop.length >= 14) tabs = '\t\t\t'; else if(prop.length >= 6) tabs = '\t\t\t\t'; else tabs = '\t\t\t\t\t'; str += '\n'+prop+' :'+tabs+tmp; };dbg.alert(str); }; dbg.benchStart = function(){ window.bdgTimerStart = new Date(); }; dbg.benchGet = function(traceConcatString){ var time = new Date(); time = time.getTime() - window.bdgTimerStart.getTime(); if(!traceConcatString) traceConcatString = ''; else traceConcatString = '\t '+traceConcatString; dbg.alert(time / 1000 +" s"+traceConcatString); }; if (this.JSON){ JSON.htmlify = function(str) { str = JSON.stringify(str); str = vtp.base64.encode(str); str = vtp.uri.encode(str); return str; } };String.prototype.replaceAll = function(search, repl) { var str = this; while (str.indexOf(search) != -1) str = str.replace(search, repl); return str; };String.prototype.trim = function() { return this.replace(/(^\s*)|(\s*$)/g, ""); };String.prototype.isLowerCase = function(pos){ if (!arguments.length) var pos = 0; if (pos >= this.length) return false; var c = this.charCodeAt(pos); return (c > 96 && c < 123); };String.prototype.isUpperCase = function(pos){ if (!arguments.length) var pos = 0; if (pos >= this.length) return false; var c = this.charCodeAt(pos); return (c > 64 && c < 91); };String.prototype.contains = function(toFind) { if(this.search(toFind) >= 0) return true; else return false; };String.prototype.padLeft = function(strChar, intLength){ var str = this + ''; while(str.length < intLength) str = strChar + str; return str; };String.prototype.capture = function(capturingRegex) { var m = this.match(capturingRegex); if(m){ if(m[1] && m[1].length > 0) return m[1]; if(m[0] && m[0].length > 0) return m[0]; };return ""; };String.prototype.string2Ascii = function(){ var str = this.trim(); str = str.removeAccents(); str = str.replace(/\W/g, ''); return str; };String.prototype.removeAccents = function() { var tmp = this; tmp = tmp.replace(/[Ã Ã¢Ã¤]/gi,"a"); tmp = tmp.replace(/[Ã©Ã¨ÃªÃ«]/gi,"e"); tmp = tmp.replace(/[Ã®Ã¯]/gi,"i"); tmp = tmp.replace(/[Ã´Ã¶]/gi,"o"); tmp = tmp.replace(/[Ã¹Ã»Ã¼]/gi,"u"); return tmp; }; String.prototype.isAlpha = function() { return /^[A-Za-zÃ€Ã‚Ã‡ÃˆÃ‰ÃŠÃ‹ÃŽÃ”Ã™Ã›Ã Ã¢Ã§Ã¨Ã©ÃªÃ«Ã®Ã´Ã¹Ã»\s]+$/.test(this); };String.prototype.isAlphaNum = function() { return /^[\wÃ€Ã‚Ã‡ÃˆÃ‰ÃŠÃ‹ÃŽÃ”Ã™Ã›Ã Ã¢Ã§Ã¨Ã©ÃªÃ«Ã®Ã´Ã¹Ã»\s]+$/.test(this); };String.prototype.isNumeric = function() { return /^\d+$/.test(this); };String.prototype.isNumber = function() { return /^[-]?\d+$/.test(this); };String.prototype.isNotEmpty = function() { return !/^\s*$/.test(this); };String.prototype.isEmail = function() { return /^[\w\._-]+@[\w\._-]{2,}[.][A-Za-z]{1,6}$/.test(this); };String.prototype.isNoTel = function() { return /^(0\d{9})|(0\d[ \.-]\d{2}[ \.-]\d{2}[ \.-]\d{2}[ \.-]\d{2})$/.test(this); };String.prototype.isNoSecu = function() { if (/^[12]\d{2}((1[0-2])|(0[1-9]))\d{10}$/.test(this)) { var secu = parseInt(this.substring(0, 13)); var cle = parseInt(this.substring(13, 15)); return cle == (97 - secu % 97); };return false; };if (typeof vtp.date == 'undefined') vtp.date = {};String.prototype.isDate = function() { if (/^\d{2}[\/]\d{2}[\/]\d{4}$/.test(this)) { var dat1 = this.split("/"); var dat2 = new Date(dat1[2], dat1[1] - 1, dat1[0]); return (dat2.getDate() == dat1[0] && dat2.getMonth() == dat1[1]-1 && dat2.getFullYear() == dat1[2]); };return false; };String.prototype.toDate = function(){ var rx = new RegExp(/^(\d{1,2})([^\d])(\d{1,2})\2(\d{2})(\d{2})?$/); var ar = rx.exec(this); if (ar) var date = new Date(parseInt((ar[4]+ar[5]),10), parseInt(ar[3],10) - 1, parseInt(ar[1],10)); else var date = new Date(); return date; }; Date.prototype.toString = function(withTimeSeparator){ var ret = this.getDate().toString().padLeft(0, 2)+'/'+parseInt(this.getMonth() + 1, 10).toString().padLeft(0, 2)+'/'+this.getFullYear(); if(withTimeSeparator) ret += withTimeSeparator+this.getHours().toString().padLeft(0, 2)+':'+this.getMinutes().toString().padLeft(0, 2); return ret; }; vtp.date.diff = function(dateMin, dateMax){ var dMin = new Date(dateMin.toDate()); var dMax = new Date(dateMax.toDate()); var ret = dMax - dMin; ret = ret / 1000 / 60; return ret; };String.prototype.completeDate = function() { var chain = this; if (/^\d+$/.test(chain) && (6 == chain.length || 8 == chain.length)) chain=chain.substring(0,2)+"/"+chain.substring(2,4)+"/"+chain.substring(4,chain.length); var reg = /^(\d{1,2})[\/\.\\-](\d{1,2})[\/\.\\-](\d{1,4})$/; if(reg.test(chain)){ chain = chain.replace(reg, "$1/$2/$3"); var tab = chain.split("/"); for(var i = 0; i < 2; i++){ var tabi = parseInt(tab[i], 10); tab[i] = tabi > 9 ? tab[i] : '0' + tabi; };if(4 != tab[2].length){ var ObjetDate = new Date(); var year = new String(ObjetDate.getFullYear()); if (eval(tab[2]) > eval(year.substring(2,4))) year = eval(year.substring(0,2) - 1) + year.substring(2,4); tab[2] = year.substring(0, 4 - tab[2].length) + tab[2]; };return tab.join("/"); };return chain; }; Function.prototype.extend = function(baseClass){ this.prototype = new baseClass(); this.prototype.constructor = this; this.baseConstructor = baseClass; this.base = baseClass.prototype; this.callBaseConstructor = function(instance) { for(var a=1,args=[];a<arguments.length;args.push(arguments[a]),a++); this.base['constructor'].apply(instance, args); }; this.callBaseMethod = function(instance, method) { for(var a=2,args=[];a<arguments.length;args.push(arguments[a]),a++); return this.base[method].apply(instance, args); }; }; if (typeof vtp.emul == 'undefined') vtp.emul = {};if (!vtp.navigator.ie){ Node.prototype.removeNode = function( bRemoveChildren ){ var parent = this.parentNode; if ( parent && !bRemoveChildren ) { var df = document.createDocumentFragment(); for( var i=0; i < this.childNodes.length; i++ ) df.appendChild( this.childNodes[i] ); parent.insertBefore(df,this) };return parent ? parent.removeChild( this ) : this; }; Event.prototype.__defineGetter__("srcElement", function (){ var node = this.target; while (node.nodeType != 1) node = node.parentNode; return node; }); Event.prototype.__defineGetter__("toElement", function (){ var node; if (this.type == "mouseout") node = this.relatedTarget; else if (this.type == "mouseover") node = this.target; if (node){ var nt = 0; while (nt!=1){ try{ nt = node.nodeType; if (nt != 1) node = node.parentNode; }catch(e){ node=null; break; } } };return node; }); HTMLElement.prototype.contains = function (oEl){ if (oEl == this) return true; if (oEl == null) return false; return this.contains(oEl.parentNode); }; HTMLElement.prototype.__defineGetter__("currentStyle", function(){ return window.getComputedStyle(this, null); }); HTMLElement.prototype.__defineGetter__("outerHTML", function (){ return vtp.emul.getOuterHTML(this); }); HTMLElement.prototype.__defineGetter__("outerText", function (){ return this.textContent; }); Element.prototype.__defineGetter__("text", function (){ return this.textContent; }); vtp.emul.getOuterHTML = function (node){ var str = ''; switch (node.nodeType){ case 1: str += '<' + node.nodeName; for (var i=0; i<node.attributes.length; i++){ if (node.attributes.item(i).nodeValue != null){ str += ' '; str += node.attributes.item(i).nodeName; str += '="'; str += node.attributes.item(i).nodeValue; str += '"'; } };if (node.childNodes.length == 0) str += '/ >'; else{ str += '>'; str += node.innerHTML; str += '</' + node.nodeName + '>'; };break; case 3: str += node.nodeValue; break; case 4: str += '<![CDATA[' + node.nodeValue + ']]>'; break; case 5: str += '&' + node.nodeName + ';'; break; case 8: str += '<!--' + node.nodeValue + '-->'; break; };return str; }; HTMLElement.prototype.insertAdjacentHTML = function (sWhere, sHTML){ var df, r = this.ownerDocument.createRange(); switch (String(sWhere).toLowerCase()){ case "beforebegin": r.setStartBefore(this); df = r.createContextualFragment(sHTML); this.parentNode.insertBefore(df, this); break; case "afterbegin": r.selectNodeContents(this); r.collapse(true); df = r.createContextualFragment(sHTML); this.insertBefore(df, this.firstChild); break; case "beforeend": r.selectNodeContents(this); r.collapse(false); df = r.createContextualFragment(sHTML); this.appendChild(df); break; case "afterend": try{ r.setStartAfter(this); df = r.createContextualFragment(sHTML); this.parentNode.insertBefore(df, this.nextSibling); }catch(ex){};break; } }; };vtp.include('/ext/tools/cssBrowserSelector.js'); 
