Can anyone pls explain what this procedure does?

i could only figure out that it will be performing a transpose.
create or replace
PROCEDURE TEST_TRANSPOSE(o_test OUT SYS_REFCURSOR) AS
report_exists number(3);
report_name varchar(30) := 'REPORT_TBL' ;
query_main varchar(16000) := 'create table ' || report_name || ' as select MAGAZINE ' ;
query_part varchar(1024) ;
my_var varchar2(5);
cursor cur_region is select distinct REGION from MAIN_TBL order by region;
begin
select count(*) into report_exists
from tab
where tname = report_name;
if ( report_exists = 1 ) then
execute immediate 'drop table ' || report_name ;
end if;
open cur_region ;
loop
fetch cur_region into my_var ;
exit when cur_region%NOTFOUND;
query_part := 'select nvl(sum(quantity),0) from MAIN_TBL x where x.magazine = main.magazine and x.region='''||my_var||'''' ;
query_main := query_main || chr(10) || ',(' || query_part || ')"' || my_var || '"';
end loop;
close cur_region ;
query_main := query_main || ' from (select distinct MAGAZINE from MAIN_TBL ) main' ;
DBMS_OUTPUT.PUT_LINE(query_main);
--execute immediate query_main ;
open o_test for query_main;
end;
{code}
i need to transpose  a table which has dynamic number of rows.This was what i tried.Could you pls bhelp me out to correct this i get "P_TRAN_YEAR" invalid identifier
[code]
create or replace
PROCEDURE         PRM_R_MAT_RPT (p_EmpID     IN  Integer,
P_TRAN_YEAR IN NUMBER,
P_TRAN_MONTH IN NUMBER,O_rc OUT sys_refcursor) IS
v_cnt NUMBER;
v_sql VARCHAR2(32767);
v_basic Number(16, 4);
BEGIN
select PPH_ORG_AMOUNT into v_basic from prm_p_hop
where pph_emp_id=p_empid
and pph_tran_year=p_tran_year
and pph_tran_month=P_TRAN_MONTH
and pph_hop_code=5
and PPH_SALARY_THRU='R';
-- SELECT  distinct count(*)
--  INTO v_cnt
--  FROM PRM_T_VAR_HOP
--  where PTVH_EMP_ID=p_EMPID
--  and PTVH_TRAN_YEAR=p_TRAN_YEAR
--  and PTVH_TRAN_MONTH=P_TRAN_MONTH;
v_sql := 'select  distinct PCH_SHORT_DESCRIPTION,v_basic,PTVH_AMOUNT Amount ';
--  FOR i IN 1..v_cnt
--  LOOP
v_sql := v_sql || ',max(decode(rn, PCH_SHORT_DESCRIPTION)) as description ';
--v_sql := v_sql || ',max(decode(rn, '||to_char(i)||', PDSL_INTEREST)) as interest'||to_char(i);
-- v_sql := v_sql || ',max(decode(rn, '||to_char(i)||', PDSL_PRINCIPAL_SALARY)) as principle'||to_char(i);
-- v_sql := v_sql || ',max(decode(rn, '||to_char(i)||', PDSL_SOCIETY_CODE)) as SOC_CODE'||to_char(i);
--  END LOOP;
v_sql := v_sql || ' from (select  PRM_T_VAR_HOP.*, PRM_C_HOP.*, row_number() over (partition by PTVH_EMP_ID order by PTVH_EMP_ID) as rn
from  
PRM_T_VAR_HOP,
PRM_C_HOP
WHERE PTVH_EMP_ID         =P_empid
And   PTVH_TRAN_YEAR      =P_TRAN_YEAR
And   PTVH_TRAN_MONTH     =P_TRAN_MONTH
And   PTVH_HOP_CODE       =PCH_HOP_CODE
AND   PCH_CALCULATION_BASIS=''V''
AND   PCH_TAG              =''C''
AND   PTVH_SALARY_THRU     =''R'')';
OPEN O_rc FOR v_sql;
END;
[/code]                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

Your first piece of code does not work, because a create table statement cannot be issued using a ref cursor like that. When executed with the "execute immediate" command, it works. Then, the refcursor is only a "select * from report_tbl".
What it does, is dynamically dropping and creating a table report_tbl and filling it with the results of a horribly inefficient pivot query. If the report_tbl has no other purpose after running this procedure, then I'd suggest to not drop and create tables dynamically like that. In the second variant of test_transpose, you can see how you can do that.
SQL> create table main_tbl (magazine,region,quantity)
  2  as
  3  select 'MAGAZINE1','REGION1',1 from dual union all
  4  select 'MAGAZINE1','REGION2',2 from dual union all
  5  select 'MAGAZINE1','REGION3',3 from dual union all
  6  select 'MAGAZINE2','REGION1',4 from dual union all
  7  select 'MAGAZINE2','REGION2',5 from dual union all
  8  select 'MAGAZINE2','REGION3',6 from dual
  9  /
Tabel is aangemaakt.
SQL> create or replace PROCEDURE TEST_TRANSPOSE(o_test OUT SYS_REFCURSOR)
  2  AS
  3    report_exists number(3);
  4    report_name varchar(30) := 'REPORT_TBL' ;
  5    query_main varchar(16000) := 'create table ' || report_name || ' as select MAGAZINE ' ;
  6    query_part varchar(1024) ;
  7    my_var varchar2(7);
  8
  9    cursor cur_region is select distinct REGION from MAIN_TBL order by region;
10  begin
11    select count(*) into report_exists
12    from tab
13    where tname = report_name;
14    if ( report_exists = 1 ) then
15    execute immediate 'drop table ' || report_name ;
16    end if;
17
18    open cur_region ;
19    loop
20      fetch cur_region into my_var ;
21      exit when cur_region%NOTFOUND;
22      query_part := 'select nvl(sum(quantity),0) from MAIN_TBL x where x.magazine = main.magazine and x.region='''||my_var||'''' ;
23      query_main := query_main || chr(10) || ',(' || query_part || ')"' || my_var || '"';
24    end loop;
25    close cur_region ;
26
27    query_main := query_main || ' from (select distinct MAGAZINE from MAIN_TBL ) main' ;
28    execute immediate query_main;
29    open o_test for 'select * from ' || report_name;
30  end;
31  /
Procedure is aangemaakt.
SQL> var rc refcursor
SQL> exec test_transpose(:rc)
PL/SQL-procedure is geslaagd.
SQL> print rc
MAGAZINE     REGION1    REGION2    REGION3
MAGAZINE1          1          2          3
MAGAZINE2          4          5          6
2 rijen zijn geselecteerd.
SQL> create or replace procedure test_transpose (o_test out sys_refcursor)
  2  as
  3    l_query varchar2(1000) := 'select magazine';
  4  begin
  5    for r in (select distinct region from main_tbl)
  6    loop
  7      l_query := l_query || ', sum(decode(region,''' || r.region || ''',quantity)) ' || r.region;
  8    end loop;
  9    l_query := l_query || ' from main_tbl group by magazine';
10    open o_test for l_query;
11  end;
12  /
Procedure is aangemaakt.
SQL> exec test_transpose(:rc)
PL/SQL-procedure is geslaagd.
SQL> print rc
MAGAZINE     REGION1    REGION2    REGION3
MAGAZINE1          1          2          3
MAGAZINE2          4          5          6
2 rijen zijn geselecteerd.Regards,
Rob.

Similar Messages

  • Can anyone tell me what this is doing

    hey this is part of some parser code from an earlier java forum post
    http://forum.java.sun.com/thread.jspa?threadID=506162&messageID=2399163#239 9163
    i modified the code slightly to work with my program which involves its use in an applet and to solve logical equations. However i'm still uncertain as to what certain sections of the code are doing
    i know that this code evaluates the variables within the given equation, begins a for loop that does not exit until i = codeSize which is the length of the given String. However i'm not so certain as to how it achieves this. I'd like to know
    private int eval(int variableX, int variableY, int variableZ)
                    try {
                            int top = 0;
                            for (int i = 0; i < codeSize; i++)
                                    if (code[i] >= 0)
                                            stack[top++] = constants[code];
    else if (code[i] >= POWER)
    int y = stack[--top];
    int x = stack[--top];
    int ans = (int)Double.NaN;
    switch (code[i])
    case PLUS: ans = x | y; break;
    case MINUS: ans = x & y; break;
    case TIMES: ans = x & y; break;
    case DIVIDE: ans = x / y; break;
    // case POWER: ans = Math.pow(x,y); break;
    if (Double.isNaN(ans))
    return ans;
    stack[top++] = ans;
    else if (code[i] == VARIABLEX)
    stack[top++] = variableX;
    else if (code[i] == VARIABLEY)
    stack[top++] = variableY;
    else if(code[i] == VARIABLEZ)
    stack[top++] = variableZ;
    /* else {
    double x = stack[--top];
    double ans = Double.NaN;
    int d;
    d = (int) ans;
    switch (code[i])
    case SIN: ans = Math.sin(x); break;
    case COS: ans = Math.cos(x); break;
    case TAN: ans = Math.tan(x); break;
    case COT: ans = Math.cos(x)/Math.sin(x); break;
    case SEC: ans = 1.0/Math.cos(x); break;
    case CSC: ans = 1.0/Math.sin(x); break;
    case ARCSIN: if (Math.abs(x) <= 1.0) ans = Math.asin(x); break;
    case ARCCOS: if (Math.abs(x) <= 1.0) ans = Math.acos(x); break;
    case ARCTAN: ans = Math.atan(x); break;
    case EXP: ans = Math.exp(x); break;
    case LN: if (x > 0.0) ans = Math.log(x); break;
    case LOG2: if (x > 0.0) ans = Math.log(x)/Math.log(2); break;
    case LOG10: if (x > 0.0) ans = Math.log(x)/Math.log(10); break;
    case ABS: ans = Math.abs(x); break;
    case SQRT: if (x >= 0.0) ans = Math.sqrt(x); break;
    case UNARYMINUS: ans = -x; break;
    if (Double.isNaN(ans))
    return d;
    stack[top++] = d;
    catch (Exception e)
    double b = Double.NaN;
    int i = (int)b;
    return i;
    } double d2;
    if (Double.isInfinite(stack[0]))
    d2 = Double.NaN;
    int i2 = (int) d2;
    return i2;
    }else
    return stack[0];
    any help much appreciated
    cheers
    podger

    Well this is a very basic interpreter. What this piece of code does is:
    1) take an opcode from the code array, and retrieves the description for it from the constants array. This description is stored in the stack array.
    stack[top++] = constants[code];
    2) check what opcode it is
    switch (code)
    3) "execute" the opcode with simple java math operators.
    case PLUS:    ans = x | y;  break;
    case MINUS:   ans = x & y;  break;
    case TIMES:   ans = x & y;  break;
    case DIVIDE:  ans = x / y;  break;4) store the result of the opcode in the stack array, after the description of the opcode retrieved in step 1)
    stack[top++] = ans;There is also some sort of error check in there: initially the result of the opcode is "NaN", (not a number). If the opcode passed to this code is not known, the result is not added to the stack according to this piece of code:
    if (Double.isNaN(ans))
    return ans;

  • Can anyone pls explain about SSR in WebdynPro application?

    Hi,
    Am having the webdynpro code.I that code they are having one onclik event.When they are clicking on that button link they are returning SSR.handle(parameters).But i cud not found the definition of SSR.handle(parameters) function.Can anyone pls explain what exactly SSR and where they have the definition of that function?
    Rgds,
    Murugag

    Hi,
      SSR or server side rendering is a location-independent rendering method of the Webdynpro framework.Because of the strict separation of layout and content, the framework supports location-independent rendering (client-side versus server-side rendering). In other words, depending on the capabilities of the client device, an HTML page can be rendered either on the server or the client.
      A simple browser (simple client) may not support client-side scripting or processing of XML transformations so this client may require that the server generate the HTML page before sending it to the browser. More powerful browsers (advanced clients) can inject the content into the page on the client using XML and JavaScript. This location independence is purely configuration driven and does not require modification to either the application code or the presentation code.
      Just verify if your browser is javascript enabled or not.
    Regards,
    Satyajit.
    Message was edited by: Satyajit Chakraborty

  • Can anyone tell me what this Time Machine error means? The network backup disk does not support the required AFP features?

    Can anyone tell me what this Time Machine error means? The network backup disk does not support the required AFP features?

    AFP - Apple Filing Protocol
    The Network Attached Storage (NAS) that you are pointing Time Machine at does not have the features needed by Time Machine in order to do its Thing.  Time Machine needs some specific features that are not typically available on generic networked storage devices.
    There are manufactures that support the Mac OS X HFS+ file system formats and implement all the needed AFP protocol packets necessary so that they can be used with Time Machine, but apparently yours does not.
    If you are not using a networked mounted volume for Time Machine, then more information will be needed about your Time Machine setup.

  • Can anyone kindly explain what mutative triggers are in Oracle?

    hi
    Can anyone kindly explain what mutative triggers are in Oracle with example?
    what is frag in oracle?

    Oracle raises the mutating table error to protect you from building in-deterministic software.
    Let’s explain that with a very simple example. Here’s a simple EMP-table:
    ENAME      SAL
    ======     ====
    SMITH      6000
    JONES      4000Let’s suppose you have a business rule that dictates that the average salary is not allowed to exceed 5000. Which is true for above EMP-table (avg. SAL is exactly 5000).
    And you have (erroneously) built after-row triggers (insert and update) to verify this business rule. In your row trigger you compute the average salary, check it’s value and if it’s more than 5000 you raise an application error.
    Now you issue following DML-statement, to increase the salary of employees earning less than the average salary, and to decrease the salary of employees earning more than the average salary.
    Update EMP
    Set SAL = SAL + ((select avg(SAL) from EMP) – SAL)/2;The end result of this update is:
    ENAME      SAL
    ======     ====
    SMITH      5500
    JONES      4500Note that the business rule is still OK: the average salary still doesn’t exceed 5000. But what happens inside your row-trigger, that has a query on the EMP-table?
    Let’s assume the rows are changed in the order I displayed them above. The first time your row trigger fires it sees this table:
    ENAME      SAL
    ======     ====
    SMITH      5500
    JONES      4000The row trigger computes the average and sees that it is not more than 5000, so it does not raise the application error. The second time your row trigger fires it sees the end result.
    ENAME      SAL
    ======     ====
    SMITH      5500
    JONES      4500For which we already concluded that the row-trigger will not raise the application error.
    But what happens if Oracle in it’s infinite wisdom decides to process the rows in the other order? The first time your row trigger executes it sees this table:
    ENAME      SAL
    ======     ====
    SMITH      6000
    JONES      4500And now the row-trigger concludes that the average salary exceeds 5000 and your code raises the application error.
    Presto. You have just implemented indeterministic software. Sometimes it will work, and sometimes it will not work.
    Why? Because you are seeing an intermediate snapshot of the EMP-table, that you really should not be seeing (that is: querying).
    This is why Oracle prevents you from querying the table that is currently being mutated inside row-triggers (i.e. DML is executed against it).
    It’s just to protect you against yourself.
    (PS1. Note that this issue doesn't happen inside statement-triggers)
    (PS2. This also shows that mutating table error is really only relevant when DML-statements affect more that one row.)
    Edited by: Toon Koppelaars on Apr 26, 2010 11:29 AM

  • Can anyone pls explain

    Can anyone pls explain this part of the code.
    DateFormat dateFormat = new SimpleDateFormat ("MM/dd/yyyy");
    Date birthDate = dateFormat.parse (birthDateString);
    Calendar day = Calendar.getInstance();
    day.setTime (birthDate);
    int day   = day.get (Calendar.DAY_OF_MONTH);
    int month = day.get (Calendar.MONTH);
    int year  = day.get (Calendar.YEAR);

    Well, read my comments prior to each statement below...
    You should also consider reading the API docs for the used classes, if you need more details...
    // Crate a new DateFormatObject for formatting dates according to the specified pattern
    DateFormat dateFormat = new SimpleDateFormat ("MM/dd/yyyy");
    // Parse the provided String into a Date object
    // Note that if the String does not provide for a valid Date you'll get an exception
    Date birthDate = dateFormat.parse("30/08/1980");
    // Get a new calendar instace
    Calendar day = Calendar.getInstance();
    // Reset the date in the calendar to the newly created date object
    // Now the calendar represents the date in the day object
    day.setTime (birthDate);
    // Get the day of the month from the calendar
    // Note that your code snippet contained int day = ... this will cause an exception as day was already
    // defined!
    int d = day.get (Calendar.DAY_OF_MONTH);
    // Get the month of the year from the calendar
    // Note that Jan will be returned as 0, so if you have to add one to the retrieved month value
    int m = day.get (Calendar.MONTH);
    // Get the year from the calendar
    int y = day.get (Calendar.YEAR);Hope that helps...

  • My imac will not load after I enter my password. The only thing I get is the arrow from my mouse on top of a blank white screen.  Can anyone tell me what this is?  I've restarted and turned off several times.  I left it on in this state for 8 hours and

    My imac will not load after I enter my password. The only thing I get is the arrow from my mouse on top of a blank white screen.  Can anyone tell me what this is?  I've restarted and turned off several times.  I left it on in this state for 8 hours hoping it would reload and work.  No luck.

    Hello KCC4ME,
    You may try booting your Mac in Safe Boot, as it can resolve many issues that may prevent a successful login.
    OS X: What is Safe Boot, Safe Mode?
    http://support.apple.com/kb/HT1564
    If a Safe Boot allows you to successfully log in, you may have issues with one or more login itmes (while the following article is labelled as a Mavericks article, it is viable for earlier versions of the Mac OS, as well).
    OS X Mavericks: If you think you have incompatible login items
    http://support.apple.com/kb/PH14201
    Cheers,
    Allen

  • Can you tell me what this code does?

    Can you tell me what this code does?
    import java.io.*;
    class Assignment1
    public static String[][] tdi = {     {"Paris", "418", "Rome", "55"},
                             {"Liverpool", "121", "Copenhagen", "35"},
                             {"Liverpool", "418", "Paris", "50"},
                             {"Liverpool", "553", "Frankfurt", "55"},
                             {"Frankfurt", "553", "Budapest", "50"},
                             {"Amsterdam", "121", "Madrid", "65"},
                             {"Amsterdam", "418", "Paris", "35"},
                             {"Madrid", "121", "Stockholm", "90"},
                             {"Budapest", "553", "Warsaw", "30"},
                             {"Copenhagen", "121", "Amsterdam", "35"},
                             {"Rome", "418", "Amsterdam", "60"},
    //--Start Method--
    public static void main( String args[] ) throws IOException
    System.out.println("Welcome to NoWings Airline.");
    InputStreamReader input = new InputStreamReader(System.in);
    BufferedReader keyboardInput = new BufferedReader(input);
    System.out.println("Please enter the airport you wish to depart from:");
    String[] info = TDIDLL.searchDest( keyboardInput.readLine() );
    if (info == null)
    System.out.println("Sorry, no plane to this destination");
    else
    System.out.println(info[0]+" departing at platform "+info[1]); }}
    public static String[] searchDest( String dest )
    String[] result = null;
    for(int i = 0; i < tdi.length; i++)
         if (tdi[1].equals(dest)) {
         result = new String[2];
         result[0] = tdi[i][0];
         result[1] = tdi[i][2];
         return result;
    return result; }
    // Info Method //
    // Fly Method //
    // Exit Method //
    Thanks. Also, can you tell me where I have gone wrong in the code.
    Much appreciated.

    Can you tell me what this code does?Why don't you run it and find out for yourself?

  • Hi I am using iphone 4, since last few days i am facing problem in touch screen at times it doesn't work at all for 5-10 mins and then it works out itself. Can anyone pls suggest what the problem is and how it can be sorted out?

    Hi I am using iphone 4, since last few days i am facing problem in touch screen at times it doesn’t work at all for 5-10 mins and then it works out itself. Can anyone pls suggest what the problem is and how it can be sorted out?

    Did you recently updated to 7.0.4? Even for me same also issues.

  • Can anybody pls explain me this Reflections stuff?

    Hi All
    Can anybody pls explain me this Reflections stuff? is this related to singletons in java

    Maybe you could give us a bit more information where
    you need help, for all full coverage i suggest the tutorial too.

  • Can anyone tell me what this error means?

    Hi All
    The following error was encountered by a printer who has opened a supplied PDF in Acrobat, Saved it as a postscript and then run it through distiller server 6. Can anyone tell me what this error means and what sort of things can cause it?
    %%[ Error: syntaxerror; OffendingCommand: ! ]%%
    Stack:
    /PaintProc
    5.32031
    /YStep
    258.404
    /XStep
    [257.404 5.32031 258.404 5.32031]
    /BBox
    1
    /TilingType
    1
    /PaintType
    1
    /PatternType
    -mark-
    -mark-
    -mark-
    -save-
    %%[ Flushing: rest of job (to end-of-file) will be ignored ]%%
    %%[ Warning: PostScript error. No PDF file produced. ] %%

    Something to do with software from wireless.umass.edu.

  • Hi can anyone pls Explain On Pragma Serially Reuseable?

    Hi!
    Can anyone pls tell me what exactly we can achieve through Pragma Serially Reuseable? Pls, provide some example solution with bussiness requirement. When you should use this? Thanks in advance.
    Regards.
    Satyaki De.

    Hi!
    Thanks - i've tested it and i'm pasting it what i've done.
    Use of Pragma Serially Reusable
    SQL> CREATE OR REPLACE PACKAGE Sr_pkg IS
      2  PRAGMA SERIALLY_REUSABLE;
      3  n NUMBER := 5;
      4  END Sr_pkg;
      5  /
    Package created.
    SQL> set serveroutput on
    SQL>
    SQL> BEGIN
      2  Sr_pkg.N := 10;
      3  DBMS_OUTPUT.PUT_LINE(Sr_pkg.N);
      4  END;
      5  /
    10
    PL/SQL procedure successfully completed.
    SQL> BEGIN
      2  DBMS_OUTPUT.PUT_LINE(Sr_pkg.N);
      3  END;
      4  /
    5
    PL/SQL procedure successfully completed.Without use of Pragma Serially Reusable
    SQL> CREATE OR REPLACE PACKAGE Sr_pkg IS
      2  n NUMBER := 5;
      3  END Sr_pkg;
      4  /
    Package created.
    SQL> set serveroutput on
    SQL>
    SQL> BEGIN
      2  Sr_pkg.N := 10;
      3  DBMS_OUTPUT.PUT_LINE(Sr_pkg.N);
      4  END;
      5  /
    10
    PL/SQL procedure successfully completed.
    SQL> BEGIN
      2  DBMS_OUTPUT.PUT_LINE(Sr_pkg.N);
      3  END;
      4  /
    10
    PL/SQL procedure successfully completed.Regards.
    Satyaki De.

  • Can anyone tell me what this string is in the server permissions?

    Can anyone tell me what the character sting is third from the top?
    This is taken from the server app < select the server < storage < then edit permissions.
    I feel like this is something simple, but all of my searches have turned up nothing.
    Any insight would be greatly appreciated,
    -Tom

    I have recently deleted a user.
    Can I remove them from the ACL with no effect to the system?
    Is there a more efficient way to do that rather then by each individual folder and file?
    Thank you,
    -Tom

  • Can anyone tell me what this javascript is

    The following  script is at the top of  the code for my index page, can anyone tell me what it is for and can I deletye it.
    <script type="text/JavaScript">
        <!--
        function MM_preloadImages() { //v3.0
        var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
        var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
        if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
        function MM_findObj(n, d) { //v4.01
        var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
        d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
        if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
        for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
        if(!x && d.getElementById) x=d.getElementById(n); return x;
        function MM_nbGroup(event, grpName) { //v6.0
        var i,img,nbArr,args=MM_nbGroup.arguments;
        if (event == "init" && args.length > 2) {
        if ((img = MM_findObj(args[2])) != null && !img.MM_init) {
        img.MM_init = true; img.MM_up = args[3]; img.MM_dn = img.src;
        if ((nbArr = document[grpName]) == null) nbArr = document[grpName] = new Array();
        nbArr[nbArr.length] = img;
        for (i=4; i < args.length-1; i+=2) if ((img = MM_findObj(args[i])) != null) {
        if (!img.MM_up) img.MM_up = img.src;
        img.src = img.MM_dn = args[i+1];
        nbArr[nbArr.length] = img;
        } else if (event == "over") {
        document.MM_nbOver = nbArr = new Array();
        for (i=1; i < args.length-1; i+=3) if ((img = MM_findObj(args[i])) != null) {
        if (!img.MM_up) img.MM_up = img.src;
        img.src = (img.MM_dn && args[i+2]) ? args[i+2] : ((args[i+1])? args[i+1] : img.MM_up);
        nbArr[nbArr.length] = img;
        } else if (event == "out" ) {
        for (i=0; i < document.MM_nbOver.length; i++) {
        img = document.MM_nbOver[i]; img.src = (img.MM_dn) ? img.MM_dn : img.MM_up; }
        } else if (event == "down") {
        nbArr = document[grpName];
        if (nbArr)
        for (i=0; i < nbArr.length; i++) { img=nbArr[i]; img.src = img.MM_up; img.MM_dn = 0; }
        document[grpName] = nbArr = new Array();
        for (i=2; i < args.length-1; i+=2) if ((img = MM_findObj(args[i])) != null) {
        if (!img.MM_up) img.MM_up = img.src;
        img.src = img.MM_dn = (args[i+1])? args[i+1] : img.MM_up;
        nbArr[nbArr.length] = img;
        //-->
        </script>

    It's standard boilerplate javascript inserted by Dreamweaver when you add behaviors to your page. The block you posted contains three function definitions. The first covers preloading images (function MM_preloadImages), the second is what you need when an event in one place affects something in another (function MM_findOb) place on your page, and the third is for managing a group of checkboxes (function MM_nbGroup) I think!
    To say whether you could delete them or not, we would have to see the rest of your page to see if you are using any behaviors that might require those functions.

  • Can anyone tell me what this Error Code is??

    I just recently started having my computer go to sleep on me every so many seconds out of nowhere and i have tried everything i know of to fix it. I ran the apple hardware test and got this error..
    4mot/1/400000002: CPU-0
    can anybody tell me what this means?????

    Just FYI, a 4MOT error code indicates a problem with one of the fans. My guess is that the CPU fan has failed and the CPU is overheating. A trip to the Apple Store is definitely called for.
    Regards.

Maybe you are looking for

  • What are the Uses of Revision Level

    Dear All, I have been searching for articles pertaining to "Revision Level" in the Material Master Record and found out that revision level is used purposely in Engineering Change Management and Document Management System. Is this true? I want to kno

  • Adobe Premier Elements 13 Missing VBR 2 Pass

    I recently just got Adobe Premier Elements 13, I've used Elements 11 and 12 prior. In the past versions I am able to select VBR 2-Pass rendering export for H.264 videos.  Now, however, in this new version I only have the option of CBR or VBR, 1 Pass.

  • Installation Problems With Photoshop CS3

    I had to reinstall Photoshop CS3 on my current MacBook Pro running OS X 10.5.6. When trying to re-install using the original full version disk I received the following error: JavaScript Alert Critical errors were found in setup -The installer databas

  • Boothcamp

    I am trying to install windows on my macbook pro after i did a clean installation  due to upgrade from osx 10.6 to osx 10.7. the message i get from booth camp is 'The startup disk cannot be partitioned or restored to a single partition'.i formatted w

  • Wrong journal on Sales Return, how to correct it.

    Hi all, When create the Sales Return, produce the wrong journal : Variance HPP   (DB) COGS               (CR) It should be: Inventory           (DB) COGS                (CR) How to correct it ? If we use JE to reclass it, it will cause not match betw