function addtopic() {

	var popupwin = window.open('disc_topic.cfm', 'popupwin', 'height=310,width=430');}
	
function checkforhtml(evt) {	
		if (navigator.appName == "Microsoft Internet Explorer") 
		{  
		switch(window.event.keyCode) {
		case 60:window.event.keyCode = ""; alert("Sorry that character is a HTML element\nwhich cannot be used.\n\nPlease try again"); break
		case 62:window.event.keyCode = ""; alert("Sorry that character is a HTML element\nwhich cannot be used.\n\nPlease try again"); break 
				}
} else { 
			
	var keypressed = evt.which;
			
	if (keypressed == 60) {
		alert("Sorry that character is a HTML element\nwhich must not be used.\n\nPlease try again. Thank you."); 
				 }
	else if (keypressed == 62) {
		alert("Sorry that character is a HTML element\nwhich must not be used.\n\nPlease try again. Thank you."); ;
	} 
} 
}
	
function showconfirm(message) {
		var newmessage = 'The ' + message + ' details were updated  \n\nThankyou';
		alert(newmessage);
	}
	
function doCancel(theloc) {
		document.location.href = theloc;
	}
	
function open_popup(loc) {
	var popupwin = window.open(loc, 'morenews', 'height=460,width=580,scrollbars=yes, status=yes');
}

function closewindow() {
	self.close();
}

function fixname() {
	var getfile = document.insertnews.pic.value;
	if (getfile == null) {return true};
	}

function showpic(pic) {
	var popupwin = window.open(pic, 'showpic', 'height=170,width=170,scrollbars=no');
}

function gohome() {
	document.location.href="index.cfm";
}

function dodate() {
	
	if (document.forms['searchform'].search_type.value == 1) {searchform.searchfield.value = ""};
	if (document.forms['searchform'].search_type.value == 2) {searchform.searchfield.value = "dd-mmm-yyyy"}
}

function showalert(m) {
		var message = 'Please check that you have filled in your ' + m + ' \n\nThankyou';
		alert(message);
	}
