You need to put a variable on the actual aspx page;
<script>
var x = '<%=Session("dowloa") %>';
</script>
You can then use "x" in your external js file as long as the script where you define "x" is interpreted before your external script file uses it, so putting it above where you include the js file is a good idea.