/*
*
* to refernce the functions in this file include:
* <script type="text/javascript" src="<%=MySpace.Forums.ForumWebUrls.StaticContentPath%>/u/CommonFunctions.js"></script>
*/

var CheckUserAvatarsForum = function CheckUserAvatarsForum() {
	var divs =  _proxy_jslib_handle(document, 'getElementsByTagName', '', 1, 0)('div');

	for(var x=0;x<divs.length;x++)
	{		
		if (  _proxy_jslib_handle(divs, (x), 0, 0).className == 'forumAvatar' )
		{
			changeImageSize( _proxy_jslib_handle(divs, (x), 0, 0), 180, 40);		
		}
	}
}

function CheckUserAvatarsThread() {
	var Lis =  _proxy_jslib_handle(document, 'getElementsByTagName', '', 1, 0)('Li');

	for(var x=0;x<Lis.length;x++)
	{		
		if (  _proxy_jslib_handle(Lis, (x), 0, 0).className == 'ForumPostUserAvatar' )
		{
			changeImageSize( _proxy_jslib_handle(Lis, (x), 0, 0), 240, 100);		
		}
	}
}

/*
	called from: CreateEdit.ascx
*/
function registerKeyPressHandler() {
	var textBox =  _proxy_jslib_handle(document, 'getElementById', '', 1, 0)(postSubjectClientId);
	if ( textBox )
	{
		if (document.addEventListener)
		{
			textBox.addEventListener("keypress", checkEvent, false);
		}
		else
		{
			textBox.onkeypress = checkEvent;
		}
	}
}

/*
	called from: CreateEdit.ascx
*/
function checkEvent(event) {		
	if (!event)
		event = window.event;				
		
	if (!event) return;
		
	var enterHit = event.keyCode == 13;
	if (enterHit && event.stopPropagation) 
	{
		event.stopPropagation();
		event.preventDefault();
	}		

	return !enterHit;
}


/*
	called from: CreateEdit.ascx
*/
function Preview() {
	var isPostFormValid = Page_ClientValidate("PostFormValidation");
	if (isPostFormValid == false)
	{
		return false;
	}
	else
	{
		 _proxy_jslib_assign('',  _proxy_jslib_handle(document, 'getElementById', '', 1, 0)(previewPosts), 'innerHTML', '=', ( ''));
		 _proxy_jslib_handle(document, 'getElementById', '', 1, 0)('previewloading').style.display = 'block';
		//<%=PreviewScript %> - property of CreateEdit
		PreviewHelperScript();
	}
}

/*
	helper function for preview
*/	        
function PreviewHelperScript() {
	__theFormPostData = ''; 
	__theFormPostCollection = new (Array)(); 
	WebForm_InitCallback(); 
	WebForm_DoCallback(addPostControl,'preview',_proxy_jslib_new_function('result', 'document.getElementById(\'' + previewPosts + '\').innerHTML=result;PreviewCallback();'),"",ProcessCallBackError,false);
}

/*
	called from: CreateEdit.ascx
*/	        
function PreviewCallback() {
	 _proxy_jslib_handle(document, 'getElementById', '', 1, 0)('previewloading').style.display = 'none';
	//Resize Images to fit in the window
	changeImageSize( _proxy_jslib_handle(document, 'getElementById', '', 1, 0)(previewPosts), maxImageSize, maxImageSize);
}

function ProcessCallBackError(arg, context) {
	 _proxy_jslib_assign('',  _proxy_jslib_handle(document, 'getElementById', '', 1, 0)('previewloading'), 'innerHTML', '=', ( PreviewErrorString));
}

var quoteMargins = 20;

function changeImageSize(parent, maxHeight, maxWidth) {	
	var elements =  _proxy_jslib_handle( _proxy_jslib_handle(null, 'parent', parent, 0, 0), 'getElementsByTagName', '', 1, 0)("img");
	for(var i=0;i<elements.length;i++)
	{
	    var ind = (quoteMargins * getIndents( _proxy_jslib_handle(null, 'parent', parent, 0, 0),  _proxy_jslib_handle(elements, (i), 0, 0)));
	    if (ind > maxWidth) ind = maxWidth;
	     _proxy_jslib_handle(elements, (i), 0, 0).style.visibility="hidden";
	     _proxy_jslib_handle(elements, (i), 0, 0).onload = new function() {resizeTimer( _proxy_jslib_handle(elements, (i), 0, 0), maxHeight*(1-(ind/maxWidth)), maxWidth-ind)};
	}
}

