function togclass(me) {
	var chkbo = document.getElementById('l'+me);
	chkbo.className = chkbo.className == 'doclistools' ? 'bo' : 'doclistools'; // chkbo.checked ? 'doclistools' : 
}
function confirmDelete(href) {
    if (window.confirm("DELETE this document from your collection?")) {
              window.location.href = href;
    }
}
function confirmRemove(href) {
    if (window.confirm("REMOVE this document from your collection?")) {
              window.location.href = href;
    }
}
function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_showHideLayers() { //v6.0
  var i,p,v,obj,args=MM_showHideLayers.arguments;
  for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2];
    if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v=='hide')?'hidden':v; }
    obj.visibility=v; }
}
function confirmLogout(href) {
    if (window.confirm("Are you sure you want to logout?")) {
              window.location.href = href;
    }
}
function warnUserpublic(gooto){
	var x=confirm("Are you sure that you want to post a new version?")
	if(x){
		document.add_doc.submit();
		return true;
	}else {
		window.location.href=gooto;
		return false;
	}
}
function openwinp(theURL,winName,features) {
  window.open(theURL,winName,features);
}
function nameItpublic() {
	window.name = 'madepublicWindow';
}
function pop_mepublic(pURL){
	var w = 820;
	var l = screen.width - w - 10;
	var t = 750;
	var features = 'scrollbars=yes,location=no,toolbar=no,menubar=no,status=no,resizable=yes,width='+w+',height='+t+',left='+l+',top=20';
	var name ='madepublic_comment';
	// new_window = window.open('', name,'resizable'); 
	// new_window.close();   
    new_window = window.open(pURL, name, features); 
	// new_window.focus();
}
function pop_mepublic2(pURL,winName){
	var w = 820;
	var l = screen.width - w - 300;
	var t = 750;
	var features = 'scrollbars=yes,location=no,toolbar=no,menubar=yes,status=no,resizable=yes,width='+w+',height='+t+',left='+l+',top=20';
	var name = winName; 
	// new_window = window.open('', name,'resizable'); 
	// new_window.close();   
  new_window = window.open(pURL, name, features); 
	// new_window.focus();
}
function pop_mepublic3(pURL,winName){
	var w = 820;
	var l = screen.width - w - 300;
	var t = 750;
	var features = 'scrollbars=yes,location=no,toolbar=no,menubar=yes,status=no,resizable=yes,width='+w+',height='+t+',left='+l+',top=20';
	var name = winName; 
	// new_window = window.open('', name,'resizable'); 
	// new_window.close();   
  new_window = window.open(pURL, name, features); 
	// new_window.focus();
}
function changeImagepublic(image_name,image_src) {
   	document.images[image_name].src = image_src;
}
function goToURLpublic(obj){
	var f = (obj.section) ? obj : obj.form;
	var selected = f.section.selectedIndex;
	var URL = f.section.options[selected].value;
	if (URL != "") document.location = URL;
	return false;
}
if (window.self != window.top) { 
	top.location.replace(window.location.pathname); 
}
function poprcnnavig(hostos) {
	w = 260;
	l = screen.width - w;
	t = screen.height-10;
	var name = 'collectornav';
	var features = 'scrollbars=yes,location=no,toolbar=no,menubar=no,status=no,resizable=yes,width='+w+',height='+t+',left='+l+',top=10';
	winFav = window.open(hostos,name,features);
	winFav.focus();
}
function popbinder(hostos) {
	w = 360;
	l = screen.width - w;
	t = screen.height-10;
	var name = 'bindernav';
	var features = 'scrollbars=yes,location=no,toolbar=no,menubar=no,status=no,resizable=yes,width='+w+',height='+t+',left='+l+',top=10';
	winFav = window.open(hostos,name,features);
	winFav.focus();
}

function popsend(hostos) {
	w = 720;
	l = screen.width - w;
	t = screen.height-10;
	var name = 'sendthisdocument';
	var features = 'scrollbars=yes,location=no,toolbar=no,menubar=no,status=no,resizable=yes,width='+w+',height='+t+',left='+l+',top=10';
	winFav = window.open(hostos,name,features);
	winFav.focus();
}
function popfavsites(hostos,pid) { // istock.php -> rightbyhosts.php
	w = 260;
	l = screen.width - w;
	t = screen.height-10;
	var pURL = hostos+'rightbyhosts.php?pid='+pid+'&tie=50';
	var name = 'collectornav';
	var features = 'scrollbars=yes,location=no,toolbar=no,menubar=no,status=no,resizable=yes,width='+w+',height='+t+',left='+l+',top=10';
	winFav = window.open(pURL,name,features);
	winFav.focus();
}
function poplic(hostos,RCD_ID,DOCTOC_PART_ID){ // rc.php
	var pURL = hostos+'addcom.php?r='+RCD_ID+'&tbp=1&p='+DOCTOC_PART_ID;
	var name = 'madepublic_comment';
	var features = 'scrollbars=yes,location=no,toolbar=no,menubar=no,status=no,resizable=yes,width=700,height=600,left=320,top=100';
	new_window = window.open(pURL,name,features);
	// new_window.document.write (pURL);
	new_window.focus();
}
function openerWindow(URLz) {
	var F = ''
	if (opener && !opener.closed)
		opener.location=URLz;
	else {
		var madepublicWindow = window.open(URLz,'madepublicWindow',F);
		opener = madepublicWindow;
	}
	// self.focus();
}
function resizme(w) {
	if(!w) var w = 230;
	var L = screen.width - w;
	var t = screen.height-10;
	self.moveTo(L,10);
	self.resizeTo(w,t);
}
