// javascript definition file for style sheets

// features setup for dialogs
var DIALOGFEATURES_IE_SIZE1		= 'dialogWidth=450px;dialogHeight=400px;status=0;help=0;';
var DIALOGFEATURES_MOZ_SIZE1	= 'dependent=no,width=400px,height=400px,scrollbars=no';

var DIALOGFEATURES_IE_SIZE2		= 'dialogWidth=780px;dialogHeight=400px;status=0;help=0;scrollbars=1;';
var DIALOGFEATURES_MOZ_SIZE2	= 'dependent=no,width=780px,height=400px,scrollbars=no';

var DIALOGFEATURES_IE_SIZE3		= 'dialogWidth=460px;dialogHeight=300px;status=0;help=0;';
var DIALOGFEATURES_MOZ_SIZE3	= 'dependent=no,width=460px,height=300px,scrollbars=no';

var DIALOGFEATURES_IE_SIZE4		= 'dialogWidth=500px;dialogHeight=520px;status=0;help=0;';
var DIALOGFEATURES_MOZ_SIZE4	= 'dependent=no,width=500px,height=520px,scrollbars=no';


// preprocess function
function style_preprocess(mode)
{
	if (mode == 'main')
	{
		// style setup for main div

		// fix navigation area heights on all browsers
		if (document.getElementById("menu") && document.getElementById("nav"))
		{
			document.getElementById('menu').style.position = 'absolute';
			document.getElementById('nav').style.position = 'absolute';
			if (document.getElementById("sysmonitor"))
				document.getElementById('nav').style.bottom = (document.getElementById('menu').offsetHeight+96)+'px';
			else
			{
				document.getElementById('nav').style.bottom = (document.getElementById('menu').offsetHeight)+'px';
				document.getElementById('menu').style.bottom = '0px';
			}
		}
		
		// fix main in IE6
		IE6 = navigator.appVersion.indexOf("MSIE 6.");
		if (IE6 > 0)
		{
			if (document.getElementById("nav"))
			{
				if (document.getElementById("sysmonitor"))
					document.getElementById('nav').style.height = (document.body.clientHeight - 62 - 96 - document.getElementById('menu').offsetHeight)+'px';
				else
				{
				document.getElementById('nav').style.bottom = (document.getElementById('menu').offsetHeight)+'px';
				document.getElementById('menu').style.bottom = '0px';
				}
			}
		
			if (document.getElementById("main"))
			{
				document.getElementById('main').style.height = (document.body.clientHeight - 62 - 32)+'px';
				document.getElementById('main').style.width = (document.body.clientWidth - (document.body.clientWidth / 100 * 18))+'px';
				document.getElementById("main").innerHTML =	document.getElementById("main").innerHTML;
			}

			if (document.getElementById("navlayoutblock2"))
				document.getElementById('navlayoutblock2').style.height = document.body.clientHeight +'px';
		}
	}
	else if (mode == 'editor')
	{
		// style setup for editors
	}
	else if (mode == 'dialog')
	{
		// style setup for dialogs
	}
	/*	tbls = document.getElementsByTagName("li");
    for (ti=0;ti<tbls.length;ti++) {
        thisTbl = tbls[ti];
        if (((' '+thisTbl.className+' ').indexOf("selected") != -1) && (thisTbl.id)) {
            //initTable(thisTbl.id);
           document.getElementById(thisTbl.id).scrollIntoView();
        }
    }
	*/
	
	$(document).ready(function() { 
    // call the tablesorter plugin 
	//$("table").tablesorter({ widthFixed: true, widgets: ['zebra'], sortList: [[2,0]] }); 
	$("table.usermanager").tablesorter({sortList: [[4,1]],widgets: ['zebra']});
	$("table.listview").tablesorter({headers:{2: {sorter: 'digit'}}, widgets: ['zebra']});
	$("table.recyclebintable").tablesorter({sortList: [[2,1]], widgets: ['zebra']}); 
	$("table.publishtable").tablesorter({sortList: [[3,1]], widgets: ['zebra']}); 
	
	//$("table.publishtable").tablesorter(sortForce: [[0,0]], widgets: ['zebra']});

	//$("table.").tablesorter({headers:{2: {sorter: 'digit'}}, widgets: ['zebra']});

	
}); 

}
	
// format Recent Pages div function - return false to disable mouseover control
function style_formatRecentPages()
{
	if (document.getElementById("sysmonitor"))
		document.getElementById('sys_userinfo_div').style.bottom = (document.getElementById('menu').offsetHeight+96)+'px';
	else
	{
		document.getElementById('sys_userinfo_div').style.bottom = (document.getElementById('menu').offsetHeight)+'px';
		document.getElementById('menu').style.bottom = '0px';
	}

	return false;
}
