<script type="text/javascript">
// Select Code from phpBB3 to uCoz ~
http://allcity.net.ru/ function selectCode(a){
var e = a.parentNode.parentNode.getElementsByTagName('code')[0];
if (window.getSelection){
var s = window.getSelection();
if (s.setBaseAndExtent){
s.setBaseAndExtent(e, 0, e, e.innerText.length - 1);
}else{
var r = document.createRange();
r.selectNodeContents(e);
s.removeAllRanges();
s.addRange(r);}
}else if (document.getSelection){
var s = document.getSelection();
var r = document.createRange();
r.selectNodeContents(e);
s.removeAllRanges();
s.addRange(r);
}else if (document.selection){
var r = document.body.createTextRange();
r.moveToElementText(e);
r.select();}}
codediv=document.getElementsByTagName('div');
for(i=0;i<codediv.length;i++){
if(codediv[i].className=="bbCodeBlock"){
s=codediv[i].innerHTML;
s=s.replace('>Code<\/div>','>Код: <a href="#" onclick="selectCode(this); return false;">Выделить всё<\/a><\/div>').replace('<!--uzc-->','<!--uzc--><code>').replace('<!--\/uzc-->','<\/code><!--\/uzc-->');
codediv[i].innerHTML=s;}}
</script>