function movieSearch()
{
	try{
		var q = document.qvodSearch.q;
		var d = document.qvodSearch.d;
		if(q.value){
			sLink = "http://www.qvodsou.cc/search/search.do?q="+encodeURIComponent(d.value+q.value);
			top.location=sLink;
		}else{
			alert("请填写关键词！");
			q.focus();
		}
	 }
	catch(ex){}        	
}

function changeType(msg)
{
	var d	=	document.qvodSearch.d;
	d.value	=	msg;
}
function jumpTag(tag)
{
	sLink = "http://www.qvodsou.cc/search/search.do?q="+encodeURIComponent(tag);
	top.location=sLink;
}

function killErrors() {
return true;
}
window.onerror = killErrors;

TT=document.URL;
TT=TT.split("?");
if (TT[1]=='qvodSouSoft'){
	var softCssLink = document.getElementsByTagName("link")[1];
    softCssLink.setAttribute("href", "/css/softArchiver.css");
}

function vote(id){
	var selectedIndex = -1;
    var voteForm = document.getElementById("voteForm");
    var i = 0;
	var s = 4;
    
    for (i=0; i<voteForm.score.length; i++)
    {
        if (voteForm.score[i].checked)
        {
            selectedIndex = i;
            s = voteForm.score[i].value;
            break;
        }
    }
    
	res = Ajax.call("/hits/vote.do", "score="+s+"&id=" +id, null, "POST", "JSON", false);

	if (res.message)
	{
		alert(res.message);
	}else{
		document.getElementsByTagName("archiverScore").innerHTML = res.content;
	}
}
