﻿function mail() {

    var To = document.getElementById("ctl00_ContentPlaceHolder1_lstViewNews_ctrl0_txtTo").value;
    var Name = document.getElementById("ctl00_ContentPlaceHolder1_lstViewNews_ctrl0_txtName").value;
    var Msg = document.getElementById("ctl00_ContentPlaceHolder1_lstViewNews_ctrl0_txtMessage").value;
    var Link = document.getElementById("ctl00_ContentPlaceHolder1_lstViewNews_ctrl1_lblEmailStory").href;

    ws_sendEmail.mail(To, Name, Link + "\n\n" + Msg, success, abort);

}

function success() { alert("Email sent successfully."); }
function abort(error) { alert(error.get_message()); }

function Cover(bottom, top) {
    //         try {

    var location = Sys.UI.DomElement.getLocation(bottom);
    top.style.position = 'absolute';
    top.style.top = location.y + 'px';
    top.style.left = '0px'; //location.x + 'px';
    //             if (!ignoreSize) {
    //                 top.style.height = bottom.offsetHeight + 'px';
    //                 top.style.width = bottom.offsetWidth + 'px';
    //                 }
    //         }
    //           catch(Error) {
    //               alert(Error.Message);
    //           }
}            