var currentID="";
function zipFinder(zid)
{
if(typeof jQuery != 'undefined')
{
var wid = 540;
var hei = 370;
if($("#zipPane").length>0) return;
currentID=zid;
var zip = document.createElement("div");
$(zip).css({"z-index":"100","position":"absolute","border":"2px solid black","background-color":"white"});
$(zip).css({"width":wid+"px","height":hei+"px"});
$(zip).attr("id","zipPane");
var winHeight = $(window).height();
var winWidth = $(window).width();  
var pleft = winWidth/2 - wid/2;
     pleft+=$(window).scrollLeft();  
var ptop = winHeight/2 - hei/2;
     ptop+=$(window).scrollTop();
if(pleft<0) pleft=0;
if(ptop<0) ptop=0;
$(zip).css({"top":ptop+"px","left":pleft+"px"});
var iframe = document.createElement("iframe");
     $(iframe).attr("border","0");
     $(iframe).css({"width":"99%","height":"99%","border":"none","overflow":"auto"}); 
     $(iframe).attr("src","/jsp/zip/zip.html");
     $(zip).append(iframe);  
 var close = document.createElement("img"); 
     $(close).attr("src","/jsp/zip/closeroundsmall.png");
     $(close).css({"position":"absolute","top":"-20px","left":wid-20,"cursor":"pointer"});
     $(close).bind("click",function(e){closeZip();});
     $(zip).append(close);


$("body").append(zip);
}
}

function closeZip()
{
$("#zipPane").remove();
currentID="";
}

function zipSelected(zip)
{
if($("#"+currentID).length>0) $("#"+currentID).val(zip);
closeZip();
}
