﻿<!--
// if extra == true, add opts to base opts, otherwise replace them.
function popWnd(url, title, opts, extra)
{
	baseopts = 'left=200,top=200,width=360,height=480,resizable=yes';

	if (!opts) {
		finalopts = baseopts;
	}
	
	else {
		if (extra == true) {
			finalopts = baseopts + ',' + opts;
		}
		else finalopts = opts;
	}
		
	newwindow = window.open(url, title, finalopts);
	
	if (window.focus) {newwindow.focus()}
	return false;
}
	
function lite(obj)
{
	if(document.all&&!window.opera) {
	obj.filters.blendTrans.apply();
	obj.filters.blendTrans.play();
	}
}

function alternateRowColors()
{
	var className = 'alt';
	var rowcolor = '#B5A894';
	var rowcolor2 = '#786D5B';
	var rows, arow;
	var tables = document.getElementsByTagName("table");
	var rowCount = 0;
	for(var i=0;i<tables.length;i++) {
		//dump(tables.item(i).className + " " + tables.item(i).nodeName + "\n");
		if(tables.item(i).className == className) {
			atable = tables.item(i);
			rows = atable.getElementsByTagName("tr");
			for(var j=0;j<rows.length;j++) {
				arow = rows.item(j);
				if(arow.nodeName == "TR") {
					if(rowCount % 2) {
						arow.style.backgroundColor = rowcolor;
					} else {
						arow.style.backgroundColor = rowcolor2;
					}
					rowCount++;
				}
			}
			rowCount = 0;
		}
	}
}

function doTest ()
{
	var idName = 'container';
	var container = document.getElementById("container");
	var widest = 0;
	var tables;
	var tmp = 0;
	
	container.style.width = "auto";
	/*tables = container.getElementsByTagName("table");
	for (var i=0;i<tables.length;i++) {
		if ((tmp = tables.item(i).style.width) > widest) {
			alert(tables.length);
			widest = tmp;
		}
	}
	alert(widest);
	container.style.width=widest;
			
	for(var i=0;i<divs.length;i++) {
		//dump(tables.item(i).className + " " + tables.item(i).nodeName + "\n");
		if((div = divs.item(i).id) == idName) {
			tables = document.item(i).getElementsByTagName("table");
					
		for (var j=0;j<tables.length;j++) {
			if (div.item(j).style.width > widest)
				widest = div.item(j).style.width;
			}
					
			div.style.width = widest;
		}
	}*/
}
//-->
