<!--
var thisMarker = "";

var ns4 = (document.layers) ? true:false;
var ie4 = (document.all) ? true:false;
var w3c = ((document.getElementById) && (navigator.userAgent.toLowerCase().indexOf("opera")==-1)) ? true:false;

function setThis(the_form, the_elem) {
	document.forms[the_form].elements[the_elem].value = true;
	document.forms[the_form].submit();
}

function setThisValue(the_form, the_elem, the_value) {
	document.forms[the_form].elements[the_elem].value = the_value;
	document.forms[the_form].submit();
}

function setValue(the_form, the_elem, the_value) {
	document.forms[the_form].elements[the_elem].value = the_value;
}

function submitIt(the_form) {
	document.forms[the_form].submit();
}

function fillshort(the_form,the_elem,the_value) {
	document.forms[the_form].elements[the_elem].value = shorts[the_value];
}

function checkThisBox(the_form, the_box) {
	document.forms[the_form].elements[the_box].checked = true;
}

function checkThisList(the_form, the_select, the_option ) {
	for(i=0; i<document.forms[the_form].elements[the_select].length; i++)
		if( document.forms[the_form].elements[the_select].options[i].value == the_option )
			document.forms[the_form].elements[the_select].options[i].selected = true;
}

function controlAGB(the_form, the_box, the_message) {
	if( !document.forms[the_form].elements[the_box].checked ) {
		alert(the_message);
		return false;
	} else {
		document.forms['mainform'].elements['action'].value = 'summary';
		document.forms['mainform'].submit();
	}
}

function markThis(the_form, the_box, do_check) {
	var elts      = document.forms[the_form].elements[the_box];
    var elts_cnt  = (typeof(elts.length) != 'undefined')? elts.length: 0;

    if (elts_cnt) {
        for (var i = 0; i < elts_cnt; i++) {
           elts[i].checked = do_check;
        } 
    } else {
        elts.checked = do_check;
    }
    return true;
}

function confirmThis(the_form, the_elem, the_message) {
	checker = confirm(the_message);
	if( checker == true ) {
		document.forms[the_form].elements[the_elem].value = true;
		document.forms[the_form].submit();
	}
}

function checkThis(the_form, the_message) {
	isEmpty = false;
	for( i in document.forms[the_form].elements ) {
		if( i.value == "" )
			isEmpty = true;
	}
	if( isEmpty == true ) {
		alert(the_message);
	} else {
		document.forms[the_form].submit();
	}
}

function setCheckboxes(the_form, the_boxes, do_check)
{
    var elts      = document.forms[the_form].elements[the_boxes];
    var elts_cnt  = (typeof(elts.length) != 'undefined')? elts.length: 0;

    if (elts_cnt) {
        for (var i = 0; i < elts_cnt; i++) {
            elts[i].checked = !elts[i].checked;
			//elts[i].checked = do_check;
        } 
    } else {
        elts.checked        = do_check;
    }
    return true;
}

function replaceThis(the_form, the_elem, the_start, the_close) {
	 if (window.getSelection) alert(window.getSelection());
		else if (document.getSelection) alert(document.getSelection());
			else if (document.selection) alert(document.selection.createRange().text);
	//the_txt = document.forms[the_form].elements[the_elem].selectedtext.value;
	
	alert(the_txt);
	//document.forms[the_form].submit();
}
//-->