
	function turnOn(obj,n){
		var id = obj.id.substring(0,obj.id.indexOf("_")+1);
		for(var i=5;i>=n;i--){
			var thisobj = document.getElementById(id+i);
			thisobj.src="/style/3.0/img/s_gray_bg.gif";
		}
		for(var i=1;i<=n;i++){
			var thisobj = document.getElementById(id+i);
			thisobj.src="/style/3.0/img/s_orange_bg.gif";
		}
	}
	function turnOff(obj,n){
		var id = obj.id.substring(0,obj.id.indexOf("_")+1);
//		for(var i=5;i>=n;i--){
//			var thisobj = document.getElementById(id+i);
//			thisobj.src="/style/img/star2.jpg";
//		}		
		for(var i=1;i<=n;i++){
			var thisobj = document.getElementById(id+i);
			thisobj.src="/style/3.0/img/s_gray_bg.gif";
		}
	}
	
	function scoreAction(type,scoreId,n){
		switch(type){
			case "airline" :					
				var url = "/ScoreFrontScript.do?method=scoreAction&scoreId="+scoreId+"&score="+n;
				try{new Ajax.Updater("", url, {asynchronous:true, evalScripts:true, onComplete: scoreActioned});}
				catch(e){
					$.ajax({
						url:url,
						cache:false,
						success:function(html){
							if(html.Trim()=="true") alert("评分成功");
							else alert(html.Trim());
						}
					});
				} 
		}
	}
		function scoreActioned(originalRequest){
			var cValue = originalRequest.responseText;
			if(cValue.Trim()=="true") alert("评分成功");
			else alert(cValue.Trim());
		}
