function imgMouseOver(oImg) {
	var sAdd = "_over";
	if ( oImg.src.indexOf(sAdd) < 0 ) {
		var sTmp = oImg.src.substring(0,oImg.src.indexOf(".gif")) + sAdd + ".gif";
		oImg.src = sTmp;
	}
	return;
}

function imgMouseOut(oImg) {
	var sAdd = "_over";
	if ( oImg.src.indexOf(sAdd) > 0 ) {
		var sTmp = oImg.src.substring(0,oImg.src.indexOf(sAdd)) + ".gif";
		oImg.src = sTmp;
	}
	return;
}

function anchorMouseOver(oA) {
	oA.style.color = "#888888";
	return;
}

function anchorMouseOverHotlink(oA) {
	oA.style.color = "#414042";
	return;
}

function anchorMouseOut(oA) {
	oA.style.color = "#ffffff";
	return;
}

function anchorMouseOutDop(oA) {
	oA.style.color = "#555555";
//	oA.style.color = "#f58220";
	return;
}

function linkMouseOver(oLnk) {
	oLnk.style.textDecoration = "underline";
}

function linkMouseOut(oLnk) {
	oLnk.style.textDecoration = "none";
}

function login_onfocus() {
	if ( document.logForm.TextBox1.value == 'Логин') {
		document.logForm.TextBox1.value = '';
	}
}

function login_onblur() {
	if ( document.logForm.TextBox1.value == '') {
		document.logForm.TextBox1.value = 'Логин';
	}
}

function passw_onfocus() {
	if ( document.logForm.TextBox2.value == 'Пароль') {
		document.logForm.TextBox2.value = '';
	}
}

function passw_onblur() {
	if ( document.logForm.TextBox2.value == '') {
		document.logForm.TextBox2.value = 'Пароль';
	}
}

function openPopupWindow(sURL, sName, sFeatures, bReplace) {
	try {
		var popupWindowHR = null;
		if ( !sURL )
			sURL = "about:blank";
		if ( !sName )
			sName = null;
		if ( !sFeatures )
			sFeatures = "";
		if ( !bReplace )
			bReplace = false;
		if ( window != null ) {
			popupWindowHR = window.open(sURL, sName, sFeatures, bReplace);
			if ( popupWindowHR == null ) {
				alert("Внимание: Невозможно открыть всплывающее окно. \n\r Возможно, включена блокировка всплывающих окон. \n\r Пожалуйста, проверьте установки Вашего браузера и попробуйте снова.");
			} else {
				return popupWindowHR;
			}
		}
	}
	catch(e) {
		return null;
	}
}

function addOption(oSelect, optname, optvalue) {
	for ( var i = 0; i < oSelect.options.length; i++ ) {
		oSelect.options[i].selected = false;
	}	
	opt = new Option(optname,optvalue,false,false);
	oSelect.options[oSelect.length] = opt;
	oSelect.options[oSelect.length-1].selected = true;
	for ( i = 0; i < oSelect.options.length; i++ ) {
		if ( oSelect.options[i].value == "" && oSelect.options[i].text == "" ) { 
			oSelect.options[i] = null;
		}
	}	
}

function removeOption(oSelect, optindex) {
	oSelect.options[optindex] = null;
}
