﻿// JScript File
 function wrapContent(e, img, w, h, txt, wd, offx, offy) 
	    {
          var imgStr, cntnt, win, str;
          imgStr = '<img src="' + img + '"' + (w? ' width="' + w + '"': "") + (h? ' height="' + h + '"': "") + '>';
          if ( dragObj.supported && typeof document.body.innerHTML != "undefined" ) 
          {
            cntnt = '<div class="img">' + imgStr + '</div>';
            if (txt) cntnt += '<div class="msg">' + txt + '</div>';  
            if (!wd) wd = w; 
            writeDrag.set(e, cntnt, wd, offx, offy);
          } 
          else 
          { // non-capable browsers will open sub window
            w = w+80 || wd || 250; h = h+80 || 250; // size
            win = window.open('', 'subwin', 'resizable,width='+w+',height='+h+',left=100,top=100');
            if (win && !win.closed) win.resizeTo(w,h); 
            str = '<html><head><title>Image Display</title></head>';
  	        str += '<body style="text-align:center">';
            str += imgStr + (txt? '<p>' + txt + '</p>':"");
  	        str += '</body></html>'
  	        win.document.write(str);
  	        win.document.close();
            if (win && !win.closed) win.focus(); 
          } 
            return false;
        }

function recordLogoff()
{
    //PageMethods.RecordLogOff(OnSucceeded,OnFailed);
}

function OnSucceeded(result, userContext,methodName)
{
    alert("Logout succeeded");
}

function OnFailed(error, userContext, methodName)
{
    alert("Logout call failed");
}

function Uploadtest()
{
   var addMore = document.getElementById();
   if(addMore)
   {
        addMore.style.display = 'block';
   }
}

function addAnotherFile()
{
    alert('AddAnotherFile Called');
}

function RowClick(row)
{
     var selRow = this.GetCellByColumnUniqueName(row,"UserID");
     window.open("ADViewprofile.aspx?ID=" + selRow.innerHTML);
}

function MessageRowSelected(row)
{
    var selRow = this.GetCellByColumnUniqueName(row,"UniqueID");
    window.open('SupportMessage.aspx?msgID=' + selRow.innerHTML,'Message','width=800px,height=610px,toolbar=no,location=no');
}


