title: creating a javascript bookmarklet with variables declared in page
body: <p>absolute novice at js, as a disclaimer.</p>
  
  <p>there's a page that exists that has variables declared such as:</p>
  
  <pre><code>c="hello"
  cd="12345"
  </code></pre>
  
  <p>and a php viewing script that makes the image only "accessible" (it's hidden under a flash layer otherwise" by a swf that loads:</p>
  
  <pre><code> ((("view.php?cid=" + c) + "&amp;cd=") + cd)
  </code></pre>
  
  <p>so the url ends up looking like</p>
  
  <pre><code> view.php?cid=hello&amp;cd=12345
  </code></pre>
  
  <p>would it be possible to turn this into a javascript bookmarklet?</p>
  
  <p>thanks</p>
  
  <p>-A</p>
  
  <p>EDIT for clarity for Sno0py:</p>
  
  <p>Neither of the pages are my site. It's a site I'm trying to create a bookmarklet for.
  On the page, there is flashembed.js, which can be used for a multitude of things, but in this case, in used to make it so you can't right click to save an image (makes it a movie, and with a php view script, puts the image in it).</p>
  
  <p>On the page, there is this html/javascript:</p>
  
  <pre><code>&lt;div id="viewer"&gt;
      &lt;!-- image is here --&gt;
  &lt;/div&gt;
  &lt;script type="text/javascript"&gt;
      flashembed("viewer",
      {src: "overlay.swf"},
      {c: "hello", cd: "123456"}
      );
  &lt;/script&gt;
  </code></pre>
  
  <p>where #viewer is specified in another js script, and c &amp; cd are randomly generated identifiers for the image.</p>
  
  <p><code>overlay.swf</code> does this:</p>
  
  <pre><code>stage.showmenu = false;
  loadmovie ((("http://example.com/view.php?cid=" + c) + "&amp;cd=") + cd, _root);
  _root.stop();
  </code></pre>
  
  <p>so navigating to <code>http://example.com/view.php?cid=hello&amp;cd=123456</code> would yield the raw data for the image. you can view it with <code>&lt;img src="view.php?cid=hello&amp;cd=123456"&gt;</code> though.</p>
  
  <p>SO: to clarify, would I would like, is a javascript bookmarklet that grabs <code>c</code> and <code>cd</code>, forms the url, and brings you to a page with just the <code>&lt;img src"yadayada"&gt;</code> from above. If that's not possible, just bringing me to the <code>url</code> would be nice.</p>