                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                

if(!window.__td){window.__MT=100;window.__ti=0;window.__td=[];window.__td.length=__MT;window.__noTrace=false;}
if(typeof vp=="undefined"){var vp={};}
if(!vp.text)
{vp.text=function text(){if(!window.__noTrace){__td[__ti]=arguments;__ti=__ti>=__MT?0:__ti+1;}};}
vp.text.htmlPattern=/<(?:.|\s)*?>/g;vp.text.hasRtlText=function text_hasRtlText(sText){if(!window.__noTrace){__td[__ti]=arguments;__ti=__ti>=__MT?0:__ti+1;}
if(typeof sText!="string")
{throw new Error("vp.text.hasRtlText(): Text is null.");}
var iLen=sText.length;for(var i=0;i<iLen;i++)
{if(vp.text.isRtlCode(sText.charCodeAt(i)))
{return true;}}
return false;};vp.text.isRtlCode=function text_isRtlCode(iCode){if(!window.__noTrace){__td[__ti]=arguments;__ti=__ti>=__MT?0:__ti+1;}
if(iCode<0x0590){return false;}else if(iCode<=0x074f){return true;}else if(iCode<0x0780){return false;}else if(iCode<=0x07bf){return true;}else if(iCode<0xfb1d){return false;}else if(iCode<=0xfefc){return true;}else{return false;}};vp.text.stripHtml=function text_stripHtml(sText){if(!window.__noTrace){__td[__ti]=arguments;__ti=__ti>=__MT?0:__ti+1;}
if(typeof sText!="string"){throw new Error("vp.text.stripHtml(): Text is null.");}
return sText.replace(this.htmlPattern,"");};vp.text.stripRtlText=function text_stripRtlText(sText){if(!window.__noTrace){__td[__ti]=arguments;__ti=__ti>=__MT?0:__ti+1;}
if(typeof sText!="string")
{throw new Error("vp.text.stripRtlText(): Text is null.");}
var aOut=[];var iLen=sText.length;for(var i=0;i<iLen;i++)
{if(!vp.text.isRtlCode(sText.charCodeAt(i)))
{aOut.push(sText.charAt(i));}}
return aOut.join("");};RegExp.escape=function(text)
{if(!arguments.callee.sRE)
{var specials=['/','.','*','+','?','|','(',')','[',']','{','}','\\','$','#','@',' ','%'];arguments.callee.sRE=new RegExp('(\\'+specials.join('|\\')+')','g');}
return text.replace(arguments.callee.sRE,'\\$1');};vp.text.replace=function text_replace(sText,sFind,sReplace,bCaseInsensitive)
{if(!window.__noTrace){__td[__ti]=arguments;__ti=__ti>=__MT?0:__ti+1;}
var sRegExp=RegExp.escape(sFind);var sOptions=bCaseInsensitive?"gi":"g";var oRegExp=new RegExp(sRegExp,sOptions);return sText.replace(oRegExp,sReplace);};vp.text.trim=function text_trim(sText){if(!window.__noTrace){__td[__ti]=arguments;__ti=__ti>=__MT?0:__ti+1;}
try
{sText=sText.toString();}
catch(e)
{throw new Error("vp.text.trim(): Argument could not be converted to a string.");}
return sText.replace(/^\s*(.*?)\s*$/,"$1");};String.prototype.trim=function(){return vp.text.trim(this);};vp.text.truncate=function text_truncate(sStr,iLen)
{if(!window.__noTrace){__td[__ti]=arguments;__ti=__ti>=__MT?0:__ti+1;}
if(sStr.length-3>iLen)
{return sStr.substr(0,iLen)+"...";}
else
{return sStr;}};String.prototype.startsWith=function(sPrefix,bCaseInsensitive)
{if(!sPrefix)
{return false;}
if(sPrefix.length>this.length)
{return false;}
var sSubject=bCaseInsensitive?this.toLowerCase():this;var sCompareTo=bCaseInsensitive?sPrefix.toLowerCase():sPrefix;return sSubject.substring(0,sPrefix.length)===sCompareTo;};String.prototype.truncate=function(iLen){return vp.text.truncate(this,iLen);};String.prototype.format=function()
{var sStr=this;for(var i=0;i<arguments.length;i++)
{var oRe=new RegExp('\\{'+(i)+'\\}','gm');sStr=sStr.replace(oRe,arguments[i]);}
return sStr;};
