';
}
document.chessflash.copynpaste.value=scrpts + ds;
document.getElementById("span2").innerHTML=ds;
}
function trim(txt) {
if (txt == null) {
return null;
}
txt = txt.replace('#','');
return txt == null ? null : txt.replace(/^\s+|\s+$/g, '');
}
function encodepgn(txt) {
ntxt = txt.replace(/\'/g, '’'); // single quote to single right quote;
ntxt = ntxt.replace(/&/g, ' '); // ampersand to space
ntxt = ntxt.replace(/\n/g,' '); // newline to space
ntxt = ntxt.replace(/\r/g,' '); // return to space
ntxt = ntxt.replace(/\+/g,'%2B'); // encode check / plus sign symbol
return ntxt;
}
function makeshowhide(objectEmbed, i) {
var embedCf = '';
embedCf += '';
embedCf += '';
embedCf += '';
embedCf += '
(show chess board)';
embedCf += '';
embedCf += '';
embedCf += '
(hide chess board)
';
embedCf += objectEmbed + '';
return embedCf;
}
// -->