function getIndents(parent, child) {
    var indents = 0;
    var node = child;
    while(node.parentNode !=  _proxy_jslib_handle(null, 'parent', parent, 0, 0) && node.parentNode != null)
    {
        if (node.tagName == 'BLOCKQUOTE')
            indents++;
        node = node.parentNode;
    }
    return indents;
}

/*
	called from: CreateEdit.ascx.cs
	copied from telligent_common.js
*/
function GetSelectedHtmlInElement(element, includeAllContentIfNoSelection, includeAllContentIfInvalidSelection, invalidSelectionMessage) {
	var selectionIsValid = true;
	var content = null;
	
	if (window.getSelection)
	{
		var selection = window.getSelection();
		if (selection && selection.rangeCount > 0 &&  _proxy_jslib_handle(selection, 'toString', '', 1, 0)().length > 0)
		{
			selectionIsValid = false;
			var selectedRange = selection.getRangeAt(0);
			var availableRange = document.createRange();
			availableRange.selectNode(element);
			
			if (availableRange.compareBoundaryPoints(Range.START_TO_START, selectedRange) <= 0 

 && availableRange.compareBoundaryPoints(Range.END_TO_END, selectedRange) >= 0)
			{
				var temp = document.createElement('div');
				temp.appendChild(selectedRange.cloneContents());
				
				 content= _proxy_jslib_assign_rval('', 'content', '=', (  _proxy_jslib_handle(temp, 'innerHTML', '', 0, 0)), content);	
			}
			else if (invalidSelectionMessage)
				alert(invalidSelectionMessage);
		}
	}
	else if (document.selection)
	{
		var range = document.selection.createRange();
		if (range && range.text)
		{
			selectionIsValid = false;		
			var parent = range.parentElement();
			if ( _proxy_jslib_handle(null, 'parent', parent, 0, 0) != null && ElementContainsElement(element,  _proxy_jslib_handle(null, 'parent', parent, 0, 0)))
				 content= _proxy_jslib_assign_rval('', 'content', '=', ( range.htmlText), content);
			else if (invalidSelectionMessage)
				alert(invalidSelectionMessage);
		}
	}

	if ( _proxy_jslib_handle(null, 'content', content, 0, 0) == null && ((selectionIsValid && includeAllContentIfNoSelection) || includeAllContentIfInvalidSelection))
		 content= _proxy_jslib_assign_rval('', 'content', '=', (  _proxy_jslib_handle(element, 'innerHTML', '', 0, 0)), content);
		
	if(document.all)
	{
		return insertParams(element, _proxy_jslib_handle(null, 'content', content, 0, 0));	
	}
	
	return  _proxy_jslib_handle(null, 'content', content, 0, 0);
}

String.prototype.trim = function() {
	return  _proxy_jslib_handle(this, 'replace', '', 1, 0)(/^\s+|\s+$/g,"");
}

function insertParams(element,content) {			
	var objects =  _proxy_jslib_handle(element, 'getElementsByTagName', '', 1, 0)("object");
	for (var i = 0; i < objects.length; i++) 
	{
		var o =  _proxy_jslib_handle(objects, (i), 0, 0);
		var h =  _proxy_jslib_handle(o, 'outerHTML', '', 0, 0);				
		var params = "";		
		for (var j = 0; j<o.childNodes.length; j++) 
		{
			var p =  _proxy_jslib_handle(o.childNodes, (j), 0, 0);
			if (p.tagName == "PARAM")
			{
				params +=  _proxy_jslib_handle(p, 'outerHTML', '', 0, 0);
			}
		}				
		var tag = h.split(">")[0] + ">";				
		var newObject = tag + params +  _proxy_jslib_handle(o, 'innerHTML', '', 0, 0) + " </OBJECT>";		
		 content= _proxy_jslib_assign_rval('', 'content', '=', (  _proxy_jslib_handle( _proxy_jslib_handle(null, 'content', content, 0, 0), 'replace', '', 1, 0)(h.trim(),newObject)), content);				
	}			
	
	return  _proxy_jslib_handle(null, 'content', content, 0, 0);
}

