var e;
var fs;

var e;
function p(name, w, h)
{
	e = window.open(name, 'popup', 'scrollbars=yes,width=' + w + ',height=' + h);
	if (window.focus) { e.focus(); }
	return false;
}



function on_select(obj)
{
	if (obj.selectedIndex > 1) 
	{
		window.location.href = obj.options[obj.selectedIndex].value; 
	}
}

var sm = 0;

function on(n)
{
	if (n != sm)
	{
		if (sm) {
			document.all['sm' + sm].style.display = "none";
		} 
		document.all['sm' + n].style.display = "block";
        sm = n;
	}
	else {
		document.all['sm' + n].style.display = "none";
		sm = 0;
	}
	return false;
}

function pop(html, w, h)
{
	w = (w != 'undefinde') ? w : 600;
	h = (h != 'undefinde') ? h : 400;
	e = window.open(html, 'html', 'scrollbars=yes,width=' + w + ',height=' + h);
	if (window.focus) { e.focus(); }

	return false;
}

function FontSizer (minsize, maxsize, defsize) {
	this.minsize = minsize || 10;
	this.maxsize = maxsize || 32;
	this.defsize = defsize || 13;

	this.init = function () {
		if (document.getElementById && document.getElementsByTagName) {
			var sizer = document.getElementById('sizer');
			if (sizer) {
				sizer.style.display="block";
//				this.cursize = getCookie("fontSize");
				this.cursize = !isNaN(parseFloat(this.cursize)) ? parseFloat(this.cursize) : this.defsize;
				if (this.cursize > this.maxsize)
					this.cursize = this.maxsize;
				if (this.cursize < this.minsize)
					this.cursize = this.minsize;
				var el = document.getElementsByTagName("div");
				for(i=0;el[i];i++) {
					if (el[i].className == "state") {
						el[i].style.fontSize= this.cursize + "px";
						this.el = el[i];
					}
				}
			}
		}
	}

	this.adjust = function (n) {
		if (this.cursize && this.el) {
			this.cursize += n;
			if (this.cursize > this.maxsize)
				this.cursize = this.maxsize;
			if (this.cursize < this.minsize)
				this.cursize = this.minsize;
			this.el.style.fontSize= this.cursize + "px";
//			setCookie("fontSize",this.cursize,180,"/");
		}
	}

}

/*********************************************************************************
  dw_cookies.js - cookie functions for www.dyn-web.com
  Recycled from various sources 
**********************************************************************************/

// Modified from Bill Dortch's Cookie Functions (hidaho.com) 
// (found in JavaScript Bible)
function setCookie(name,value,days,path,domain,secure) {
  var expires, date;
  if (typeof days == "number") {
    date = new Date();
    date.setTime( date.getTime() + (days*24*60*60*1000) );
		expires = date.toGMTString();
  }
  document.cookie = name + "=" + escape(value) +
    ((expires) ? "; expires=" + expires : "") +
    ((path) ? "; path=" + path : "") +
    ((domain) ? "; domain=" + domain : "") +
    ((secure) ? "; secure" : "");
}

// Modified from Jesse Chisholm or Scott Andrew Lepera ?
// (found at both www.dansteinman.com/dynapi/ and www.scottandrew.com/junkyard/js/)
function getCookie(name) {
  var nameq = name + "=";
  var c_ar = document.cookie.split(';');
  for (var i=0; i<c_ar.length; i++) {
    var c = c_ar[i];
    while (c.charAt(0)==' ') c = c.substring(1,c.length);
    if (c.indexOf(nameq) == 0) return unescape( c.substring(nameq.length, c.length) );
  }
  return null;
}

// from Bill Dortch's Cookie Functions (hidaho.com) 
function deleteCookie(name,path,domain) {
  if (getCookie(name)) {
    document.cookie = name + "=" +
      ((path) ? "; path=" + path : "") +
      ((domain) ? "; domain=" + domain : "") +
      "; expires=Thu, 01-Jan-70 00:00:01 GMT";
  }
}

function init_listitem(src, title) {
    this.src=src;
    this.title=title;
 }


