Astros pitcher arrested at Seminole Hard Rock - Tbo.com

Print

'); external.close(); } }); } }); // Close the "print this" popup. $("#print_this__popup__close").click(function() { print_this__popup__status = popup_close(print_this__popup__status,

'print_this__popup'); }); } // Function to validate recipient email addresses function validate_emails(emails) { var good_emails = ''; if (emails.search(',') != -1) { var emails_array = emails.split(','); for (var i in emails_array) { var email = emails_array[i].replace(/\s+/g, ''); if (email) { good_emails += email.match(/^[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,4}$/i) + ','; } else { continue; } } } else { var email = emails.replace(/\s+/g, ''); if (email) { good_emails += email.match(/^[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,4}$/i); } } if (good_emails.search('null') == -1) { return good_emails; } else { return false; } } function email_article() { var email_this__popup__status = false; // Load the "email this" popup. $(".email_this").click(function() { popup_center('email_this__popup') email_this__popup__status = popup_load(email_this__popup__status, 'email_this__popup'); }); // Close the "email this" popup. $("#email_this__popup__close").click(function() { email_this__popup__status = popup_close(email_this__popup__status, 'email_this__popup'); // Clear the errors. empty_errors(); }); // Send an email $('#email_this__popup__body__form__submit').click(function() { // Clear the errors. empty_errors(); var status = true; var error_message = ''; var url = window.location.href; url = url.replace(/\?clear_cache/g, ''); // Deal with email addresses. var to = $('#email_this__popup__body__form__to').val(); if (to.length == 0) { error_message += '*There are no recipient email addresses entered.
'; status = false; } else if (to.length > 500) { error_message += '*The recipient emails addresses are, in total, longer than 500 characters long.
'; status = false; } else { var recipients = validate_emails(to); if (!recipients) { error_message += '*Not all of the recipient email addresses are valid.
'; status = false; } } // Deal with sender's name var sender_name = $('#email_this__popup__body__form__sender__name').val(); if (sender_name.length == 0) { error_message += "*You have not entered the sender's name.
"; status = false; } else if (sender_name.length > 64) { error_message += "*The sender's name is over 64 characters long.
"; status = false; } else if (sender_name.search(/[^\w\s'"-]/) != -1) { error_message += "*Invalid characters were found in the sender's name.
"; status = false; } // Deal with the sender's email address. var sender_email = $('#email_this__popup__body__form__sender__email').val(); if (sender_email.length == 0) { error_message += "*You have not entered the sender's email address.
"; status = false; } else if (sender_email.length > 64) { error_message += "*The sender's email address is over 64 characters long.
"; status = false; } else { var sender = validate_emails(sender_email); if (!sender) { error_message += "*The sender's email address is not valid.
"; status = false; } } var article_name = "Astros pitcher arrested at Seminole Hard Rock"; var message = $('#email_this__popup__body__form__message').val(); if (message.length > 5000) { error_message += "*Your message is over 5000 characters.
"; status = false; } mg_ctype = 131; mg_cid = 345872; if (status) { // Get the shortened version of the URL $.ajax({ async: false, type: 'POST', url: '/shorty/api/get_shorty/', data: { url: url }, cache: false, dataType: 'text', success: function (result) { short_url = result; } }); $.ajax({ type: 'POST', url: '/api/email/article/', data: { url: short_url, article_name: article_name, recipients: recipients, sender_name: sender_name, sender_email: sender_email, message: message, ctype: mg_ctype, cid: mg_cid }, cache: false, dataType: 'json', success: function(mg_json) { if (mg_json.status == 'success') { var message = 'Thanks ' + sender_name + '.
'; message += mg_json.message; $('#email_this__popup__body').empty().html(message); $('#email_this__popup__body').addClass('success'); } else { $('#email_this__popup__container').css({'overflow': 'scroll'}); $('#email_this__popup__error__body').empty().html(mg_json.message); $('#email_this__popup__error').show(); } } }); } else { $('#email_this__popup__container').css({'overflow': 'scroll'}); $('#email_this__popup__error__body').empty().html(error_message); $('#email_this__popup__error').show(); } }); } <![CDATA[ .popup__close { float:left; font-size:1em; padding-left:11px; } .popup__title { border-bottom:1px dotted #7B7B7B; color:#4A4A4A; font-size:2em; font-weight:bold; padding-right:10px; text-align:right; } .popup__body { padding-bottom:10px; padding-top: 10px; clear: both; } #print_this__popup { white-space: normal; font-weight: normal; } .print_this { cursor: pointer; } .email_this { cursor: pointer; } #email_this__popup { display: none; font-size: 14px; font-weight: normal; } #email_this__popup__container { clear:both; height:419px; } #email_this__popup__body__header { color: green; font-size:1.5em; font-weight:bold; margin-left: 30px; } #email_this__popup__body__fine_print { font-size: .75em; margin-bottom:7px; margin-left:48px; margin-top:5px; } #email_this__popup__body__form__table { margin-left: auto; margin-right: auto; } #email_this__popup__body .text_input { width: 400px; } #email_this__popup__body__form__message { height:200px; width:400px; } #email_this__popup__body__form__submit { width: 100px; } .table_left { text-align: right; } #popup__background { display:none; position:fixed; _position:absolute; /* hack for internet explorer 6*/ height:100%; width:100%; top:0; left:0; background:#000000; border:1px solid #cecece; z-index:100000; } #email_this__popup { display:none; position:fixed; _position:absolute; /* hack for internet explorer 6*/ height:450px; width:680px; background: #EBEBEB; border:2px solid black; z-index:300001; padding:12px; font-size:13px; left: 50%; margin-left: -340px; } #email_this__popup__error { display: none; } #email_this__popup__error__header { color:red; font-size:1.25em; font-weight:bold; padding-left:10px; padding-top:10px; } #email_this__popup__error__body { color:red; font-size:1.2em; padding-left:36px; padding-top:5px; } .success { color:green; font-size:1.85em; margin-top:42px; text-align:center; } #print_this__popup { display:none; position:fixed; _position:absolute; /* hack for internet explorer 6*/ height:450px; width:680px; background: #EBEBEB; border:2px solid black; z-index:300000; padding:12px; font-size:13px; left: 50%; margin-left: -340px; } ]]>

Business Forum | Christian Forum | Coupon Forum | Discussion Forum | Gamers Forum
Legal Forum | Politics Forum | Sports Forum | Teen Forum | Webmaster Forum

Source: http://news.google.com/news/url?sa=t&fd=R&usg=AFQjCNH8kgbdroefJuh_X39CbxxK9X5rpg&url=http://www2.tbo.com/content/2011/jan/22/221716/astros-pitcher-arrested-at-seminole-hard-rock/