var majors = new Array('downloads', 'technology');
function toggle(a, b) {
	if (!document.getElementById) return true;
	if (b==1) for (var i=majors.length-1; i>=0; i--) if (majors[i] != a) document.getElementById(majors[i]).style.display='none';
	a=document.getElementById(a);
	a.style.display=(a.style.display=='block')?'none':'block';
	return false;
}

function GetCokStr(sName){			// sName include "=" sign
	var iStart = 0, iEnd = 0;
	var sCoki, Rtn = "";
	
	if (document.cookie){
		sCoki  = document.cookie;												
		iStart = sCoki.indexOf(sName);
			
		if (iStart > -1){
			iStart += sName.length;
			iEnd = sCoki.indexOf("&0", iStart);
				
			if (iEnd > iStart)
				Rtn = sCoki.substring(iStart, iEnd);				
		}							
	}				
	return Rtn;
}

function GotoDownload(){
	var s1 = GetCokStr("SURVEY=");
		
	if (s1 == "1"){
		//= user already done survey. goto download
		location.href = "http://www.spooledtv.com/episode_guide.shtml";
	}else{
		//= goto surver
		location.href = "http://www.spooledtv.com/svy/survey.aspx";
	}
}