
function addUpdate(){
//*************
//Put last modified date string on page in correct format
//created 31/3/2002
//useage '<script>javaScript:addUpdate()</script>'
//********************

//Create arrays to hold proper names
dayName= new Array("Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday");
mnthName=new Array("January","February","March","April","May","June","July","August","September","October","November","December");

//get the information from the document
lastDate=document.lastModified;
//create a date object using that information
dateString=new Date(lastDate);
//use the date objects properties to build the string into a var
update=dayName[dateString.getDay()]+", "+dateString.getDate()+" "+ mnthName[dateString.getMonth()]+" "+dateString.getYear();
//write that var to the page
document.write("Page last updated on: "+update+"<br>");
} //End function




//window with scroll bars
// x = url
function scrollWin(x){
	options = "toolbar=0,status=0,menubar=0,scrollbars=1,resizable=0," +
	"top=100,left=100,width=650,height= 500";
		scroll_win = window.open(x,"Scrollable",options);
	
	

} //End func


function formWindow(x){
//***************
// Used to display wanted form at (x)
//while making it clear that original page is still open underneath
//****************
	form_window = window.open(x,"Form",'scrollbars=0, top=100,left=100, width=400,height=400');
	form_window.document.close;
}




function plainWindow(x,y,z){
//*****************
//Sizable window without attributes to view images
//includes a form with 'Close' and 'Print' buttons
//x =url, y =width, z=height
//***************
	options = "toolbar=0,status=0,menubar=0,scrollbars=0,resizable=0," +
	'top=100,left=100,width='+(y+100)+','+'height= '+(z+200)+'"';

	content= '<html><head>'+
	'<title>'+x+'</title>'+
	'<link rel="stylesheet" href="coalPort.css" type="text/css">'+
	'</head>'+
	'<body bgcolor="#ffffff" onBlur="self.focus()">'+
	'<div align="center">'+	
	'<img src= "'+x+'"'+' width='+y+' height= '+z+'">'+
	'<form><input Name="Shut" TYPE=Button VALUE="Close Window" onClick="javascript:window.close()">'+
	'&nbsp&nbsp'+
	'<input Name="print" TYPE=Button VALUE="Print Window" onClick="javascript:window.print()"></form>'+
	'</div>';
	
	'</body></html>';

	plain_window = window.open("","plain",options);
	plain_window.document.write(content)
	plain_window.document.close;

}




//Write the Date to page in local format
function writeDate(){
	now = new Date(); // create an instance of date obj
	LocalTime = now.toLocaleString(); // convert to string in local format

	document.writeln(LocalTime); //write variable to page
	document.close;  //allow document to load
}


function pageWindow(page){
//*****************
//Sizable window without attributes to view popUp
//***************
	//options = "toolbar=0,status=0,menubar=0,scrollbars=0,resizable=0," +
	//"top=100,left=100,";	
	page_window = window.open(page,"Page",'width=300,height= 325');
}	