function openLarge(gid,days,offset) {
	newWindow = window.open('/viewgraph/?id='+gid+'&days='+days+'&offset='+offset+'&size=l','largeGraph','width=640, height=328');
}
function setTimeZone(offset) {
	var date = new Date();
	var expires = date.setTime(date.getTime()+(30*24*60*60*1000));
	document.cookie = "offset="+offset+"; expires="+date.toGMTString()+"; path=/";
	window.location.href = window.location.href;
}
		
function switchGraph(selectObj,id,offset) {
	var days = selectObj.options[selectObj.selectedIndex].value;
	var a    = document.getElementById('graph'+id);
	var img  = a.getElementsByTagName('img')[0];
	
	a.setAttribute('href','javascript:openLarge('+id+','+days+','+offset+');');
	img.setAttribute('src','/_images/graph?id='+id+'&days='+days+'&offset='+offset+'&size=s');
}
function alertBar() {
	alertBar.html  = "<div id=\"alertBar\">\n";
	alertBar.html += "<a href=\"/feeds/\">Webmasters, display graphs and current jackpots on your website now. Click here.</a>\n";
	alertBar.html += "</div>\n";
	document.body.innerHTML = alertBar.html+document.body.innerHTML;
}