html
Code: Select all
<script language="javascript" src="../external.js" type="text/javascript"></script>
Code: Select all
/* Insert stylesheet in HTML if source is a compiled CHM file */
function fnInsertExternalStyleSheet(filename) {
var path = unescape(location.pathname);
var i = path.lastIndexOf("\\"), j = 0, doc_type = "";
if( path.indexOf("::") != -1 ) { // it is a CHM file
doc_type = "CHM";
if( path.charAt(0) == "@" ) { // this is a @MSITStore: .. chop this off
j = path.indexOf(":") + 1;
} // else this is an ms-its: .. path starts at the beginning of string
}
path = path.substring(j, i+1);
if (doc_type == "CHM") {
document.writeln("<link rel=\"stylesheet\" href=\"file://" + path + filename + "\" type=\"text/css\">");
//alert("This is a CHM file\n<link rel=\"stylesheet\" href=\"file://" + path + filename + "\" type=\"text/css\">");
}
}
/* Set e.g. filename.css as parameter to use as a external CSS file */
fnInsertExternalStyleSheet("style.css")
Code: Select all
<a href="javascript:ClipBoard(copytext);"><IMG NAME="botton" title="Copy to clipboard" style='margin: 5px 4px 4px 10px;' src='../images/copy.gif'" border="0" align='right'></a><p id="copytext" class="codebox">
Code: Select all
function ClipBoard(NumBlok) {
var input = document.createElement('textarea');
if ((navigator.appName == "Microsoft Internet Explorer") && (parseInt(navigator.appVersion) >= 4)) // IE (4+) only
input.innerText = NumBlok.innerText;
else
input.innerHTML = NumBlok.innerText;
document.body.appendChild(input);
input.select();
document.execCommand('copy');
document.body.removeChild(input);
}