function swapImage() {
	var filename = document.getElementById('filename').value;
	document.getElementById('imagedisplay').src = filename;
	document.getElementById('url').value = filename;
}

function pdfUrl() {
	var filename = document.getElementById('filename').value;
	document.getElementById('url').value = filename;
}

confirmHandle = function() {
	if(confirm("Are you sure you wish to delete this item?\n\nYou will not be able to undo this action.")) {
		return true;
	} else {
		return false;
	}
}

helpPopup = function() {
	window.open(this.href,'helpwin','toolbars=no,status=no,scrollbars=no,width=350,height=515');
	return false;
}

showMenu = function() {
	document.getElementById('quickhelp-submenu').style.display = 'block';
}

hideMenu = function() {
	document.getElementById('quickhelp-submenu').style.display = 'none';
}

window.onload = function(){

	var helpLinks = document.getElementsByTagName('a');
	for(var i=0; i<helpLinks.length; i++){
	if(helpLinks[i].className == 'help-popup'){
			helpLinks[i].onclick = helpPopup;
			//return false;
		}
	}


	var confirmLinks = document.getElementsByTagName('a');
	for(var i=0; i<confirmLinks.length; i++){
		if(confirmLinks[i].className == 'confirm'){
			confirmLinks[i].onclick = confirmHandle;
		}
	}

	var confirmLinks2 = document.getElementsByTagName('input');
	for(var i=0; i<confirmLinks2.length; i++){
		if(confirmLinks2[i].className == 'confirm'){
			confirmLinks2[i].onclick = confirmHandle;
		}
	}

	var menu = document.getElementById('quickhelp-active');
	menu.onmouseover = showMenu;
	menu.onmouseout = hideMenu;

}
