function setChecked(obj,val) {
    len=obj.length;
    for( i=0;i<len;i++) {
	obj[i].selected=val;
    }
}
function checkSubmit(lang) {
    if (document.forms[0].target!='pdf'&&document.forms[0].target!='csv'&&document.forms[0].target!='sla') {
        oldtarget=document.forms[0].target;
    }
    if (lang=='pdf') {
        document.forms[0].mode.value='showpdf';
	window.open('','pdf','');
	document.forms[0].target='pdf';
    } else if (lang=='csv') {
        document.forms[0].mode.value='showcsv';
	window.open('','csv','');
	document.forms[0].target='csv';
    } else if (lang=='sla') {
        document.forms[0].mode.value='showsla';
	window.open('','sla','');
	document.forms[0].target='sla';
    } else if (lang=='html') {
        document.forms[0].mode.value='show';
	document.forms[0].target=oldtarget;
    }
    document.forms[0].submit();
}

