﻿// JScript File

function GotoHomePage()
{
//    var Argumentos = new Array("a", "b");
//    //damos la configuracion a la pagina que se ha de abrir
//    //usamos esto para asegurarnos que la pagina destino se refresque 
//    var ran =Math.random()*4;
//    var ConfiguracionPagina = 'center:yes;resizable:no;help:no;status:no;dialogWidth:315px;dialogHeight:175px';
//    var Pagina = 'ATADM_MensajeError.aspx?rn='+ ran;
//    // aqui hacemos que la pagina que se abra no sea totalmente independiente
//    // sino que funcione al tipico estilo de los "child forms"
//    // se espera a que esta pagina retorne un determinado valor(como un arreglo) 
//    // Nota: Las dos paginas padre.aspx y contactos.aspx estan en el mismo directorio
//    Argumentos = window.showModalDialog(Pagina, Argumentos, ConfiguracionPagina);

	//window.showModalDialog("ATADM_MensajeError.htm",window,"dialogwidth:315 px; dialogheight:175 px; status:no; resizable: Yes");
	
	parent.window.document.forms[0].submit();
	
}

function GotoPage(pagename, ontop)
{


    parent.window.open(pagename,"","",true);
    //window.open(pagename,ontop);

}
    

function MaximizeWindow()
    {
    
        window.moveTo(0,0)
        top.window.resizeTo(screen.availWidth,screen.availHeight); 
        
    }


      
function onOk()
    {
       // var fieldname = document.getElementById("QWebErrorMsg1_cmdfieldid");
       //window.alert(" Hello ");
        
       var fieldname = document.getElementById("CDMERRORMSG");
       if (fieldname == null)
        {
             //window.alert("CDMERRORMSG not found");
             return;
        }
        
       //window.alert(fieldname.value);
        
        if (fieldname.value == "")
            return;
    
         var fx = document.getElementById(fieldname.value);
         if (fx == null)
         {
             window.alert("Field:" + fieldname.value + " not found ");
             return;
         }
         
         // SELECT FIELD AND SETFOCUS   
         fx.select();
         fx.focus();
    
    }
    
    function MyFocus()
    {
        window.document.focus();
        
    }


function ShowMyModalPopup(customerid) 
{ 
 var modal = $find('ModalPopupExtender1'); 
 modal.show(); 
// WebService.FetchOneCustomer(customerid,DisplayResult); 
}

function HideModalPopup() 
{ 
  var modal = $find('ModalPopupExtender1'); 
  modal.hide(); 
}


function DivOnClick()
{

}

function VDMSelectRow(e) {
    alert("Hello");
}

