
function register_success(){

  var msgw,msgh,bordercolor;
  msgw=330;//pop window width
  msgh=220;//pop window height

  w = document.documentElement.clientWidth;
  h = document.documentElement.clientHeight;
  
  var left=(w/2)-(msgw/2);
  var top =(h/2)-(msgh/2);

  var msgObj=document.createElement("div")//the pop div

  msgObj.setAttribute("id","msgDiv");
  msgObj.setAttribute("align","center");
  msgObj.className = "pop-form-dialog";
  msgObj.style.left = left+"px";
  msgObj.style.top = top+"px";
  msgObj.style.width = msgw + "px";
  msgObj.style.height =msgh + "px";
  
  var closeBtn=document.createElement("input");//the close btn
  closeBtn.setAttribute("type","image");
  closeBtn.setAttribute("src","images/close1.gif");
  closeBtn.style.border = "none";
  closeBtn.style.width = "16px";
  closeBtn.style.height = "16px";
  closeBtn.style.marginTop = "0px";
  closeBtn.style.marginLeft = "77px";
  closeBtn.style.float = "left";
  closeBtn.onclick=closeWin;

  
  function closeWin(){
  location.reload(true)
    document.body.removeChild(msgObj);//remove the pop window
  }

  document.body.appendChild(msgObj);//append the pop window
  
  var formDiv = document.createElement("DIV");
  formDiv.className="pop-form-div";
  msgObj.appendChild(formDiv);
  
  var login_img = new Image(216,37);
  login_img.src = "images/registration.jpg";
  login_img.className = "pop-login";
    formDiv.appendChild(login_img);
    
   var msg_img = new Image(273,90);
   msg_img.src = "images/reg-success.jpg";
     msg_img.style.marginLeft = "14px";
  msg_img.style.marginTop = "33px";
   formDiv.appendChild(closeBtn);
   formDiv.appendChild(msg_img);

}