function changeCategory(categoryLink){
	if(categoryLink != ''){
		document.location.href = categoryLink;
	}
}

function commitSearch(){
	
}

function redirectPage(url, time){
	setTimeout("window.location='"+url+"'", time);
}

function addBookmark(websiteUrl, websiteTitle){
	if(window.sidebar) window.sidebar.addPanel(websiteTitle, websiteUrl, '');
	else if(window.external) window.external.AddFavorite(websiteUrl, websiteTitle);
	else if(window.opera && window.print){
		var bookmarkLink = document.createElement('a');
		bookmarkLink.setAttribute('href', url);
		bookmarkLink.setAttribute('title', title);
		bookmarkLink.setAttribute('rel', 'sidebar');
		bookmarkLink.click();
	}
	else alert('Broswer not compatible with javascript bookmarks.');
}

function refreshCaptcha(){
	var captchaDivision = document.getElementById('captcha-image');
	captchaDivision.src = 'images-index.php?content=captcha-verification&id='+Math.floor(Math.random()*100000000/Math.random());
}

function inArray(toSearch, searchArray){
	var isInArray = false;
	for(var o = 0; o < searchArray.length; o++){
		if(searchArray[o] == toSearch) isInArray = true;
	}
	return isInArray;
}