// ipy.js - Javascript for IPY-2007 site

function InitTextAreas() { var field = document.getElementsByTagName("textarea"); for(var i=0;i<field.length;i++) { field[i].onfocus = GrowIt; field[i].onblur = ShrinkIt; } }
function GrowIt() { this.style.height="200px"; }
function ShrinkIt() { this.style.height=""; }
function rowColr(theRow, theColr) { if (theColr == '' || typeof(theRow.style) == 'undefined') { return false; } if (typeof(document.getElementsByTagName) != 'undefined') { var theCells = theRow.getElementsByTagName('td'); } else if (typeof(theRow.cells) != 'undefined') { var theCells = theRow.cells; } else { return false; } var rowCellsCnt=theCells.length; for (var c = 0; c < rowCellsCnt; c++) { theCells[c].style.backgroundColor = theColr; } return true; }
function SetCookie(cookieName,cookieValue,nDays) { var today = new Date(); var expire = new Date(); if (nDays==null || nDays==0) nDays=1; expire.setTime(today.getTime() + 3600000*24*nDays); document.cookie = cookieName+"="+escape(cookieValue) + ";expires="+expire.toGMTString(); }
function ReadCookie(cookieName) { var theCookie=""+document.cookie; var ind=theCookie.indexOf(cookieName+"="); if (ind==-1 || cookieName=="") return "";  var ind1=theCookie.indexOf(';',ind); if (ind1==-1) ind1=theCookie.length;  return unescape(theCookie.substring(ind+cookieName.length+1,ind1)); }

function showDates(sel)
	{
	var FromTo=document.getElementById("fromto");
//	if(sel.value==4) FromTo.style.visibility="visible"; else FromTo.style.visibility="hidden";
	if(sel.value==4) FromTo.style.display="inline"; else FromTo.style.display="none";
	}

function DelEvent(EvId)
	{
	if (confirm('Are you sure you want to permanently remove this Event?'))
		{ window.location='index.php?del=' + EvId; }
	}

	