function switchTab1(P1,P2,P3,P4,P5,P6,P7,P8) {
	document.getElementById(P1).className=P2; 
	document.getElementById(P3).className=P4; 
	document.getElementById(P5).className=P6; 
	document.getElementById(P7).className=P8; 
}


var pre_searchtype = "search" ;
function changeSearchType(type) {
	if ($$$$("searchType_"+pre_searchtype)) {
		$$$$("searchType_"+pre_searchtype).className = "" ;
	}
	pre_searchtype = type ;
	$$$$("searchType_"+type).className = "currA" ;
	setResType(type) ;
	if ($$$$("searchbox1").value == '搜索超过10万部影视内容') {
		$$$$("searchbox1").value = "" ;
	}
	else {
		$$$$("searchbox1").value = $$$$("searchbox1").value + "" ;
	}
	$$$$("searchbox1").focus() ;
}



function showGougouMoreLink() {
	document.getElementById("GougouMoreLink").style.display = "block" ;
}
function hideGougouMoreLink() {
	document.getElementById("GougouMoreLink").style.display = "none" ;
}
function getDownloadUrl(productName) {
	var random = parseInt(Math.random()*100);
	var temp = 0;

	for(var i = 0; i < productName.length && random > temp; i++) {
		temp += parseInt(productName[i].percent);
	}
	i = (random == 0 ? 0 : i - 1);
	var return_str = "<a href=\"" + productName[i].url + "\">" + productName[i].stitle + "</a>";
	productName.splice(i,1);
	return return_str ;
}

