// JavaScript Document
//delete item from favorite shows list

function createMarker( point, tagstr , stitle, yin, closein ) 
{
if (yin==closein)
	var marker = new GMarker( point, { title: tagstr, icon: closeicon }  );
else
	var marker = new GMarker( point, { title: tagstr, icon: mkicon }  );
GEvent.addListener(marker, "mouseover", 
  				function() { marker.openInfoWindowHtml(stitle); }
				);
return marker;
}



function delfav(fid,myid)
{
fvid="fv"+fid;
fave = $(fvid);

var surl ='http://gruvr.com/gruvsrv.php';
var params = "uid="+myid+"&shid="+fid;

new Ajax.Request
	(	
		surl,
		{
  		method: 'get',
		parameters: params,
		onFailure: function(badrmfav) { alert(rmfav.status);  }	,
		onSuccess: function(okrmfav) {  fave.innerHTML=""; }	
	}
	);
	
//fave.innerHTML="";
}


//delete band from radar
function delradar(bid, myid)
{

fvid="rad"+bid;
fave = $(fvid);
var surl ='http://gruvr.com/gruvsrv.php';
var params = "uid="+myid+"&bid="+bid;



new Ajax.Request
	(	
	surl,
		{
  		method: 'get',
		parameters: params,
		onFailure: function(badrmrad) {  }	,
		onSuccess: function(okrmrad) {  fave.innerHTML=""; }	
	}
	);
	
//fave.innerHTML="";
}


//toggle reminders
function remtoggle(myid)
{
var surl ='http://gruvr.com/gruvsrv.php';
var params = "remid="+myid;

new Ajax.Request
	(	
		surl,
		{
  		method: 'get',
		parameters: params,
		onFailure: function(badtogrem) { alert(badtogrem.status);  }	,
		onSuccess: function(oktogrem) {   }	
		}
	);
}


function radartoggle(myid)
{
var surl ='http://gruvr.com/gruvsrv.php';
var params = "radid="+myid;
new Ajax.Request
	(	
		surl,
		{
  		method: 'get',
		parameters: params,
		onFailure: function(badtograd) { alert(badtograd.status);  } ,
		onSuccess: function(oktograd) {   }	
		}
	);
}


function goLite(FRM,BTN)
{ 
   window.document.forms[FRM].elements[BTN].style.color = "#9900FF";
   window.document.forms[FRM].elements[BTN].style.backgroundColor = "#FFFF99";
   window.document.forms[FRM].elements[BTN].style.borderColor = "#FF3300";
}

function goDim(FRM,BTN)
{
   window.document.forms[FRM].elements[BTN].style.color = "#333399";
   window.document.forms[FRM].elements[BTN].style.backgroundColor = "#FFFFCC";
   window.document.forms[FRM].elements[BTN].style.borderColor = "#FF0000";
}
