function formatNews(id_tag)
{
	if(document.getElementById)
	{
		var object = document.getElementById(id_tag);

		if (typeof(object.innerHTML) != "undefined")
		{
			var myColumns = Columns.splitText(object.innerHTML, 155, 170);
			
			var len = myColumns.length;
			var myString = "";

			myString = "<table width=\"500\" cellpadding=\"2\" cellspacing=\"2\" border=\"0\" height=\"170\"><tr>";
			for (var i = 0; i < 3; i ++)
			{
				myString+="<td width=\"32%\" class=\"news\" valign=\"top\">";
	
				if(myColumns[i]!=undefined)
					myString+=myColumns[i];
				else
					myString+= "&nbsp;";

				if((i==len || i==2) && len>3)
					myString+="<p align=\"right\"><a href=\"/news.php\">More...</a></p>";

				myString+="</td>";

				if(i<2)
					myString+="<td width=\"1%\" class=\"v_line\"><img src=\"images/spacer.gif\" width=\"1\" height=\"1\"></td>";
			}
			myString+= "</tr><table>";

			object.innerHTML = myString;
		}
	}
}

bBool=false;
var copiedtext="";
var tempstore="";

function initiatecopy()
{
	bBool=true;
}

function copyit()
{
	if (bBool)
	{
		tempstore=copiedtext;
		document.execCommand("Copy");
		copiedtext=window.clipboardData.getData("Text");
		
		bBool=false;
	}
}

function copyText(obj)
{
	obj.select();
	initiatecopy();
	copyit();
	alert('Code Copied To Clipboard :: You may now paste it into you website using your favorite html editor.');
}

function jsChangePassword()
{
	myLocation = "changepassword.php";
	myPopup = window.open(myLocation, "_blank", "scrollbars=yes, location=no, status=no, titlebar=no, toolbar=no, resizeable=no, height=150, width=255");
	myPopup.focus();
}

function jsBanners()
{
	myLocation = "banners.php";
	myPopup = window.open(myLocation, "_blank", "scrollbars=yes, location=no, status=no, titlebar=no, toolbar=no, resizeable=yes, height=580, width=780");
	myPopup.focus();
}

function jsTerms()
{
	myLocation = "terms.php";
	myPopup = window.open(myLocation, "_blank", "scrollbars=yes, location=no, status=no, titlebar=no, toolbar=no, resizeable=yes, height=460, width=620");
	myPopup.focus();
}

function jsPrivacy()
{
	myLocation = "privacy.php";
	myPopup = window.open(myLocation, "_blank", "scrollbars=yes, location=no, status=no, titlebar=no, toolbar=no, resizeable=yes, height=460, width=620");
	myPopup.focus();
}

function jsLogout()
{
	document.location = "myaccount.php?logout=yes";
	return false;
}