function jump(el) {
	val 	= el.options[el.selectedIndex].value;
	class1	= el.options[el.selectedIndex].className;
	el.selectedIndex = 0;
	if (class1=="region") {
		url = "http://www.online2.church123.com/christiansolidarityworldwide2/region" + val + ".htm";
	} else {
		url = "http://dynamic.csw.org.uk/country.asp?s=id&urn=" + val;
	}
	window.location.href = url;
}
function swapheader() {
	num = 8;
	var randnum = Math.round(Math.random()*(num-1)) + 1;
	document.getElementById("headerimg").src = "http://www.online2.church123.com/christiansolidarityworldwide/images/header0" + randnum + ".jpg";
}
function doSave(frm) {
	frm.mybody.value = document.getElementById("divmybody").innerHTML;
	return true;
}
function doDel(table, id) {
	if (confirm("Deleting " + table + " " + id + ". Are you sure?")) window.location.href="do_delarticle.asp?t="+table+"&id="+id;
	
}
document.onkeydown = function() {
	if ((event.ctrlKey==true)&&(event.shiftKey==true)) {
		key = event.keyCode;
		if (window.location.href.indexOf("admin")==-1) {
			if (((window.location.href.indexOf("t=")>0) || (window.location.href.indexOf("s=")>0)) && (key==69)) window.location.href = window.location.href.replace("http://dynamic.csw.org.uk/","http://dynamic.csw.org.uk/admin/"); //Ctrl-Shift-E
		} else {
			thisEl = document.selection.createRange().parentElement();
			if (thisEl.tagName!="DIV") {
				if ((key>=48) && (key<=51)) {
					switch (key) {
						case 48: level="p"; break; //Ctrl-Shift-0
						case 49: level="h1"; break; //Ctrl-Shift-1
						case 50: level="h2"; break; //Ctrl-Shift-2
						case 51: level="h3"; break; //Ctrl-Shift-3
					}
					document.execCommand('RemoveFormat');
					thisEl.outerHTML = "<"+level+">" + thisEl.innerHTML + "</"+level+">";
				}
				
			}
		}
	}
	
	
}

