
function bookmark(url, description)
//**************************
//Added to link on page allows user to,
//in IE automatically add the page as a bookmark,
//in Netscape show msg box
//**************************

{
netscape="Netscape User's hit CTRL+D to add a bookmark to this site."
if (navigator.appName=='Microsoft Internet Explorer')
{
//Usage:-window.external.AddFavorite(url, description);
window.external.AddFavorite(url, description); //Coalport params in <a href=
}
else if (navigator.appName=='Netscape')
{
alert(netscape);
}
}

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=600,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=500,height=400');
	form_window.document.close;
}//End func




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()">'+
	'<p align="center">All items are hand painted and may not exactly match our photograph</p>'+
	'<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;

}

function picWindow(x,y,z){
//*****************
//fixed size (500x600) window without attributes to 
//view 400 x 400 images includes a form with 'Close' and 'Print' buttons
//x =url, y =picName, z=picDesc
//***************
	options = 'toolbar=0,status=0,menubar=0,scrollbars=0,resizable=0,' +
	'top=100,left=100,width=500,height=600';

	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">'+
	'<h3 style="margin-bottom:0">'+y+'</h3>'+
	'<p style="margin-top:0">'+z+'</p>'+
	'<img src= "'+x+'"'+' width="400" height="400">'+
	'<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>';

	pic_window = window.open("","plain",options);
	pic_window.document.write(content)
	pic_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');
}	
