<!--
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) {
	var godel = window.confirm("Are you sure you want to delete seleted items?");
	if (godel) {
		aForm = eval("document." + form);
		aForm.suredelete.value = 1;
		aForm.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);
}





isN4 = document.layers;

function HideLayer(divname){
	if (isN4) return;
	whichDog = eval("document.all."+divname);
	whichDog.style.visibility="hidden";
}

function HideAllLayers() {
	if (isN4) return;
	document.all.div1.style.display = "none";
	document.all.div2.style.display = "none";
	document.all.div3.style.display = "none";
	document.all.div4.style.display = "none";
	document.all.div5.style.display = "none";
	document.all.div6.style.display = "none";
	document.all.cell1.style.background = '#5C86B4';
	document.all.cell2.style.background = '#5C86B4';
	document.all.cell3.style.background = '#5C86B4';
	document.all.cell4.style.background = '#5C86B4';
	document.all.cell5.style.background = '#5C86B4';
	document.all.cell6.style.background = '#5C86B4';
}

function ShowLayer(divname) {
	if (isN4) return;
	HideAllLayers(); 
	if (divname == 'div1') document.all.cell1.style.background = '#4B6D92';
	if (divname == 'div2') document.all.cell2.style.background = '#4B6D92';
	if (divname == 'div3') document.all.cell3.style.background = '#4B6D92';
	if (divname == 'div4') document.all.cell4.style.background = '#4B6D92';
	if (divname == 'div5') document.all.cell5.style.background = '#4B6D92';
	if (divname == 'div6') document.all.cell6.style.background = '#4B6D92';
	whichDog = eval("document.all."+divname);
	whichDog.style.display="block";
}

isMozilla = (document.all) ? 0 : 1;

function SwitchTableRow(rid, state) {
	if (isMozilla) disp = 'table-row';
	else disp = 'block';
	if (!state) disp = 'none';
	document.getElementById(rid).style.display=disp;
}


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;
	}
}




function prepareInputsForHints() {
	var inputs = document.getElementsByTagName("input");
	for (var i=0; i<inputs.length; i++) {
		if (inputs[i].parentNode.getElementsByTagName("span")[0]) {
			inputs[i].onfocus = function () { this.parentNode.getElementsByTagName("span")[0].style.display = "inline"; }
			if (!inputs[i].onblur) inputs[i].onblur = function () { this.parentNode.getElementsByTagName("span")[0].style.display = "none";}
		}
	}
	var inputs = document.getElementsByTagName("select");
	for (var i=0; i<inputs.length; i++) {
		if (inputs[i].parentNode.getElementsByTagName("span")[0]) {
			inputs[i].onfocus = function () {
				this.parentNode.getElementsByTagName("span")[0].style.display = "inline";
				return true;
			}
			inputs[i].onblur = function () {
				this.parentNode.getElementsByTagName("span")[0].style.display = "none";
				return true;
			}
		}
	}
}



function SwitchLoginReg(st) {
	if (st == 'none') st2 = 'block';
	else st2 = 'none';
	document.getElementById('sublogin').style.display=st;
	document.getElementById('subreg').style.display=st2;
	if (st == 'none') st2 = 'reg';
	else st2 = 'login';
	document.getElementById('regtype').value=st2;
}



function MenuImgPreload(lang) {
	MM_preloadImages('/images/m1-act-'+lang+'.jpg','/images/m2-act-'+lang+'.jpg','/images/m3-act-'+lang+'.jpg','/images/m4-act-'+lang+'.jpg','/images/m5-act-'+lang+'.jpg')
}


var lastnum = -1;

function ShowSubPage(num) {
	if (lastnum == num) {
		if (document.getElementById('subpage'+num).style.display=='none') document.getElementById('subpage'+num).style.display='block';
		else document.getElementById('subpage'+num).style.display='none';
		return ;
	}
	var divs = document.getElementsByTagName("div");
	for (var i=0; i<divs.length; i++) if (divs[i].id.indexOf('subpage') == 0) divs[i].style.display='none';
	else document.getElementById('subpage'+num).style.display='block';
	lastnum = num;
}

 -->