/*
	called from: CreateEdit.ascx.cs
	copied from telligent_common.js
*/
function ElementContainsElement(parent, child) {
	if (! _proxy_jslib_handle(null, 'parent', parent, 0, 0) || !child)
		return false;

	if ( _proxy_jslib_handle(null, 'parent', parent, 0, 0) == child)
		return true;
		
	if ( _proxy_jslib_handle(null, 'parent', parent, 0, 0) &&  _proxy_jslib_handle(null, 'parent', parent, 0, 0).childNodes)
	{
		for (var i = 0; i <  _proxy_jslib_handle(null, 'parent', parent, 0, 0).childNodes.length; i++)
		{
			if ( _proxy_jslib_handle( _proxy_jslib_handle(null, 'parent', parent, 0, 0).childNodes, (i), 0, 0) == child || Telligent_Common.ElementContainsElement( _proxy_jslib_handle( _proxy_jslib_handle(null, 'parent', parent, 0, 0).childNodes, (i), 0, 0), child))
				return true;
		}
	}
	
	return false;
}





/*
	called from: CreatePoll.ascx
*/
function showPollArea(obj) {
	if (obj.checked) 
	{ 
		 _proxy_jslib_handle(document, 'getElementById', '', 1, 0)(pollContainerId).style.display = 'block';
		ValidatorEnable( _proxy_jslib_handle(document, 'getElementById', '', 1, 0)(titleValidator),true); 
		ValidatorEnable( _proxy_jslib_handle(document, 'getElementById', '', 1, 0)(answersValidator),true); 
		ValidatorEnable( _proxy_jslib_handle(document, 'getElementById', '', 1, 0)(requiredExpireAfterDaysValidator),true); 
		ValidatorEnable( _proxy_jslib_handle(document, 'getElementById', '', 1, 0)(expireAfterDaysValidator),true); 
	} 
	else 
	{ 
		 _proxy_jslib_handle(document, 'getElementById', '', 1, 0)(pollContainerId).style.display = 'none'; 
		ValidatorEnable( _proxy_jslib_handle(document, 'getElementById', '', 1, 0)(titleValidator),false); 
		ValidatorEnable( _proxy_jslib_handle(document, 'getElementById', '', 1, 0)(answersValidator),false); 
		ValidatorEnable( _proxy_jslib_handle(document, 'getElementById', '', 1, 0)(requiredExpireAfterDaysValidator),false); 
		ValidatorEnable( _proxy_jslib_handle(document, 'getElementById', '', 1, 0)(expireAfterDaysValidator),false); 
	}
}

/*
	called from: CreatePoll.ascx
*/
function validateAnswers(sender, args) {
	var answers= _proxy_jslib_handle( _proxy_jslib_handle(document, 'getElementById', '', 1, 0)(answersId), 'value', '', 0, 0);
	args.IsValid= answers.split(",").length>=2;		
}


/*
	called from: SearchForm.ascx
*/
function search() {
	 //Global Variables  searchErrorMsg , searchProgressMsg - use your 
	 //namespace to avoid collision.
	 
	  var searchElement =  _proxy_jslib_handle(document, 'getElementById', '', 1, 0)('forumSearchQuery');	 
	  
	  if(validateSearch(searchElement, searchErrorMsg))
	  {
	       var searchBtn =  _proxy_jslib_handle(document, 'getElementById', '', 1, 0)('forumSearchButton');
	  
	      if(searchBtn)
	      {
		     _proxy_jslib_assign('', searchBtn, 'href', '=', ( "#"));
		    searchBtn.onclick = "return false;"

 

 if (searchBtn.childNodes.length >= 1)
	        {			
			    searchBtn.childNodes[0].style.color = "#bbb";
		    }
	      }
		  ShowFetchBox(searchElement, searchProgressMsg);
		  var forumsSearchUrl = searchBaseUrl + '&qforums=' + encodeURIComponent( _proxy_jslib_handle(searchElement, 'value', '', 0, 0));
		  
		  if (searchFilter && searchFilter.length > 0)
		  {
			 forumsSearchUrl += '&' + searchFilter;       
		  }
		  else
		  {
			 forumsSearchUrl += '&filterlang=' + searchFilterLang;	
		  }
		  
		   _proxy_jslib_assign('',  _proxy_jslib_handle(null, 'location', location, 0, 0), 'href', '=', ( forumsSearchUrl));
		 
      }
}

