function OnCD(fileID, url){

	if ( url == null )
		url = 'http://www.xburn.com/cgi-bin/main.cgi?conf=gamespy';

	open(url + '&file_id=' + fileID + '&title=' + escape(document.title) + '&url=' + escape(location.href),'XBURN','height=480,width=640,location=no,scrollbars=yes,status=yes,menubar=no,toolbar=no,directories=no,resizable=yes');
	//open('http://www.xburn.com/cgi-bin/main.cgi?conf=gamespy&file_id=' + fileID + '&title=' + escape(document.title) + '&url=' + escape(location.href),'XBURN','height=480,width=640,location=no,scrollbars=yes,status=yes,menubar=no,toolbar=no,directories=no,resizable=yes');
}

function seoDownload(fileID, linkTitle, fileTitle, showText){

	//var url = "http://stage-fp3.fileplanet.com/" + fileID + "/download/" + linkTitle;
	var url = "http://www.fileplanet.com/" + fileID + "/download/" + linkTitle;
	//var url = "http://dev2-www.fileplanet.com/" + fileID + "/download/" + linkTitle;
	var cls = "";
	
	if ( !showText ) 
	{
		cls = "fileactionico";
	}
	
	document.write('<a href="' + url + '"><img class="' + cls + '" src="/_img/main/icons/arrow_right.gif" width="5" height="9" border="0" alt="Download ' + fileTitle + '" /></a>');
	
	if ( showText ) 
	{
		document.write(' <a href="' + url + '" title="Download ' + fileTitle + '">Download</a>');
	}
}

function download(fileID, mirrorFileID, showText){

	//var url = "http://stage-fp3.fileplanet.com/download.aspx?f=" + fileID;
	var url = "http://www.fileplanet.com/download.aspx?f=" + fileID;
	//var url = "http://dev2-www.fileplanet.com/download.aspx?f=" + fileID;
	
	var cls = "";

	//if ( mirrorFileID == null || mirrorFileID < 1 )
	//	url = "translate.aspx?f=" + fileID;

	if ( !showText )
		cls = "fileactionico";


	document.write('<a href="' + url + '"><img class="' + cls + '" src="/images/arrow_right.gif" height="9" width="5" border="0" alt="Download" /></a>');
	if ( showText )
		document.write(' <a href="' + url + '">Download</a>');
}

function screenViewer(fileID) {
	window.open('/screenviewer.aspx?f=' + fileID, 'screenviewer', 'height=625, width=760, resizable=no'); 
}

function screenShot(URL) {
	window.open('/promotions/image.asp?img=' + URL, 'screenshot', 'height=625, width=760, resizable=no'); 
}

function showMoreInfo() {
	var infoText = document.getElementById('moretext');

	if ( infoText != null )	
		infoText.style.display = ( infoText.style.display == 'block' ) ? "none" : "block";
}

function fileData(id, rating){
	if ( rating != null )
	{
		//document.write(id + ' ' + rating);
		document.write('<script type="text/javascript" language="javascript" src="/filedata.aspx?f=' + id + '&r=' + rating + '"></script>');
	}
	else
	{
		document.write('<script type="text/javascript" language="javascript" src="/filedata.aspx?f=' + id + '"></script>');
	}
}