function backindex(thislink,thishref) {
  itemz = new Array(0);
  parts = new Array(0);
  thisitem = new String;
	thisurl = document.location.href;
	locate = 0;
	locate = thisurl.search(/\/backindex/);
  if (locate < 1) {
    thisurl = document.referrer;
    locate = 0;
    locate = thisurl.search(/\/backindex/);
  }
  if (locate < 1) {
  	if (parent != self) { 
	  thisurl = parent.document.referrer;
	  locate = 0;
	  locate = thisurl.search(/\/backindex/);
	}
  }
	if (locate > 0) {
		parts = thishref.split("/");
		pagename = parts[parts.length - 1];
		itemz = thisurl.split("/");
		wherebackindex = 0;
		locate = 0;
		counter = 0;
		while (counter <= (itemz.length - 1)) {
			if (wherebackindex == 0) {
        thisitem = itemz[counter];
				locate = thisitem.search(/backindex/);
				if (locate > -1) {
					wherebackindex = counter;
				}
			}
		counter = counter + 1;
		}
		pubyr = itemz[wherebackindex + 1];
		pubmo = itemz[wherebackindex + 2];
		pubda = itemz[wherebackindex + 3];
		thislink.href = "/backindex/" + pubyr + "/" + pubmo + "/" + pubda + "/" + pagename;
	}
}

function back(thislink,thishref,pagename) {
  itemz = new Array(0);
  thisitem = new String;
	thisurl = document.location.href;
	locate = -1;
	locate = thisurl.search(/\/backindex/);
  if (locate < 1) {
    thisurl = document.referrer;
    locate = -1;
    locate = thisurl.search(/\/backindex/);
  }
  if (locate < 1) {
  	if (parent != self) { 
	  thisurl = parent.document.referrer;
	  locate = 0;
	  locate = thisurl.search(/\/backindex/);
	}
  }
	if (locate > -1) {
		itemz = thisurl.split("/");
		wherebackindex = 0;
		locate = 0;
		counter = 0;
		while (counter <= (itemz.length - 1)) {
			if (wherebackindex == 0) {
        thisitem = itemz[counter];
				locate = thisitem.search(/backindex/);
				if (locate > -1) {
					wherebackindex = counter;
				}
			}
		counter = counter + 1;
		}
		pubyr = itemz[wherebackindex + 1];
		pubmo = itemz[wherebackindex + 2];
		pubda = itemz[wherebackindex + 3];
		thislink.href = "/backindex/" + pubyr + "/" + pubmo + "/" + pubda + "/" + pagename;
  }
}
function backalt(thislink,newurl) {
  itemz = new Array(0);
  thisitem = new String;
	thisurl = document.location.href;
	locate = 0;
	locate = thisurl.search(/\/backindex/);
  if (locate < 1) {
    thisurl = document.referrer;
    locate = 0;
    locate = thisurl.search(/\/backindex/);
  }
  if (locate < 1) {
  	if (parent != self) { 
	  thisurl = parent.document.referrer;
	  locate = 0;
	  locate = thisurl.search(/\/backindex/);
	}
  }
  if (locate > 0) {
    itemz = thisurl.split("/");
	wherebackindex = 0;
	locate = 0;
	counter = 0;
	while (counter <= (itemz.length - 1)) {
	  if (wherebackindex == 0) {
        thisitem = itemz[counter];
		locate = thisitem.search(/backindex/);
		if (locate > -1) {
		  wherebackindex = counter;
		}
	  }
      counter = counter + 1;
	}
	pubyr = new String(itemz[wherebackindex + 1]);
	pubmo = new String(itemz[wherebackindex + 2]);
	pubda = new String(itemz[wherebackindex + 3]);
    pubdate = pubyr + pubmo + pubda;
    if (newurl.search(/pubdate/) > -1) {
      newurl = newurl.replace(/pubdate/,pubdate);
    }
	dupepubyr = pubyr;
	dupepubmo = pubmo;
	dupepubda = pubda;
	pubdateasdate = new Date(dupepubyr,dupepubmo - 1,dupepubda);
	changeoverdate = new Date(2001, 3, 26);
	if (pubdateasdate > changeoverdate) {
		if (newurl.indexOf("nufront.htm") > 0) {
			newurl = "/backindex/" + pubyr + "/" + pubmo + "/" + pubda + "/entertainment.htm";
		}
	}
    thislink.href = newurl;
  }
}
function noback(thislink) {
	thisurl = document.location.href;
	locate = 0;
	locate = thisurl.search(/\/backindex/);
  if (locate < 1) {
    thisurl = document.referrer;
    locate = 0;
    locate = thisurl.search(/\/backindex/);
  }
  if (locate < 1) {
  	if (parent != self) { 
	  thisurl = parent.document.referrer;
	  locate = 0;
	  locate = thisurl.search(/\/backindex/);
  	}
  }
  if (locate > 0) {
    thislink.href = "/backindex/nolinkavailable.htm";
  }
}
function openemailchild() {
  emailchild = window.open("/Architext/emailstory.htm","","width=320,height=450,toolbar=0,menubar=0,scrollbars=0,resizable=0,status=0,location=0");
}
