<!--

isN4 = document.layers;
isMozilla = (document.all) ? 0 : 1;


function OpenWin(url, winname) {
  window.open(url, winname, "toolbar=0,location=0,directories=0,menuBar=0,scrollbars=0,resizable=1,width=200,height=100");
}

function CheckAll(formname) {
	formobj = eval('document.' + formname);
	for (i=0; i < formobj.length; i++) {
		if (formobj.elements[i].name.substr(0,8) == 'checked_') formobj.elements[i].checked = formobj.checkall.checked;
	}
}


function ConfirmDelete(form, msg) {
	var godel = window.confirm(msg);
	if (godel) {
		form.elements['suredelete'].value = 1;
		form.submit();
	}
}


function popup( url, winname, width, height ) {
	if (winname == "") winname = "popup";
	if (width == "") width = "400";
	if (height == "") height = "300";
	var top = (screen.height) / 2 - (height / 2);
	var left = (screen.width) / 2 - (width / 2);
	var win_arg = "scrollbars=yes,status=yes,resizable=yes,location=no,toolbar=no,width=" + width + ",height=" + height + ",top=" + top + ",left=" + left;
	window.open(url,winname,win_arg);
}



function imgpopup( url, winname, width, height ) {
  if (width == "")  width = 450;
  if (height == "")  height = 500;
  if (winname == "")  winname = "popup";
  var top = screen.height / 2 - height;
  var left = screen.width / 2 - width;
  var win_arg = "scrollbars=no,status=no,location=no,toolbar=no,resizable=yes,width=" + width + ",height=" + height + ",top=" + top + ",left=" + left;
  window.open(url,winname,win_arg);
}


function HideLayer(divname){
	if (isN4) return;
	whichDog = eval("document.all."+divname);
	whichDog.style.visibility="hidden";
}


function editor_insertHTML(myValue, fld) {
	if (fld == '') fld = 'content';
	myField = document.getElementById(fld);
	if (document.selection) {
		myField.focus();
		sel = document.selection.createRange();
		sel.text = myValue;
	}
	else if (myField.selectionStart || myField.selectionStart == '0') {
		var startPos = myField.selectionStart;
		var endPos = myField.selectionEnd;
		myField.value = myField.value.substring(0, startPos) + myValue + myField.value.substring(endPos, myField.value.length);
	}
	else {
		myField.value += myValue;
	}
}

 -->
