/******/
var straddle = {
  obj:new Object(),
  id:null,
  flag:null,
  init:function(){
    var myAjax = new Ajax.Updater('goldStraddle', '/vote/viewStraddle', { method: 'get', parameters: straddle.flag ? '&t='+Math.random(1,1000)+'&flag='+straddle.flag : '&t='+Math.random(1,1000)});
  },
  vote:function(id, type, flag, cate){
    straddle.id = id;
    straddle.flag = flag;
    if(straddle.obj['is_join'+id] == null){
      var myAjax = new Ajax.Request('/vote/straddle', { method: 'get', parameters:cate ? '&id='+id+'&type='+type+'&cate='+cate : '&id='+id+'&type='+type, asynchronous: false, onComplete: this.Show });
    }else{
      alert("\u60a8\u5df2\u7ecf\u6295\u8fc7\u7968\u4e86\uff01");return;
    } 
  },
  Show:function(AjaxInfo){
    var R = eval('('+AjaxInfo.responseText+')');
    alert(R.notice);
    straddle.obj['is_join'+straddle.id] = R.is_join;
    if(R.first==true){ straddle.init()};
  }
}