// Reference this JS file from all HTML files that include a Comments link.
//
// 05feb02

function doComments() {
  var stitle = document.title;
  stitle = stitle.replace( /[\?]/g, "_" );  //31jan02: remove question marks from title (others?)
  var surl   = unescape(location.href);
  surl = surl.replace( /#.*$/, "" );        //05feb02: strip hash and all that follows 
  var sver = "";
  var meta = document.getElementsByTagName("meta");
  for(var c = 0;c < meta.length; c++) {
	 if(meta[c].getAttribute("name") == "version"){
	   sver = meta[c].getAttribute("content") + " - ";
	 }
  }
  var i = surl.indexOf("::");
  if( i == -1 ) {
    i = surl.lastIndexOf("/"); 
    chmpath = surl.substring(0,i+1);
  } else {
    chmpath = surl.substring(0,i+3);
  }
  window.open(chmpath+"comments.html#"+sver+stitle+" ["+surl+"]",null,"height=450,width=450,resizable=yes,directories=no,location=no,menubar=no,status=no,toolbar=no" );
}


