<!--

// have getElementById always
if ( document.all && !document.getElementById) 
{
	document.getElementById = function(id) { return document.all[id]; }
}

function browser_height() 
{
	var myHeight = 0;
	if( typeof( window.innerWidth ) == 'number' ) 
		//Non-IE
		myHeight = window.innerHeight;
	else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) 
	 	//IE 6+ in 'standards compliant mode'
		myHeight = document.documentElement.clientHeight;
	else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) 
		//IE 4 compatible
		myHeight = document.body.clientHeight;
	return myHeight;
}

function browser_width() 
{
	var myW = 0;
	if( typeof( window.innerWidth ) == 'number' ) 
		//Non-IE
		myW = window.innerWidth;
	else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) 
	 	//IE 6+ in 'standards compliant mode'
		myW = document.documentElement.clientWidth;
	else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) 
		//IE 4 compatible
		myW = document.body.clientWidth;
	return myW;
}


function AdjustMenuWidth()
{
    if( typeof( window.innerWidth ) == 'number' ) 
	{	
	  //Non-IE
	  document.getElementById('right').width = browser_width() - 337;
  	  document.getElementById('right').height = browser_height() - 12;
	  document.getElementById('left').height = document.getElementById('right').height;
    }
	else 
    {
	  document.getElementById('right').width = browser_width() - 317;
  	  document.getElementById('right').height = browser_height();
	  document.getElementById('left').height = document.getElementById('right').height;
 	}
}

function printit()
{ 
	window.print(); 
}

				
function Save()
{
	document.execCommand('SaveAs');
}

function fullscreen()
{
	features = 'resizable=1,status=1,menubar=1,toolbar=1,scrollbars=1';
	//alert(location.pathname);
	//alert(location.search);
	w = open(self.location.href, null, features); 
	w = open(window.location.pathname, null, features);
	w.resizeTo(screen.availWidth,screen.availHeight); 
	w.moveTo(0,0);
}


function add2favorites()
{
	if (window.external)
		window.external.AddFavorite(location.href,document.title);
    else alert("Your browser doesn't support this feature.");
}


function show(a)
{
	var e=get(a);
	e.style.display='block';
}

function hide(a)
{
	var e=get(a);
	e.style.display='none';
}


function toggle(a)
{
	var e=get(a);
	if (!e) return true;
	if (e.style.display=='none') show(a);
	else                         hide(a);
	return true;
}

function toggle_range( prefix, startpos, count )
{
	var start = 0 + startpos; 
	var end   = start + count;
	for( i=start; i<end; i++ ) 
	{
		var ID = prefix + i;
		toggle( ID );
	}
	return true;
}

function show_range( prefix, startpos, count )
{
	for( i=startpos; i<startpos+count; i++ ) show( prefix+i );
}

function hide_range( prefix, startpos, count )
{
	for( i=startpos; i<startpos+count; i++ ) hide( prefix+i );
}

function toggle_range2( prefix, startpos, count )
{
	var e= get( prefix+startpos );	
	if (e.style.display=='none') show_range( prefix, startpos, count );
	else                         hide_range( prefix, startpos, count );
}


function get(a)
{
	return document.getElementById(a);
}

function getval(a)
{
	var e = document.getElementById(a);
	if (e!=null) return e.value;
	return null;
}

function copy(a,b)
{
	var e = document.getElementById(b);
	if (e!=null) e.value = getval(a);
}

function trimL(str) 
{
	var s = str;
	while (s.substring(0,1) == ' ') s = s.substring(1, s.length);
	return s;
}

function trimR(str) 
{
	var s = str;
	while (s.substring(s.length-1, s.length) == ' ') s = s.substring(0,s.length-1);
	return s;
}

function trim(s) 
{
	return trimL( trimR(s)  );
}

function set_focus2(control_id) 
{
	var e = get(control_id);
	if (e!=null) e.focus();
}

function close_me() 
{
	window.opener  = 'x';
    self.close();
}

function stripHTML()
{
    var re= /<\S[^><]*>/g
    for (i=0; i<arguments.length; i++)
    if (arguments[i]!=null) arguments[i].value=arguments[i].value.replace(re, "")
}

-->

