function masSearchFormSubmit(mainUrl){
	var str = document.masSearchForm.keyword.value;
	var sortby = document.masSearchForm.sortby.value;
	if(str.indexOf('>')==0){
		str=str.substring(1,str.length);
		window.open('http://www.google.com/search?q='+str+'&btnG=Google+Search&hl=en',"open_window");
	}else{
		if(document.masSearchForm.searchType[0].checked){
			document.location=mainUrl+"artistView.do?keyword="+str+"&sortby="+sortby;
		}
		if(document.masSearchForm.searchType[1].checked){
			document.location=mainUrl+"imageView.do?keyword="+str+"&sortby="+sortby;
		}
		if(document.masSearchForm.searchType[2].checked){
			document.location=mainUrl+"galleryView.do?keyword="+str+"&sortby="+sortby;
		}
	}
	return false;
}

function submitSearchForm(){
	var str=document.SearchForm.keyword.value;
	if(str.indexOf('>')==0){
		str=str.substring(1,str.length);
		window.open('http://www.google.com/search?q='+str+'&btnG=Google+Search&hl=en',"open_window");
	}
	else{
		document.SearchForm.submit();
	}
}
 function enableLink(noOfLinks,linkName,linkToEnable,url,tagMoreType){
 	
  	if(noOfLinks!=0){
  		
  		document.SearchForm.linkToEnable=linkToEnable;
  		document.SearchForm.action=url;
		document.GenreForm.action=url;
		document.GenreMoreForm.type.value=tagMoreType;	
  		for(var i=0;i<noOfLinks;i++){
  			var code=linkName+i;
  			var obj=document.getElementById(code);
  			obj.style.textDecoration='none';
  			if(i==linkToEnable){
  				obj.style.textDecoration='underline';
  			}
  		}
  	}
  }
  
function goto_URL(genreID) {
	document.GenreForm.tag.value=genreID;
	document.GenreForm.submit();
}
function goto_TagCould_URL() {
	document.GenreMoreForm.submit();
}