Routing Error (javascript prob culprit)

I am using the DOM popup kit to create modal popups and am having trouble getting popups to work in IE6 when they are not in my main layout view. When they are not in the main layout view the popups always display beneath the overlay and cannot be accessed. But when I put them in my layout view, they seem to work. This was working fine until I discovered that putting the popup code in the layout view was messing up my routes on other pages. This is the error that I am getting:

ActionView::TemplateError (spec_url failed to generate from {:action=>"show", :controller=>"spec"} - you may have ambiguous routes, or you may need to supply additional parameters for this route. content_url has the following required parameters: ["spec", :id] - are they all satisfied?) on line #175 of layouts/ site.rhtml: 172: <div id="profile_edit_popup" class="popup" style="width:700px" style ="display: none;"> .....

The relevant code for the popups that is in my view:

<% if is_logged_in? %>   <div id="profile_edit_popup" class="popup" style="width:700px" style ="display: none;">   <fieldset>     <legend>Edit Profile Information</legend>       <% form_for :spec, :url => spec_url,         :html => { :method => :put, :multipart => true } do |form| %>          ........form stuff...........       <input class="popup_closebox" type="button" value="Cancel" /> </div>

<script type="text/javascript"> {modal:true,position:'30%,15%',opacity:'.60',duration:0}) </script> <% end %>

Does anyone have any idea why this may be messing up my other routes? I am totally lost here. Thanks.