        $(function($) {
            $(document).ready(function() { 
		        $('a#SendLink').click(SubmitSendLinkForm);
            });
        });

        (function($) {
            $.fn.customFadeIn = function(speed, callback) {
                $(this).fadeIn(speed, function() {
	                if(jQuery.browser.msie)
		                $(this).get(0).style.removeAttribute('filter');
	                if(callback != undefined)
		                callback();
                });
            };
            $.fn.customFadeOut = function(speed, callback) {
                $(this).fadeOut(speed, function() {
	                if(jQuery.browser.msie)
		                $(this).get(0).style.removeAttribute('filter');
	                if(callback != undefined)
		                callback();
                });
            };
        })(jQuery);
	    
	    function Hide(){$('div.dialog-field').customFadeOut('slow');}
	    function Show(obj){Hide();$(obj).customFadeIn('slow');///window.setTimeout(Hide,4000);
	    }
        function SubmitSendLinkForm() {
            if(GetFormValue("receiver") == "") {
                Show("div#dialog"); 
                $("p#text").text("Alıcı adresini girmediniz.");
                return false;
            }
            if(!validateEmail(GetFormValue("receiver"))) {
                Show("div#dialog");  
                $("p#text").text("Alıcı adresi geçerli değil.");
                return false;
            }             
            if(GetFormValue("sender") == "") {
                Show("div#dialog");
                $("p#text").text("Kendi adresinizi girmediniz.");  
                return false;
            }  
            Hide();
            SetCookie('receiver', GetFormValue("receiver"), expiry);
            SetCookie('sender', GetFormValue("sender"), expiry);
            SetCookie('note', GetFormValue("note"), expiry);
            SetCookie('url', GetFormValue("url"), expiry);
            document.forms[0].reset();
            animatedcollapse.toggle('Email');
            GB_showCenter('','../Message.aspx?get=pagesent',220,400);
        }	    
