<!---
// Javascript code for moving Divs
// -------------------------------
var dragy,dragx=false;
var display_mode = 0;
var screenx, screeny;

var x = 170;
var y = 250;

var minx = 120, maxx = 200;
var miny = 230, maxy = 250;

var offset = 0;

function resize_screen()
{
// Remove out since this causes netscape to crash
//	document.body.style.overflow='hidden';  

	screenx = document.body.clientWidth-2;
	screeny = document.body.clientHeight-4;
	maxy = screeny-100;
	maxx = screenx-200;
 
        set_x_bar();
	set_y_bar();
}

function mouse_down(mx)
{
	document.getElementById("hiddendiv").style.display="";
	if (mx=="x") {
		dragx=true;
		document.getElementById("hiddendiv").style.cursor="w-resize";
	}
	else	{
		dragy=true;
		document.getElementById("hiddendiv").style.cursor="s-resize";
	}
}

function mouse_up()
{
	dragx=dragy=false;
	document.getElementById("hiddendiv").style.display="none";
}

function mouse_move(e)
{
	if (dragx) {
		if (!e) Pos = window.event.clientX;
		else 	Pos = e.pageX;

		if (Pos < minx)	Pos = minx;
		if (Pos > maxx) Pos = maxx;

		x= Pos-2;
		set_x_bar();
		set_y_bar();
	}
	else if (dragy) {
		if (!e) Pos = window.event.clientY;
		else 	Pos = e.pageY;

		if (Pos < miny) Pos = miny;
	        if (Pos > maxy)	Pos = maxy;

		y = Pos-2;
		set_y_bar();
	}
}

function set_x_bar()
{
	document.getElementById("hiddendiv").style.width = (screenx-offset) +"px";
	document.getElementById("file_menu").style.width = (screenx) +"px";
	
	document.getElementById("file_fld").style.width = (200) +"px";

	document.getElementById("file_files_menu").style.left = 206 +"px";
	document.getElementById("file_files_menu").style.width = (screenx-203-6+offset) +"px";

	document.getElementById("file_files").style.left = 206 +"px";
	document.getElementById("file_files").style.width = (screenx-203-6+offset) +"px";

	document.getElementById("file_new_file").style.left = 206 +"px";
	document.getElementById("file_new_file").style.width = (screenx-203-6+offset) +"px";

	document.getElementById("file_new_msg").style.left = 206 +"px";
	document.getElementById("file_new_msg").style.width = (screenx-203-6+offset) +"px";

	document.getElementById("file_new_fld").style.left = 206 +"px";
	document.getElementById("file_new_fld").style.width = (screenx-203-6+offset) +"px";

	document.getElementById("file_url").style.width = (screenx-6+offset) +"px";
}

function set_y_bar()
{
	document.getElementById("hiddendiv").style.height = (screeny-offset) +"px";

	if (offset) {
		document.getElementById("file_files_menu").style.height = (17+offset) +"px";
	}

	document.getElementById("file_fld").style.height = (screeny-30-15-offset) +"px";
	document.getElementById("file_files").style.height = (screeny-30-15-15-offset) +"px";

	document.getElementById("file_new_file").style.height = (screeny-30-15-offset) +"px";
	document.getElementById("file_new_msg").style.height = (screeny-30-15-offset) +"px";
	document.getElementById("file_new_fld").style.height = (screeny-30-15-offset) +"px";

	document.getElementById("file_url").style.top = (screeny-12) +"px";
	document.getElementById("file_url").style.height = "15px";
}

// -------------------------------------------------------------------------------------------
// -------------------------------------------------------------------------------------------
// -------------------------------------------------------------------------------------------
// -------------------------------------------------------------------------------------------

// Change Screen to display in selected mode:
// 0 - EMail Header Display.
// 1 - New Shared File.
// 2 - New Folder.
// 3 - New message.

function set_display_mode(mode)
{
	if (display_mode == mode)
		return ;

	display_mode = mode;
	if (display_mode == 0) {	
		document.getElementById("file_menu").style.visibility = 'visible';
		document.getElementById("file_fld").style.visibility = 'visible';
		document.getElementById("file_files_menu").style.visibility = 'visible';
		document.getElementById("file_files").style.visibility = 'visible';

		document.getElementById("file_new_file").style.visibility = 'hidden';
		document.getElementById("file_new_msg").style.visibility = 'hidden';
		document.getElementById("file_new_fld").style.visibility = 'hidden';
	}
	else if (display_mode == 1) {
		document.getElementById("file_menu").style.visibility = 'visible';
		document.getElementById("file_fld").style.visibility = 'visible';
		document.getElementById("file_files_menu").style.visibility = 'hidden';
		document.getElementById("file_files").style.visibility = 'hidden';

		document.getElementById("file_new_file").style.visibility = 'visible';
		document.getElementById("file_new_msg").style.visibility = 'hidden';
		document.getElementById("file_new_fld").style.visibility = 'hidden';
	}
	else if (display_mode == 2) {
		document.getElementById("file_menu").style.visibility = 'visible';
		document.getElementById("file_fld").style.visibility = 'visible';
		document.getElementById("file_files_menu").style.visibility = 'hidden';
		document.getElementById("file_files").style.visibility = 'hidden';

		document.getElementById("file_new_file").style.visibility = 'hidden';
		document.getElementById("file_new_msg").style.visibility = 'hidden';
		document.getElementById("file_new_fld").style.visibility = 'visible';
	}
	else if (display_mode == 3) {
		document.getElementById("file_menu").style.visibility = 'visible';
		document.getElementById("file_fld").style.visibility = 'visible';
		document.getElementById("file_files_menu").style.visibility = 'hidden';
		document.getElementById("file_files").style.visibility = 'hidden';

		document.getElementById("file_new_file").style.visibility = 'hidden';
		document.getElementById("file_new_msg").style.visibility = 'visible';
		document.getElementById("file_new_fld").style.visibility = 'hidden';
	}


	set_x_bar();
	set_y_bar();		
}

// -------------------------------------------------------------------------------------------
// -------------------------------------------------------------------------------------------
// -------------------------------------------------------------------------------------------
// -------------------------------------------------------------------------------------------

// -->

