
function changeNewsPage()
{
	var page = document.newspages.newspage.value;
	document.location.href = "http://www.titantorrent.to/Movies-Musik-Games-Software-Sonstiges-XXX/news-" + page + "-torrent-news.html";
}

function changeCategoryPage(bTop, params, folder)
{
	var page;
	if (bTop == true)
		page = document.categorypages1.categorypage.value;
	else
		page = document.categorypages2.categorypage.value;
	document.location.href = "http://www.titantorrent.to/" + folder + "/" + params + "-" + page + "-torrent-category.html";
}

function sendKeywordRequest()
{
	var keyword = document.searchform.keyword.value;
	if (keyword == "") {
		document.location.href = "http://www.titantorrent.to/Movies-Musik-Games-Software-Sonstiges-XXX/news-torrent-news.html";
		return;
	}
	var category = document.searchform.searchcat.value;
	keyword = keyword.replace("/", "%20");
	keyword = keyword.replace("*", "%20");
	keyword = keyword.replace("#", "%20");
	keyword = keyword.replace("'", ".bgsl.");
	keyword = keyword.replace("&", ".andchr.");
	keyword = escape(keyword);
	document.location.href = "http://www.titantorrent.to/" + keyword + "/" + category + "-torrent-search.html";
}

function SetSearchForm(SearchKeyword, SearchCat)
{
	document.searchform.keyword.value = SearchKeyword;
	document.searchform.searchcat.value = SearchCat;
}

function copyTextToClipboard(form, element)
{
	var textarea = document.forms[form].elements[element];
	textarea.focus();
	textarea.select();
}

function StartDownload(type, name)
{
	if (adbl)
		alert("AdBlock verhindert, dass diese Datei mit 100Mbit/s heruntergeladen werden kann. Deaktiviere AdBlock und lade diese Seite erneut, um den Download mit 100Mbit/s "+unescape("%FC")+"ber diesen Link zu starten.");
	else
		window.open("http://www.titantorrent.to/download-file.php?type=" + type + "&n=" + name);
}