function ShowFetchBox(searchElement, progressMsg) {
	var searchErrorBox= _proxy_jslib_handle(document, 'getElementById', '', 1, 0)('SearchErrorBox');	
	searchErrorBox.className = 'FetchBox';
	var coors = FindElementPosition(searchElement);				
	 _proxy_jslib_assign('', searchErrorBox.style, 'top', '=', ( coors[1] -4 + 'px'));	
	searchErrorBox.style.width = searchElement.offsetWidth - 8 + 'px';
	 _proxy_jslib_assign('', searchErrorBox, 'innerHTML', '=', ( progressMsg));			
	searchErrorBox.style.left = coors[0] + 'px';
	if (searchErrorBox.filters)
	{
		searchErrorBox.filters.alpha.opacity=100;
	}
	searchElement.blur();
	searchErrorBox.style.display = "block";
	
	
}


function validateSearch(searchElement, errorMsg) {
	var trimmedvalue =  _proxy_jslib_handle( _proxy_jslib_handle(searchElement, 'value', '', 0, 0), 'replace', '', 1, 0)(/^\s+|\s+$/g, '') ;	
	
	if ( trimmedvalue == "" ||  _proxy_jslib_handle(searchElement, 'value', '', 0, 0).length > 100 )
	{				
		//Show Error Box		
		var searchErrorBox= _proxy_jslib_handle(document, 'getElementById', '', 1, 0)('SearchErrorBox');	
		searchErrorBox.className='ErrorBox';
		var coors = FindElementPosition(searchElement);				
		 _proxy_jslib_assign('', searchErrorBox.style, 'top', '=', ( coors[1] + 25 + 'px'));
		searchErrorBox.style.width = searchElement.offsetWidth - 8 + 'px';
		 _proxy_jslib_assign('', searchErrorBox, 'innerHTML', '=', ( errorMsg));			
		searchErrorBox.style.left = coors[0] + 'px';
		if(searchErrorBox.filters)
		{	
			searchErrorBox.filters.alpha.opacity=0;	
			searchErrorBox.style.display = "block";			
			fade();					
		}
		else
		
		{					
			searchErrorBox.style.display = "block";	
		}
		
		searchElement.onfocus=clearErrorBox;
		return false;
	}	
	return true;
}

function fade() {
	var searchErrorBox= _proxy_jslib_handle(document, 'getElementById', '', 1, 0)('SearchErrorBox');	
	if(searchErrorBox.filters.alpha.opacity < 65)
	{
		searchErrorBox.filters.alpha.opacity += 2;
		 _proxy_jslib_handle(null, 'setTimeout', setTimeout, 1, 0)('fade()',40);
	}
}

function clearErrorBox() {
	var searchErrorBox= _proxy_jslib_handle(document, 'getElementById', '', 1, 0)('SearchErrorBox');
	if(searchErrorBox.filters)
	{				
		searchErrorBox.filters.alpha.opacity=0;
	}
				
	searchErrorBox.style.display = "none";	
}

/*
	called from: SearchForm.ascx
*/
function searchCheckEvent(e) {
	if (!e)
		e = window.event;

	if ( e && e.keyCode == 13 )
	{
		 _proxy_jslib_handle(null, 'search', search, 1, 0)();          
		return false;           
	}
	
	return true;
}

/*
    called from: SearchForm.ascx
*/
var searchFilter;
function changeSearchFilter(value) {
    searchFilter =  _proxy_jslib_handle(null, 'value', value, 0, 0);
}

/*
	called from: thread.aspx
*/
var maxImageSize = 491;
var maxSignatureImageheight = 125;

var checkImages = function checkImages() {	
	var posts =  _proxy_jslib_handle(document, 'getElementsByTagName', '', 1, 0)('div');

	for(var x=0;x<posts.length;x++)
	{		
		if (  _proxy_jslib_handle(posts, (x), 0, 0).className == 'ForumPostBodyArea' )
		{
			changeImageSize( _proxy_jslib_handle(posts, (x), 0, 0), maxImageSize, maxImageSize);		
		}
		else if (  _proxy_jslib_handle(posts, (x), 0, 0).className == 'Signature' )
		{
			changeImageSize( _proxy_jslib_handle(posts, (x), 0, 0), maxSignatureImageheight, maxImageSize);
		}			
	}
	
	CheckUserAvatarsThread();
}

/*
	called from: thread.aspx
*/

