/*    HTTP Host:  b.static.ak.fbcdn.net                                        */
/*    Generated:  January 19th 2010 6:34:21 AM PST                             */
/*      Machine:  10.16.140.106                                                */
/*       Source:  Backing Store                                                */
/*     Location:  js/report.js h:26d2mc00                                      */
/*       Locale:  en_US                                                        */
/*         Path:  js/report.js                                                 */

if (window.CavalryLogger) { CavalryLogger.start_js(["js\/report.js"]); }


function reasonChangeHandler(commentField,reportGuidelineContent,event){var selectedValue=parseInt(this.value);if(commentField){if(selectedValue){commentField.disabled=false;commentField.style.display='block';}else{commentField.disabled=true;commentField.value="";}}
var touField=ge('report_tou_row');if(touField&&reportGuidelineContent){var guidelinesField=$('report_guidelines_placeholder');var guidelineText=reportGuidelineContent[selectedValue];var hideTermsOfUse=(selectedValue==0||guidelineText==null);CSS.conditionClass(touField,'report_hidden_row',hideTermsOfUse);guidelinesField.setContent(HTML(guidelineText||''));}}
function removePlaceholderText(){if(typeof this.place_holder_removed=="undefined"){this.place_holder_removed=true;this.value='';}}
function tagged_content_report_message(content_name,msg){new Dialog().setTitle(_tx("Before you report this {content}...",{'content':content_name})).setBody(msg).setButtons([Dialog.OK]).show();return false;}
function report_content_dialog(href){var existing_dialog;if(existing_dialog=generic_dialog.get_dialog(this)){existing_dialog.hide();}
var async=new AsyncRequest().setMethod('GET').setReadOnly(true).setURI(href);new Dialog().setAsync(async).show();return false;}
function report_public_canvas_page_dialog(app_id){var report_func=function(){var async=new AsyncRequest().setURI('/ajax/canvas_report.php').setData({'app_id':app_id,'confirm':1}).setMethod('GET').setReadOnly(true);new Dialog().setAsync(async).setButtons(Dialog.OK).show();};var async=new AsyncRequest().setURI('/ajax/canvas_report.php').setData({app_id:app_id}).setMethod('GET').setReadOnly(true);new Dialog().setAsync(async).setButtons([{name:'report',label:_tx("Report")},Dialog.CANCEL]).setHandler(report_func).show();}

if (window.Bootloader) { Bootloader.done(["js\/report.js"]); }