var win=null;
function NewWindow(mypage,myname,w,h,scroll,pos){
if(pos=="random"){LeftPosition=(screen.width)?Math.floor(Math.random()*(screen.width-w)):100;TopPosition=(screen.height)?Math.floor(Math.random()*((screen.height-h)-75)):100;}
if(pos=="center"){LeftPosition=(screen.width)?(screen.width-w)/2:100;TopPosition=(screen.height)?(screen.height-h)/2:100;}
else if((pos!="center" && pos!="random") || pos==null){LeftPosition=0;TopPosition=20}
settings='width='+w+',height='+h+',top='+TopPosition+',left='+LeftPosition+',scrollbars='+scroll+',location=no,directories=no,status=no,menubar=no,toolbar=no,resizable=no';
win=window.open(mypage,myname,settings);}
function RPWindow(mypage,myname,w,h,scroll,pos){
 doctitle = new String(document.title);
 winloc = new String(window.location);
 var reEQ = /=/g; var rePL = /\+/g;
 var reCN = /:/g; var reQU = /\?/g;
 var reAM = /&/g; var reSL = /\//g;
 var reSP = / /g;
 doctitle = doctitle.replace(reSP,"+")
 doctitle = doctitle.replace(reCN,"%3A")
 doctitle = doctitle.replace(reAM,"%26")
 winloc = winloc.replace(reEQ,"%3D")
 winloc = winloc.replace(reCN,"%3A")
 winloc = winloc.replace(reAM,"%26")
 winloc = winloc.replace(rePL,"%2B")
 winloc = winloc.replace(reQU,"%3F")
 winloc = winloc.replace(reSL,"%2F")
 mypage += "?loc=" + winloc + "&title=" + doctitle;
 NewWindow(mypage,myname,w,h,scroll,pos);
}
CRLF = unescape("%0D%0A");
function LinkToThisPage() {
	document.write('<textarea name="LinkToThisPage" rows="2" cols="60" onClick="this.select()">')
	document.write('<a href="' + window.location + '">' + document.title)
	document.write('</a>')
	document.write('</textarea>')
}