var base;	var addfx=36;	var addmx=35;	var addsx=91;	var addfy=30;	var addmy=31;	var addsy=46;
function txtcolor(txtID,color){	//copied from lib
	document.getElementById(txtID).style.color=color; return true;
}
function pophtms(phtm,popw,poph,scroll) {	popw=popw+16;	poph=poph+19;	//menubar=File toolbar=BACK
var wopt=scroll + ",resizable=yes,width=" + popw + ",height=" + poph;
var win=window.open("","popWin",wopt);
rlt = win.document.open();
rlt.writeln(
'<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">\n<HTML><HEAD><title></title></HEAD><BODY onBlur="self.focus()\">\n',
phtm,
'\n</BODY></HTML>'
);
rlt.close();
return false;
}	//status=yes,menubar=yes,toolbar=yes

function popimgs(phtm,popw,poph) {	popw=popw+16;	poph=poph+19;	//31 wo scrollbars
var win=window.open(phtm,"popWin","resizable=yes,width=" + popw + ",height=" + poph);
phtm="<IMG src=\"" + phtm + "\" ALT=''>";
popme(phtm,win);	return false;
}
function popimgsq(phtm,popw,poph,pv,nx) {	popw=popw+16;	poph=poph+19;
var win=window.open(phtm,"popWin","scrollbars=yes,resizable=yes,width=" + popw + ",height=" + poph);
var tab="<Table Align=Right><Tr><Td>" + pv + " &nbsp; </Td><Td>" + nx + "</Td></Tr></Table>\n";
phtm="<IMG src=\"" + phtm + "\" ALT=''>";
popme(phtm,win);	return false;
}

function poptops(phtm,popw,poph) {	popw=popw+16;	poph=poph+19;
var win=window.open(phtm,"popWin","resizable=yes,width=" + popw + ",height=" + poph);
popme(phtm,win);	return false;
}
function poptop(phtm) {
var win=window.open(phtm,"popWin","resizable=yes,menubar=yes,location=yes,width=800,height=640");
popme(phtm,win);	return false;
}
function popme(phtm,win) {
var add = phtm.split('=');
var url = add[1];
url = url.replace(/>/,"");
rlt = win.document.open();
rlt.writeln(
'<!DOCTYPE HTML SYSTEM>\n<HTML><BODY onblur="self.focus()\">',
phtm,
'</BODY></HTML>'
);
rlt.close();
}
function poptxt(phtm,win) {
rlt =win.document.open("alwaysRaised");
rlt.writeln("<HTML><HEAD><HEAD><BODY onBlur=\"self.focus()\"><Span style=\"color:navy; font-size:large; font-weight:bold;\">");
rlt.writeln(phtm);
rlt.writeln("</Span></BODY></HTML>");
rlt.close();
return false;
}
function phtmj(htm,popw,poph) {
if (popw==0){	popw=400;	}
if (poph==0){	poph=300;	}
var win=window.open("","WJ","resizable=yes,toolbar=yes,width=" + popw + ",height=" + poph);
poptxt(htm,win);
return false;
}
function phtms(htm,popw,poph) {
if (popw==0){	popw=400;	}
if (poph==0){	poph=300;	}
popw=popw+16;	poph=poph+19;
var win=window.open("","WJ","resizable=yes,toolbar=yes,scrollbars=yes,width=" + popw + ",height=" + poph);
poptxt(htm,win);
return false;
}

