/* - - - - - - - - - - - - - - - - - - - - - - -
 JavaScript
 Monday, November 17, 2008 4:08:45 PM
 HAPedit 3.1.11.111
 - - - - - - - - - - - - - - - - - - - - - - - */
var thinbox_width;
var thinbox_height;
function thinboxSetup(mywidth,myheight)
 {
   thinbox_width=mywidth;
   thinbox_height=myheight;

 }
 function showThinBox(disptype,disparam)
 {
   elem=document.getElementById("thinBox");
   //elem.style.width=window.screen.width+"px";
   myvar1=document.body.scrollWidth-1;
  elem.style.width=myvar1+"px";
  //alert(elem.style.width);
  elem.style.height=document.body.scrollHeight+"px";
  mycalc= document.body.scrollTop+100;
  myvr="<br><br style='line-height:"+mycalc+"px;'>";
  myvr=myvr+"<table width='"+ thinbox_width +"' align='center' bgcolor='white' class='tabclass'><tr><td class='boxtop' align=right><a href='javascript:closeThinBox();' class='boxtop'>Close</a>&nbsp; </td></tr><tr><td height='"+thinbox_height+"' valign=top class='boxtext'>";
  if (disptype==0)
  {//normal HTML Display
    myvr=myvr+disparam;
    //alert(myvr);
    myvr=myvr+"</td></tr></table>";
  elem.innerHTML=myvr;
  elem.style.visibility="visible";
  }
  if(disptype==1)
  {//iframed URL display
   myvr=myvr+"<iframe width='"+ thinbox_width +"' align='center' height='"+thinbox_height+"' frameborder='0' scrolling='yes' src='"+disparam+"' />";
   myvr=myvr+"</td></tr></table>";
  elem.innerHTML=myvr;
  elem.style.visibility="visible";
  }
  if(disptype==2)
  { //AJAX page
   myvr=myvr+"<div id='tbContent'>Loading...</div>";
    myfunc=disparam+"()";
    myvr=myvr+"</td></tr></table>";
  elem.innerHTML=myvr;
  elem.style.visibility="visible";
    eval(myfunc);

  }


 }
 function closeThinBox()
{
  elem=document.getElementById("thinBox");
  elem.style.visibility="hidden";
}
function showAjaxContent(ajvar)
{
  elem=document.getElementById("tbContent");
  elem.innerHTML=ajvar;

}
