<!--
function refresh_init(){
	if(java_inbox == java_folder){
		if (_refresh > 0) {
			setTimeout("refresh()",eval(_refresh + "000"))
		}
	}
}

function refresh()
{
	if(_nopreview){
		document.reload_fld.cmd.value = "reload_mail";
		document.reload_fld.submit();		
		return;
	}
	else{
		if(window.parent.frames[1].document.email){
			document.reload_fld.showitem.value = -1;
			document.reload_fld.cmd.value = "reload_mail";
			document.reload_fld.submit();
			return;
		}
		document.reload_fld.listcmd.value = "reload_mail";
		document.reload_fld.cmd.value = "show";
		document.reload_fld.page.value = "framelist";
		document.reload_fld.submit();
		return;
	}
}

function goto_page()
{
        document.goto_page.pos.value = (_max_message_display * (document.goto_page.goto_page.value - 1)) + 1;
        document.goto_page.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;
}

function check_printwin(url){
	if(do_printwin){
		window.parent.printwin(url);
	}
}

function force_printwin(url){
	window.parent.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();
}

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

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

function 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.name.substring(2,row.name.length));
			firsti = eval(TRfirst.name.substr(2,TRfirst.name.length));
			if(rowi <= firsti){
				start = rowi;
				end = firsti;
			}
			else{
				start = firsti;
				end = rowi;
			}
			end++;
			for(i=1; 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).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).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).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=1; 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;
	}
}
// -->
