var openingStatus=false;function seeSessionDetails(conference_session_id,conf_id){if(!openingStatus){openingStatus=true;var args={session_id:conference_session_id,event_id:conf_id};$.ajax({url:"/ajax/ajax_conferences.php?action=show_session_info",data:args,type:"GET",async:false,dataType:"json",success:function(json){if(!json.is_success){$('#status_msg').html(json.err_msg[0]);}else{var custom_msg_form='<script>$(\'#jqi\').css("width", "600px")</script>';custom_msg_form+='<div width="500" height="400" style="border: 2px solid;">';custom_msg_form+=json.data.html;custom_msg_form+='</div>';custom_msg_form+='<input type="hidden" id="event_id" value="'+conf_id+'">';custom_msg_form+='<input type="hidden" id="session_id" value="'+conference_session_id+'">';$.prompt(custom_msg_form,{callback:openSessionPage,persistent:false,overlayspeed:'fast',buttons:{'Join this session':true,'Close':false}});}}});openingStatus=false;}}
function openSessionPage(v,m){if(v){window.location='/conference/'+m.children('#event_id').val()+'?page=schedule&mode=details&session_id='+m.children('#session_id').val();}}
function addFormRow(id_prefix,update_attr_classes){if(update_attr_classes==null)update_attr_classes=[];if(id_prefix==null)return false;var cloned_row=$("#tbody_"+id_prefix+" tr:first").clone();var old_row_id=cloned_row.attr("id");var match_regex=new RegExp("row_"+id_prefix+"(\\d+)");var matches=old_row_id.match(match_regex);var old_id=0;if(matches!=null)old_id=parseInt(matches[1]);var last_row_id=$("#tbody_"+id_prefix+" tr:last").attr("id");var matches=last_row_id.match(match_regex);var last_id=0;if(matches!=null)last_id=parseInt(matches[1]);new_id=last_id+1;$("#row_"+id_prefix+old_id,cloned_row).attr("id","row_"+id_prefix+new_id);var default_value;$.each(update_attr_classes,function(i,update_class){if($("."+update_class,cloned_row).attr("id"))$("."+update_class,cloned_row).attr("id",$("."+update_class,cloned_row).attr("id").replace(id_prefix+old_id,id_prefix+new_id));if($("."+update_class,cloned_row).attr("name")){$("."+update_class,cloned_row).attr("name",$("."+update_class,cloned_row).attr("name").replace(id_prefix+old_id,id_prefix+new_id));}
default_value=$("#var_default_"+update_class+"_val").val();if(default_value!=null)$("."+update_class,cloned_row).val(default_value);default_html=$("#var_default_"+update_class+"_html").val();if(default_html!=null)$("."+update_class,cloned_row).html(default_html);$("."+update_class,cloned_row).removeAttr("disabled");});$("#tbody_"+id_prefix).append(cloned_row);$("#tbody_"+id_prefix+" tr:last").attr("id","row_"+id_prefix+new_id);}
function delFormRow(id_prefix,del_link_id){var row_id=del_link_id.replace("del_link_","row_");if($.browser.msie&&row_id=="row_item1")alert("The first line item cannot be removed.");else if($("#tbody_"+id_prefix+" tr").length>1)$("#tbody_"+id_prefix+" #"+row_id).remove();else alert("At least one row is required");}
function delItemRow(del_link_id){delFormRow("item",del_link_id);}
function sessionVideoVote(event_id,session_id,video_id){$.ajax({type:'GET',dataType:'text',url:'/ajax/ajax_conferences.php?action=video_vote&event_id='+event_id+'&session_id='+session_id+'&video_id='+video_id,success:function(vote_count){if(vote_count>0){$('span#vote_count_'+video_id).html(vote_count);if(vote_count==1){$('span#vote_word_'+video_id).html('vote');}
$('div.vote-box-click').each(function(){if($(this).hasClass('vote_box_'+video_id)){$(this).html('Thank you for your vote');}else{$(this).remove();}});}}});}
