var ocBugFix = ""; // Workaround for bug in onchange() handler in IE
var swidth=591;
var sizeup=0;
var operbr=navigator.userAgent.toLowerCase().indexOf('opera');
var clWin = new Array();

function selectstart() {
	var o=event.srcElement;
	return ((o.tagName=="INPUT") || (o.tagName=="TEXTAREA"));
}

function hf(a, b) {
	ocBugFix = a.value;
	if (a.value == b) a.value = '';
}

function hb(a, b) {
	if (a.value == '') a.value = b;
//	if (ocBugFix != a.value) a.onchange();
}

function open_w(url, name, features) {
	var p = clWin.length;
	for (var i = 0; i < clWin.length; i++) {
		if (clWin[i] == null) {
			p = i;
		} else {
			if (clWin[i].closed) {
				clWin[i] = null;
		    } else {
				if (clWin[i].name == name) {
					clWin[i].close();
					clWin[i] = null;
				}
			}
		}
	}
	clWin[p] = window.open(url, name, features);
	clWin[p].focus();
}
function close_w() {
	for (var i = 0; i < clWin.length; i++) {
		if ((clWin[i] != null) && (!clWin[i].closed)) {
			clWin[i].close();
			clWin[i] = null;
		}
	}
}
function showSelect(strVariable, strClass, strCode, arrValues, intSkip, strLocation) {
	document.write('<select name="' + strVariable + '" class="' + strClass + '"');
	if (strLocation == "") {
		document.write('><option value="">Please select...');
	} else {
		document.write(' onchange="location=\'' + strLocation + '&' + strVariable + '=\' + document.all.' + strVariable + '.value">');
	}
	for (var a = 0; a < arrValues.length; a += (1 + intSkip)) {
		document.write('<option value="' + arrValues[a] + '"');
		if (arrValues[a] == strCode) document.write(' selected');
		document.write('>' + arrValues[a + intSkip]);
	}
	document.write('</select>');
}

function navOn(source) {
	source.style.backgroundColor='#617E9B';
	source.style.cursor = 'hand';
	if (source.children) // MSIE4+
		source.children[0].children[0].style.color = '#ff8';
	else
		source.firstChild.firstChild.style.color = '#ff8';
}
function navOff(source) {
	source.style.backgroundColor='';
	if (source.children) // MSIE4+
		source.children[0].children[0].style.color = '';
	else
		source.firstChild.firstChild.style.color = '';
}
function imgOn(source) {
	if (source.parentElement) // MSIE4+
		img = source.children[0];
	else
		img = source.firstChild;
	path = img.src.split("/")
	path[path.length - 1] = "h" + path[path.length - 1];
	img.src = path.join("/");
}

function imgOff(source) {
	if (source.parentElement) // MSIE4+
		img = source.children[0];
	else
		img = source.firstChild;
	path = img.src.split("/")
	path[path.length - 1] = path[path.length - 1].substr(1);
	img.src = path.join("/");
}