
	
	var q_type = '1';
	if(q_type != '1' && q_type != '2' && q_type != '3' && q_type != '4' && q_type != '5' && q_type != '6') q_type='1';
	q_type = parseInt(q_type);
	
	function q_str_click(id,buttonType){
		var contentName = new Array();
		contentName[0]="请输入歌曲名";
		contentName[1]="请输入歌手名";
		contentName[2]="请输入视频名";
		contentName[3]="请输入素材名";
		contentName[4]="请输入用户昵称";
		//contentName[5]="请输入歌词";
		
		var searchTypeName= new Array();
		searchTypeName[0]="search_GQ";
		searchTypeName[1]="search_GS";
		searchTypeName[2]="search_SP";
		searchTypeName[3]="search_SC";
		searchTypeName[4]="search_YHNC";
		//searchTypeName[5]="search_GC";
		
		var v_q_str = document.getElementById("q_str").value;
		
		if(buttonType==1){
			if(id==1){
				changeInputContent(contentName,searchTypeName,1);
			}else if(id==2){
				changeInputContent(contentName,searchTypeName,2);
				
			}else if(id==3){
				changeInputContent(contentName,searchTypeName,3);
			}else if(id==4){
				changeInputContent(contentName,searchTypeName,4);
			}else if(id==5){
				changeInputContent(contentName,searchTypeName,5);
			}
			/*
			else if(id==6){
				changeInputContent(contentName,searchTypeName,6);
			}
			*/
		}else if(buttonType==9){
    		for(var i=0;i<contentName.length;i++){
    			if(v_q_str==contentName[i]){
						document.getElementById("q_str").style.color="#000000";
    					document.getElementById("q_str").value="";
    					break;
    			}
    		}
		}else{
			if(v_q_str==""){
				//if(q_type == 1){
				//	alert('请输入歌曲名');
				//}else if(q_type == 2){
				//	alert('请输入歌手名');
				//}else{
					alert(contentName[q_type-1]);
				//}
				return false;
			}
			
			for(var i=0;i<contentName.length;i++){
				if(v_q_str==contentName[i]){
    				//if(q_type != 5 && q_type != 1 && q_type != 2){
    					alert(v_q_str);
						return false;
    				//}
				}
			}

		}
	}

	function changeInputContent(inputArray,searchTypeArray,id){
		q_type = id;
		var InputContent = document.getElementById("q_str").value;
		for(var i=0;i<inputArray.length;i++){
			if(InputContent==inputArray[i]||InputContent==""){
					document.getElementById("q_str").style.color="#a6a6a6";
					document.getElementById("q_str").value=inputArray[id-1];
					break;
			}
		}
		for(var i=0;i<searchTypeArray.length;i++){
			if((i+1)==id){
					document.getElementById(searchTypeArray[i]).className="tabOn";
			}else{
				document.getElementById(searchTypeArray[i]).className="";
			}
		}
		document.getElementById("q_type").value=q_type;
	}
	
	//验证查询输入不能为空
	function checkSearch(){
		var q_type = document.getElementById("q_type").value;
		var q_str = document.getElementById("q_str").value;
		if (q_str.length==0){
			alert("请输入查询内容！");
			return false;
		}
	}
