
	//==================================
	// 投稿ウィンドウ
	//==================================
  function submit_window(){
    if(u_id == "" || u_id == 133){
    	location.href="/home/sorry.php";
    	return false;
    }

    x_loc = 100;
    y_loc = 100;
    window.open("./image_upload.php", "image_upload", "width=500,height=560,status=no,resizable=yes,scrollbars=yes,left=" + x_loc + ",top=" + y_loc);
  }
  
	//==================================
	// 通報ウィンドウ
	//==================================
  function report_window(){
    x_loc = 100;
    y_loc = 100;
    window.open("./report_input.php", "image_upload", "width=500,height=560,status=no,resizable=yes,scrollbars=yes,left=" + x_loc + ",top=" + y_loc);
  }
  

	//==================================
	// ソート用変数設定
	//==================================
  function sort_exe(sort_type){
  	document.paging_form.sort.value = sort_type;
  	document.paging_form.indicated_page.value = '1';
  	document.paging_form.submit();
  }
  

	//==================================
	// 投票処理
	//==================================
  function vote_exe(no){
		//指定した議事録IDの画像を取得
		var param = "no=" + no;
		res = ajax_request_json("vote.php", param, "post");

		data_update(res.point, res.vote_cnt);
	}

	//==================================
	// スターエリアの描画
	//==================================
  function data_update(good, vote_cnt){
	
		if(good == "undefined"){
			good = "";
		}
	
		star_create(good);
		document.getElementById("good_disp").innerHTML = good;

		if(parseInt(vote_cnt) >= parseInt(max_vote)){
			document.getElementById("vote_area").style.display = "none";
		}
	}
	
	//==================================
	// 星の表示
	//==================================
	function star_create(get_point){
		var star_n = parseInt(get_point / star_rate);
		var star_str = "";
		
		if(star_n > 10){
			star_n = 10;
		}
		for(i = 0 ; i < star_n ; i++){
			star_str += "<img src='img/star.gif' border='0' style='vertical-align:middle;'>";
		}
		document.getElementById("star_area").innerHTML = star_str;
	}
			
  