function resizeTimer(img, maxHeight, maxWidth) {
	 _proxy_jslib_handle(window, 'setTimeout', '', 1, 0)(function() {resizeImage(img, maxHeight, maxWidth)},500);
}
function resizeImage(img, maxHeight, maxWidth) {
	
	var width = img.clientWidth;
	var height = img.clientHeight;	
	var ratio = width / height;
	
	if ( width > maxWidth )
	{
		// is the new height too big ?
		if ( (maxWidth / ratio ) > maxHeight )
		{
			img.style.height = maxHeight + "px";
			img.style.width = (maxHeight * ratio) + "px";
		}
		else
		{
			img.style.width = maxWidth + "px";
			img.style.height = (maxWidth / ratio) + "px";
		}
	}
	else if ( height > maxHeight )
	{
		// is the new width too big ?
		if ( (maxHeight * ratio) > maxWidth )
		{
			img.style.width = maxWidth + "px";
			img.style.height = (maxWidth / ratio) + "px";	
		}
		else
		{
			img.style.height = maxHeight;
			img.style.width = (maxHeight * ratio) + "px";						
		}
	}
	img.style.visibility="visible";
}

/*
	called from: thread.aspx
*/
function EvalAjaxResponse(result, context) {eval(_proxy_jslib_proxify_js(( result ), 0, 0) );}


/* For Paging Control */
function ResetBox(obj,intialText) {
	if( _proxy_jslib_handle(obj, 'value', '', 0, 0)==intialText)
	{
		 _proxy_jslib_assign('', obj, 'value', '=', (""));
		obj.className="Normal";
	}
}

function BlurBox(obj,intialText) {
	if( _proxy_jslib_handle(obj, 'value', '', 0, 0)=="")
	{
		 _proxy_jslib_assign('', obj, 'value', '=', (intialText));
		obj.className="Grayed";
	}
}



function ValidateAndGetPage(gotoboxid,intialText,maxPage,sortOrder,navigateURL) {
	var obj= _proxy_jslib_handle(document, 'getElementById', '', 1, 0)(gotoboxid);
	var pageNo=parseInt( _proxy_jslib_handle(obj, 'value', '', 0, 0),10);
	if(pageNo>0 && pageNo<=maxPage)
	{
		 _proxy_jslib_assign('',  _proxy_jslib_handle(null, 'location', location, 0, 0), 'href', '=', ( _proxy_jslib_handle( _proxy_jslib_handle(navigateURL, 'replace', '', 1, 0)("{0}",pageNo), 'replace', '', 1, 0)("{1}",sortOrder)));
	}
	else
	{
		 _proxy_jslib_assign('', obj, 'value', '=', (intialText));
		obj.className="Grayed";
		obj.blur();
	}
}

function OnGoToBoxEnter(evnt,gotoboxid,intialText,maxPage,sortOrder,navigateURL) {
	var keycode;
	if (window.event) 
	{
		keycode = window.event.keyCode;
	}
	else if(evnt) 
	{
		keycode = evnt.which;
	}
	if(keycode == "13")
	{
		ValidateAndGetPage(gotoboxid,intialText,maxPage,sortOrder,navigateURL);
	}
}

function FindElementPosition(element) {
	var eleft = etop = 0;
	
	if (element.offsetParent) 
	{
		eleft = element.offsetLeft

 etop = element.offsetTop

 while (element = element.offsetParent) 
		{
			eleft += element.offsetLeft

 etop += element.offsetTop

 }
	}
	return [eleft,etop];
}

function ShowPager(e,obj,pagerId) {
	
	var pagerDiv= _proxy_jslib_handle(document, 'getElementById', '', 1, 0)(pagerId);
	if(pagerDiv.style.display=='none' || pagerDiv.style.display=='')
	{
		obj.style.backgroundColor = "#99b3cc";
		var coors = FindElementPosition(obj);				
		 _proxy_jslib_assign('', pagerDiv.style, 'top', '=', ( coors[1] + 14 + 'px'));
		pagerDiv.style.left = coors[0] + 1 + 'px';				
		pagerDiv.style.display='block';		
	}
	else
	{
		pagerDiv.style.display='none';
	}
	
	cancelEvent(e);

}

function cancelEvent(e) {	
	if (!e) e = window.event;
				
	e.cancelBubble = true;
	e.returnValue = false;	
	
	if(e.stopPropagation)
	{
		e.stopPropagation();
		e.preventDefault();
	}
	
}

