<!-- begin sitewide scripts
// GENERIC WINDOW OPENER
function openWin(url,name,options)  {
	win = window.open(url,name,options)
	self.name = "main"
	win.focus()
}
// GENERIC COOKIE SCRIPT (Next 3 functions)
function getCookieVal(offset) {
 var endstr=document.cookie.indexOf(";",offset);
 if (endstr==-1)
 endstr=document.cookie.length;
 return unescape(document.cookie.substring(offset,endstr));
}
function GetCookie(cname) {
 var arg=cname+"="; var alen=arg.length;
 var clen=document.cookie.length; var i=0;
 while (i<clen) {
	var j=i+alen;
	if (document.cookie.substring(i,j)==arg) return getCookieVal (j);		i=document.cookie.indexOf(" ",i)+ 1;
	if (i==0) break;
 } return null;
}
function SaveCookie(cname,cvalue,cdays,cpath) {
 ex=new Date; ex.setTime(ex.getTime()+(cdays*86400000));
 if (cpath == null) { cpath = "" } else { cpath= "; path="+cpath }
 document.cookie=cname+'='+cvalue+'; expires='+ex.toGMTString()+cpath;
}

// GALLERY LAUNCHER
function goGallery(url)  {
	galleryWindow = window.open(url,'gallerypopup','status=yes,width=600,height=400,scrollbars=auto,resizable=yes');
}

// end sitewide scripts -->
