// HOROSCOPE
function savesigns(the_menu) {
	var allmysigns=""; var len = the_menu.length;	
	for (itm=0; (itm < the_menu.length); itm++) {
		if (the_menu.options[itm].selected) {
			if (allmysigns) {allmysigns = allmysigns + "|"}
			allmysigns = allmysigns + the_menu.options[itm].value;
		}
	}
	SaveCookie("mysigns",allmysigns,365);
}
function setmysigns() {		// POPUP window for user to select lot_prefered states
	window.name="orig";
	var availsigns="Aquarius|Aries|Cancer|Capricorn|Gemini|Leo|Libra|Pisces|Sagittarius|Scorpio|Taurus|Virgo";
	var popstring="<HTML><TABLE><TR VALIGN=TOP><TD ALIGN=CENTER>"
	+"<FONT SIZE=+2><B>Choose<BR>your<BR>sign(s)<BR>"
	+"<A HREF='javascript:window.opener.savesigns(document.picksign.mysigns);window.opener.location.reload();self.close();'>SAVE</A>"
	+"</TD><TD><FORM name='picksign'><SELECT NAME='mysigns' MULTIPLE SIZE=7>";
	var avail=availsigns.split("|");
	for (sign in avail) {popstring = popstring+"<OPTION VALUE='"+avail[sign]+"'>"+avail[sign];}
	popstring=popstring+"</SELECT></FORM></TD></TR></TABLE></HTML>";
	setme = window.open('',"horoscope","status=yes,width=200,height=150,scrollbars=no,resizable=no");
	setme.document.write(popstring);
	setme.document.close();
}


// LOTTERY
function savelot(the_menu) {
	var allmystates=""; var len = the_menu.length;	
	for (itm=0; (itm < the_menu.length); itm++) {
		if (the_menu.options[itm].selected) {
			if (allmystates) {allmystates = allmystates + "|"}
			allmystates = allmystates + the_menu.options[itm].value;
		}
	}
	SaveCookie("mylstates",allmystates,365);
}
function setstates() {		// POPUP window for user to select lot_prefered states
	window.name="orig";
	var availstates="AZ|CA|CO|CT|DC|DE|FL|GA|IA|ID|IL|IN|KS|KY|LA|MA|MD|ME|MI|MN|MO|MT|NE|NH|NJ|NM|NY|OH|OR|PA|RI|SC|SD|TX|VA|VT|WA|WI|WV";
	var popstring="<HTML><TABLE><TR VALIGN=TOP><TD ALIGN=CENTER>"
	+"<FONT SIZE=+2><B>Choose<BR>your<BR>state<BR>"
	+"<A HREF='javascript:window.opener.savelot(document.pickstate.mylstates);window.opener.location.reload();self.close();'>SAVE</A>"
	+"</TD><TD><FORM name='pickstate'><SELECT NAME='mylstates' MULTIPLE SIZE=7>";
	var avail=availstates.split("|");
	for (state in avail) {popstring = popstring+"<OPTION VALUE='"+avail[state]+"'>"+avail[state];}
	popstring=popstring+"</SELECT></FORM></TD></TR></TABLE></HTML>";
	setme = window.open('',"lotto","status=yes,width=150,height=150,scrollbars=no,resizable=no");
	setme.document.write(popstring);
	setme.document.close();
}
