<!--
var listf2 = "true";
function refresh_init(){
	if(java_inbox == java_folder){
		if (_min_refresh > 0) {
			setTimeout("refresh()",eval(_min_refresh*60 + "000"))
		}
		else if (_refresh > 0) {
			setTimeout("refresh()",eval(_refresh + "000"))
		}
	}
}

function refresh()
{
	document.reload_fld.cmd.value = "reload_mail";
	document.reload_fld.submit();
}

function do_command(command, msg)
{
	if (top.stats) {
		if (top.stats.document) {
			top.stats.Message(msg);
		}
	}
	window.location = command;
}

function mysubmit(cmd, msg)
{
	if (top.stats) {
		if (top.stats.document) {
			top.stats.Message(msg);
		}
	}
	if (cmd == "switch")
		document.reload_fld.pos.value = "1";
	document.reload_fld.cmd.value = cmd;
	document.reload_fld.submit();
}

function mysubmit_list(cmd, msg)
{
	if (top.stats) {
		if (top.stats.document) {
			top.stats.Message(msg);
		}
	}
	document.List.cmd.value = cmd;
	document.List.submit();
}

function goto_page()
{
        document.goto_page.pos.value = (_max_message_display * (document.goto_page.goto_page.value - 1)) + 1;
        document.goto_page.submit();
}

function do_delete()
{
	document.List.cmd.value = "delsel";
	document.List.ignore_trash.value = "true";
	document.List.force_empty.value = "true";
	document.List.submit();
}

function getUID(){
	var now = new Date();
	var rnd = Math.random() + "";
	rnd = rnd.substring(0, rnd.indexOf('.')) + rnd.substring(rnd.indexOf('.')+1,rnd.length);
	return now.getMilliseconds() + "_" + rnd;
}

var done_printwin = false;
function check_printwin(url){
	if(do_printwin){
		if(!done_printwin){
			done_printwin = true;
			printwin(url);
		}
	}
}

function printwin(url){
	if(document.all) {
		innerWidth = document.body.offsetWidth;
	}
	if(innerWidth > 800){
		var width=850;
		var height=550;
		var left=80;
		var top=60;
	}
	else{
		var width=788;
		var height=480;
		var left=0;
		var top=10;
	}
	var str = "width=" + width + ",height=" + height + ",toolbar=0,location=0,directories=0,status=0,menubar=yes,scrollbars=yes,resizable=1,left=" + left + ",top=" + top;
	var win = open(url, htmlTitle + getUID(), str, 'POPUP');
	win.focus();

//	alert(this);
//	alert(this.name);
//	prompt("","before open: url(" + url + ")");
//	var win = open(url, htmlTitle + getUID(), str, 'POPUP');
//	prompt("","after open: win(" + win + ") win.name(" + win.name +	")");
//	win.focus();
//	prompt("","after focus: win(" + win + ")");
//	prompt("","win.name(" + win.name + ")");
}

function setPages(){
	if(window.parent.frames[1].name){
		if(window.parent.frames[1].showPages){
			window.parent.frames[1].showPages(num_pages, java_folder, html_folder, nUnread, nItems);
			window.parent.frames[1].changeImg("z___" + java_folder + "img");
			return;
		}
	}
	setTimeout("setPages()",100);
}

function setTitle(){
	if(xtop == "_top")
		window.top.document.title = title + " - " + folder + ", Page " + page_pos + " of " + num_pages;
}

function openWindow(){
//	alert("openWindow()");
	var UID = getUID();
	window.open(nwimg + "/blank.htm",UID,'left=20,top=20,width=750,height=550,toolbar=no,location=no,directories=no,status=no,menubar=no,resizable=yes,scrollbars=no');
	return UID;
}

if(ie_version.indexOf("6.") > 0){
	var TRfirst = null;
	var TRisdown = false;
	var TRfirstbox = null;
	var checkdown = false;
	var linkdown = false;

	function TRdown(row, checkbox, event){
		if(linkdown){
			linkdown = false;
			return;
		}
		var elements = document.List.elements;
		var rows = document.getElementById('listTable').rows;
		TRfirstbox = checkbox;
		TRisdown = true;
		if(event.shiftKey){
			var start, end, rowi, firsti;
			rowi = eval(row.id.substring(2,row.id.length));
			firsti = eval(TRfirst.id.substr(2,TRfirst.id.length));
			if(rowi <= firsti){
				start = rowi;
				end = firsti;
			}
			else{
				start = firsti;
				end = rowi;
			}
			end++;
			end++;
			start++;
			for(i=2; i<start; i++){
				if(rows[i].bgColor == "#ffffff" || rows[i].bgColor == "#eeeeff")
					rows[i].bgColor = "#ffffff";
				else
					rows[i].bgColor = "#FFe0e0";
				document.getElementById('check' + (i-1)).checked = false;
			}
			for(i=start; i<end; i++){
				if(rows[i].bgColor == "#ffffff" || rows[i].bgColor == "#eeeeff")
					rows[i].bgColor = "#eeeeff";
				else
					rows[i].bgColor = "#ccccff";
				document.getElementById('check' + (i-1)).checked = true;
			}
			for(i=end; i<rows.length-1; i++){
				if(rows[i].bgColor == "#ffffff" || rows[i].bgColor == "#eeeeff")
					rows[i].bgColor = "#ffffff";
				else
					rows[i].bgColor = "#FFe0e0";
				document.getElementById('check' + (i-1)).checked = false;
			}
			checkdown = false;
			return;
		}
		else if(!event.ctrlKey && !checkdown){
			for(var i=0; i<elements.length; i++){
				if(elements[i].name.substr(0,4) == "sel_") elements[i].checked = false;
			}
			for(var i=2; i<rows.length-1; i++){
				if(rows[i].bgColor == "#ffffff" || rows[i].bgColor == "#eeeeff")
					rows[i].bgColor = "#ffffff";
				else
					rows[i].bgColor = "#FFe0e0";
			}
		}

		if(elements[checkbox].checked == true)
			elements[checkbox].checked = false;
		else
			elements[checkbox].checked = true;

		if(row.bgColor == "#eeeeff"){
			row.bgColor = "#ffffff";
		}
		else if(row.bgColor == "#ffffff"){
			row.bgColor = "#eeeeff";
		}
		else if(row.bgColor == "#ccccff"){
			row.bgColor = "#FFe0e0";
		}
		else{
			row.bgColor = "#ccccff";
		}

		TRfirst = row;
		checkdown = false;
	}

	function TRover(row, checkbox){
		if(TRisdown){
			if(row.bgColor == "#ffffff" || row.bgColor == "#eeeeff")
				row.bgColor = "#eeeeff";
			else
				row.bgColor = "#ccccff";
			document.List.elements[checkbox].checked = true;
		}
	}

	function TRup(row, checkbox){
		TRisdown = false;
	}

	function TRcheckbox(boxObject, checkbox){
		if(checkbox == TRfirstbox){
			if(document.List.elements[checkbox].checked == true)
				boxObject.checked = false;
			else
				boxObject.checked = true;
		}
	}

	function TRcheckdown(boxobject, checkbox){
		checkdown = true;
	}
}
//-->