function openWindow(dest,aw,ah) {
	if (!aw) aw=488;
	if (!ah) ah=500;
	Win = window.open(dest,'infowindow','left=0,screenX=0,top=0,screenY=0,width=' + aw + ',height=' + ah + ',resizable=1,scrollbars=yes,menubar=no,status=no,toolbar=no,location=no,directories=no,report=no' );
	Win.focus()
	return void(0);
}

function setCookie(name, value, expires) {  
	var expDate = new Date()
	expDate.setTime(expDate.getTime() + (expires*60*1000))
	if (value == -1) value = expDate.toGMTString()
	document.cookie = name + "=" + escape(value) + ((expires == null) ? "" : ("; expires=" + expDate.toGMTString())) 
}	

function incCookie(name, expires) {
	var cv=getCookie(name)
	if (cv == null) {
		setCookie(name,0,expires)
		cv=0;
	}	
	ncv=parseInt(cv)+1
	setCookie(name,ncv,expires)
	return ncv
}

function getCookie(name) { 
	cc=document.cookie;
	var i = cc.indexOf(name + "=")
	if (i == -1) return null
	i = cc.indexOf("=", i) + 1
	var endstr = cc.indexOf(";", i)
	if (endstr == -1) endstr = cc.length
	return unescape(cc.substring(i, endstr))
}

function rowCols(ref, col, stat)
{
 var tds = ref.children?ref.children:(ref.childNodes?ref.childNodes:null);
 if (tds) for (var td = 0; td < tds.length; td++)
 if (tds[td].style && tds[td].tagName.toLowerCase()=='td') with (tds[td].style)
 {
  backgroundColor = col;
  //cursor = document.all?'hand':'pointer';
 }
 return window.status = stat&&ref.getAttribute ? ref.getAttribute('title') : '';
}	

