function checkStatus(){
		isset = getCookieValue('reg');
		//alert(isset);
		if(isset){
			document.getElementById('v2_form_isset').style.visibility = 'hidden';
			document.getElementById('v2_comments').style.visibility = 'visible';
		}else{
			document.getElementById('v2_form_isset').style.visibility = 'visible';
		}
		
	}
	
	function popwin(url, name, width, height, scroll){
		openWin=window.open(url, name, 'height='+height+',width='+width+',scrollbars='+scroll+',resizable='+scroll);
		openWin.focus();
	}
	
	function jumpTo(URL_List)
	{
	   var URL = URL_List.options[URL_List.selectedIndex].value;
	   var urlArray = new Array();
	   urlArray = URL.split('/');
	   if(URL != 0)
	   {
	      top.location.href = URL;
	   }
	}
	
function appendBlogButton(){
	document.write('<a class="blog_postlink" title="Sphere" onclick="return Sphere.Widget.search()" href="http://www.sphere.com/search?q=sphereit:' + escape(document.location.href) + '"><img src="http://wwwimage.cbsnews.com/images/2007/03/22/image2596828.gif" align="absmiddle" border="0" alt="Sphere It" style="margin: 2px 2px;" />Sphere It</a>');
}

function loadAuthor(dir, id, a){
		a = a.replace(/ /ig, "_");
		query = 'http://www.cbsnews.com/sections/' + dir + '/main' + id + '.php?author='+a + '&dir=' + dir;
		document.location.href=query;
	}
	
	function loadCategory(dir, id, c){
		c = c.replace(/ /ig, "_");
		query = 'http://www.cbsnews.com/sections/' + dir + '/main' + id + '.php?category='+c + '&dir=' + dir;
		document.location.href=query;
	}
	
	function loadDate(dir, id, y,m,d)
	{
		query = 'http://www.cbsnews.com/sections/' + dir + '/main' + id + '.php?date='+y+'_'+m+'_'+d + '&dir=' + dir;
		document.location.href=query;
	}
	
	function ismaxlength(obj){
	var mlength=obj.getAttribute? parseInt(obj.getAttribute("maxlength")) : ""
	if (obj.getAttribute && obj.value.length>mlength){
	alert("Comments are limited to 1500 characters.");obj.value=obj.value.substring(0,mlength);}
	}

