// JavaScript Document
function reloadonclose(){
	var cookcheck = $.cookie('HD');
	 //alert(cookcheck);
	if (cookcheck){ 	
		location.reload(true);
	}
}

function writeloginbutton(){
	var cookcheck = $.cookie('HD');
	 //alert(cookcheck);
	if (!cookcheck){
	$(".topbar").addClass("notlogged");
	document.write('<a href="#TB_inline?height=375&amp;width=550&amp;inlineId=LoginFormLB;modal=true" title="Login Or Register" class="thickbox"><img src="http://media.suntimes.com/images/cds/preps/season/designelements/spacer.gif" width="92" height="70" border="0" style="float:right;" /></a>')
	}
	else{
		$(".topbar").addClass("loggedin");
		checkCookie();
		document.write('<div class="FloatRight MarginRightTwo MarginTopFive" style="text-align:center;">Welcome:<br/>'+PluckCookieUserName+'<br/><a href="/community/myaccount/index.html?TB_iframe=true&height=450&width=680" title="My Account" class="thickbox">edit account<img src="http://media.suntimes.com/images/cds/preps/season/designelements/spacer.gif" width="0" height="0" border="0" /></a> | <a href="#" onclick="PluckLogout()">logout</a></div>')
	}

}
