var dp={sh:{Utils:{},Brushes:{},Strings:{},Version:"1.3.0"}};dp.sh.Strings={AboutDialog:"<html><head><title>About...</title></head><body class=\"dp-about\"><table cellspacing=\"0\"><tr><td class=\"copy\"><p class=\"title\">dp.SyntaxHighlighter</div><div class=\"para\">Version: {V}</p><p><a href=\"http://www.dreamprojections.com/syntaxhighlighter/?ref=about\" target=\"_blank\">http://www.dreamprojections.com/SyntaxHighlighter</a></p>&copy;2004-2005 Alex Gorbatchev. All right reserved.</td></tr><tr><td class=\"footer\"><input type=\"button\" class=\"close\" value=\"OK\" onClick=\"window.close()\"/></td></tr></table></body></html>",ExpandCode:"+ expand code",ViewPlain:"view plain",Print:"print",CopyToClipboard:"copy to clipboard",About:"?",CopiedToClipboard:"The code is in your clipboard now."};dp.SyntaxHighlighter=dp.sh;dp.sh.Utils.Expand=function(_1){var _2=_1;var _3=_1;while(_3!=null&&_3.tagName!="SPAN"){_3=_3.parentNode;}while(_2!=null&&_2.tagName!="TABLE"){_2=_2.parentNode;}_3.parentNode.removeChild(_3);_2.tBodies[0].className="show";_2.parentNode.style.height="100%";};dp.sh.Utils.ViewSource=function(_4){var _5=_4.parentNode.originalCode;var _6=window.open("","_blank","width=750, height=400, location=0, resizable=1, menubar=0, scrollbars=1");_5=_5.replace(/</g,"&lt;");_6.document.write("<pre>"+_5+"</pre>");_6.document.close();};dp.sh.Utils.ToClipboard=function(_7){var _8=_7.parentNode.originalCode;if(window.clipboardData){window.clipboardData.setData("text",_8);alert(dp.sh.Strings.CopiedToClipboard);}};dp.sh.Utils.PrintSource=function(_9){var td=_9.parentNode;var _b=td.processedCode;var _c=document.createElement("IFRAME");var _d=null;var _e=_c.style.cssText="position:absolute; width:0px; height:0px; left:-5px; top:-5px;";td.appendChild(_c);_d=_c.contentWindow.document;_b=_b.replace(/</g,"&lt;");_d.open();_d.write("<pre>"+_b+"</pre>");_d.close();_c.contentWindow.focus();_c.contentWindow.print();td.removeChild(_c);};dp.sh.Utils.About=function(){var _f=window.open("","_blank","dialog,width=320,height=150,scrollbars=0");var doc=_f.document;var _11=document.getElementsByTagName("style");var _12=document.getElementsByTagName("link");doc.write(dp.sh.Strings.AboutDialog.replace("{V}",dp.sh.Version));for(var i=0;i<_11.length;i++){doc.write("<style>"+_11[i].innerHTML+"</style>");}for(var i=0;i<_12.length;i++){if(_12[i].rel.toLowerCase()=="stylesheet"){doc.write("<link type=\"text/css\" rel=\"stylesheet\" href=\""+_12[i].href+"\"></link>");}}doc.close();_f.focus();};dp.sh.Match=function(_15,_16,css){this.value=_15;this.index=_16;this.length=_15.length;this.css=css;};dp.sh.Highlighter=function(){this.addGutter=true;this.addControls=true;this.collapse=false;this.tabsToSpaces=true;};dp.sh.Highlighter.SortCallback=function(m1,m2){if(m1.index<m2.index){return -1;}else{if(m1.index>m2.index){return 1;}else{if(m1.length<m2.length){return -1;}else{if(m1.length>m2.length){return 1;}}}}return 0;};dp.sh.Highlighter.prototype.GetMatches=function(_1a,css){var _1c=0;var _1d=null;while((_1d=_1a.exec(this.code))!=null){this.matches[this.matches.length]=new dp.sh.Match(_1d[0],_1d.index,css);}};dp.sh.Highlighter.prototype.AddBit=function(str,css){var _20=document.createElement("span");str=str.replace(/&/g,"&amp;");str=str.replace(/ /g,"&nbsp;");str=str.replace(/</g,"&lt;");str=str.replace(/\n/gm,"&nbsp;<br>");if(css!=null){var _21=new RegExp("<br>","gi");if(_21.test(str)){var _22=str.split("&nbsp;<br>");str="";for(var i=0;i<_22.length;i++){_20=document.createElement("SPAN");_20.className=css;_20.innerHTML=_22[i];this.div.appendChild(_20);if(i+1<_22.length){this.div.appendChild(document.createElement("BR"));}}}else{_20.className=css;_20.innerHTML=str;this.div.appendChild(_20);}}else{_20.innerHTML=str;this.div.appendChild(_20);}};dp.sh.Highlighter.prototype.IsInside=function(_24){if(_24==null||_24.length==0){return;}for(var i=0;i<this.matches.length;i++){var c=this.matches[i];if(c==null){continue;}if((_24.index>c.index)&&(_24.index<=c.index+c.length)){return true;}}return false;};dp.sh.Highlighter.prototype.ProcessRegexList=function(){for(var i=0;i<this.regexList.length;i++){this.GetMatches(this.regexList[i].regex,this.regexList[i].css);}};dp.sh.Highlighter.prototype.ProcessSmartTabs=function(_28){var _29=_28.split("\n");var _2a="";var _2b=4;var tab="\t";function InsertSpaces(_2d,pos,_2f){var _30=_2d.substr(0,pos);var _31=_2d.substr(pos+1,_2d.length);var _32="";for(var i=0;i<_2f;i++){_32+=" ";}return _30+_32+_31;}function ProcessLine(_34,_35){if(_34.indexOf(tab)==-1){return _34;}var pos=0;while((pos=_34.indexOf(tab))!=-1){var _37=_35-pos%_35;_34=InsertSpaces(_34,pos,_37);}return _34;}for(var i=0;i<_29.length;i++){_2a+=ProcessLine(_29[i],_2b)+"\n";}return _2a;};dp.sh.Highlighter.prototype.SwitchToTable=function(){var _39=this.div.innerHTML.replace(/<(br)\/?>/gi,"\n");var _3a=_39.split("\n");var row=null;var _3c=null;var _3d=null;var _3e="";var _3f=" | ";function UtilHref(_40,_41){return "<a href=\"#\" onclick=\"dp.sh.Utils."+_40+"(this); return false;\">"+_41+"</a>";}_3d=document.createElement("TBODY");this.table.appendChild(_3d);if(this.addGutter==true){row=_3d.insertRow(-1);_3c=row.insertCell(-1);_3c.className="tools-corner";}if(this.addControls==true){var _42=document.createElement("THEAD");this.table.appendChild(_42);row=_42.insertRow(-1);if(this.addGutter==true){_3c=row.insertCell(-1);_3c.className="tools-corner";}_3c=row.insertCell(-1);_3c.originalCode=this.originalCode;_3c.processedCode=this.code;_3c.className="tools";if(this.collapse==true){_3d.className="hide";_3c.innerHTML+="<span><b>"+UtilHref("Expand",dp.sh.Strings.ExpandCode)+"</b>"+_3f+"</span>";}_3c.innerHTML+=UtilHref("ViewSource",dp.sh.Strings.ViewPlain)+_3f+UtilHref("PrintSource",dp.sh.Strings.Print);if(window.clipboardData){_3c.innerHTML+=_3f+UtilHref("ToClipboard",dp.sh.Strings.CopyToClipboard);}_3c.innerHTML+=_3f+UtilHref("About",dp.sh.Strings.About);}for(var i=0,lineIndex=this.firstLine;i<_3a.length-1;i++,lineIndex++){row=_3d.insertRow(-1);if(this.addGutter==true){_3c=row.insertCell(-1);_3c.className="gutter";_3c.innerHTML=lineIndex;}_3c=row.insertCell(-1);_3c.className="line"+(i%2+1);_3c.innerHTML=_3a[i];}this.div.innerHTML="";};dp.sh.Highlighter.prototype.Highlight=function(_44){function Trim(str){return str.replace(/^\s*(.*?)[\s\n]*$/g,"$1");}function Chop(str){return str.replace(/\n*$/,"").replace(/^\n*/,"");}function Unindent(str){var _48=str.split("\n");var _49=new Array();var _4a=new RegExp("^\\s*","g");var min=1000;for(var i=0;i<_48.length&&min>0;i++){if(Trim(_48[i]).length==0){continue;}var _4d=_4a.exec(_48[i]);if(_4d!=null&&_4d.length>0){min=Math.min(_4d[0].length,min);}}if(min>0){for(var i=0;i<_48.length;i++){_48[i]=_48[i].substr(min);}}return _48.join("\n");}function Copy(_4f,_50,_51){return _4f.substr(_50,_51-_50);}var pos=0;this.originalCode=_44;this.code=Chop(Unindent(_44));this.div=document.createElement("DIV");this.table=document.createElement("TABLE");this.matches=new Array();if(this.CssClass!=null){this.table.className=this.CssClass;}if(this.tabsToSpaces==true){this.code=this.ProcessSmartTabs(this.code);}this.table.border=0;this.table.cellSpacing=0;this.table.cellPadding=0;this.ProcessRegexList();if(this.matches.length==0){this.AddBit(this.code,null);this.SwitchToTable();return;}this.matches=this.matches.sort(dp.sh.Highlighter.SortCallback);for(var i=0;i<this.matches.length;i++){if(this.IsInside(this.matches[i])){this.matches[i]=null;}}for(var i=0;i<this.matches.length;i++){var _55=this.matches[i];if(_55==null||_55.length==0){continue;}this.AddBit(Copy(this.code,pos,_55.index),null);this.AddBit(_55.value,_55.css);pos=_55.index+_55.length;}this.AddBit(this.code.substr(pos),null);this.SwitchToTable();};dp.sh.Highlighter.prototype.GetKeywords=function(str){return "\\b"+str.replace(/ /g,"\\b|\\b")+"\\b";};dp.sh.HighlightAll=function(_57,_58,_59,_5a,_5b){function FindValue(){var a=arguments;for(var i=0;i<a.length;i++){if(a[i]==null){continue;}if(typeof (a[i])=="string"&&a[i]!=""){return a[i]+"";}if(typeof (a[i])=="object"&&a[i].value!=""){return a[i].value+"";}}return null;}function IsOptionSet(_5e,_5f){for(var i=0;i<_5f.length;i++){if(_5f[i]==_5e){return true;}}return false;}function GetOptionValue(_61,_62,_63){var _64=new RegExp("^"+_61+"\\[(\\w+)\\]$","gi");var _65=null;for(var i=0;i<_62.length;i++){if((_65=_64.exec(_62[i]))!=null){return _65[1];}}return _63;}var _67=document.getElementsByName(_57);var _68=null;var _69=new Object();var _6a="value";if(_67==null){return;}for(var _6b in dp.sh.Brushes){var _6c=dp.sh.Brushes[_6b].Aliases;if(_6c==null){continue;}for(var i=0;i<_6c.length;i++){_69[_6c[i]]=_6b;}}for(var i=0;i<_67.length;i++){var _6f=_67[i];var _70=FindValue(_6f.attributes["class"],_6f.className,_6f.attributes["language"],_6f.language);var _71="";if(_70==null){continue;}_70=_70.split(":");_71=_70[0].toLowerCase();if(_69[_71]==null){continue;}_68=new dp.sh.Brushes[_69[_71]]();_6f.style.display="none";_68.addGutter=(_58==null)?!IsOptionSet("nogutter",_70):_58;_68.addControls=(_59==null)?!IsOptionSet("nocontrols",_70):_59;_68.collapse=(_5a==null)?IsOptionSet("collapse",_70):_5a;_68.firstLine=(_5b==null)?parseInt(GetOptionValue("firstline",_70,1)):_5b;_68.Highlight(_6f[_6a]);var div=document.createElement("DIV");div.className="dp-highlighter";div.appendChild(_68.table);_6f.parentNode.insertBefore(div,_6f);}};dp.sh.Brushes.JScript=function(){var _1="abstract boolean break byte case catch char class const continue debugger "+"default delete do double else enum export extends false final finally float "+"for function goto if implements import in instanceof int interface long native "+"new null package private protected public return short static super switch "+"synchronized this throw throws transient true try typeof var void volatile while with";this.regexList=[{regex:new RegExp("//.*$","gm"),css:"comment"},{regex:new RegExp("/\\*[\\s\\S]*?\\*/","g"),css:"comment"},{regex:new RegExp("\"(?:[^\"\n]|[\"])*?\"","g"),css:"string"},{regex:new RegExp("'(?:[^'\n]|['])*?'","g"),css:"string"},{regex:new RegExp("^\\s*#.*","gm"),css:"preprocessor"},{regex:new RegExp(this.GetKeywords(_1),"gm"),css:"keyword"}];this.CssClass="dp-c";};dp.sh.Brushes.JScript.prototype=new dp.sh.Highlighter();dp.sh.Brushes.JScript.Aliases=["js","jscript","javascript"];dp.sh.Brushes.Xml=function(){this.CssClass="dp-xml";};dp.sh.Brushes.Xml.prototype=new dp.sh.Highlighter();dp.sh.Brushes.Xml.Aliases=["xml","xhtml","xslt","html","xhtml"];dp.sh.Brushes.Xml.prototype.ProcessRegexList=function(){function push(_1,_2){_1[_1.length]=_2;}var _3=0;var _4=null;var _5=null;this.GetMatches(new RegExp("<\\!\\[[\\w\\s]*?\\[(.|\\s)*?\\]\\]>","gm"),"cdata");this.GetMatches(new RegExp("<!--\\s*.*\\s*?-->","gm"),"comments");_5=new RegExp("([\\w-.]+)\\s*=\\s*(\".*?\"|'.*?'|\\w+)*","gm");while((_4=_5.exec(this.code))!=null){push(this.matches,new dp.sh.Match(_4[1],_4.index,"attribute"));if(_4[2]!=undefined){push(this.matches,new dp.sh.Match(_4[2],_4.index+_4[0].indexOf(_4[2]),"attribute-value"));}}this.GetMatches(new RegExp("</*\\?*(?!\\!)|/*\\?*>","gm"),"tag");_5=new RegExp("</*\\?*\\s*([\\w-.]+)","gm");while((_4=_5.exec(this.code))!=null){push(this.matches,new dp.sh.Match(_4[1],_4.index+_4[0].indexOf(_4[1]),"tag-name"));}};dp.sh.Brushes.Php=function(){var _1="and or xor __FILE__ __LINE__ array as break case "+"cfunction class const continue declare default die do echo else "+"elseif empty enddeclare endfor endforeach endif endswitch endwhile eval exit "+"extends for foreach function global if include include_once isset list "+"new old_function print require require_once return static switch unset use "+"var while __FUNCTION__ __CLASS__";this.regexList=[{regex:new RegExp("//.*$","gm"),css:"comment"},{regex:new RegExp("/\\*[\\s\\S]*?\\*/","g"),css:"comment"},{regex:new RegExp("\"(?:[^\"\n]|[\"])*?\"","g"),css:"string"},{regex:new RegExp("'(?:[^'\n]|['])*?'","g"),css:"string"},{regex:new RegExp("\\$\\w+","g"),css:"vars"},{regex:new RegExp(this.GetKeywords(_1),"gm"),css:"keyword"}];this.CssClass="dp-c";};dp.sh.Brushes.Php.prototype=new dp.sh.Highlighter();dp.sh.Brushes.Php.Aliases=["php"];