function closesIt(){
	close();
}

function openAWindow( pageToLoad, winName, width, height, center) {
	var xposition=0;
	var yposition=0;
	
	if ( ( parseInt( navigator.appVersion ) >= 4 ) && ( center ) )
	{
		xposition = ( screen.width - width ) / 2;
		yposition = ( screen.height - height ) / 2;
	}
	
	args = "width=" + width + "," 
		+ "height=" + height + "," 
		+ "location=0," 
		+ "menubar=0,"
		+ "resizable=1,"
		+ "scrollbars=1,"
		+ "status=0," 
		+ "titlebar=0,"
		+ "toolbar=0,"
		+ "hotkeys=0,"
		+ "screenx=" + xposition + ","  //NN Only
		+ "screeny=" + yposition + ","  //NN Only
		+ "left=" + xposition + ","     //IE Only
		+ "top=" + yposition;           //IE Only
	
	window.open( pageToLoad, winName, args );
}
var openWindow = openAWindow;
var openAsWindow = openAWindow;

// clickEnclosure is attached to the enclosure links
// in the edit form
function clickEnclosure() {
	var imgName = this.innerHTML;
	
	if ( /\/__NewThread__/.test( window.location ) )  // this is an un-saved new message
	{
		alert( "This picture is not yet in the database. You must save the message with the enclosure, and then edit it, before inserting a picture." );
		return false;
	}
	
	var s = '<img src="' + this.href + '" alt="weblog image" align="center" border="0" />';
	
	try
	{
		editor.insertHTML( s );
	}
	catch( e )
	{
		alert( e );
	}
	
	return false;
}