document.write("<div id=vistaDiv style='display:none'></div>");
document.write("<iframe name=IFrameResult id=IFrameResult style='display:none'></iFrame>");

 function popupVista(actionUrl, winName, popArg) {
  if ( popArg == null ) popArg = "";
  var content = "<form name=visActionForm>";
  if ( actionUrl.indexOf("?") == -1 ) {
   moveURL = actionUrl;
  } else {
   var paramSplit = actionUrl.split("?");
   moveURL = paramSplit[0];
   if ( paramSplit.length == 2 ) {
    getParam = paramSplit[1].split("&"); 
    for (var i=0; i < getParam.length; i++) {
     getElement = getParam[i].split("=");
     getElementName = (getElement[0] != null) ? getElement[0] : '';
     getElementValue = (getElement[1] != null) ? getElement[1] : '';
     content += "<input type=hidden name='" + getElementName + "' value='" + getElementValue + "'>\n";
    }
   }
  }
  
  content += "</form>";
  document.all.vistaDiv.innerHTML = content;
  if( winName != "_self" ) window.open("about:blank", winName, popArg);
 
  visActionForm.target = winName;
  visActionForm.action = moveURL;
  visActionForm.method = "post";
  visActionForm.submit();

}