JavaScript is client side script, ASP is Server side script. ALL ASP is processed before your page is ever sent to the browser.
To put an ASP variable into JavaScript, simply add <%=yourvariable%> into the JavaScript wherever you need it to appear. Since the ASP is processes first, your javaScript will have the ASP variable inserted into it before sending the html to your browser.
Passing a variable from javascript into ASP is by definition an impossible thing, since all the ASP is already processed before the page is rendered. You CAN use javascript to call a new ASP page, passing javascript variables as querystring or form variables.
Tim