  
  function add(DocID,IndexID,Email,qbuy,Fees,frompu,actn)
  {if(!qbuy) qbuy = "";
   if(!Fees) Fees = "";
   if(!actn) actn = "";
   var subwin = window.open("addrec.php?IndexID="+IndexID+"&DocID="+DocID+"&qbuy="+qbuy+"&action="+actn+"&tsids=1&PHPSESSID=b6f63e900ed23b25ebf045b72dcf3a64","fsadd","toolbar=off,location=off,directories=off,status=off,menubar=off,scrollbars=off,resizable=off,width=200,height=10");
   if(qbuy=="1")
     switch(frompu)  
     {case "pop":
     	 parent.opener.location="checkout1.htm?qbuy=1&DocID="+DocID+"&IndexID="+IndexID+"&Total="+Fees+"&Op=Chk&tsids=1&PHPSESSID=b6f63e900ed23b25ebf045b72dcf3a64"; 
       parent.window.close();
       break;
      case "frm":  
       parent.parent.location="checkout1.htm?qbuy=1&DocID="+DocID+"&IndexID="+IndexID+"&Total="+Fees+"&Op=Chk&tsids=1&PHPSESSID=b6f63e900ed23b25ebf045b72dcf3a64"; 
       break;
      default:
       document.location="checkout1.htm?qbuy=1&DocID="+DocID+"&IndexID="+IndexID+"&Total="+Fees+"&Op=Chk&tsids=1&PHPSESSID=b6f63e900ed23b25ebf045b72dcf3a64"; 
       break;
     }     

/* FreeModel orig replaced by switch above also didn't have frompu or action params    
     if(frompu)  
     {parent.opener.location="checkout1.htm?qbuy=1&DocID="+DocID+"&IndexID="+IndexID+"&Total="+Fees+"&Op=Chk&tsids=1&PHPSESSID=b6f63e900ed23b25ebf045b72dcf3a64"; 
      parent.window.close();
     }
     else
      document.location="checkout1.htm?qbuy=1&DocID="+DocID+"&IndexID="+IndexID+"&Total="+Fees+"&Op=Chk&tsids=1&PHPSESSID=b6f63e900ed23b25ebf045b72dcf3a64"; 
*/      
  }
