﻿// JScript 文件

function loadMessage() 
{ 
    result="Please sign in before download!" 
    var url = window.location.href;
    url = URLencode(url);
    
    if (confirm(result)) 
    { 
        window.location.href="../userInformation/Login.aspx?parameter=" + url; 
    } 
    else 
    { 
        window.location.href="#";
    } 
} 

function URLencode(sStr) 
{
    return escape(sStr).replace(/\+/g, '%2B').replace(/\"/g,'%22').replace(/\'/g, '%27').replace(/\//g,'%2F');
}

    //除去左右空格
    function trim(string)
    {
        return string.replace(/(^\s*)|(\s*$)/g, "");
    }

