// ThreadsInclude.js
function myRedirect(href,flag)	// redirect based on flag
{
	var cookiestring = document.cookie;
	if( cookiestring.indexOf("threads_login") < 0 && flag==0 ){	// cookie not set go to href
		location.href = href;
	}
	else if( cookiestring.indexOf("threads_login") >= 0 && flag==1 ){	// cookie set go to href
		location.href = href;
	}
	else if( href!='' && href!=null & flag==2 ){	// just go to the location
		location=href;
	}
}
