var sdate="+15";manualtable=1;internationalcalls=1;clonedemailtype="";function player(){$(document).ready(function(){flowplayer("player","/flash/flowplayer.commercial-3.1.5.swf",{canvas:{backgroundColor:"#478dca",backgroundGradient:'none'},plugins:{controls:null},play:null,key:'#$52ffb13a87543b391f7',clip:{autoPlay:true,autoBuffering:true,scaling:'fit',duration:15,fadeOutSpeed:8000,bufferLength:3},playlist:[{url:'/flash/octopusCartoon04.fla',duration:0,onBeforeFinish:function(){return false}}],logo:{opacity:0}})})}function addCredit(){$("#balanceincrease").click(function(){if($(this).val()=='increase'){$("#ccinfo").show();$(this).val("decrease")}else{$("#ccinfo").hide();$(this).val("increase")}})}function newAccount(){$("#addItem").click(function(){if($(this).val()=='addItem'){$(".addEntry").show();$(this).val("remove")}else{$(".addEntry").hide();$(this).val("addItem")}})}function saveuploadSong(filename){$("#uploadedmessage").show();$("#recordp").hide();var fileinfo='';for(var i=0;i<filename.length;i++)fileinfo=fileinfo+filename[i];$("#uploadedmessagefile").show();$(".uploadedmessagelocation").attr('location','/uploadedmessages/'+fileinfo+'.wav');$("#uploadedmessage").val(fileinfo+'.wav');$("#play").html("<embed src='"+'/uploadedmessages/'+fileinfo+'.wav'+"' height=10 width=144 autostart=false loop=false>")}function playSong(){$(".songplayer").click(function(){wimpyButtonPlayPause($(this).attr('song'))})}function plogsec(){$.post('/login',function(data){$("#logininfo").html(data)});$("#reasonsec").css('display','none');$("#accountinfosec").css('display','none');$("#usagesec").css('margin-top','130px')}function treasureFresh(){$("#refreshmessages").click(function(){$("#buzy").show();$.post('/treasureresh',function(data){$("#existingtreasures").html(data);$("#buzy").hide()})})}function submitLoginCenter(){$("#submitbutton").click(function(){$("#loginForm").submit()})}function regEdit(){if($("#balanceincrease").val()=='increase'){$("#ccinfo").show();$("#balanceincrease").val("decrease");$("#updateForm").validate().element("#balanceincrease")}else{$("#ccinfo").hide();$("#balanceincrease").val("increase")}init=true;dispEdit(".pbactor");date();entrySelectorType();phonefileLoad();manualLoad();countrySelector();phoneSelector();$('#showTime').timeEntry({show24Hours:true,showSeconds:true,timeSteps:[1,15,0],minTime:new Date(0,0,0,7,0,0),maxTime:new Date(0,0,0,21,30,0),spinnerImage:'/img/spinnerOrange.png'});selectRMS();dispEdit(".rms");callCenterCheck();broadcastSelector();noZero('.phoneadd');noOne('.phoneadd');numOnly('#displaynumber');numOnly('.phoneadd');charOnly('displayname');charandspaceOnly('messagetts');clearMessage();dispEdit(".deleteentry");cost();increaseCallHours();clock();introSelector();removeTableItem("manualphonetable","deletemanualentry");removeTableItem("phonefiletable","deleteentry");songfileLoad();selectIntro();dispEdit(".introgem");closingSelector();voicemessageLoad();playSong();dispEdit(".songplayer");dispEdit("#login");dispEdit("#addphonenumber");submitLoginCenter();dispEdit("#deletepage");deleteVM();costfocus();addPhoneTableItem();dispEdit("#refreshmessages");treasureFresh();dispEdit(".deletemanualentry");dispEdit(".deletemanualemailentry");dispEdit("#addemailaddress");phoneemailonly();addEmailTableItem();removeEmailTableItem();transportSelected();getEmails();emailInput();songSelector();regionSelector()}function regBoogie(){dispEdit(".pbactor");playSong();dispEdit(".songplayer");whoboogied();whoboogiedCheck();whoboogieddate();submitLoginCenter()}function regAccount(){addCredit();newAccount();regCheck();numOnly('#x_card_num');numOnly('#x_exp_date');charOnly('x_first_name');charOnly('x_last_name');tosagree();scrolled()}function regPassword(){regPasswordCheck();numOnly('#last4');charOnly('firstname')}function regPasswordCheck(){$(document).ready(function(){$("#updateForm").validate();$("#useremail").rules('add',{required:true,email:true,minlength:7,maxlength:35});$("#firstname").rules('add','required');$("#last4").rules('add',{required:true,maxlength:4});$("#recaptcha_response_field").rules('add','required');$("label[for=recaptcha_response_field]").html("<br/>Please enter a valid CAPTCHA");$("label[for=recaptcha_response_field]").css('display','none')})}function regUpdatePassword(){regPasswordChangeCheck()}function regPasswordChangeCheck(){$(document).ready(function(){$("#updateForm").validate();$("#useremail").rules('add','required');$("#oldpassword").rules('add','required');$("#newpassword").rules('add',{required:true,minlength:8,maxlength:35});$("#newpasswordconfim").rules('add',{required:true,equalTo:'#newpassword'})})}function regCheck(){$(document).ready(function(){$("#updateForm").validate();$("#useremail").rules('add',{required:true,email:true,minlength:7,maxlength:35});$("#userphone").rules('add',{maxlength:10});$("#x_card_num").rules('add',{required:"#balanceincrease:checked",minlength:16,maxlength:16});$("#x_exp_date").rules('add',{required:"#balanceincrease:checked",minlength:4,maxlength:4});$("#x_first_name").rules('add',{required:"#balanceincrease:checked",maxlength:50});$("#x_last_name").rules('add',{required:"#balanceincrease:checked",maxlength:50});$("#x_street_address").rules('add',{required:"#balanceincrease:checked",maxlength:60});$("#x_city").rules('add',{required:"#balanceincrease:checked",maxlength:40});$("#x_state").rules('add',{maxlength:40});$("#x_zip_code").rules('add',{maxlength:20});$("#x_country").rules('add',{maxlength:60});$("#x_security_code").rules('add',{required:"#balanceincrease:checked",minlength:3,maxlength:4});if($("#loggedin").val()!='true'){$("#useremail2").rules('add',{required:true,email:true,equalTo:'#useremail'});$("#password").rules('add',{required:true,minlength:8,maxlength:35});$("#password2").rules('add',{required:true,equalTo:'#password'})}$("#recaptcha_response_field").rules('add','required');$("label[for=recaptcha_response_field]").html("<br/>Please enter a valid CAPTCHA");$("label[for=recaptcha_response_field]").css('display','none')})}function tos(){$("#termsofservice").rules('add','required');$("label[for=termsofservice]").html("<br/>You must agree to the Terms of Service<br/> in order to use Phone Boogie&trade;.");$("label[for=termsofservice]").css('display','none')}function callCenterCheck(){$(document).ready(function(){$("#callcenterForm").validate();$("#displaynumber").rules('add',{maxlength:10});$("#displayname").rules('add',{required:"#phoneemailsender:checked",maxlength:50});$(".phoneadd").rules('add',{required:"#manualload:checked"&&"#phoneemailsender:checked",maxlength:10});$(".emailadd").rules('add',{email:"#manualload:checked",maxlength:50});$(".emailaddonly").rules('add',{required:"#emailonlysender:checked",email:"#manualload:checked",maxlength:50});$("#configDatepicker").rules('add',{required:"#phoneemailsender:checked",maxlength:10});$("#showTime").rules('add',{required:"#phoneemailsender:checked",maxlength:8});$("#artist").rules('add',{required:"#uploadasong:checked",maxlength:50});$("#songtitle").rules('add',{required:"#uploadasong:checked",maxlength:50});$("#uploadfile").rules('add',{required:"#uploadasong:checked"});$("#messagetts").rules('add',{maxlength:200});$("#selectedsong").rules('add',{required:"#selectasong:checked"});$("#selectedgreeting").rules('add',{'required':'#greetingselection:checked'});$("#selectedclosing").rules('add',{'required':'#closingselection:checked'});$("#clamscost").rules('add',{required:true,max:7});$("label[for=clamscost]").html("<br/>You do not have enough clams in your account for this transaction. Please increase your account balance by purchasing more clams.");$("label[for=clamscost]").css('display','none');$(".Regions").hide();broadcastSelected()})}function date(){$('#configDatepicker').datepick({dateFormat:'yy-mm-dd',minDate:'0W',maxDate:'+12M'})}function increaseCallHours(){$("#increasecallhours").click(function(){if($(this).val()=='decrease'){$('#showTime').timeEntry('destroy');$('#showTime').html('');$('#showTime').timeEntry();$(this).val('increase')}else{$('#showTime').timeEntry('destroy');$('#showTime').html('');$('#showTime').timeEntry({minTime:new Date(0,0,0,7,0,0),maxTime:new Date(0,0,0,21,30,0)});$(this).val('decrease')}})}function phonefileLoad(){$("#phonefileload").click(function(){$("#fileloaderl").click();removeTableItem("phonefiletable","deletefileentry")})}function songfileLoad(){$(".inputsongselector").click(function(){if($(this).val()=='songupload'){$(".songselectorlist").hide();$("#callcenterForm").attr('ENCTYPE','multipart/form-data');$("#fileloader").show();$(".bsong").css('color','yellow');$(".bsong").css('text-decoration','none');$("#selectedsong").val('')}else{$(".songselectorlist").show();$("#callcenterForm").attr('ENCTYPE','text/plain');$("#fileloader").hide()}})}function manualLoad(){$("#manualload").click(function(){$("#phonefile").hide();$(".manualload").show();$("#callcenterForm").attr('action','/edit/callcenter');$("#clams").val(1);$("#clams").html(1+" (clams)")})}function voicemessageLoad(){$("#recordb").click(function(){if(($(".uploadedmessagelocation").attr('location')==undefined)||($(".uploadedmessagelocation").attr('location')=='')){$("#voiceappletdisplay").load("/voicemessage")}else $("#voiceappletdisplay").hide()})}function loadFile(){$("#fileloader").click(function(){$("#fileloaderl").click()})}function countrySelector(){var phoneto='';var phonefrom='';var selector='';$(".countrySelector").click(function(){phoneto=$("#phoneto").val();phonefrom=$("#phonefrom").val();selector=$(this)});$(".countrySelector").bind("change",function(){if(manualtable>=1)var confirmation=true;else{$("#manualphonetable tr:eq(1) .phoneadd").attr('value','');$("#manualphonetable tr:eq(1) .emailadd").attr('value','');dateSetter();$("#cost").load("/edit/cost?country="+$("#phoneto").val()+"&number="+$("#phoneadd").val());$("#clams").val(1);$("#clams").html(1+" (clams)")}if(confirmation==true){internationalcalls=1;if(manualtable>1){$("#manualphonetable tr:gt(1)").remove();$("#manualphonetable tr:eq(1) .phoneadd").attr('value','');$("#manualphonetable tr:eq(1) .emailadd").attr('value','');manualtable=1}if($("#phonefrom").val()!='1'||$("#phoneto").val()!='1')$("#uploadfashion").css('display','none');else $("#uploadfashion").css('display','block');if($("#phoneto").val()=='61'){$(".Regions").show()}else $(".Regions").hide();dateSetter();$("#clams").val(1);$("#clams").html(1+" (clams)")}else if(confirmation==false){$("#phoneto").val(phoneto);$("#phonefrom").val(phonefrom)}})}function regionSelector(){$("#regions").bind("change",function(){$.getJSON("/edit/date?country=61&region="+$(this).val(),function(data){jQuery('#clock').epiclock('destroy');$("#clockrefresh").html('<div id="clock"></div><span id="timezone" style="font-size:smaller;margin-left:50px;"></span>');jQuery('#clock').epiclock({format:'F j, Y, H:i:s',gmt:true,offset:{hours:data.hour,minutes:data.minute,seconds:0,days:data.day,years:0}}).clocks(EC_RUN);$("#timezone").html(data.timezone)})})}function dateSetter(){$.getJSON("/edit/date?country="+$("#phoneto").val(),function(data){jQuery('#clock').epiclock('destroy');$("#clockrefresh").html('<div id="clock"></div><span id="timezone" style="font-size:smaller;margin-left:50px;"></span>');jQuery('#clock').epiclock({format:'F j, Y, H:i:s',gmt:true,offset:{hours:data.hour,minutes:data.minute,seconds:0,days:data.day,years:0}}).clocks(EC_RUN);$("#timezone").html(data.timezone)})}function clock(){jQuery(function(){jQuery('#clock').epiclock({format:'F j, Y, H:i:s',gmt:true,offset:{hours:-5,minutes:0,seconds:0,days:0,years:0}}).clocks(EC_RUN);$("#timezone").html('(New York)')})}function entrySelectorType(){$(".inputselector").click(function(){if($(this).val()=='record')$(".manualentry").css('display','none');else $(".manualentry").css('display','block')})}function introSelector(){$(".inputgreetingselector").click(function(){if($(this).val()=='nogreeting'){$("#introlist").css('display','none');$(".introgem").css('color','yellow');$(".introgem").css('text-decoration','none');$("#selectedgreeting").val('')}else $("#introlist").css('display','block')})}function closingSelector(){$(".inputclosingselector").click(function(){if($(this).val()=='noclosing'){$("#closinglist").css('display','none');$(".rms").css('color','yellow');$(".rms").css('text-decoration','none');$("#selectedclosing").val('')}else $("#closinglist").css('display','block')})}function phoneSelector(){$(".countrySelector").change(function(){var phonef=$("#phonefrom").val();var phonet=$("#phoneto").val();var longdistanceNumF;var longdistanceNumT;var longdistanceCC;switch(phonef){case"1":longdistanceNumF="011";break;case"61":longdistanceNumF="0011";break;case"81":longdistanceNumF="010";break;default:longdistanceNumF="00"}switch(phonet){case"1":longdistanceNumT="011";break;case"61":longdistanceNumT="0011";break;case"81":longdistanceNumT="010";break;default:longdistanceNumT="00"}if(phonef==phonet){if(phonet=='1')longdistanceNumF="1";else if(phonet!='1'||phonet!='81'||phonet!='64'||phonet!='61')longdistanceNumF="0";else longdistanceNumF="";longdistanceCC=""}else longdistanceCC=countryCode(phonet);$("#longdistance").text("("+longdistanceNumF+longdistanceCC+")")})}function countryCode(countryID){var code;switch(countryID){case"1":code="1";break;case"61":code="61";break;case"43":code="43";break;case"32":code="32";break;case"45":code="45";break;case"33":code="33";break;case"49":code="49";break;case"353":code="353";break;case"39":code="39";break;case"81":code="81";break;case"31":code="31";break;case"47":code="47";break;case"64":code="64";break;case"48":code="48";break;case"351":code="351";break;case"34":code="34";break;case"46":code="46";break;case"41":code="41";break;case"44":code="44";break;default:code=""}return code}function selectRMS(){$(".rms").click(function(){$(".rms").css('color','yellow');$(".rms").css('text-decoration','none');$(this).css('text-decoration','underline');$(this).css('color','#3cf816');$("#selectedclosing").val($(this).attr('value'));$("#selectedclosing").valid()})}function selectSong(){$(".bsong").click(function(){$(".bsong").css('color','yellow');$(".bsong").css('text-decoration','none');$(this).css('text-decoration','underline');$(this).css('color','#3cf816');if($(this).attr('stype')=='N')$("#selectedsong").attr('name','selectedsong');else $("#selectedsong").attr('name','selecteduploadsong');$("#selectedsong").val($(this).attr('value'));$("#selectedsong").valid()})}function selectIntro(){$(".introgem").click(function(){$(".introgem").css('color','yellow');$(".introgem").css('text-decoration','none');$(this).css('text-decoration','underline');$(this).css('color','#3cf816');$("#selectedgreeting").val($(this).attr('value'));$("#selectedgreeting").valid()})}function dispEdit(element){$(element).bind("mouseenter",function(){$(this).css({'text-decoration':'underline','font-style':'italic','cursor':'pointer'})});$(element).bind("mouseleave",function(){$(this).css({'text-decoration':'none','font-style':'normal'})})}function broadcastSelector(){$(".broadcaster").click(function(){if($(this).val()=='tts'){var confirmation=window.confirm("Are you sure you want a Text-To-Speech Message?  \n\This switch will delete your uploaded voice message.");if(confirmation!=false){$("#ttsp").css('display','block');$("#recordp").css('display','none')}else $("#recordb").attr('checked','checked');$("#uploadedmessagefile").hide();$("#play").load("/delete?"+$(".uploadedmessagelocation").attr('location'));$(".uploadedmessagelocation").attr('location','');$("#uploadedmessage").val("")}else{$("#ttsp").css('display','none');$("#recordp").css('display','block')}})}function deleteVM(){$("#deletepage").click(function(){var confirmation=window.confirm("Are you sure you want a Text-To-Speech Message?  \n\This switch will delete your uploaded voice message.");if(confirmation==true){$("#play").load("/delete?"+$(".uploadedmessagelocation").attr('location'));$("#ttsp").css('display','block');$("#recordp").css('display','none');$("#ttsb").attr('checked','checked');$("#uploadedmessagefile").hide();$(".uploadedmessagelocation").attr('location','');$("#uploadedmessage").val("")}})}function broadcastSelected(){var result=$(".broadcaster:checked").val();if(result=='gem'){$("#gems").css('display','block');$("#ttsp").css('display','none');$("#recordp").css('display','none')}else if(result=='tts'){$("#gems").css('display','none');$("#ttsp").css('display','block');$("#recordp").css('display','none')}else{$("#gems").css('display','none');$("#ttsp").css('display','none');$("#recordp").css('display','block')}}function noZero(id){$(id).bind("keyup",function(){var site=$(this).val();$(this).val(site.replace(/^0*/g,""))})}function noOne(id){$(id).bind("keyup",function(){var site=$(this).val();if($("#phoneto").val()==1)$(this).val(site.replace(/^1*/g,""))})}function numOnly(id){$(id).bind("keyup",function(){var site=$(this).val();$(this).val(site.replace(/[^0-9]/g,""))})}function charOnly(id){$("#"+id).bind("keyup",function(){var site=$(this).val();if(id=='displayname')$(this).val(site.replace(/[^A-Za-z ]/g,""));else $(this).val(site.replace(/[^A-Za-z]/g,""))})}function clearMessage(){$("#messagetts").click(function(){if($(this).attr('couch')==20)$(this).text('');$(this).attr('couch',90)})}function cost(){$(".phoneadd").bind("keyup",function(){if($("#phoneto").val()!='1'){var number='';$(".phoneadd").each(function(){number+=$(this).val()+","});$("#cost").load("/edit/cost?country="+$("#phoneto").val()+"&number="+number)}else{if($(this).val().length==3){$.getJSON("/edit/date?country="+$("#phoneto").val()+"&areacode="+$(this).val(),function(data){if(data.garbage==false){jQuery('#clock').epiclock('destroy');$("#clockrefresh").html('<div id="clock"></div><span id="timezone" style="font-size:smaller;margin-left:50px;"></span>');jQuery('#clock').epiclock({format:'F j, Y, H:i:s',gmt:true,offset:{hours:data.hour,minutes:data.minute,seconds:0,days:data.day,years:0}}).clocks(EC_RUN);$("#timezone").html(data.timezone)}else{jQuery('#clock').epiclock('destroy');$("#clockrefresh").html('<div id="clock">---</div>')}})}}})}function costfocus(){$(".phoneadd").bind("click",function(){if($(this).val().length>=3&&$("#phoneto").val()=='1'){$.getJSON("/edit/date?country="+$("#phoneto").val()+"&areacode="+$(this).val().substr(0,3),function(data){if(data.garbage==false){jQuery('#clock').epiclock('destroy');$("#clockrefresh").html('<div id="clock"></div><span id="timezone" style="font-size:smaller;margin-left:50px;"></span>');jQuery('#clock').epiclock({gmt:true,offset:{hours:data.hour,minutes:data.minute,seconds:0,days:data.day,years:0}}).clocks(EC_RUN);$("#timezone").html(data.timezone)}else{jQuery('#clock').epiclock('destroy');$("#clockrefresh").html('<div id="clock">---</div>')}})}})}function ErrorCenterDisplay(id){$("#callcenterForm").validate().element("#"+id)}function ErrorAccountCenterDisplay(id){$("#updateForm").validate().element("#"+id)}function ErrorAccountDisplay(id){$("#updateForm").validate().element("#"+id)}function charandspaceOnly(id){$("#"+id).bind("keyup",function(){var site=$(this).val();$(this).val(site.replace(/[^A-Za-z ,!.]/g,""))})}function removeTableItem(table,deleteelement){$("."+deleteelement).click(function(){if(deleteelement=="deletemanualentry")manualtable=parseInt(manualtable)-1;var cost=$("#clams").attr('value');if(cost!=1&&$("#phoneto").val()==1){cost=parseInt(cost)-1;if($("#"+table+" tr").length>2){$(this).parents('tr:eq(0)').remove();$("#clams").val(cost);$("#clams").html(cost+" (clams)")}}else{if($("#"+table+" tr").length>2){$(this).parents('tr:eq(0)').remove();var number='';$(".phoneadd").each(function(){number+=$(this).val()+","});$("#cost").load("/edit/cost?country="+$("#phoneto").val()+"&number="+number)}}return false})}function addPhoneTableItem(){$("#addphonenumber").click(function(){$("#manualphonetable tr:last").clone(true).insertAfter("#manualphonetable tr:last");$("#manualphonetable tr:last td:last").children().css('display','inline');manualtable=parseInt(manualtable)+1;if($("#phoneto").val()==1){var cost=$("#clams").attr('value');cost=parseInt(cost)+1;$("#clams").val(cost);$("#clams").html(cost+" (clams)")}$("#manualphonetable tr:last .phoneadd").attr('value','');$("#manualphonetable tr:last .emailadd").attr('value','')})}function addEmailTableItem(){$("#addemailaddress").click(function(){$(clonedemailtype).clone(true).insertAfter("#manualemailtable tr:first");$("#manualemailtable tr:last td:last").children().css('display','inline');$("#manualemailtable tr:gt(1) td:eq(1) .deletemanualemailentry").show();$("#manualemailtable tr:eq(1) .emailaddonly").attr('value','')})}function removeEmailTableItem(){$(".deletemanualemailentry").click(function(){if($("#manualemailtable tr").length>2){$(this).parents('tr:eq(0)').remove()}})}function analytics(){var gaJsHost=(("https:"==document.location.protocol)?"https://ssl.":"http://www.");document.write(unescape("%3Cscript src='"+gaJsHost+"google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));try{var pageTracker=_gat._getTracker("UA-3376991-2");pageTracker._trackPageview()}catch(err){}}function scrolled(){$("#terms").bind('scroll',function(){var elem=$('#terms');if((elem[0].scrollHeight)-elem.scrollTop()<=elem.outerHeight()+2000){$("#subaccount").html('<input id="accountsubmitbutton" type="image" src="/img/called.gif" style="margin-left:225px;border:0px;"/>')}})}function captcha(){Recaptcha.create("6LehLwkAAAAAALllO4SRoXIxqV1j8X4wLlv_43EC&lang=en",'recaptcha_image',{theme:'custom',custom_theme_widget:'recaptcha_widget',callback:Recaptcha.focus_response_field});$("#recaptcha_widget").css('display','inline')}function whoboogied(){$("#whoboogied").bind('click',function(){captcha();$("#submitwho").html('<input id="whobuggied" type="image" src="/img/called.gif" style="margin-left:170px;border:0px;"/>')})}function whoboogiedCheck(){$("#whoboogiedForm").validate();$("#configDatepicker").rules('add',{required:true,maxlength:10});$("#whobphone").rules('add',{required:true,maxlength:10});numOnly('#whobphone');$("#recaptcha_response_field").rules('add','required');$("label[for=recaptcha_response_field]").html("<br/>Please enter a valid CAPTCHA");$("label[for=recaptcha_response_field]").css('display','none')}function whoboogieddate(){$('#configDatepicker').datepick({dateFormat:'yy-mm-dd',minDate:'-12M',maxDate:'0W'})}function tosagree(){$("#termsofservice").click(function(){captcha()})}function phoneemailonly(){$(".phoneemailonly").click(function(){var confirmation=window.confirm("Are you sure you want to change Boogie Senders?  This switch will delete any phone numbers/email addresses you may have already entered.");if(confirmation==true){if($(this).val()=='phone'){$(".phonevis").show();$(".emailvis").css('display','none');$("#manualemailtable tr:gt(1)").remove();$("#manualemailtable tr:eq(1) .emailaddonly").attr('value','');$("#callcenterForm").attr('action','/edit/callcenter?'+$("#refreshval").val())}else{$(".emailvis").show();$(".phonevis").css('display','none');$("#callcenterForm").attr('action','/edit/emailcenter?'+$("#refreshval").val());if(manualtable>1){$("#manualphonetable tr:gt(1)").remove();$("#manualphonetable tr:eq(1) .phoneadd").attr('value','');$("#manualphonetable tr:eq(1) .emailadd").attr('value','');manualtable=1;$("#clams").val(1);$("#clams").html(1+" (clams)")}}}else{if($(this).val()=='phone'){$("#emailonlysender").attr('checked','checked');$("#callcenterForm").attr('action','/edit/callcenter?'+$("#refreshval").val())}else{$("#phoneemailsender").attr('checked','checked');$("#callcenterForm").attr('action','/edit/emailcenter?'+$("#refreshval").val())}}})}function transportSelected(){var result=$(".phoneemailonly:checked").val();if(result=='phone'){$(".phonevis").show();$(".emailvis").attr('display','none');$("#callcenterForm").attr('action','/edit/callcenter?'+$("#refreshval").val())}else{$(".emailvis").show();$(".phonevis").attr('display','none');$("#callcenterForm").attr('action','/edit/emailcenter?'+$("#refreshval").val())}}function getEmails(){$("#emailonlysender").click(function(){if($("#obtainedemails").val()=='notobtained'){$.post('/emailfinder',function(data){$("#emailselector").html(data);clonedemailtype=$("#manualemailtable tr:eq(1)").clone(true)})}$("#obtainedemails").val('obtained')})}function emailInput(){$("#emailselector").bind('change',function(){if($(this).val()=='other'){$(this).parents('td:eq(0)').html('<input class="emailaddonly" name="emailaddonly" size="25" style="color:blue"/>')}})}function songSelector(){$("#songselectorcategory").bind('change',function(){if($(this).val()!='category'){$("#songbuzy").show();$.post('/newsongs/'+$("#songselectorcategory").val(),function(data){$("#songselection").html(data);if(data.indexOf('bsong')!=-1)$("#songselection").html(data);else $("#songselection").html("No Boogies Available");$("#songbuzy").hide()});$(".songselectorlist").show()}else $(".songselectorlist").hide()})}