function AddPagerEvent(pagerId,gotoid,src) {
	if ( _proxy_jslib_handle(document, 'body', '', 0, 0).attachEvent) 
	{	 
		 _proxy_jslib_handle(document, 'body', '', 0, 0).attachEvent("onclick" ,function() {HidePager(pagerId,gotoid, _proxy_jslib_handle(null, 'src', src, 0, 0));}); 
	} 
	else 
	{	
		 _proxy_jslib_handle(document, 'body', '', 0, 0).addEventListener("click", function() {HidePager(pagerId,gotoid, _proxy_jslib_handle(null, 'src', src, 0, 0));}, false); 
	}  
}

function HidePager(pagerId,gotoid,src) {	
	
	var pagerDiv =  _proxy_jslib_handle(document, 'getElementById', '', 1, 0)(pagerId);
	var gotoid =  _proxy_jslib_handle(document, 'getElementById', '', 1, 0)(gotoid);
	pagerDiv.style.display='none';
	gotoid.style.backgroundColor = "";
	
}


//Helper Browser Functions
function GetWindowSize() {
	  var myWidth = 0, myHeight = 0;
	  if( typeof( window.innerWidth ) == 'number' ) 
	  {
		//Non-IE
		myWidth = window.innerWidth;
		myHeight = window.innerHeight;
	  } 
	  else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) 
	  {
		//IE 6+ in 'standards compliant mode'
		myWidth = document.documentElement.clientWidth;
		myHeight = document.documentElement.clientHeight;
	  } 
	  else if(  _proxy_jslib_handle(document, 'body', '', 0, 0) && (  _proxy_jslib_handle(document, 'body', '', 0, 0).clientWidth ||  _proxy_jslib_handle(document, 'body', '', 0, 0).clientHeight ) ) 
	  {
		//IE 4 compatible
		myWidth =  _proxy_jslib_handle(document, 'body', '', 0, 0).clientWidth;
		myHeight =  _proxy_jslib_handle(document, 'body', '', 0, 0).clientHeight;
	  }
	 return [myWidth,myHeight];
}


function GetWindowScrollXY() {
	  var scrOfX = 0, scrOfY = 0;
	  if( typeof( window.pageYOffset ) == 'number' ) 
	  {
		//Netscape compliant
		scrOfY = window.pageYOffset;
		scrOfX = window.pageXOffset;
	  } 
	  else if(  _proxy_jslib_handle(document, 'body', '', 0, 0) && (  _proxy_jslib_handle(document, 'body', '', 0, 0).scrollLeft ||  _proxy_jslib_handle(document, 'body', '', 0, 0).scrollTop ) ) 
	  {
		//DOM compliant
		scrOfY =  _proxy_jslib_handle(document, 'body', '', 0, 0).scrollTop;
		scrOfX =  _proxy_jslib_handle(document, 'body', '', 0, 0).scrollLeft;
	  } 
	  else if( document.documentElement && ( document.documentElement.scrollLeft || document.documentElement.scrollTop ) ) 
	  {
		//IE6 standards compliant mode
		scrOfY = document.documentElement.scrollTop;
		scrOfX = document.documentElement.scrollLeft;
	  }
	  return [ scrOfX, scrOfY ];
}

function CheckAll() {
	var checked =  _proxy_jslib_handle(document, 'getElementById', '', 1, 0)("checkAll").checked;	
	
	var parent =  _proxy_jslib_handle(document, 'getElementById', '', 1, 0)("TopicsListTable");
	var elements =  _proxy_jslib_handle( _proxy_jslib_handle(null, 'parent', parent, 0, 0), 'getElementsByTagName', '', 1, 0)("input");
	
	for(var i=0;i<elements.length;i++)
	{
		if (  _proxy_jslib_handle(elements, (i), 0, 0).type == "checkbox" )
		{
			 _proxy_jslib_handle(elements, (i), 0, 0).checked = checked;
		}
	}	
}

function up_launchChat(userID,roomID) {
	 _proxy_jslib_handle(window, 'open', '', 1, 0)( "http://chat.myspace.com/index.cfm?fuseaction=messenger.chatroom&roomID="+roomID, "ICWindow_ChatRoom"+userID+roomID, "status=1,toolbar=0,directories=0,menubar=0,location=0,scrollbars=0,resizable=1,width=800,height=600" );
}
 ;
_proxy_jslib_flush_write_buffers() ;