//----------------------------------------------------------------------------------------
//-- changePage()																		--
//--																					--
//-- Takes a inparmeter that is the new locations to surf to.							--
//----------------------------------------------------------------------------------------
function changePage(sUrl){
	if(sUrl != "noUrl")
		document.location.href = sUrl;
}
//----------------------------------------------------------------------------------------

//----------------------------------------------------------------------------------------
//-- login_openNewWindow()																--
//--																					--
//-- Creates a new window to show the site in and performes the login.					--
//----------------------------------------------------------------------------------------
function login_openNewWindow() {
	var winHeight = (screen.width * 0.75) - 100;
	_win = window.open('','login','height='+winHeight+',width=680,left=40,top=20,scrollbars=YES');
	_win.focus();
		
	location.href = "/page_memberloginNewWindow.asp";	
	return true;
}

//----------------------------------------------------------------------------------------
//-- searchSubtitles_checkForm()														--
//--																					--
//-- make sure so you search on either character or freesearch not both					--
//----------------------------------------------------------------------------------------
function searchSubtitles_checkForm(objectName){
	if (objectName == "_character") {
		if (document.searchSubtitles._character.value != -1)
			document.searchSubtitles._free.value = ""
	}else
		document.searchSubtitles._character.value = -1
}
//-- END: serach subtitles	--------------------------------------------------------------

//----------------------------------------------------------------------------------------
//-- searchSubtitles_doSearch()															--
//--																					--
//-- do the search from a result page													--
//----------------------------------------------------------------------------------------
function searchSubtitles_doSearch() {
	document.searchSubtitles.method = "post";
	document.searchSubtitles.submit();
}	

//----------------------------------------------------------------------------------------
//-- Subtitles_show()																	--
//--																					--
//-- show all subtitles I have downloaded												--
//----------------------------------------------------------------------------------------
function Subtitles_show(sOrderBy) {
	document.getElementsByName('orderby')[0].value=sOrderBy;
	//document.searchSubtitles.orderby.value = sOrderBy;
	document.getElementsByName('direction')[0].value=0;
	document.searchSubtitles.method = "post";
	document.forms.searchSubtitles.submit();
}	

function invert(){
	var tmp=document.getElementsByName('direction')[0].value;
	document.getElementsByName('direction')[0].value=1-tmp;
	//alert(document.getElementsByName('direction')[0].value);
	document.forms.searchSubtitles.submit();
}

//----------------------------------------------------------------------------------------
//-- mySubtitles_orderby()																--
//--																					--
//-- show all subtitles I have downloaded												--
//----------------------------------------------------------------------------------------
function mySubtitles_orderby(sOrderBy) {
	document.mySubtitles.orderby.value = sOrderBy;
	document.mySubtitles.method = "post";
	document.mySubtitles.submit();
}	
//----------------------------------------------------------------------------------------
//-- mySubtitles_show()																	--
//--																					--
//-- show all subtitles I have downloaded												--
//----------------------------------------------------------------------------------------
function mySubtitles_show() {
	document.mySubtitles.method = "post";
	document.mySubtitles.submit();
}	

//----------------------------------------------------------------------------------------
//-- myRequestedSubtitles_orderby()														--
//--																					--
//-- do a new order on all my requested subtitles										--
//----------------------------------------------------------------------------------------
function myRequestedSubtitles_orderby(sOrderBy) {
	document.myRequestedSubtitles.orderby.value = sOrderBy;
	document.myRequestedSubtitles.method = "post";
	document.myRequestedSubtitles.submit();
}	
//----------------------------------------------------------------------------------------
//-- myRequestedSubtitles()																--
//--																					--
//-- show all subtitles I have downloaded												--
//----------------------------------------------------------------------------------------
function myRequestedSubtitles_show() {
	document.myRequestedSubtitles.method = "post";
	document.myRequestedSubtitles.submit();
}	

//----------------------------------------------------------------------------------------
//-- myMovieList_orderby()																--
//----------------------------------------------------------------------------------------
function myMovieList_orderby(sOrderBy){
	document.myMovieList.orderby.value = sOrderBy;
	document.myMovieList.method = "post";
	document.myMovieList.submit();
}
//----------------------------------------------------------------------------------------
//-- myMovieList()																		--
//--																					--
//-- show all subtitles I have added to my movielist									--
//----------------------------------------------------------------------------------------
function myMovieList_show() {
	document.myMovieList.method = "post";
	document.myMovieList.submit();
}	

//----------------------------------------------------------------------------------------
//-- showSubtitle_amazon()																--
//--																					--
//-- Opens a new window with a page from amazon.com										--
//----------------------------------------------------------------------------------------
function showSubtitle_amazon(asinID) {
	open('http://www.amazon.com/exec/obidos/ASIN/'+asinID,'','');
}

