function MM_openBrWindow(theURL,winName,features) { 
  window.open(theURL,winName,features);
}
var win=null;
function NewWindow(mypage,myname,w,h,scroll,pos){
	if(pos=="random"){
		LeftPosition=(screen.width)?Math.floor(Math.random()*((screen.width-w)-75)):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='height='+h+',width='+w+',top='+TopPosition+',left='+LeftPosition+',scrollbars='+scroll+',resizable=no';
	win=window.open(mypage,myname,settings);
	if(win.focus){win.focus();}}
function writeDate() {
var months=new Array(13);
months[1]="1";
months[2]="2";
months[3]="3";
months[4]="4";
months[5]="5";
months[6]="6";
months[7]="7";
months[8]="8";
months[9]="9";
months[10]="10";
months[11]="11";
months[12]="12";
var time=new Date();
var lmonth=months[time.getMonth() + 1];
var date=time.getDate();
var year=time.getYear();
if (year < 2000)
year = year + 1900;
document.write(lmonth + "/" + date + "/" + year);
}

function writeYear() {
var time=new Date();
var year=time.getYear();
if (year < 2000)
year = year + 1900;
document.write(year);
}



//display huge image in framed scrollable pop-up window

function clickToEnlarge( url, height, width)
			{
				//newWindowOptions = 'width='+width+',height='+height+',scrollbars=yes,toolbar=no,left=0,top=0,screenX=0,screenY=0,resizable=yes,alwaysRaised=yes';
                          	newWindowOptions = 'width=600,height=400,scrollbars=yes,toolbar=no,left=0,top=0,screenX=0,screenY=0,resizable=yes,alwaysRaised=yes';
				newWindow = window.open( '', 'targetWindow', newWindowOptions );
				// write out rhtml to the above window reference
				newWindow.document.writeln("<body bgcolor='#FFFFFF' leftmargin='0' topmargin='0' marginwidth='0' marginheight='0'>");
				newWindow.document.writeln("<table border='0' cellspacing='0' cellpadding='0'><tr><td align='left' valign='top' bgcolor='#000066'>&nbsp;&nbsp;<a href='javascript:window.close();'><img src='/ebooks/images/close_window_new.gif' width='91' height='18' border='0' alt='Close'></a></td></tr>");
				newWindow.document.writeln("<tr><td height='2' bgcolor='#879AC4'><spacer type='block' height='2'></td></tr><tr><td valign='top'>");
				newWindow.document.writeln("<img src='"+url+"' border='0' width='"+width+"' height='"+height+"'/>");
				newWindow.document.writeln("</td></tr></table>");
				newWindow.document.writeln( "</body></html>");
				newWindow.document.close();
			}
