﻿function BeginRequestHandler(sender, args)
{
  //alert("Request_Start");
}

function PageLoadedHandler(sender, args) {
  //alert("Page_Loaded");
}

function EndRequestHandler(sender, args)
{
  //alert("Request_End");
  if (args.get_error() != null /*undefined*/)
  {
    var errorMessage = "";
    if (args.get_response().get_statusCode() == "200")
    {
      errorMessage = args.get_error().message + "\n\n";
    }
    else
    {
      // the server wasn&#8217;t the problem...
      errorMessage = "An unknown error occurred... " + args.get_error().message + "\n\n";
    }
    
    if (args._response._xmlHttpRequest.responseText != null)
      errorMessage += args._response._xmlHttpRequest.responseText + "\n\n";
    // do something with the errorMessage here.
    // now make sure the system knows we handled the error.
    args.set_errorHandled(true);

// //    alert("EndRequestHandler error:\n" + errorMessage);
  }
  else
  {
    //alert("Request_End OK");
  }
}

function immWeb_print() 
{ 
  window.print();
}

function immWeb_preLoad()
{
  // alert('preLoad');  
}
function immWeb_postLoad(padre, myDiv, new_iframe, customParam)
{
  // alert('postLoad'); 
  
  /*
  new_iframe.src += "&" + customParam;
  alert(customParam); 
  alert(new_iframe.src);
  */
  
}
function immWeb_preAdd(padre, clave1Value, clave3Value)
{
  // alert('preAdd');    
}
function immWeb_postAdd(padre, myDiv, new_iframe, customParam)
{
  // alert('postAdd'); 
  /*
  new_iframe.src += "&" + customParam;
  alert(customParam); 
  alert(new_iframe.src);  
  */
}
function immWeb_preDelete()
{
  // alert('preDelete'); 
}
function immWeb_postDelete()
{
  // alert('postDelete');
}
function immWeb_preHide()
{
  // alert('preHide');   
}
function immWeb_postHide()
{
  // alert('postHide');  
}
function immWeb_preUpload()
{
  // alert('preUpload'); 
}
function immWeb_postUpload()
{
  // alert('postUpload');
}


function immWeb_open(url, name, features, replace)
{
  window.open(url, name, features, replace);
}

function immWeb_close()
{
  window.close();
}

function immWeb_CreateBanner(id, smovie, sxmlPath, swidth, sheight)
{
  if (typeof(UFO) !== 'undefined')
  {
    var FO0 = 
      { 
      movie:smovie + "?xmlPath=" + sxmlPath, 
      width:swidth, 
      height:sheight,  
      majorversion:"8",  
      build:"0", 
      xi:"true",  
      wmode:"transparent" 
      };
    UFO.create(FO0, id);
  }
}


// Notify ScriptManager that this is the end of the script.
if (typeof(Sys) !== 'undefined') Sys.Application.notifyScriptLoaded();

