<!--
/// Dash board functionality
dboard = new Object();

var hostUrl = "http://www.adultswim.com/";

var MsgURL = "http://fancollective.adultswim.com/Community/memberservices/regwall/Status";
var gotoMsgURL = "http://fc.adultswim.com/Community/memberservices/regwall/Message";
var gotoFriendReqURL = "http://fc.adultswim.com/Community/memberservices/regwall/InviteFriend?action=listInvites";

dboard.init=function(){ 

	this.textcolor = "000000";
	this.linkcolor = "0000ff";
	this.linkrollcolor = "0000ff";
	this.fbgcolor = "ffffff";
	this.COOKIE_DOMAIN="adultswim.com";
	this.COOKIE_STATIC=" expires=Sunday, 21-Mar-2010 23:59:59 GMT;";
	this.COOKIE_DELETE=" expires=Fri, 02-Jan-1970 00:00:00 GMT;";
	this.lHref = window.location.href;
	
	if(this.isLoggedIn()){
		this.fvUsername = this.getCookie("displayname");
		this.fvLoggedin = "true";
		this.fvMsgURL = escape(MsgURL); 
	}else{
		this.fvUsername = "null";
		this.fvLoggedin = "null";
		this.fvMsgURL = "null";
	}
	
}

/// ----- cookie code -----------
dboard.getPropVal=function(sString,sProp,cDelim,cEnd){
	var match = (sString == null) ? null : sString.match(sProp + cDelim + "[^" +cEnd + "]*");
	return (match == null) ? null :match[0].split(cDelim)[1];
}
dboard.getCookie=function(sCookie){
	return this.getPropVal(document.cookie,sCookie,"=",";");
}
dboard.setCookie=function(sCookieName, sVal, sCookieType){
	sCookieType = (sCookieType == null) ? "" : sCookieType;
	document.cookie = sCookieName+"="+sVal+ ";" + sCookieType+" path=/; domain=."+this.COOKIE_DOMAIN;
}
dboard.deleteCookie=function(sCookieName){
	this.setCookie(sCookieName, "", this.COOKIE_DELETE);
}

/// ------- various functions --------------
dboard.isLoggedIn=function(){
	return (this.getCookie("authid") != null); 
}
dboard.logOut=function(){ 
	this.deleteCookie("authid");
	this.deleteCookie("authpass");
	this.deleteCookie("displayname");
	this.deleteCookie("LiSESSIONID");

	if(this.lHref.indexOf("fancollective.adultswim")!= -1 || this.lHref.indexOf("login.adultswim")!= -1 || this.lHref.indexOf("tenint1")!= -1 || this.lHref.indexOf("tendev-l2")!= -1){
		window.location.href = hostUrl + 'index2.html';
	}else{
		window.location.reload();
	}

}

dboard.goMsgURL=function(){
	window.location.href = gotoMsgURL;
}

dboard.goFriendRequest=function(){
	window.location.href = gotoFriendReqURL;
}


/// --------- build object tag ------------  
dboard.getParams=function(){ 
	var s="";
	s+="fvUsername=" + this.fvUsername; 
	s+="&fvMsgURL=" + this.fvMsgURL; 
	s+="&fvTextcolor=" + this.textcolor;
	s+="&fvLinkcolor=" + this.linkcolor;
	s+="&fvLinkRollcolor=" + this.linkrollcolor;
	
	s+="&";	
	
	return s;
}

function switchItMeh(){
	// this is not the function yer lookin 4.
	var someString = '<a href="/shows/athf/movie/indexHB.html?deepLink=musicVid"><img src="tools/img/cards/home/032907/feature_cards/1_musicvid_featurecard.jpg" alt="" width="200" height="120" border="0"></a></td><td class="featurecontent"><strong>ATHF Movie Music Video</strong><br>If you think meaty nubs can\'t shred up a fretboard, you got another think coming.';
}
function switchIt1337(){
	// nor is this.
	alert ("!! " + servertime);
	var someString = '</td></tr><tr><td colspan="2"><img src="tools/img/pixel.gif" alt="" width="1" height="10" border="0"></td></tr><tr><td class="featurecontent"><a href="/shows/athf/movie/indexHB.html?deepLink=musicVid"><img src="tools/img/cards/home/032907/feature_cards/1_musicvid_featurecard.jpg" alt="" width="200" height="120" border="0"></a></td><td class="featurecontent"><strong>ATHF Movie Music Video</strong><br>If you think meaty nubs can\'t shred up a fretboard, you got another think coming.';
	document.write(someString);
}
function switchIt5318008() {
	// neither is this.
	var someString = '<a href="/shows/athf/movie/indexHB.html?deepLink=musicVid"><img src="tools/img/cards/home/032907/feature_cards/1_musicvid_featurecard.jpg" alt="" width="200" height="120" border="0"></a></td><td class="featurecontent"><strong>ATHF Movie Music Video</strong><br>If you think meaty nubs can\'t shred up a fretboard, you got another think coming.';
}



dboard.writeSWF=function(){
	var s='';
	s+='<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"  ';
	s+='codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0"  ';
	s+='width="180" height="100" id="login"> ';
	s+='<param name="wmode" value="opaque">'; 
	s+='<param name="allowScriptAccess" value="always" /> ';
	s+='<param name="movie" value="http://www.adultswim.com/tools/media/login.swf" /> ';
	s+='<param name="quality" value="high" /> ';
	s+='<param name="bgcolor" value="#' + this.fbgcolor + '" /> ';
	s+='<param name="FlashVars" value="'+ this.getParams() + '" /> ';
	s+='<embed src="http://www.adultswim.com/tools/media/login.swf" quality="high" wmode="opaque" bgcolor="#' + this.fbgcolor + '" ';
	s+='width="180" height="100" name="login" ';
	s+='FlashVars="'+ this.getParams() + '" ';
	s+='allowScriptAccess="always" type="application/x-shockwave-flash"  ';
	s+='pluginspage="http://www.macromedia.com/go/getflashplayer" /> ';
	s+='</object>';
	
	document.write(s);
}


dboard.init(); 

-->