function burl(url,popw,poph) {	var ix;	//base=url.replace(/\..*/,"");
base=url.replace(/\./g,"");	base=base.replace(/\//g,"");	base=base.replace(/:/g,"");
while (ix != -1){
	base = base.replace( "-", "" );	ix = base.indexOf( "-" );
}
ix=0;
while (ix != -1){
	base = base.replace( "_", "" );	ix = base.indexOf( "_" );
}
//alert("base="+base+"!");
return;
}

function popurlj(url,popw,poph) {
var win=window.open(url,"WJ","resizable=yes,toolbar=yes,width=" + popw + ",height=" + poph);
return false;
}
function popmap(url) {
window.open(url,"Map","resizable=yes,toolbar=yes,location=yes,width=860,height=640");
return false;
}
function popmaps(url,popw,poph) {	popw=popw+addmx;	poph=poph+addmy;
window.open(url,"Map","resizable=yes,toolbar=yes,location=yes,width=" + popw + ",height=" + poph);
return false;
}
function popmapts(url,popw,poph) {	popw=popw+addsx;	poph=poph+addsy;	popname=popw+poph;
window.open(url,popname,"resizable=yes,toolbar=yes,location=yes,scrollbars=yes,width=" + popw + ",height=" + poph);
return false;
}

function popfig(url) {
window.open(url,"Fig","resizable=yes,toolbar=yes,width=860,height=640");
return false;
}
function popfigl(url) {
window.open(url,"Fig","resizable=yes,toolbar=yes,location=yes,width=860,height=640");
return false;
}
function popfigs(url,popw,poph) {	popw=popw+addfx;	poph=poph+addfy;	//for IM4?
window.open(url,"Fig","resizable=yes,toolbar=yes,width=" + popw + ",height=" + poph);
return false;
}
function popfigls(url,popw,poph) {	popw=popw+addfx;	poph=poph+addfy;
window.open(url,"Fig","resizable=yes,location=yes,width=" + popw + ",height=" + poph);
return false;
}
function popfigt(url) {
window.open(url,"Fig",",resizable=yes,scrollbars=yes,toolbar=yes,width=860,height=640");
return false;
}
function popfigts(url,popw,poph) {	popw=popw+addsx;	poph=poph+addsy;	var sb;
if (popw > 999 || poph > 600){	sb="scrollbars=yes,";	}
window.open(url,"Fig","resizable=yes,toolbar=yes,location=yes," + sb  + "width=" + popw + ",height=" + poph);
return false;
}
function popfigtsz(url,popw,poph) {	popw=popw+addfx;	poph=poph+addfy;	burl(url);
window.open(url,base,"resizable=yes,width=" + popw + ",height=" + poph);
return false;
}
function popfigsz(url,popw,poph) {	popw=popw+addfx;	poph=poph+addfy;	burl(url);
window.open(url,base,"resizable=0,width=" + popw + ",height=" + poph);
return false;
}
function popfiglsz(url,popw,poph) {	popw=popw+addfx;	poph=poph+addfy;
window.open(url,"Fig","width=" + popw + ",height=" + poph);
return false;
}
function popfigtz(url) {
window.open(url,"Fig",",scrollbars=yes,width=860,height=640");
return false;
}
function popfigz(url) {
window.open(url,"Fig","width=860,height=640");
return false;
}
function popfiglz(url) {
window.open(url,"Fig","width=860,height=640");
return false;
}
function popfiglt(url) {
window.open(url,"Fig","resizable=yes,scrollbars=yes,toolbar=yes,location=yes,width=860,height=640");
return false;
}
function popact(url) {
window.open(url,"Act","resizable=yes,toolbar=yes,location=yes,width=860,height=640");
return false;
}
function popurl(url) {
window.open(url,"Url","resizable=yes,scrollbars=yes,toolbar=yes,location=yes,width=860,height=640");
return false;
}
function popurlts(url,popw,poph) {	popw=popw+addsx;	poph=poph+addsy;	burl(url);
window.open(url,base,"scrollbars=yes,resizable=yes,location=yes,toolbar=yes,width=" + popw + ",height=" + poph);
return false;
}
function popurlms(url,popw,poph) {	popw=popw+addsx;	poph=poph+addsy;	burl(url);
window.open(url,base,"scrollbars=yes,resizable=yes,toolbar=yes,width=" + popw + ",height=" + poph);
return false;
}
function popurls(url,popw,poph) {	popw=popw+addsx;	poph=poph+addsy;	//popw=popw+addmx;
window.open(url,"s","resizable=yes,location=yes,width=" + popw + ",height=" + poph);
return false;
}
function popurlq(url) {
window.open(url,"q","resizable=yes,width=900,height=300");
return false;
}
function popurlt(url) {	burl(url);	
window.open(url,base,"scrollbars=yes,resizable=yes,toolbar=yes,location=yes,width=860,height=640");
return false;
}
function popurltu(url,uid) {	burl(url);	url=url + "watch?v=" + uid;
window.open(url,base,"scrollbars=yes,resizable=yes,toolbar=yes,location=yes,width=860,height=640");
return false;
}
function popurla(url) {
window.open(url,"s","scrollbars=1,resizable=1,menubar=1,toolbar=1,location=yes,width=860,height=640");
return false;
}
function popurll(url) {
window.open(url,"l","resizable=yes,location=yes,width=860,height=640");
return false;
}
function popurllm(url) {
window.open(url,"lm","resizable=yes,location=yes,menubar=yes,width=860,height=640");
return false;
}
function popurlm(url) {
window.open(url,"m","resizable=yes,menubar=yes,width=860,height=640");
return false;
}
function popurlmt(url) {
window.open(url,"mt","scrollbars=yes,resizable=yes,menubar=yes,toolbar=yes,width=860,height=640");
return false;
}
function popurlnu(url) {	//should show no location: Firefox?
window.open(url,"mt","scrollbars=yes,resizable=yes,status=no,location=no,width=860,height=640");
return false;
}
function popaudio(phtm) {
var win=window.open("","popAud","resizable=yes");
popme(phtm,win);	return false;
}
function popnull() {
return false;
}

