title: jQuery or Javascript Click function change or add id
body: <p>Is it possible to change the text "mars-on-newyork" from this links, this is how the links looks like:</p>
  
  <pre><code>&lt;ul&gt;
    &lt;li&gt; 
  &lt;a href="google.com/finder.php?offer=mars-on-newyork"&gt; 
  &lt;img class="the-button-red"/&gt; 
  &lt;/a&gt; 
    &lt;/li&gt;
    &lt;li&gt; 
  &lt;a href="google.com/finder.php?offer=mars-on-newyork"&gt; 
  &lt;img class="the-button-green"/&gt; 
  &lt;/a&gt; 
    &lt;/li&gt;
   &lt;li&gt; 
  &lt;a href="google.com/finder.php?offer=mars-on-newyork"&gt; 
  &lt;img class="the-button-blue"/&gt; 
  &lt;/a&gt; 
     &lt;/li&gt;
  &lt;/ul&gt;  
  </code></pre>
  
  <p>This code changes my images only: </p>
  
  <pre><code>function changeIt(objName) {
   var obj = document.getElementById(objName);
   var objId = new Array();
   objId[0] = "newyork";
   objId[1] = "paris";
   objId[2] = "tokyo";
   var i;
   var tempObj;
  for (i = 0; i &lt; objId.length; i++) {
      if (objName == objId[i]) {
          obj.style.display = "block";
      } else {
          tempObj = document.getElementById(objId[i]);
          tempObj.style.display = "none";
        }
    }
    return;
  }
  </code></pre>
  
  <p>and here is the rest of the html from which the java script changes only the pictures:</p>
  
  <pre><code>&lt;div id="newyork"&gt;
   &lt;a href="#"&gt; 
     &lt;img src="newyork.jpg"/&gt; 
  &lt;/a&gt;
  &lt;/div&gt; 
  
  &lt;div id="paris" style="display:none"&gt;
  &lt;img src="paris.jpg" border="0" alt="one"/&gt;
  &lt;/div&gt; 
  &lt;div id="tokyo" style="display:none"&gt;
  &lt;img src="tokyo.jpg" border="0" alt="two" /&gt;
  &lt;/div&gt; 
  
  &lt;div style="display:none;"&gt;
  &lt;a id="one" href="#" onclick="changeIt('newyork');"&gt;&lt;img src="newyork.jpg" border="0"      alt="one"/&gt;&lt;/a&gt; 
  &lt;/div&gt; 
  
  &lt;div&gt;
  &lt;a id="one" href="#" onclick="changeIt('paris');"&gt;&lt;img src="paris.jpg" border="0" alt="one"/&gt;&lt;/a&gt; 
  &lt;/div&gt; 
  
  &lt;div&gt;
  &lt;a id="two" href="#" onclick="changeIt('tokyo');"&gt;&lt;img src="tokyo.jpg" border="0" alt="two"/&gt;&lt;/a&gt; 
  &lt;/div&gt;  
  </code></pre>
  
  <p>If i click on
       <code>&lt;a id="one" href="#" onclick="changeIt('paris');"&gt;&lt;img src="paris.jpg" border="0"        alt="one"/&gt;&lt;/a&gt;</code>  </p>
  
  <p>i want the text from the links on the ul to change from this: </p>
  
  <p>href="google.com/finder.php?offer=mars-on-newyork  </p>
  
  <p>to this:</p>
  
  <p>href="google.com/finder.php?offer=mars-on-paris </p>
  
  <p>and if i click on<br>
    <code>&lt;a id="one" href="#" onclick="changeIt('tokyo');"&gt;&lt;img src="paris.jpg" border="0"        alt="one"/&gt;&lt;/a&gt;</code></p>
  
  <p>it changes it to 
  href="google.com/finder.php?offer=mars-on-tokyo </p>
  
  <p>i want the java script to work like it does, how it changes the images but i also want to take advantage of the click to change the text. </p>
  
  <p>thanks! </p>
  
  <hr>
  
  <p>I see how it is now, i guess my post wasn't good enough to have piqued you're interest's, i guess i would have to pay a freelancer to help me, thanks anyways guys for your time and help!</p>