Javascript OnUnload

Hi experts,
i want to have an OnUnload event within my BSP
but I only know a OnLoad attribut in the <htmlb:documentBody>.
Is it possible to do a OnUnload?
For example: "Do you really want to leave this page?" -Yes-No Case (I'm familiar with the JS Part)
kind regards
Marcus

Hi everyone,
now the problem is solved.
I did it with an iFrame on an normal html-site.
<htmlb:content design="design2003">
    <htmlb:document>
        <htmlb:documentHead>
                <SIEHTMLB:textEditHeader/>
                <script language="JavaScript">
                    var needToConfirm = true;
                    window.onbeforeunload = confirmExit;
                    function confirmExit()
                       if (needToConfirm)
          return "This will close the application!";
                </script>
        </htmlb:documentHead>
        <htmlb:documentBody>
            <iframe src="main.do"
name="NameApplication" width="100%" height="100%" marginheight="0" marginwidth="0" align="center">
<p>Your Browser cannot show embedded Frames</p>
            </iframe>
        </htmlb:documentBody>
       </htmlb:document>
</htmlb:content>
Thats all --- Thanks for every answer!
Regards,
Marcus
Message was edited by: Marcus Pohl

Similar Messages

  • JavaScript onunload problems in Mavericks

    I use an HTML/JavaScript launcher whenever I open a new window in Safari:
    http://iuseacomputer.tumblr.com/post/22426730817/update-safari-launcher
    The idea is that it starts as a small, minimalistic window, and when I type in a URL or do search, it automatically expands the window to a good size. I've been using this every day for more than a year and it's really handy, but since today when I installed Mavericks the JavaScript onunload function doesn't work when I type a URL and press enter. So, it loads the next page, but it doesn't resize the window to full-size anymore. Any ideas? It is definitely related to my Mavericks update, but is there a better forum I could ask this?

    I saved the html & opened it locally - the small window changed to a larger one after clicking Go : this on Mavericks & Safari 7. Same thing happened when it was set as the homepage. Obviously not for you, so try a new or Guest user account.

  • Submit processing with javascript "onUnload" event

    Hi there,
    I want a page to save its state regardless of how the user exits the page. Using page tabs, which have direct URLs, it seems the only way to do this is to use a javascript "onUnload" event which calls doSubmit(). The problem with this is that the submission requires a branch. Obviously, I don't want to branch the page; a destination has already been set. Telling the branch the is impossible as there is no way to access the destination URL for an onUnload event (understandably; it would be a serious breach of privacy.)
    So, the question I have is: is there any way to get a call to doSubmit() (or similar) to process the page, but not branch afterwards?
    Many thanks,
    Robert

    Robert,
    Take a look at the following thread -
    Re: clean page items when user leaves a page
    Whilst that thread deals with clearing items when the user leaves a page, it illustrates the issues of trying to capture the event of the user 'leaving' the page (after all 'leaving the page' could mean that they navigate to Google instead).
    An alternative way would not to try and capture the 'leaving event' but to store the values in session state automatically (perhaps using some of Carl's Ajax examples) when the user types them in, then have an application process that runs on every page that determines whether those values need to be written to the database or not.
    As an aside...I've heard of this requirement coming up quite a few times and I always question the logic behind it....since for every method that you can come up with as a way of forcing my input to be saved, I can come up with a way that will prevent it from working....until eventually we just reach the stage where I stand up and switch the machine off ;)

  • Multiple User Accessing the same record issue

    I am planning to design an app where we have the following use case requirement.
    If a user who is logged into the system is accessing a record(plan in this case) anyone else who is logged into the system at the same time should be locked out of that same plan but should still be able to access other plans in the system. A plan has many things associated with it so the 2nd user should be locked out of everything associated to the plan being accessed by the first user.
    What is the best way to implement this at the application or the database level?
    Here are some options we have been bouncing around.
    1. When the first user logs in and accesses the first plan we lock the plan at the app level using a singleton class which has one and only one instance on the app server. The plan_id can be put as an entry into a hashtable which can be in the session and is created if one does not exist. When the 2nd user tries to access the same plan, since the plan_id is still in the hashtable he would be locked out. However we somehow need to timeout the first user after 30 mts of inactivity or so so that others can access the plan and are not locked out for ever if the first user walks away from his PC or does not close his browser, thus keeping his session alive indefinitely.
    2. In the database in the plan table we add a column for 'locked'. When the first entry is created in the plan table locked column is marked as 'yes' or 1 and when the user closes the browser we use some javascript to trigger an event which changes that 'yes' or 1 to 'no' or 0 thus unlocking the plan. However the big issue we see in this concept is that we will have to put a javascript onUnload method in all jsp pages in the app because the user could be anywhere in the app after starting his plan access after login.
    Conceptually the 2 options are the same but one is done at the app whereas the other is at the database level.
    Is there a better way to handle this scenario using transactions or some other technological option.
    Thanks

    Another solution involving no modification of the database structure:
    As soon as a user want to access a plan, try to UPDATE the plan record... if it fails, the record was locked
    by another user before. When the user has finished with the plan, you can COMMIT or ROLLBACK the changes, which will free the lock for other users.
    An advantage of this solution is that if program crashes unexpectedly, there will automatically be a ROLLBACK.
    Of course, you need a transaction for this... and perhaps more if you want to separate the 'locking transaction' (virtual update just for restricting access) from the 'operating transaction' (in which you will
    do the DB stuff: inserts, updates, deletes, etc.)
    Hope this helped,
    Regards.

  • How to restrict a user to login twice

    hei evryone!
    Here's my prob... I need to restrict a user to login more than once meaning, if a certain user account is currently login , that account cannot be used concurrently using another window or machine... If another user attempts to login, using that same account an error message will be displayed saying "this user account is already logged in".. i tried to do this in javascript but the code that i've got only works for IE and its kinda hard to capture the event for closing window.. plus using onunload is not advisable with my situation since my webpage can be redirected to other codes meaning the cause of unloading the page could either be closing the browser or redirecting the window to another page such as window.location="anothercode.jsp";... I was wondering if there's a way to do this in jsp...
    Any suggestions, ideas, or sample codes would be deeply appreciated. Thanks in advance!
    btw, i need to generate a code that is cross browser.. What i really need to accomplish is to be able to determine when the browser is closed either by clicking the X button on the window, alt f4 or my own close button and not when the page is unloaded.
    Here's a sample code : This only works in IE =(
    ---------- default.jsp-------------------------
    <html>
    <head>
    <script language="Javascript">
         onunload=function(e) {      
         winX = navigator.appName=="Microsoft Internet Explorer" ? window.event.clientX : e.screenX;
         winY =navigator.appName=="Microsoft Internet Explorer" ? window.event.clientY :e.screenY;
    if (winX<0 && winY<0)
              // redirect to logout.jsp n do some stuff
    </script>
    </head>
    <body>
    Logout
    List
    View Schedules
    </body>
    </html>
    the default screen would be the code above: "default.jsp" wherein there are many ways that the page
    can be unloaded such as :
    - clicking the logout link
    - click the View Schedules
    - click the x button the left side of the window
    - alt f4
    - if the window is minimized , right click then select close option
    Now, what i needed to do is to determined when the browser is closed so i reset the login flag of the account and can be used later on.

    hei everyone!
    im tryin to resolve this prob by adding a session id field on the users table. Everytime a user logs in i will update the session id field so that if anyone attempts to use the same account i will redirect the later into the login page with a warning msg. I'll do this by comparing the session id that u got from the dbase and the session id from request.getSessionId() of the browser. However, my prolem now is how to cleanup my database.. i need the cleanup coz i have a user tracking screen wherein i cud show who's account are login n who's not. I have created an applet and embed it in all of jsp files so that i cud catch the event for closing window whether by using the x button of the window or a power intrerruption. However, i need to find a way where i cud determine whether the event was really a close window or just a redirection from another page. I mean , you could leave the page either by viewing another screen or by actually closing the window.. For instance, my main page has main menu which are (1) View Users and (2) View Schedule .By default, im in the "View Users" screen . These two menus have their corresponding jsp n both jsp files have an embeded applet. So if the user click the "View Schedules " screen or if the user chooses to click the logout button or window's x button to exit the browser, then the applet will call the stop method. This what i meant by how will i determine if the user really exits on my application or not.. Coz if the user clicks from one screen to another then, user actually does not leave my application the user only exit on my application if the user logs out or close the window..
    Please help me out on this matter... Thanks in advance!

  • Flash Player 9 and IE don't play nice

    If you have a Flash movie with external calls, it crashes
    when you try to navigate to another web page. You will receive an
    'Out of Memory' error. This seems to be a problem with the way
    Flash Player 9 handles the unload Handler when the web page's
    javascript onUnload event is fired.
    I have experiened this with both IE6 and IE7 RC1.
    Has anyone else experienced this problem?

    I came accross the same problem.
    As of today, the only source I could find that addresses the
    issue is:
    http://blog.deconcept.com/2006/05/18/flash-player-bug-streaming-content-innerhtml-ie/#comm ent-14544
    but their solution doesn't appear to be working reliably enough. I
    am still getting "Out of Memory at line:56" errors even when I use
    the suggested workaround.
    I hope that the next version of the Flash Player will include
    a fix for this.

  • Handling logout and window close

    How can I do to invalidate the session when user closes the browser windows. Invalidating session is done in logout.jsp page? Thanks and excuse me for my english!!

    The server has no way of telling if a browser window is open or closed. All it can say is the last time it received a communication from it.
    A session will invalidate itself after a timeout (standard 30 minutes).
    The most common solution is to use a javascript onUnload event to pop up a new window and go to the logout.jsp page. Its been discussed several times on this forum

  • Servlet to detect browser closing

    if a user closes a browser instead of clicking on something like "logout", then, how the servlet can detect that the user exits out the application, and update the database accordingly, for example, the time the user spent for that application?
    i tried to use javascript, onunload, but it will trigger every back, refresh, and any link clicking event. so i'm wonder, if there's a way a servelet can detect it directly.
    thanks a lot.
    cc

    The design is shaky at best, too.
    The idea that somebody who logs on to the application and then closes the browser 10 minutes later, actually spent 10 minutes on the application, is hard to support. It's also possible they spent 9 of the minutes checking their e-mail in a different browser window, then closed all the windows.

  • Onunload event in javascript

    I want the user to log off as soon as the browser is closed..
    For it i m firing an onunload event in the body tag..
    this thing is working fine in Windows XP but not in 2000
    My code is
    function closeWindow()
    if(boolCloseWindow != "false")
    document.frmChgPwd.requestid.value = "LGF000";
    document.frmChgPwd.submit();
    return false;
    I m calling this function like this
    <body onunload="return closeWindow()">
    boolCloseWindow is a flag that i m setting to check some conditions
    when i call this event a requestid is set and the form is submitted to a servlet where the servlet does the task of deleting the record from the database.
    but its not working in Windows 2000
    please help

    Dear Professional,
    Good Morning. Are you looking for CMM Level - 5 or onsite oppertunity. Here are the correct match for you. Just send your updated profile to this id: [email protected]
    Also do let us know, if any of your friends intrested for this oppertunity.
    Regards,
    Swathi.

  • Unknown problem with JSP, JavaScript - Pls help

    Hi Friends,
    I am facing a strange problem. Explained it below. Kindly help me as it is really affecting my work. Thanks in advance.
    I am working on building a web application using jsp, servlet, ejb. the IDE used is WSAD 5.1.2.
    I have the below :
    1 JSP - Input page - for user input entry
    2. Java script1 - For all client side validations
    Java script2 - For handling the data submission to servlet (as selected by user)
    Javascript3 - Header & Menu Bar
    3 Servlet - This actually retrieves the values from the hidden parameters, sets them in session and redirects the control back to the jsp.
    Logic for one small iteration : Two drop downs are there. On selecting the first drop down the second drop down should be populated and the first drop down should display the user selected value.
    1. When the user selects the first drop down onchange() event gets fired which calls a method in the javascript.
    2. In the javascript I set the value of a hidden form field to the selected combo index and submit the form to the servlet
    3. In the servlet, I retrieve the hidden request parameter (Index),
    set the index in session. Do my business logic based on the value of the index. Set the collection (to be displayed) in second drop down in session.
    4. Send the response back to the JSP.
    5. In the JSP, we have a method which is called during the onload() event of the body
    6. This method sets the user selected values in appropriate controls(by taking from session)
    Problem faced: I have a javascript which creates the menu bar for my application and this i've included it in my jsp. I dont know whats wrong with this javascript, when it is commented out the page works perfectly fine. Both the user selected value and the collection are loaded exactly as expected. But when it is included the collection is loaded in the second drop down but the selected index of the first drop down is not set - the drop down gets reset to the default value.
    Also on body load of my jsp, I call a javascript method which sets the current date in one text field of my form. Even this is not working fine when I include this javascript. I don't see any script error in this javascript in my browser though. Strange but guess something basic :(
    I'm sure there is nothing to do with session. I've tried printing the entire flow. The Servlet sets the values correctly in session and they are also correctly available in the JSP page. The JSP also gets loaded with the user selected values but something happens on page load which clears the values to default.
    Am also confused in what way javascript is related to this, coz when I remove it things are working fine.
    Am really helpless here pls do the needful. any help is appreciated.
    Header.js [which includes the menu bar code]
    document.write("<!-- COMMON HEADER CODE -->")
    document.write("     <table id='mplPageHeader' cellspacing='0' cellpadding='2' border='0'>")
    document.write("          <tr> ")
    document.write("               <td rowspan='2' bgcolor='#FFFFFF' width='1%'>")
    document.write("                    <a href='http://www.web.com' target='_top'>")
    document.write("                         <img src='./images/ford.gif' alt='BLogistics' border='0'>")
    document.write("                    </a>     ")
    document.write("               </td>")
    document.write("               <td rowspan='2' class='appTitle' title='Mp' width='1%'>MP&L</td>")
    document.write("               <td class='appTitle' title='M R'>M R</td>")
    document.write("               <td class='pageIdentifier'>"+' '+"</td>");
    document.write("          </tr>")
    document.write("          <tr>")
    document.write("               <td class='pageTitle' nowrap></td>");
    document.write("               <td class='dateInfo' nowrap>Thu Jan 22 2004 12:24 PM</td>")
    document.write("          </tr>")
    document.write("     </table>")
    document.write("<!-- Display Menu Items -->")
    document.write("<div id='navigationMenu'>")
    document.write("     <script type='text/javascript' src='./javascript/MRmenuItem.js'></script>")
    document.write("     <script type='text/javascript' src='./javascript/menuScript.js'></script>")
    document.write("</div>")-------------------------------------------------------
    Menu Bar Code
    var AgntUsr=navigator.userAgent.toLowerCase();
    var AppVer=navigator.appVersion.toLowerCase();
    var DomYes=document.getElementById?1:0,NavYes=AgntUsr.indexOf("mozilla")!=-1&&AgntUsr.indexOf("compatible")==-1?1:0,ExpYes=AgntUsr.indexOf("msie")!=-1?1:0,Opr=AgntUsr.indexOf("opera")!=-1?1:0;
    var DomNav=DomYes&&NavYes?1:0,DomExp=DomYes&&ExpYes?1:0;
    var Nav4=NavYes&&!DomYes&&document.layers?1:0,Exp4=ExpYes&&!DomYes&&document.all?1:0;
    var MacCom=(AppVer.indexOf("mac")!= -1)?1:0,MacExp4=(MacCom&&AppVer.indexOf("msie 4")!= -1)?1:0,Mac4=(MacCom&&(Nav4||Exp4))?1:0;
    var Exp5=AppVer.indexOf("msie 5")!= -1?1:0,Fltr=(AppVer.indexOf("msie 6")!= -1||AppVer.indexOf("msie 7")!= -1)?1:0,MacExp5=(MacCom&&Exp5)?1:0,PosStrt=(NavYes||ExpYes)&&!Opr?1:0;
    var RmbrNow=null,FLoc,ScLoc,DcLoc,SWinW,SWinH,FWinW,FWinH,SLdAgnWin,FColW,SColW,DColW,RLvl=0,FrstCreat=1,Ldd=0,Crtd=0,IniFlg,AcrssFrms=1,FrstCntnr=null,CurOvr=null,CloseTmr=null,CntrTxt,TxtClose,ImgStr,ShwFlg=0,M_StrtTp=StartTop,M_StrtLft=StartLeft,StaticPos=0,LftXtra=DomNav?LeftPaddng:0,TpXtra=DomNav?TopPaddng:0,FStr="",M_Hide=Nav4?"hide":"hidden",M_Show=Nav4?"show":"visible",Par=MenuUsesFrames?parent:window,Doc=Par.document,Bod=Doc.body,Trigger=NavYes?Par:Bod;
    var Ztop=100,InitLdd=0,P_X=DomYes?"px":"";
    var OpnTmr=null;
    if(PosStrt){if(MacExp4||MacExp5)LdTmr=setInterval("ChckInitLd()",100);
              else{if(Trigger.onload)Dummy=Trigger.onload;
                   if(DomNav)Trigger.addEventListener("load",Go,false);
                   else Trigger.onload=Go}}
    function ChckInitLd(){
         InitLdd=(MenuUsesFrames)?(Par.document.readyState=="complete"&&Par.frames[FirstLineFrame].document.readyState=="complete"&&Par.frames[SecLineFrame].document.readyState=="complete")?1:0:(Par.document.readyState=="complete")?1:0;
         if(InitLdd){clearInterval(LdTmr);Go()}}
    function Dummy(){return}
    function CnclSlct(){return false}
    function RePos(){
         FWinW=ExpYes?FLoc.document.body.clientWidth:FLoc.innerWidth;
         FWinH=ExpYes?FLoc.document.body.clientHeight:FLoc.innerHeight;
         SWinW=ExpYes?ScLoc.document.body.clientWidth:ScLoc.innerWidth;
         SWinH=ExpYes?ScLoc.document.body.clientHeight:ScLoc.innerHeight;
         if(MenuCentered.indexOf("justify")!=-1&&FirstLineHorizontal){
              ClcJus();
              var P=FrstCntnr.FrstMbr,W=Menu1[5],a=BorderBtwnMain?NoOffFirstLineMenus+1:2,i;
              FrstCntnr.style.width=NoOffFirstLineMenus*W+a*BorderWidthMain+P_X;
              for(i=0;i<NoOffFirstLineMenus;i++){
                   P.style.width=W-(P.value.indexOf("<")==-1?LftXtra:0)+P_X;               
                   if(P.ai&&!RightToLeft)
                        P.ai.style.left=BottomUp?W-BorderColor-2+P_X:W-Arrws[4]-2+P_X;
                        P=P.PrvMbr
         StaticPos=-1;
         ClcRl();
         if(TargetLoc)ClcTrgt();ClcLft();ClcTp();
         PosMenu(FrstCntnr,StartTop,StartLeft);
         if(RememberStatus)StMnu()}
    function NavUnLdd(){Ldd=0;Crtd=0;SetMenu="0"}
    function UnLdd(){
         NavUnLdd();
         if(ExpYes){var M=FrstCntnr?FrstCntnr.FrstMbr:null;
              while(M!=null){if(M.CCn){MakeNull(M.CCn);M.CCn=null}
                   M=M.PrvMbr}}
         if(!Nav4){LdTmr=setInterval("ChckLdd()",100)}}
    function UnLddTotal(){MakeNull(FrstCntnr);FrstCntnr=RmbrNow=FLoc=ScLoc=DcLoc=SLdAgnWin=CurOvr=CloseTmr=Doc=Bod=Trigger=null}
    function MakeNull(P){
         var M=P.FrstMbr,Mi;
         while(M!=null){Mi=M;
              if(M.CCn){MakeNull(M.CCn);M.CCn=null}
              M.Cntnr=null;M=M.PrvMbr;Mi.PrvMbr=null;Mi=null}
         P.FrstMbr=null}
    function ChckLdd(){
         if(!ExpYes){if(ScLoc.document.body){clearInterval(LdTmr);Go()}}
         else if(ScLoc.document.readyState=="complete"){if(LdTmr)clearInterval(LdTmr);Go()}}
    function NavLdd(e){if(e.target!=self)routeEvent(e);if(e.target==ScLoc)Go()}
    function ReDoWhole(){if(AppVer.indexOf("4.0")==-1)Doc.location.reload();else if(SWinW!=ScLoc.innerWidth||SWinH!=ScLoc.innerHeight||FWinW!=FLoc.innerWidth||FWinH!=FLoc.innerHeight)Doc.location.reload()}
    function Go(){
         if(!Ldd&&PosStrt){
              BeforeStart();
              Crtd=0;Ldd=1;
              FLoc=MenuUsesFrames?parent.frames[FirstLineFrame]:window;
              ScLoc=MenuUsesFrames?parent.frames[SecLineFrame]:window;
              DcLoc=MenuUsesFrames?parent.frames[DocTargetFrame]:window;
              if(MenuUsesFrames){
                   if(!FLoc){FLoc=ScLoc;if(!FLoc){FLoc=ScLoc=DcLoc;if(!FLoc)FLoc=ScLoc=DcLoc=window}}
                   if(!ScLoc){ScLoc=DcLoc;if(!ScLoc)ScLoc=DcLoc=FLoc}
                   if(!DcLoc)DcLoc=ScLoc}
              if(FLoc==ScLoc)AcrssFrms=0;
              if(AcrssFrms)FirstLineHorizontal=MenuFramesVertical?0:1;
              FWinW=ExpYes?FLoc.document.body.clientWidth:FLoc.innerWidth;
              FWinH=ExpYes?FLoc.document.body.clientHeight:FLoc.innerHeight;
              SWinW=ExpYes?ScLoc.document.body.clientWidth:ScLoc.innerWidth;
              SWinH=ExpYes?ScLoc.document.body.clientHeight:ScLoc.innerHeight;
              FColW=Nav4?FLoc.document:FLoc.document.body;
              SColW=Nav4?ScLoc.document:ScLoc.document.body;
              DColW=Nav4?DcLoc.document:ScLoc.document.body;
              if(TakeOverBgColor){
                   if(ExpYes&&MacCom)FColW.style.backgroundColor=AcrssFrms?SColW.bgColor:DColW.bgColor;
                   else FColW.bgColor=AcrssFrms?SColW.bgColor:DColW.bgColor}
              if(MenuCentered.indexOf("justify")!=-1&&FirstLineHorizontal)ClcJus();
              if(FrstCreat||FLoc==ScLoc)FrstCntnr=CreateMenuStructure("Menu",NoOffFirstLineMenus,null);
              else CreateMenuStructureAgain("Menu",NoOffFirstLineMenus);
              ClcRl();
              if(TargetLoc)ClcTrgt();ClcLft();ClcTp();
              PosMenu(FrstCntnr,StartTop,StartLeft);
              IniFlg=1;Initiate();Crtd=1;
              SLdAgnWin=ExpYes?ScLoc.document.body:ScLoc;SLdAgnWin.onunload=Nav4?NavUnLdd:UnLdd;
              if(ExpYes)Trigger.onunload=UnLddTotal;
              Trigger.onresize=Nav4?ReDoWhole:RePos;
              AfterBuild();
              if(RememberStatus)StMnu();
              if(Nav4&&FrstCreat){Trigger.captureEvents(Event.LOAD);Trigger.onload=NavLdd}
              if(FrstCreat)Dummy();FrstCreat=0;
              if(MenuVerticalCentered=="static"&&!AcrssFrms)setInterval("KeepPos()",250)     }}
    function KeepPos(){
         var TS=ExpYes?FLoc.document.body.scrollTop:FLoc.pageYOffset;
         if(TS!=StaticPos){var FCSt=Nav4?FrstCntnr:FrstCntnr.style;
              FrstCntnr.OrgTop=StartTop+TS;FCSt.top=FrstCntnr.OrgTop+P_X;StaticPos=TS}}
    function ClcRl(){
         StartTop=M_StrtTp<1&&M_StrtTp>0?M_StrtTp*FWinH:M_StrtTp;
         StartLeft=M_StrtLft<1&&M_StrtLft>0?M_StrtLft*FWinW:M_StrtLft}
    function ClcJus(){
         var a=BorderBtwnMain?NoOffFirstLineMenus+1:2,Sz=Math.round((PartOfWindow*FWinW-a*BorderWidthMain)/NoOffFirstLineMenus),i,j;
         for(i=1;i<NoOffFirstLineMenus+1;i++){j=eval("Menu"+i);j[5]=Sz}
         StartLeft=0}
    function ClcTrgt(){
         var TLoc=Nav4?FLoc.document.layers[TargetLoc]:DomYes?FLoc.document.getElementById(TargetLoc):FLoc.document.all[TargetLoc];
         if(DomYes){while(TLoc){StartTop+=TLoc.offsetTop;StartLeft+=TLoc.offsetLeft;TLoc=TLoc.offsetParent}}
         else{StartTop+=Nav4?TLoc.pageY:TLoc.offsetTop;StartLeft+=Nav4?TLoc.pageX:TLoc.offsetLeft}}
    function ClcLft(){
         if(MenuCentered.indexOf("left")==-1){
              var Sz=FWinW-(!Nav4?parseInt(FrstCntnr.style.width):FrstCntnr.clip.width);
              StartLeft+=MenuCentered.indexOf("right")!=-1?Sz:Sz/2;
              if(StartLeft<0)StartLeft=0}}
    function ClcTp(){
         if(MenuVerticalCentered!="top"&&MenuVerticalCentered!="static"){
              var Sz=FWinH-(!Nav4?parseInt(FrstCntnr.style.height):FrstCntnr.clip.height);
              StartTop+=MenuVerticalCentered=="bottom"?Sz:Sz/2;
              if(StartTop<0)StartTop=0}}
    function PosMenu(Ct,Tp,Lt){
         RLvl++;
         var Ti,Li,Hi,Mb=Ct.FrstMbr,CStl=!Nav4?Ct.style:Ct,MStl=!Nav4?Mb.style:Mb,PadL=Mb.value.indexOf("<")==-1?LftXtra:0,PadT=Mb.value.indexOf("<")==-1?TpXtra:0,MWt=!Nav4?parseInt(MStl.width)+PadL:MStl.clip.width,MHt=!Nav4?parseInt(MStl.height)+PadT:MStl.clip.height,CWt=!Nav4?parseInt(CStl.width):CStl.clip.width,CHt=!Nav4?parseInt(CStl.height):CStl.clip.height,CCw,CCh,STp,SLt;
         var BRW=RLvl==1?BorderWidthMain:BorderWidthSub,BTWn=RLvl==1?BorderBtwnMain:BorderBtwnSub;
         if(RLvl==1&&AcrssFrms)!MenuFramesVertical?Tp=BottomUp?0:FWinH-CHt+(Nav4?MacCom?-2:4:0):Lt=RightToLeft?0:FWinW-CWt+(Nav4?MacCom?-2:4:0);
         if(RLvl==2&&AcrssFrms)!MenuFramesVertical?Tp=BottomUp?SWinH-CHt+(Nav4?MacCom?-2:4:0):0:Lt=RightToLeft?SWinW-CWt:0;
         if(RLvl==2){Tp+=VerCorrect;Lt+=HorCorrect}
         CStl.top=RLvl==1?Tp+P_X:0;Ct.OrgTop=Tp;
         CStl.left=RLvl==1?Lt+P_X:0;Ct.OrgLeft=Lt;
         if(RLvl==1&&FirstLineHorizontal){Hi=1;Li=CWt-MWt-2*BRW;Ti=0}
         else{Hi=Li=0;Ti=CHt-MHt-2*BRW}
         while(Mb!=null){
              MStl.left=Li+BRW+P_X;
              MStl.top=Ti+BRW+P_X;
              if(Nav4)Mb.CLyr.moveTo(Li+BRW,Ti+BRW);
              if(Mb.CCn){if(RightToLeft)CCw=Nav4?Mb.CCn.clip.width:parseInt(Mb.CCn.style.width);
                   if(BottomUp)CCh=Nav4?Mb.CCn.clip.height:parseInt(Mb.CCn.style.height);
                   if(Hi){STp=BottomUp?Ti-CCh:Ti+MHt+2*BRW;SLt=RightToLeft?Li+MWt-CCw:Li}
                   else{SLt=RightToLeft?Li-CCw+ChildOverlap*MWt+BRW:Li+(1-ChildOverlap)*MWt;
                        STp=RLvl==1&&AcrssFrms?BottomUp?Ti-CCh+MHt:Ti:BottomUp?Ti-CCh+(1-ChildVerticalOverlap)*MHt+2*BRW:Ti+ChildVerticalOverlap*MHt+BRW}
                   PosMenu(Mb.CCn,STp,SLt)}
              Mb=Mb.PrvMbr;
              if(Mb){     MStl=!Nav4?Mb.style:Mb;PadL=Mb.value.indexOf("<")==-1?LftXtra:0;
                   PadT=Mb.value.indexOf("<")==-1?TpXtra:0;
                   MWt=!Nav4?parseInt(MStl.width)+PadL:MStl.clip.width;
                   MHt=!Nav4?parseInt(MStl.height)+PadT:MStl.clip.height;
                   Hi?Li-=BTWn?(MWt+BRW):(MWt):Ti-=BTWn?(MHt+BRW):MHt}}
         status="Ready";RLvl--}
    function StMnu(){
         if(!Crtd)return;
         var i,Pntr=FrstCntnr,Str=ScLoc.SetMenu?ScLoc.SetMenu:"0";
         while(Str.indexOf("_")!=-1&&RememberStatus==1){
              i=Pntr.NrItms-parseInt(Str.substring(0,Str.indexOf("_")));
              Str=Str.slice(Str.indexOf("_")+1);
              Pntr=Pntr.FrstMbr;
              for(i;i;i--)Pntr=Pntr.PrvMbr;
              if(Nav4)Pntr.CLyr.OM();
              else Pntr.OM();
              Pntr=Pntr.CCn}
         i=Pntr.NrItms-parseInt(Str);
         Pntr=Pntr.FrstMbr;
         for(i;i;i--)Pntr=Pntr.PrvMbr;
         if(RmbrNow!=null){SetItem(RmbrNow,0);RmbrNow.Clckd=0}
         if(Pntr!=null){SetItem(Pntr,1);Pntr.Clckd=1;
         if(RememberStatus==1){if(Nav4)Pntr.CLyr.OM();else Pntr.OM()}}
         RmbrNow=Pntr;
         ClrAllChlds(FrstCntnr.FrstMbr);
         Rmbr(FrstCntnr)}
    function Initiate(){
         if(IniFlg&&Ldd){Init(FrstCntnr);IniFlg=0;if(RememberStatus)Rmbr(FrstCntnr);if(ShwFlg)AfterCloseAll();ShwFlg=0}}
    function Rmbr(CntPtr){
         var Mbr=CntPtr.FrstMbr,St;
         while(Mbr!=null){
              if(Mbr.DoRmbr){
                   HiliteItem(Mbr);
                   if(Mbr.CCn&&RememberStatus==1){St=Nav4?Mbr.CCn:Mbr.CCn.style;St.visibility=M_Show;Rmbr(Mbr.CCn)}
                   break}
              else Mbr=Mbr.PrvMbr}}
    function Init(CPt){
         var Mb=CPt.FrstMbr,MCSt=Nav4?CPt:CPt.style;
         RLvl++;MCSt.visibility=RLvl==1?M_Show:M_Hide;CPt.Shw=RLvl==1?1:0;
         while(Mb!=null){if(Mb.Hilite)LowItem(Mb);if(Mb.CCn)Init(Mb.CCn);Mb=Mb.PrvMbr}
         RLvl--}
    function ClrAllChlds(Pt){
         var PSt,Pc;
         while(Pt){if(Pt.Hilite){Pc=Nav4?Pt.CLyr:Pt;if(Pc!=CurOvr){LowItem(Pt)}
              if(Pt.CCn){PSt=Nav4?Pt.CCn:Pt.CCn.style;if(Pc!=CurOvr){PSt.visibility=M_Hide;Pt.CCn.Shw=0}ClrAllChlds(Pt.CCn.FrstMbr)}
              break}
         Pt=Pt.PrvMbr}}
    function SetItem(Pntr,x){while(Pntr!=null){Pntr.DoRmbr=x;Pntr=Nav4?Pntr.CLyr.Ctnr.Cllr:Pntr.Ctnr.Cllr}}
    function GoTo(){
         var HP=Nav4?this.LLyr:this;
         if(HP.Arr[1]){status="";LowItem(HP);IniFlg=1;Initiate();
              HP.Arr[1].indexOf("javascript:")!=-1?eval(HP.Arr[1]):DcLoc.location.href=BaseHref+HP.Arr[1]}}
    function HiliteItem(P){
         if(Nav4){     if(P.ro)P.document.images[P.rid].src=P.ri2;
              else{     
                    P.bgColor = HighBgColor;
                   if(P.value.indexOf("<img")==-1){P.document.write(P.Ovalue);P.document.close()}}}
                   else{     
                        if(P.ro){var Lc=P.Lvl==1?FLoc:ScLoc;Lc.document.images[P.rid].src=P.ri2}
                        else{               
                             P.style.backgroundColor=HighBgColor;
                             P.style.color=FontHighColor;
         P.Hilite=1
    function LowItem(P){
         P.Hilite=0;
         if(P.ro){if(Nav4)P.document.images[P.rid].src=P.ri1;
              else{var Lc=P.Lvl==1?FLoc:ScLoc;Lc.document.images[P.rid].src=P.ri1}}
         else{
              if(Nav4){
                        P.bgColor=LowBgColor;
              if(P.value.indexOf("<img")==-1){P.document.write(P.value);P.document.close()}}
              else{
                        P.style.backgroundColor=LowBgColor;
                        P.style.color=FontLowColor;
    function OpenMenu(){
         if(!Ldd||!Crtd)return;
         if(OpnTmr)clearTimeout(OpnTmr);
         var P=Nav4?this.LLyr:this;
         if(P.NofChlds&&!P.CCn){
              RLvl=this.Lvl;
              P.CCn=CreateMenuStructure(P.MN+"_",P.NofChlds,P);
              var Ti,Li,Hi;
              var MStl=!Nav4?P.style:P;
              var PadL=P.value.indexOf("<")==-1?LftXtra:0;
              var PadT=P.value.indexOf("<")==-1?TpXtra:0;
              var MWt=!Nav4?parseInt(MStl.width)+PadL:MStl.clip.width;
              var MHt=!Nav4?parseInt(MStl.height)+PadT:MStl.clip.height;
              var CCw,CCh,STp,SLt;
              var BRW=RLvl==1?BorderWidthMain:BorderWidthSub;
              if(RightToLeft)CCw=Nav4?P.CCn.clip.width:parseInt(P.CCn.style.width);
              if(BottomUp)CCh=Nav4?P.CCn.clip.height:parseInt(P.CCn.style.height);
              if(RLvl==1&&FirstLineHorizontal){Hi=1;Li=(Nav4?P.left:parseInt(P.style.left))-BRW;Ti=0}
              else{Hi=Li=0;Ti=(Nav4?P.top:parseInt(P.style.top))-BRW}
              if(Hi){STp=BottomUp?Ti-CCh:Ti+MHt+2*BRW;SLt=RightToLeft?Li+MWt-CCw:Li}
              else{SLt=RightToLeft?Li-CCw+ChildOverlap*MWt+BRW:Li+(1-ChildOverlap)*MWt;
              STp=RLvl==1&&AcrssFrms?BottomUp?Ti-CCh+MHt:Ti:BottomUp?Ti-CCh+(1-ChildVerticalOverlap)*MHt+2*BRW:Ti+ChildVerticalOverlap*MHt+BRW}
              PosMenu(P.CCn,STp,SLt);
              RLvl=0}
         var CCnt=Nav4?this.LLyr.CCn:this.CCn,HP=Nav4?this.LLyr:this;
         CurOvr=this;IniFlg=0;ClrAllChlds(this.Ctnr.FrstMbr);
         if(!HP.Hilite)HiliteItem(HP);
         if(CCnt!=null&&!CCnt.Shw)RememberStatus?Unfld():OpnTmr=setTimeout("Unfld()",UnfoldDelay);
    //alert(HP.value);
         status=HP.value;
    function Unfld(){
         var P=CurOvr;
         var TS=ExpYes?ScLoc.document.body.scrollTop:ScLoc.pageYOffset,LS=ExpYes?ScLoc.document.body.scrollLeft:ScLoc.pageXOffset,CCnt=Nav4?P.LLyr.CCn:P.CCn,THt=Nav4?P.clip.height:parseInt(P.style.height),TWt=Nav4?P.clip.width:parseInt(P.style.width),TLt=AcrssFrms&&P.Lvl==1&&!FirstLineHorizontal?0:Nav4?P.Ctnr.left:parseInt(P.Ctnr.style.left),TTp=AcrssFrms&&P.Lvl==1&&FirstLineHorizontal?0:Nav4?P.Ctnr.top:parseInt(P.Ctnr.style.top);
         // TS != 0 is only needed if the menu DIVs are positioned relative to the body.
         // We've made them positioned relative to div#navigationMenu which causes
         // a problem if TS is based on how the body is scrolled.  So set TS to zero.
         // Note: the code below will adjust the final top offset based on the height of
         // the menu bar so the dropdown appears below (and not on top of) the nav bar.
         TS = 0;
         var CCW=Nav4?P.LLyr.CCn.clip.width:parseInt(P.CCn.style.width),CCH=Nav4?P.LLyr.CCn.clip.height:parseInt(P.CCn.style.height),CCSt=Nav4?P.LLyr.CCn:P.CCn.style,SLt=AcrssFrms&&P.Lvl==1?CCnt.OrgLeft+TLt+LS:CCnt.OrgLeft+TLt,STp=AcrssFrms&&P.Lvl==1?CCnt.OrgTop+TTp+TS:CCnt.OrgTop+TTp;
         if(!ShwFlg){ShwFlg=1;BeforeFirstOpen()}
         if(MenuWrap){
              if(RightToLeft){if(SLt<LS)SLt=P.Lvl==1?LS:SLt+(CCW+(1-2*ChildOverlap)*TWt);if(SLt+CCW>SWinW+LS)SLt=SWinW+LS-CCW}
              else{if(SLt+CCW>SWinW+LS)SLt=P.Lvl==1?SWinW+LS-CCW:SLt-(CCW+(1-2*ChildOverlap)*TWt);if(SLt<LS)SLt=LS}
              if(BottomUp){if(STp<TS)STp=P.Lvl==1?TS:STp+(CCH-(1-2*ChildVerticalOverlap)*THt);if(STp+CCH>SWinH+TS)STp=SWinH+TS-CCH+(Nav4?4:0)}
              else{if(STp+CCH>TS+SWinH)STp=P.Lvl==1?STp=TS+SWinH-CCH:STp-CCH+(1-2*ChildVerticalOverlap)*THt;if(STp<TS)STp=TS}}
         CCSt.top=STp+P_X;CCSt.left=SLt+P_X;
         if(Fltr&&MenuSlide){P.CCn.filters[0].Apply();P.CCn.filters[0].play()}
         CCSt.visibility=M_Show}
    function OpenMenuClick(){
         if(!Ldd||!Crtd)return;
         var HP=Nav4?this.LLyr:this;CurOvr=this;
         IniFlg=0;ClrAllChlds(this.Ctnr.FrstMbr);HiliteItem(HP);
    function CloseMenu(){
         if(!Ldd||!Crtd)return;
         status="";
         if(this==CurOvr){if(OpnTmr)clearTimeout(OpnTmr);if(CloseTmr)clearTimeout(CloseTmr);IniFlg=1;CloseTmr=setTimeout("Initiate(CurOvr)",DissapearDelay)}}
    function CntnrSetUp(W,H,NoOff,WMu,Mc){
         var x=BorderColor;
         this.FrstMbr=null;this.NrItms=NoOff;this.Cllr=Mc;this.Shw=0;
         this.OrgLeft=this.OrgTop=0;
         if(Nav4){if(x)this.bgColor=x;this.visibility="hide";this.resizeTo(W,H)}
         else{if(x)this.style.backgroundColor=x;this.style.width=W+P_X;this.style.height=H+P_X;
              if(!NavYes)this.style.zIndex=RLvl+Ztop;
              if(Fltr){FStr="";if(MenuSlide&&RLvl!=1)FStr=MenuSlide;if(MenuShadow)FStr+=MenuShadow;
                   if(MenuOpacity)FStr+=MenuOpacity;if(FStr!="")this.style.filter=FStr}}}
    function MbrSetUp(MbC,PrMmbr,WMu,Wd,Ht,Nofs){
         var Lctn=RLvl==1?FLoc:ScLoc,Tfld=this.Arr[0],t,T,L,W,H,S,a;
         this.PrvMbr=PrMmbr;this.Lvl=RLvl;this.Ctnr=MbC;this.CCn=null;this.ai=null;this.Hilite=0;this.DoRmbr=0;
         this.Clckd=0;this.OM=OpenMenu;this.style.overflow="hidden";
         this.MN=WMu;this.NofChlds=Nofs;
         this.style.cursor=(this.Arr[1]||(RLvl==1&&UnfoldsOnClick))?ExpYes?"hand":"pointer":"default";this.ro=0;
         if(Tfld.indexOf("rollover")!=-1){this.ro=1;this.ri1=Tfld.substring(Tfld.indexOf("?")+1,Tfld.lastIndexOf("?"));
              this.ri2=Tfld.substring(Tfld.lastIndexOf("?")+1,Tfld.length);this.rid=WMu+"i";
              Tfld="<img src=\""+this.ri1+"\" name=\""+this.rid+"\" width=\""+Wd+"\" height=\""+Ht+"\">"}
         this.value=Tfld;
         this.style.color=FontLowColor;
         this.style.fontFamily=FontFamily;
         this.style.fontSize = FontSize + "pt";
         this.style.fontWeight="normal";
         this.style.fontStyle="normal";
         this.style.backgroundColor=LowBgColor;
         if (WMu.length > 6)
         { MenuTextCentered = 'left';}
         else
         {MenuTextCentered = 'center';}     
         this.style.textAlign=MenuTextCentered;
         if(this.Arr[2])this.style.backgroundImage="url(\""+this.Arr[2]+"\")";
         if(Tfld.indexOf("<")==-1){this.style.width=Wd-LftXtra+P_X;this.style.height=Ht-TpXtra+P_X;this.style.paddingLeft=LeftPaddng+P_X;this.style.paddingTop=TopPaddng+P_X}
         else{this.style.width=Wd+P_X;this.style.height=Ht+P_X}
         if(Tfld.indexOf("<")==-1&&DomYes){t=Lctn.document.createTextNode(Tfld);this.appendChild(t)}
         else this.innerHTML=Tfld;
         if(this.Arr[3]){a=RLvl==1&&FirstLineHorizontal?BottomUp?9:3:RightToLeft?6:0;
              if(Arrws[a]!=""){S=Arrws[a];W=Arrws[a+1];H=Arrws[a+2];T=RLvl==1&&FirstLineHorizontal?BottomUp?2:Ht-H-2:(Ht-H)/2;L=RightToLeft?2:Wd-W-2;
                   if(DomYes){t=Lctn.document.createElement("img");this.appendChild(t);
                        t.style.position="absolute";t.src=S;t.style.width=W+P_X;t.style.height=H+P_X;t.style.top=T+P_X;t.style.left=L+P_X}
                   else{Tfld+="<div id=\""+WMu+"_im\" style=\"position:absolute; top:"+T+"; left:"+L+"; width:"+W+"; height:"+H+";visibility:inherit\"><img src=\""+S+"\"></div>";
                        this.innerHTML=Tfld;t=Lctn.document.all[WMu+"_im"]}
                   this.ai=t}}
         if(ExpYes){this.onselectstart=CnclSlct;this.onmouseover=RLvl==1&&UnfoldsOnClick?OpenMenuClick:OpenMenu;
              this.onmouseout=CloseMenu;this.onclick=RLvl==1&&UnfoldsOnClick&&this.Arr[3]?OpenMenu:GoTo}
         else{RLvl==1&&UnfoldsOnClick?this.addEventListener("mouseover",OpenMenuClick,false):this.addEventListener("mouseover",OpenMenu,false);
              this.addEventListener("mouseout",CloseMenu,false);
              RLvl==1&&UnfoldsOnClick&&this.Arr[3]?this.addEventListener("click",OpenMenu,false):this.addEventListener("click",GoTo,false)}}
    function NavMbrSetUp(MbC,PrMmbr,WMu,Wd,Ht,Nofs){
         var a;
         this.value=this.Arr[0];this.ro=0;
         if(this.value.indexOf("rollover")!=-1){
              this.ro=1;this.ri1=this.value.substring(this.value.indexOf("?")+1,this.value.lastIndexOf("?"));
              this.ri2=this.value.substring(this.value.lastIndexOf("?")+1,this.value.length);this.rid=WMu+"i";
              this.value="<img src=\""+this.ri1+"\" name=\""+this.rid+"\">"}
         CntrTxt="<div align=\""+MenuTextCentered+"\">";
         TxtClose="</font>"+ "</div>";
         if(LeftPaddng&&this.value.indexOf("<")==-1&&MenuTextCentered=="left")this.value="�\;"+this.value;
         this.Ovalue=this.value;
         this.value=this.value.fontcolor(FontLowColor);
         this.Ovalue=this.Ovalue.fontcolor(FontHighColor);
         this.value=CntrTxt+"<font face=\""+FontFamily+"\" point-size=\""+FontSize+"\">"+this.value+TxtClose;
         this.Ovalue=CntrTxt+"<font face=\""+FontFamily+"\" point-size=\""+FontSize+"\">"+this.Ovalue+TxtClose;
         this.CCn=null;this.PrvMbr=PrMmbr;this.Hilite=0;this.DoRmbr=0;this.Clckd=0;this.visibility="inherit";
         this.MN=WMu;this.NofChlds=Nofs;
         this.bgColor=LowBgColor;
         this.resizeTo(Wd,Ht);
         if(!AcrssFrms&&this.Arr[2])this.background.src=this.Arr[2];
         this.document.write(this.value);this.document.close();
         this.CLyr=new Layer(Wd,MbC);
         this.CLyr.Lvl=RLvl;this.CLyr.visibility="inherit";
         this.CLyr.onmouseover=RLvl==1&&UnfoldsOnClick?OpenMenuClick:OpenMenu;this.CLyr.onmouseout=CloseMenu;
         this.CLyr.captureEvents(Event.MOUSEUP);this.CLyr.onmouseup=RLvl==1&&UnfoldsOnClick&&this.Arr[3]?OpenMenu:GoTo;
         this.CLyr.OM=OpenMenu;
         this.CLyr.LLyr=this;this.CLyr.resizeTo(Wd,Ht);this.CLyr.Ctnr=MbC;
         if(this.Arr[3]){a=RLvl==1&&FirstLineHorizontal?BottomUp?9:3:RightToLeft?6:0;
              if(Arrws[a]!=""){this.CLyr.ILyr=new Layer(Arrws[a+1],this.CLyr);this.CLyr.ILyr.visibility="inherit";
                   this.CLyr.ILyr.top=RLvl==1&&FirstLineHorizontal?BottomUp?2:Ht-Arrws[a+2]-2:(Ht-Arrws[a+2])/2;
                   this.CLyr.ILyr.left=RightToLeft?2:Wd-Arrws[a+1]-2;this.CLyr.ILyr.width=Arrws[a+1];this.CLyr.ILyr.height=Arrws[a+2];
                   ImgStr="<img src=\""+Arrws[a]+"\" width=\""+Arrws[a+1]+"\" height=\""+Arrws[a+2]+"\">";
                   this.CLyr.ILyr.document.write(ImgStr);this.CLyr.ILyr.document.close()}}}
    function CreateMenuStructure(MNm,No,Mcllr){
         status="Building menu";RLvl++;
         var i,NOs,Mbr,W=0,H=0,PMb=null,WMnu=MNm+"1",MWd=eval(WMnu+"[5]"),MHt=eval(WMnu+"[4]"),Lctn=RLvl==1?FLoc:ScLoc;
         var BRW=RLvl==1?BorderWidthMain:BorderWidthSub,BTWn=RLvl==1?BorderBtwnMain:BorderBtwnSub;
         if(RLvl==1&&FirstLineHorizontal){
              for(i=1;i<No+1;i++){WMnu=MNm+eval(i);W=eval(WMnu+"[5]")?W+eval(WMnu+"[5]"):W+MWd}
              W=BTWn?W+(No+1)*BRW:W+2*BRW;H=MHt+2*BRW}
         else{for(i=1;i<No+1;i++){WMnu=MNm+eval(i);H=eval(WMnu+"[4]")?H+eval(WMnu+"[4]"):H+MHt}
              H=BTWn?H+(No+1)*BRW:H+2*BRW;W=MWd+2*BRW}
         if(DomYes){var MbC=Lctn.document.createElement("div");MbC.style.position="absolute";MbC.style.visibility="hidden";Lctn.document.getElementById("navigationMenu").appendChild(MbC)}
         else{if(Nav4)var MbC=new Layer(W,Lctn);
              else{WMnu+="c";Lctn.document.body.insertAdjacentHTML("AfterBegin","<div id=\""+WMnu+"\" style=\"visibility:hidden; position:absolute;\"><\/div>");
                   var MbC=Lctn.document.all[WMnu]}}
         MbC.SetUp=CntnrSetUp;MbC.SetUp(W,H,No,MNm+"1",Mcllr);
         if(Exp4){MbC.InnerString="";
              for(i=1;i<No+1;i++){WMnu=MNm+eval(i);MbC.InnerString+="<div id=\""+WMnu+"\" style=\"position:absolute;\"><\/div>"}
              MbC.innerHTML=MbC.InnerString}
         for(i=1;i<No+1;i++){WMnu=MNm+eval(i);NOs=eval(WMnu+"[3]");
              W=RLvl==1&&FirstLineHorizontal?eval(WMnu+"[5]")?eval(WMnu+"[5]"):MWd:MWd;
              H=RLvl==1&&FirstLineHorizontal?MHt:eval(WMnu+"[4]")?eval(WMnu+"[4]"):MHt;
              if(DomYes){Mbr=Lctn.document.createElement("div");     Mbr.style.position="absolute";Mbr.style.visibility="inherit";MbC.appendChild(Mbr)}
              else Mbr=Nav4?new Layer(W,MbC):Lctn.document.all[WMnu];
              Mbr.Arr=eval(WMnu);                    
              Mbr.SetUp=Nav4?NavMbrSetUp:MbrSetUp;Mbr.SetUp(MbC,PMb,WMnu,W,H,NOs);
              if(NOs&&!BuildOnDemand){Mbr.CCn=CreateMenuStructure(WMnu+"_",NOs,Mbr)}
              PMb=Mbr}
         MbC.FrstMbr=Mbr;
         RLvl--;
         return(MbC)}
    function CreateMenuStructureAgain(MNm,No){
         if(!BuildOnDemand){
              var i,WMnu,NOs,PMb,Mbr=FrstCntnr.FrstMbr;RLvl++;
              for(i=No;i>0;i--){WMnu=MNm+eval(i);NOs=eval(WMnu+"[3]");PMb=Mbr;if(NOs)Mbr.CCn=CreateMenuStructure(WMnu+"_",NOs,Mbr);Mbr=Mbr.PrvMbr}
              RLvl--}
         else{     var Mbr=FrstCntnr.FrstMbr;
              while(Mbr){Mbr.CCn=null;Mbr=Mbr.PrvMbr}}}

    Hi thanks...As you said I am performing only on onload event..only thing i am confused is if i remove the javacript MRHeader.js everything works fine...am totally confused...pls help
    Here is my JSP code for my input page
    <%@page import="java.util.*" %>
    <%@page import="com.ford.mr.*" %>
    <HTML>
    <HEAD>
    <link href="./css/mplstyle.css" rel="STYLESHEET" type="text/css">
    <title>Input Frame</title>
    <link type="text/css" rel="STYLESHEET" href="./css/classic.css">
    <STYLE>
        .vis1 { visibility:visible }
        .vis2 { visibility:hidden }
    </STYLE>
    <%--
    MRIFValidation.js contains the java script for the following requirement:
    1. Setting the current date in date to compare
    2. All input frame client validations.
    E.g Plant id should not be empty.
    --%>
    <script type="text/javascript" src="./javascript/MRIFValidation.js"> </script>
    <%--
    MRR2HandleDropdown.js is the javascript for the input frame server side actions
    It has many functions related to drop down populating and rendering the data
    to user from server.
    --%>
    <script language="javascript" src="./javascript/MRR2HandleDropdown.js"> </script>
    <%--
    MRheader.js is the javascript which displays the header for our application
    plus it has an internal call to MRMenuItem.js and menuscript.js which
    builds the menu bar for our application
    Issue is here - On commenting the below the previously entered user
    inputs are displayed correctly. Else they are not displayed.
    --%>
    <script language="javascript" src="./javascript/MRheader.js"> </script>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    <style type="text/css">
    <!--
    a:visited {
         color: #0000FF;
    .style1 {font-weight: bold}
    .style2 {color: #FF0000}
    body {
         background-color: #FFFFFF;
    -->
    </style>
    <%--
    Declaring all the JSP variables used in the page
    These variables are used for holding the session parameters
    and are used while setting the selected values in the screen.
    --%>
    <%!      
         // HTTPSession object
         HttpSession sess;
         // To hold session Variables //
         // Selected plant index
         String plantIndex;
         // Selected supplier index
         String supplierIndex;
         // Selected part index
         String partIndex;
         // List of plant codes
         Vector plantCodes = new Vector();
         // List of supplier codes
         Vector supplierCodes = new Vector();
         // List of part codes
         Vector partCodes = new Vector();
         // To hold the part description for the selected part
         String partDescription;
         // List of release numbers matching the selected plant, supplier & part
         Vector releaseNumbers = new Vector();
         // Type of release - Weekly / Daily
         String releaseType;
         // Selected release1 index
         String release1Index;
         // Selected release2 index
         String release2Index;
         // Holds the issue date 1 corresponding to release 1 selected
         String issueDate1;
         // Holds the issue date 2 corresponding to release 2 selected
         String issueDate2;
         // List of matching release numbers to the entered issue date1 (Might be one or two
         // in case if amended release exist)
         Vector matchingRelease1Number = new Vector();
         // List of matching release numbers to the entered issue date2 (Might be one or two
         // in case if amended release exist)
         Vector matchingRelease2Number = new Vector();
         // Size of matchingRelease1Number collection
         int matchingRelease1Size = 0;
         // Size of matchingRelease2Number collection
         int matchingRelease2Size = 0;
         // Boolean flags to hold if amended release exists in the release numbers
         // matching the issue dates entered by user.
         boolean amendedRelease1Exist;
         boolean amendedRelease2Exist;
         String pageName = "";
    %>
    <%--
    The below code does the following:
    1. Fetches the various values available in session
    2. Stores the same in various JSP variables for access within the page
    --%>
    <%
    System.out.println("In input frame page");
    sess = request.getSession(true);
         if(sess != null) {
              System.out.println("Session id in input frame: "+ sess.getId());
              plantIndex = (String) sess.getAttribute("selectedPlantIndex");
              supplierIndex = (String) sess.getAttribute("selectedSupplierIndex");
              partIndex = (String) sess.getAttribute("selectedPartIndex");
              //plantCodes = (Vector) sess.getAttribute("plantCodes");
              supplierCodes = (Vector) sess.getAttribute("supplierCodes");
              partCodes = (Vector) sess.getAttribute("partCodes");
              partDescription = (String) sess.getAttribute("partDescription");
              releaseNumbers = (Vector) sess.getAttribute("releaseNumbers");
              releaseType = (String) sess.getAttribute("releaseType");
              release1Index = (String) sess.getAttribute("selectedRelease1Index");
              release2Index =(String)  sess.getAttribute("selectedRelease2Index");
              issueDate1 = (String) sess.getAttribute("issueDate1");
              issueDate2 = (String) sess.getAttribute("issueDate2");
              matchingRelease1Number = (Vector) sess.getAttribute("correspondingRelease1Number");
              matchingRelease2Number = (Vector) sess.getAttribute("correspondingRelease2Number");
              System.out.println("Displaying values in session *******************");
              Enumeration enum = sess.getAttributeNames();
              while(enum.hasMoreElements()) {
                   String elementName = (String) enum.nextElement();
                   System.out.println("element:"+ elementName+": Value: "+ sess.getAttribute(elementName));
              System.out.println("Plant Index JSP variable:"+ plantIndex);
    %>
    <%--
    This code is used for getting the plant codes from
    the DB. Currently it is hardcoded.
    --%>
    <%
    MRR2GetPlantCodes obj = new MRR2GetPlantCodes();
    plantCodes = obj.getPlantCodes();
    %>
    <%--
    The below two blocks are used to iterate through matchingRelease1Number & matchingRelease2Number
    and checks if it has amended release. If yes, sets a boolean flag.
    matchingRelease1Number & matchingRelease2Number are two collections which
    contains the release number(s) matching the inputted issue date
    --%>
    <%
    // Code to set boolean flag amendedRelease1Exist
    if(matchingRelease1Number != null) {
         Iterator relIter = matchingRelease1Number.iterator();
         while(relIter.hasNext()) {
              if( ((String)relIter.next()).endsWith("A") ) {                    
                   amendedRelease1Exist = true;
    // Code to set boolean flag amendedRelease2Exist
    if(matchingRelease2Number != null) {
         Iterator relIter = matchingRelease2Number.iterator();
         while(relIter.hasNext()) {
              if( ((String)relIter.next()).endsWith("A") ) {                    
                   amendedRelease2Exist = true;
    %>
    <%--
    The below script has one method fillDropDown which is used for setting the
    values of the various I/P controls to user selected values:
    It sets the below selected values:
    1. Plant Index, Supplier Index, Part Index, Part description
    2. Release Type (Daily / weekly)
    3. Release 1 Index, Release 2 Index
    4. Issue date1 & Issue date2
    --%>
    <script language="javascript">
    function fillDropDown(field) {
         with(field) {
              var partD = "<%=partDescription%>"
              <% System.out.println("Loading the index values in input frame......");%>
              // inputform.country.selectedIndex = inputform.hiddencountry.value
              // Loading plant Index, supplier Index, part index and part description to selected values
              <% if(plantIndex != null && !plantIndex.equals("")) {%>
                   inputframe.plant.selectedIndex = "<%=Integer.parseInt(plantIndex)%>"               
              <% System.out.println("Selected Plant Index after loading:"+plantIndex);} %>
              <% if(supplierIndex != null && !supplierIndex.equals("")) { System.out.println("****Supplier Index not equals null..."+Integer.parseInt(supplierIndex)); %>
                   inputframe.supplier.selectedIndex = "<%=Integer.parseInt(supplierIndex)%>"
              <% } %>
              <% if(partIndex != null && !partIndex.equals("")) { %>
                   inputframe.part.selectedIndex = "<%=Integer.parseInt(partIndex)%>"
              <% } %>
              <% if(partDescription != null && !partDescription.equals("")) { %>
                   document.getElementById("partDescription").innerHTML = partD
              <%     } %>
              // Making the default release type selection as done by user
              <% if(releaseType != null && !"".equals(releaseType)) {
                        if("daily".equals(releaseType)) {%>
                             inputframe.release[0].checked = "checked"
                        <%     //isDaily = true;
                        } else { %>
                             inputframe.release[1].checked = "checked"
                        <%     //isWeekly = true;
                   } %>
              <%--
                   The below code is used to fetch the session variable issueDate1
                   & issueDate2 (based on the release numbers selected)
                   and sets the same in two text fields.
               --%>          
              <% if(issueDate1 != null && !issueDate1.equals("")) { %>
                   inputframe.issueDate1.value = "<%=issueDate1%>"
              <% } %>
              <% if(issueDate2 != null && !issueDate2.equals("")) { %>
                   inputframe.issueDate2.value = "<%=issueDate2%>"
              <% } %>     
         <%--
              Loading release drop down with the value matching with the entered issue date.
              Scenario : User enters the issue date and the corresponding release number is
              selected in drop down.
              Logic 1:
              1. Pass the issue date entered by user and get the matching release numbers
              from EJB
              2. Compare this with the combo collection and get the perfect match.
              3. If more than one match is found take the one with amendment by default
              4. Else get the matching one
              5. Update the selected index of dropdown to this value
         --%>          
              if(inputframe.release1.options.length > 0) {
                   var matchingCombo1Index = 0
                   var comboValue               
                   var matchFound = "false"
                   var size
                   var amended = false;
                   var amendedReleaseExist = "<%=amendedRelease1Exist%>";
                   var firstValue = ""
                   var secondValue = ""
                   var amendedValue = ""
                   var j = 0
                <%                 
                     if(matchingRelease1Number != null && matchingRelease1Number.size() != 0) {
                          Iterator iter = matchingRelease1Number.iterator();                          
                        matchingRelease1Size = matchingRelease1Number.size(); %>
                        size = "<%=     matchingRelease1Size %>"
                        //alert("Size of collection to be matched:"+size)
                   <%     while(iter.hasNext()) {                         
                             //String matchFound1 = "false";
                             String relValue = (String)iter.next();%>
                             //alert("Collection value under iteration:"+ "<%=relValue%>")                         
                             amended = "<%=relValue.endsWith("A")%>"
                             if(amended) {
                                  amendedValue = "<%=relValue%>"
                             //alert("Collection value under iteration ends with A:"+amended)
                             var comb = "<%=relValue%>"
                             j = j + 1
                             for(var i = 0; i < inputframe.release1.options.length; i++) {
                                  //      breaking the for loop when matchingCombo1Index is set greater than 0
                                  /*if(matchFound == true) {
                                       break
                                  comboValue = inputframe.release1.options.value                              
                                  //alert("Combo value:->"+comboValue)
                                  //alert("rel value in comparison:"+ comb);
                                  if(comboValue == comb) {
                                       if(size == 1) {
                                            matchFound = "true";
                                       if(size == 2) {
                                            if(j == 1)
                                                 firstValue = comb
                                            if(j == 2)
                                                 secondValue = comb
                                            // The below if block shall be also kept as if((amended||(!amendedReleaseExist)==true)
                                            // The below one perfectly works fine
                                            if(amended || !amendedReleaseExist) {
                                                 matchFound = "true";
                                  if(matchFound == "true") {
                                       matchingCombo1Index = i
                                       // alert("Matching combo index set to:"+ matchingCombo1Index)                                   
                                       inputframe.release1.selectedIndex = matchingCombo1Index
                                       if(size == 2)
                                            document.getElementById('errorArea').innerHTML = "There are"
                                                 + " two release numbers for the particular Issue date."
                                                 +" Please select either one of the release numbers ("+firstValue+ " or "+secondValue+" )."
                                                 +" Default selection in the Release drop down is "+ amendedValue+ "."
                                       matchingCombo1Index = 0;
                                       matchFound = "false";
                                       // Breaking the for loop
                                       break;                                   
                        <%                          
                        sess.removeAttribute("correspondingRelease1Number") ;
                   }%>
                   // Setting the selected release 1 index based on the logic done above.
                   if(matchingCombo1Index == 0) {
                        <% if(release1Index != null && !release1Index.equals("")) { matchingRelease1Number = null;%>
                                  inputframe.release1.selectedIndex = "<%=Integer.parseInt(release1Index)%>"
                        <% } %>
              <%--
                   Performing the above logic to select Release2 value
                   when the user enters issue date2
              --%>
              if(inputframe.release2.options.length > 0) {
                   var matchingCombo2Index = 0
                   var comboValue
                   var matchFound = "false"
                   var size
                   var amended = false;
                   var amendedReleaseExist = "<%=amendedRelease2Exist%>";
                   var firstValue = ""
                   var secondValue = ""
                   var amendedValue = ""
                   var j = 0
              <%               
                   if(matchingRelease2Number != null && matchingRelease2Number.size() != 0) {
                        Iterator iter = matchingRelease2Number.iterator();                         
                        matchingRelease2Size = matchingRelease2Number.size(); %>
                        size = "<%=     matchingRelease2Size %>"
                        //alert("Size of collection to be matched:"+size)
                   <%     while(iter.hasNext()) {
                             String matchFound1 = "false";
                             String relValue = (String)iter.next();%>
                             //alert("Collection value under iteration:"+ "<%=relValue%>")                         
                             amended = "<%=relValue.endsWith("A")%>"                         
                             if(amended) {
                                  amendedValue = "<%=relValue%>"
                             //alert("Collection value under iteration ends with A:"+amended)
                             var comb = "<%=relValue%>"
                             j = j + 1
                             for(var i = 0; i < inputframe.release2.options.length; i++) {
                                  //      breaking the for loop when matchingCombo2Index is set greater than 0
                                  /*if(matchFound == true) {
                                       break
                                  comboValue = inputframe.release2.options[i].value                              
                                  //alert("Combo value:->"+comboValue)
                                  //alert("rel value in comparison:"+ comb);
                                  if(comboValue == comb) {
                                       if(size == 1) {
                                            matchFound = "true";
                                       if(size == 2) {
                                            if(j == 1)
                                                 firstValue = comb
                                            if(j == 2)
                                                 secondValue = comb
                                            // The below if block shall be also kept as if((amended||(!amendedReleaseExist)==true)
                                            // The below one perfectly works fine
                                            if(amended || !amendedRelease2Exist) {
                                                 matchFound = "true";
                                  if(matchFound == "true") {
                                       matchingCombo2Index = i
                                       // alert("Matching combo index set to:"+ matchingCombo2Index)                                   
                                       inputframe.release2.selectedIndex = matchingCombo2Index
                                       if(size == 2)
                                            document.getElementById('errorArea').innerHTML = "There are"
                                                 + " two release numbers for the particular Issue date."
                                                 +" Please select either one of the release numbers ("+firstValue+ " or "+secondValue+" )."
                                                 +" Default selection in the Release drop down is "+ amendedValue+ "."
                                       matchingCombo2Index = 0;
                                       matchFound = "false";
                                       // Breaking the for loop
                                       break;                                   
                        <%                          
                        sess.removeAttribute("correspondingRelease2Number") ;
                   }%>
                   // Loading the selected release2 value in drop down
                   if(matchingCombo2Index == 0) {
                        <% if(release2Index != null && !release2Index.equals("")) { matchingRelease2Number = null;%>
                                  inputframe.release2.selectedIndex = "<%=Integer.parseInt(release2Index)%>"
                        <% } %>
         } // end of WITH
              Logic 2: Not used
              1. Pass the issue date entered by user and get the matching release numbers
              2. Get the release numbers from session.
              3. if release type is daily get the daily release numbers else get weekly release numbers
              4. Compare the matching release numbers with daily / weekly release numbers collection
              5. Find the match and update the selected index of drop down to this value
    }// end of function
    </script>
    </HEAD>
    <%-- Calling the two methods onload event of body --%>
    <BODY onload="setCurrentDate(this);fillDropDown(this)">

  • How do I centre javascript in a HTML page? Please help!

    Ok, I recently set up a website with advertising space. The space is split into banner engines of 10 banners each rotating every 7 seconds.
    I have fully tested the coding which I downloaded and it all seems to work as well as I need it to.
    The only problem that I have is that the javascript or at least the banner it produces are always firmly stuck to the left. They need to mbe in the centre to fit the rest of the page, but I can't seem to get them to centre.
    Here's how the page is set up and coded:
    in the page I have:<html>
    <head>
    <center>
    <p>Each test banner links back to this page. Your banner would link to whatever site/location you required.</p>
    <p>
    <script type=text/javascript src="http://www.UkVariety.co.uk/banner/div_construct2.js"></script>
    <script type=text/javascript>
    var _banners = new Array();
    function addBanner(_bannerHTML){
      _banners[_banners.length?_banners.length:0]=_bannerHTML;
    addBanner("<a href='http://www.ukvariety.co.uk/banners.html'><img border=0 alt='Advertiser 1' src='http://www.ukvariety.co.uk/Images/banners/Ad1.gif'></a>");
    addBanner("<a href='http://www.ukvariety.co.uk/banners.html'><img border=0 alt='Advertiser 2' src='http://www.ukvariety.co.uk/Images/banners/Ad2.gif'></a>");
    addBanner("<a href='http://www.ukvariety.co.uk/banners.html'><img border=0 alt='Advertiser 3' src='http://www.ukvariety.co.uk/Images/banners/Ad3.gif'></a>");
    addBanner("<a href='http://www.ukvariety.co.uk/banners.html'><img border=0 alt='Advertiser 4' src='http://www.ukvariety.co.uk/Images/banners/Ad4.gif'></a>");
    addBanner("<a href='http://www.ukvariety.co.uk/banners.html'><img border=0 alt='Advertiser 5' src='http://www.ukvariety.co.uk/Images/banners/Ad5.gif'></a>");
    addBanner("<a href='http://www.ukvariety.co.uk/banners.html'><img border=0 alt='Advertiser 6' src='http://www.ukvariety.co.uk/Images/banners/Ad6.gif'></a>");
    addBanner("<a href='http://www.ukvariety.co.uk/banners.html'><img border=0 alt='Advertiser 7' src='http://www.ukvariety.co.uk/Images/banners/Ad7.gif'></a>");
    addBanner("<a href='http://www.ukvariety.co.uk/banners.html'><img border=0 alt='Advertiser 8' src='http://www.ukvariety.co.uk/Images/banners/Ad8.gif'></a>");
    addBanner("<a href='http://www.ukvariety.co.uk/banners.html'><img border=0 alt='Advertiser 9' src='http://www.ukvariety.co.uk/Images/banners/Ad9.gif'></a>");
    addBanner("<a href='http://www.ukvariety.co.uk/banners.html'><img border=0 alt='Advertiser 10' src='http://www.ukvariety.co.uk/Images/banners/Ad10.gif'></a>");
    var div2 = new NewDiv2(window, "banner", _banners[0],0,0,50,50,500,"ABSOLUTE");
    var count=0; /* which one to start with */
    function doIt() {
    count++;
    count%=_banners.length;
    div2.setBody(_banners[count]);
    setInterval('doIt()',7000);
    </script>
    </p>
    </head>
    <body>
    <script type=text/javascript>
    div2.output();
    </script>
    </body></center>
    </html>The javascript links to a file caled div_construct2.js
    This file contains the following coding:
    isNS = document.layers?true:false;
    isIE = navigator.appName.indexOf("Microsoft") != -1
    isNS6=document.getElementById&&!isIE?true:false;
    function NewDiv2(window, id, body, left, top, width, height, zIndex, absolute) {
        this.window = window;
        this.id     = id;
        this.body   = body;
        var d = window.document;
        d.writeln('<STYLE TYPE="text/css">#' + id + ' {');
         if (absolute) d.write('position:absolute;');
         else          d.write('position:relative;');
        if (left)   d.write('left:'  + left  + ';');
        if (top)    d.write('top:'   + top   + ';');
        if (width)  d.write('width:' + width + ';');
         if (height) d.write('height:' + height + ';');
         if (zIndex) d.write('z-index:' + zIndex + ';');
        d.writeln('}</STYLE>');
    if (isNS) {
        NewDiv2.prototype.output             = function()      { var d = this.window.document;d.writeln('<DIV ID="' + this.id + '">');d.writeln(this.body);d.writeln("</DIV>");this.layer = d[this.id];}
        NewDiv2.prototype.moveTo             = function(x,y)   { this.layer.moveTo(x,y); }
        NewDiv2.prototype.moveBy             = function(x,y)   { this.layer.moveBy(x,y); }
        NewDiv2.prototype.show               = function()      { this.layer.visibility = "show"; }
        NewDiv2.prototype.hide               = function()      { this.layer.visibility = "hide"; }
        NewDiv2.prototype.setZ               = function(z)     { this.layer.zIndex = z; }
        NewDiv2.prototype.setBgColor         = function(color) { this.layer.bgColor = color; }
        NewDiv2.prototype.setBgImage         = function(image) { this.layer.background.src = image;}
        NewDiv2.prototype.getX               = function() { return this.layer.left; }
        NewDiv2.prototype.getY               = function() { return this.layer.top; } //was right .. ??
        NewDiv2.prototype.getWidth           = function() { return this.layer.width; }
        NewDiv2.prototype.getHeight          = function() { return this.layer.height; }
        NewDiv2.prototype.getZ               = function() { return this.layer.zIndex; }
        NewDiv2.prototype.isVisible          = function() { return this.layer.visibility == "show"; }
        NewDiv2.prototype.setBody            = function() { for(var i = 0; i < arguments.length; i++) this.layer.document.writeln(arguments);this.layer.document.close();}
    NewDiv2.prototype.addEventHandler = function(eventname, handler) {this.layer.captureEvents(NewDiv2._eventmasks[eventname]); var newdivel = this;this.layer[eventname] = function(event) { return handler(newdivel, event.type, event.x, event.y, event.which, event.which,((event.modifiers & Event.SHIFT_MASK) != 0),((event.modifiers & Event.CTRL_MASK)  != 0),((event.modifiers & Event.ALT_MASK)   != 0));}}
    NewDiv2.prototype.removeEventHandler = function(eventname) {this.layer.releaseEvents(NewDiv2._eventmasks[eventname]);delete this.layer[eventname];}
    NewDiv2.prototype.centerX = function() {this.layer.moveTo(Math.round((window.pageXOffset+document.width-100)/2),this.layer.top)}
    NewDiv2._eventmasks = {onabort:Event.ABORT,onblur:Event.BLUR,onchange:Event.CHANGE,onclick:Event.CLICK,ondblclick:Event.DBLCLICK, ondragdrop:Event.DRAGDROP,onerror:Event.ERROR, onfocus:Event.FOCUS,onkeydown:Event.KEYDOWN,onkeypress:Event.KEYPRESS,onkeyup:Event.KEYUP,onload:Event.LOAD,onmousedown:Event.MOUSEDOWN,onmousemove:Event.MOUSEMOVE, onmouseout:Event.MOUSEOUT,onmouseover:Event.MOUSEOVER, onmouseup:Event.MOUSEUP,onmove:Event.MOVE,onreset:Event.RESET,onresize:Event.RESIZE,onselect:Event.SELECT,onsubmit:Event.SUBMIT,onunload:Event.UNLOAD};
    if (isIE) {
    NewDiv2.prototype.output = function() { var d = this.window.document;d.writeln('<DIV ID="' + this.id + '">');d.writeln(this.body);d.writeln("</DIV>");this.element = d.all[this.id];this.style = this.element.style;}
    NewDiv2.prototype.moveTo = function(x,y) { this.style.pixelLeft = x;this.style.pixelTop = y;}
    NewDiv2.prototype.moveBy = function(x,y) { this.style.pixelLeft += x;this.style.pixelTop += y;}
    NewDiv2.prototype.show = function() { this.style.visibility = "visible"; }
    NewDiv2.prototype.hide = function() { this.style.visibility = "hidden"; }
    NewDiv2.prototype.setZ = function(z) { this.style.zIndex = z; }
    NewDiv2.prototype.setBgColor = function(color) { this.style.backgroundColor = color; }
    NewDiv2.prototype.setBgImage = function(image) { this.style.backgroundImage = image;}
    NewDiv2.prototype.getX = function() { return this.style.pixelLeft; }
    NewDiv2.prototype.getY = function() { return this.style.pixelRight; }
    NewDiv2.prototype.getWidth = function() { return this.style.width; }
    NewDiv2.prototype.getHeight = function() { return this.style.height; }
    NewDiv2.prototype.getZ = function() { return this.style.zIndex; }
    NewDiv2.prototype.isVisible = function() { return this.style.visibility == "visible"; }
    NewDiv2.prototype.setBody = function() { var body = "";for(var i = 0; i < arguments.length; i++) {body += arguments[i] + "\n";}this.element.innerHTML = body;}
    NewDiv2.prototype.addEventHandler = function(eventname, handler) { var NewDiv = this;this.element[eventname] = function() { var e = NewDiv2.window.event;e.cancelBubble = true;return handler(NewDiv2, e.type, e.x, e.y, e.button, e.keyCode, e.shiftKey, e.ctrlKey, e.altKey); }}
    NewDiv2.prototype.removeEventHandler = function(eventname) { delete this.element[eventname];}
         NewDiv2.prototype.centerX = function() { this.style.pixelLeft=Math.round((document.body.clientWidth+document.body.scrollLeft-300)/2)}
    * The following was written by:
    * Dario Guzik
    * Spam unfriendly email address: dguzik AT bigfoot DOT com
    if (isNS6) {
    NewDiv2.prototype.output = function() { var d = this.window.document;d.writeln('<DIV ID="' + this.id + '">');d.writeln(this.body);d.writeln("</DIV>");this.element = d.getElementById(this.id);this.style = this.element.style;}
    NewDiv2.prototype.moveTo = function(x,y) { this.style.pixelLeft = x;this.style.pixelTop = y;}
    NewDiv2.prototype.moveBy = function(x,y) { this.style.pixelLeft += x;this.style.pixelTop += y;}
    NewDiv2.prototype.show = function() { this.style.visibility = "visible"; }
    NewDiv2.prototype.hide = function() { this.style.visibility = "hidden"; }
    NewDiv2.prototype.setZ = function(z) { this.style.zIndex = z; }
    NewDiv2.prototype.setBgColor = function(color) { this.style.backgroundColor = color; }
    NewDiv2.prototype.setBgImage = function(image) { this.style.backgroundImage = image;}
    NewDiv2.prototype.getX = function() { return this.style.pixelLeft; }
    NewDiv2.prototype.getY = function() { return this.style.pixelRight; }
    NewDiv2.prototype.getWidth = function() { return this.style.width; }
    NewDiv2.prototype.getHeight = function() { return this.style.height; }
    NewDiv2.prototype.getZ = function() { return this.style.zIndex; }
    NewDiv2.prototype.isVisible = function() { return this.style.visibility == "visible"; }
    NewDiv2.prototype.setBody = function() { var body = "";for(var i = 0; i < arguments.length; i++) {body += arguments[i] + "\n";}this.element.innerHTML = body;}
    NewDiv2.prototype.addEventHandler = function(eventname, handler) { var NewDiv = this;this.element[eventname] = function() { var e = NewDiv2.window.event;e.cancelBubble = true;return handler(NewDiv, e.type, e.x, e.y, e.button, e.keyCode, e.shiftKey, e.ctrlKey, e.altKey); }}
    NewDiv2.prototype.removeEventHandler = function(eventname) { delete this.element[eventname];}
    NewDiv2.prototype.centerX = function() { this.style.pixelLeft=Math.round((document.body.clientWidth+document.body.scrollLeft-300)/2)}
    If anyone could help, I would be most grateful and could even offer a free advert for a while if needs be.
    Thanks in advance
    Dave
    "I think my brain exploded"

    You might want to ask this on a JavaScript forum.
    Java and JavaScript are not related.Now his brain probably experienced not just a mere explosion, but more like an atomic one.

  • I am running Win 7 Pro and the javascript to give popup pictures on my website is not resolving correctly. Pop up frames are too large. Worked O.K. on 3.6

    Small images are on the website pages. A click on the small images gives a larger picture which pops up in a frame. Small images are around 320 x 200. Pop up images are around 880 x 660. This procedure is controlled by javascript coding within the page for each pop up. If the images are larger than your screen size, scrollbars are provided.
    Javascript routine -
    <script language="JavaScript" type="text/javascript">
    <!-- ;
    var newwindow;
    var wheight = 0, wwidth = 0;
    function popitup(url, title, iwidth, iheight, colour) {
    var pwidth, pheight;
    if ( !newwindow || newwindow.closed ) {
    pwidth=iwidth+30;
    pheight=iheight+30;
    newwindow=window.open('','htmlname','width=' + pwidth +',height=' + pheight + ',scrollbars=yes,resizable=1,top=50,left=120');
    wheight=iheight;
    wwidth=iwidth;
    if (wheight!=iheight || wwidth!=iwidth ) {
    pwidth=iwidth+30;
    pheight=iheight+60;
    newwindow.resizeTo(pwidth, pheight);
    wheight=iheight;
    wwidth=iwidth;
    newwindow.document.clear();
    newwindow.focus();
    newwindow.document.writeln('<html> <head> <title>'+ title +'<\/title> <meta http-equiv="imagetoolbar" content="no"> <\/head> <body bgcolor= \"'+ colour +'\"> <center>');
    newwindow.document.writeln('<img src=' + url + ' onContextmenu="return false;">');
    newwindow.document.writeln('<\/center> <\/body> <\/html>');
    newwindow.document.close();
    newwindow.focus();
    // Routines to tidy up popup windows when page is left
    // Call with an onUnload="tidy()" in body tag
    // -->
    </script>
    Routine called with -
    <a title=" Auld Brig in the Summer Foliage" href="javascript: popitup('images/auldbrigsum2-2.jpg','Auld Brig and Summer Foliage',865,650,'white')">

    Small images are on the website pages. A click on the small images gives a larger picture which pops up in a frame. Small images are around 320 x 200. Pop up images are around 880 x 660. This procedure is controlled by javascript coding within the page for each pop up. If the images are larger than your screen size, scrollbars are provided.
    Javascript routine -
    <script language="JavaScript" type="text/javascript">
    <!-- ;
    var newwindow;
    var wheight = 0, wwidth = 0;
    function popitup(url, title, iwidth, iheight, colour) {
    var pwidth, pheight;
    if ( !newwindow || newwindow.closed ) {
    pwidth=iwidth+30;
    pheight=iheight+30;
    newwindow=window.open('','htmlname','width=' + pwidth +',height=' + pheight + ',scrollbars=yes,resizable=1,top=50,left=120');
    wheight=iheight;
    wwidth=iwidth;
    if (wheight!=iheight || wwidth!=iwidth ) {
    pwidth=iwidth+30;
    pheight=iheight+60;
    newwindow.resizeTo(pwidth, pheight);
    wheight=iheight;
    wwidth=iwidth;
    newwindow.document.clear();
    newwindow.focus();
    newwindow.document.writeln('<html> <head> <title>'+ title +'<\/title> <meta http-equiv="imagetoolbar" content="no"> <\/head> <body bgcolor= \"'+ colour +'\"> <center>');
    newwindow.document.writeln('<img src=' + url + ' onContextmenu="return false;">');
    newwindow.document.writeln('<\/center> <\/body> <\/html>');
    newwindow.document.close();
    newwindow.focus();
    // Routines to tidy up popup windows when page is left
    // Call with an onUnload="tidy()" in body tag
    // -->
    </script>
    Routine called with -
    <a title=" Auld Brig in the Summer Foliage" href="javascript: popitup('images/auldbrigsum2-2.jpg','Auld Brig and Summer Foliage',865,650,'white')">

  • Using cookies and JavaScript to create a page to page timer.

    I have long wanted to be able to measure the time it takes to get from one page to another.  While reading in my JavaScript reference the other day, I came across cookies.  I've long known about cookies but have never used them.  The thing that looked attractive was that you can access cookies from both JavaScript and CF.
    So I put together the procedures to store the "start time" (startTimeP8D) for the transition and activated it on the onUnload event of a 1stpage.  After a few rewrites I got it working.   Here is the JavaScript to do that: it consists of two functions: doTimer which is the input section and setCookie, which writes to the cookie.  Not the two numbered alert statements.
    doTimer - results for "start" from the doTimer function called from page 1 when it unloads. (See doTimer below)
         Please note that the two startTime8D values are the same immediately after they are stored.
    On the 2nd page in the sequence, I run the corresponding code to determine the "end time", compute the delta and write it out to the page.  It didn't all run on the first try, but it now seems to be running without a crash, which can be misleading.
          second set of outputs from page 2:    
         Please not that while the endTimeP8D match, the startTimeP8D value no longer matches the previously stored value. 
    There is one major hitch in the get along which has me stymied:  As you can see, when you compare the startTimeP8 in the setCookie – results above and the "startTimeP8" in the doTimer results below the startTimeP8 is not the value that I wrote to the cookie @ unload of page 1.  I have checked and checked and do now see anywhere that the startTimeP8D value is being overwritten.  Based upon my limited experience with JavaScript cookies, it seems to me that you get an entry for each time you set the cookie.  So I would expect to see to startTimeP8D entry for each setCookie event, not a different value.
         The result of the failed computation is shown on the bottom of the page.  As you can see, the Total Elapsed Time is negative, which is never a good sign.  The other time shown, Page build time, is the run time from the server.  The whole purpose is to be able to show folks that the reason the code might be show is because of their overloaded network and not our code.  We had one client whose had users running on 56k modems.  It was so slow their VPN software was timing out!!!  Still the had the never to blame us!!!
    I am using SQLServer 2005, CF8, IE8 on W7. 
    I'm not married to this way of doing this so if anyone has a better/easier way of doing a "page to page timer", I'm up for it.  I'd prefer to fix this one since I've been working on it for the past 3 days.
    Thanks in advcance for your help.
    Len, PHRED SE

    Here it is with no JQuery or console logging calls using cookie utility functions found here:
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
           "http://www.w3.org/TR/html4/loose.dtd">
    <html>
    <head>
         <title>Test JavaScript Page Load Timer</title>
         <script>
              window.onload = function(){
                   var previousPageUnload = getCookie('unloadTime');
                   if(previousPageUnload){
                        var d = new Date();
                        var loadTime = d.getTime() - previousPageUnload;
                        alert(loadTime + 'ms');
              window.onunload = function(){
                   var d = new Date();
                     setCookie('unloadTime',d.getTime());
              function setCookie(c_name,value,expiredays) {
                   var exdate=new Date();
                   exdate.setDate(exdate.getDate()+expiredays);
                   document.cookie=c_name+ "=" + escape(value) + ((expiredays==null) ? "" : ";expires="+exdate.toUTCString());
              function getCookie(c_name) {
                   if (document.cookie.length>0) {
                     c_start=document.cookie.indexOf(c_name + "=");
                     if (c_start!=-1)
                       c_start=c_start + c_name.length+1;
                       c_end=document.cookie.indexOf(";",c_start);
                       if (c_end==-1) c_end=document.cookie.length;
                       return unescape(document.cookie.substring(c_start,c_end));
                   return null;
         </script>
    </head>
    <body>
         <h1>Test JavaScript Page Load Timer</h1>
    </body>
    </html>
    Note that overwriting global window events like this is not a good idea, which is why I used JQuery in my earlier example. I strongly suggest you look at JQuery or one of the other JS libraries (YUI, etc.) to help with event handling. I'll leave it at that as this is getting into JavaScript development, not really on topic for a ColdFusion forum.

  • Runtime error in menu using javascript

    i got a code for building menu using javascript from internet. But when run this file, it gives a runtime error stating Error: 'Trigger' is null or not an object.I am not able to rectify it. Can you please help me with this problem? Its very urgent..
    I am giving the code here.The initialization of the trigger is given in bold, italics.
    <script type='text/javascript'>
    function Go(){return}
    Menu1=new Array("1","1.jsp","a",0,20,150);
    Menu2=new Array("2","2.jsp","",0,0,150);
    Menu3=new Array("3","","",4,0,150);
    Menu3_1=new Array("3-1","","",2,20,170);
    Menu3_1_1=new Array("3-1-1","3-1-1.jsp","",0,20,170);
    Menu3_1_2=new Array("3-1-2","3-1-2.jsp","",0,20,170);
    Menu3_2=new Array("3-2","3-2.jsp","",0,20,170);
    Menu3_3=new Array("3-3","3-3.jsp","",0,20,0);
    Menu3_4=new Array("3-4","3-4.jsp","",0,20,170);
    Menu4=new Array("4","","",3,0,150);
    Menu4_1=new Array("4-1","4-1.jsp","",0,20,170);
    Menu4_2=new Array("4-2","","",3,20,170);
    Menu4_2_1=new Array("4-2-1","4-2-1.jsp","",0,20,170);
    Menu4_2_2=new Array("4-2-2","4-2-2.jsp","",0,20,170);
    Menu4_2_3=new Array("4-2-3","4-2-3.jsp","",0,20,170);
    Menu4_3=new Array("4-3","","",2,20,170);
    Menu4_3_1=new Array("4-3-1","4-3-1.jsp","",0,20,170);
    Menu4_3_2=new Array("4-3-2","4-3-2.jsp","",0,20,170);
    var NoOffFirstLineMenus=4;     // Number of first level items
    var LowBgColor='FFFFFF';     // Background color when mouse is not over
    var LowSubBgColor='FFFFFF';     // Background color when mouse is not over on subs
    var HighBgColor='ECE9D8';     // Background color when mouse is over
    var HighSubBgColor='ECE9D8';     // Background color when mouse is over on subs
    var FontLowColor='000000';     // Font color when mouse is not over
    var FontSubLowColor='000000';     // Font color subs when mouse is not over
    var FontHighColor='FF0000';     // Font color when mouse is over
    var FontSubHighColor='FF0000';     // Font color subs when mouse is over
    var BorderColor='ACA899';     // Border color
    var BorderSubColor='ACA899';     // Border color for subs
    var BorderWidth=1;          // Border width
    var BorderBtwnElmnts=0;          // Border between elements 1 or 0
    var FontFamily="Bookman Old Style"             // Font family menu items
    var FontSize=10;                             // Font size menu items
    var FontBold=0;                                 // Bold menu items 1 or 0
    var FontItalic=0;                               // Italic menu items 1 or 0
    var MenuTextCentered='center';                  // Item text position 'left', 'center' or 'right'
    var MenuCentered='center';     // Menu horizontal position 'left', 'center' or 'right'
    var MenuVerticalCentered='top';     // Menu vertical position 'top', 'middle','bottom' or static
    var ChildOverlap=.2;          // horizontal overlap child/ parent
    var ChildVerticalOverlap=.2;     // vertical overlap child/ parent
    var StartTop=1;          // Menu offset x coordinate
    var StartLeft=1;          // Menu offset y coordinate
    var VerCorrect=0;          // Multiple frames y correction
    var HorCorrect=0;          // Multiple frames x correction
    var LeftPaddng=3;          // Left padding
    var TopPaddng=2;          // Top padding
    var FirstLineHorizontal=1;     // SET TO 1 FOR HORIZONTAL MENU, 0 FOR VERTICAL
    var MenuFramesVertical=1;     // Frames in cols or rows 1 or 0
    var DissapearDelay=1000;     // delay before menu folds in
    var TakeOverBgColor=1;          // Menu frame takes over background color subitem frame
    var FirstLineFrame='menu';     // Frame where first level appears
    var SecLineFrame='menu';     // Frame where sub levels appear
    var DocTargetFrame='home';     // Frame where target documents appear
    var TargetLoc='';          // span id for relative positioning
    var HideTop=0;               // Hide first level when loading new document 1 or 0
    var MenuWrap=1;               // enables/ disables menu wrap 1 or 0
    var RightToLeft=0;          // enables/ disables right to left unfold 1 or 0
    var UnfoldsOnClick=0;          // Level 1 unfolds onclick/ onmouseover
    var WebMasterCheck=0;          // menu tree checking on or off 1 or 0
    var ShowArrow=1;          // Uses arrow gifs when 1
    var KeepHilite=1;          // Keep selected path highligthed
    var Arrws=['arrow_r2.gif',8,8,'arrow_d2.gif',8,8,'new1-05.gif',5,5];     // Arrow source, width and height
    var AgntUsr=navigator.userAgent.toLowerCase();
    var DomYes=document.getElementById?1:0;
    var NavYes=AgntUsr.indexOf('mozilla')!=-1&&AgntUsr.indexOf('compatible')==-1?1:0;
    var ExpYes=AgntUsr.indexOf('msie')!=-1?1:0;
    var Opr=AgntUsr.indexOf('opera')!=-1?1:0;
    var Opr6orless=window.opera && navigator.userAgent.search(/opera.[1-6]/i)!=-1 //DynamicDrive.com added code
    var DomNav=DomYes&&NavYes?1:0;
    var DomExp=DomYes&&ExpYes?1:0;
    var Nav4=NavYes&&!DomYes&&document.layers?1:0;
    var Exp4=ExpYes&&!DomYes&&document.all?1:0;
    var PosStrt=(NavYes||ExpYes)&&!Opr6orless?1:0;
    var FrstLoc,ScLoc,DcLoc;
    var ScWinWdth,ScWinHght,FrstWinWdth,FrstWinHght;
    var ScLdAgainWin;
    var FirstColPos,SecColPos,DocColPos;
    var RcrsLvl=0;
    var FrstCreat=1,Loadd=0,Creatd=0,IniFlg,AcrssFrms=1;
    var FrstCntnr=null,CurrntOvr=null,CloseTmr=null;
    var CntrTxt,TxtClose,ImgStr;
    var Ztop=100;
    var ShwFlg=0;
    var M_StrtTp=StartTop,M_StrtLft=StartLeft;
    var StaticPos=0;
    var LftXtra=DomNav&&!Opr?LeftPaddng:0; //Changed for Opera
    var TpXtra=DomNav?TopPaddng:0;
    var M_Hide=Nav4?'hide':'hidden';
    var M_Show=Nav4?'show':'visible';
    var Par=parent.frames[0]&&FirstLineFrame!=SecLineFrame?parent:window;
    var Doc=Par.document;
    var Bod=Doc.body;
    var Trigger=NavYes&&!Opr?Par:Bod; //Changed for Opera
    MenuTextCentered=MenuTextCentered==1||MenuTextCentered=='center'?'center':MenuTextCentered==0||MenuTextCentered!='right'?'left':'right';
    WbMstrAlrts=["Item not defined: ","Item needs height: ","Item needs width: "];
    if(Trigger.onload)Dummy=Trigger.onload;
    if(DomNav||Opr)Trigger.addEventListener('load',Go,false); //Changed for Opera
    else Trigger.onload=Go;
    function Dummy(){return}
    function CnclSlct(){return false}
    function RePos(){
    FrstWinWdth=ExpYes?FrstLoc.document.body.clientWidth:FrstLoc.innerWidth;
    FrstWinHght=ExpYes?FrstLoc.document.body.clientHeight:FrstLoc.innerHeight;
    ScWinWdth=ExpYes?ScLoc.document.body.clientWidth:ScLoc.innerWidth;
    ScWinHght=ExpYes?ScLoc.document.body.clientHeight:ScLoc.innerHeight;
    if(MenuCentered=='justify'&&FirstLineHorizontal){
    FrstCntnr.style.width=FrstWinWdth;
    ClcJus();
    var P=FrstCntnr.FrstMbr,W=Menu1[5],i;
    for(i=0;i<NoOffFirstLineMenus;i++){P.style.width=W;P=P.PrvMbr}}
                                 StaticPos=-1;
                                 if(TargetLoc)ClcTrgt();
                                 if(MenuCentered)ClcLft();
                                 if(MenuVerticalCentered)ClcTp();
                                 PosMenu(FrstCntnr,StartTop,StartLeft)}
                                 function UnLoaded(){
                                 if(CloseTmr)clearTimeout(CloseTmr);
                                 Loadd=0; Creatd=0;
                                 if(HideTop){
                                 var FCStyle=Nav4?FrstCntnr:FrstCntnr.style;
                                 FCStyle.visibility=M_Hide}}
                                 function ReDoWhole(){
    if(ScWinWdth!=ScLoc.innerWidth||ScWinHght!=ScLoc.innerHeight||FrstWinWdth!=FrstLoc.innerWidth||FrstWinHght!=FrstLoc.innerHeight)Doc.location.reload()}
                                 function Check(WMnu,NoOf){
                                 var i,array,ArrayLoc;
                                 ArrayLoc=parent.frames[0]?parent.frames[FirstLineFrame]:self;
                                 for(i=0;i<NoOf;i++){
                  array=WMnu+eval(i+1);
                  if(!ArrayLoc[array]){WbMstrAlrt(0,array); return false}
                  if(i==0){     if(!ArrayLoc[array][4]){WbMstrAlrt(1,array); return false}
                  if(!ArrayLoc[array][5]){WbMstrAlrt(2,array); return false}}
                  if(ArrayLoc[array][3])if(!Check(array+'_',ArrayLoc[array][3])) return false}
                  return true}
                  function WbMstrAlrt(No,Xtra){
                  return confirm(WbMstrAlrts[No]+Xtra+'   ')}
                  function Go(){
                  Dummy();
                  if(Loadd||!PosStrt)return;
                  BeforeStart();
                  Creatd=0; Loadd=1;
                  status='Building menu';
                  if(FrstCreat){
                  if(FirstLineFrame =="" || !parent.frames[FirstLineFrame]){
                  FirstLineFrame=SecLineFrame;
                  if(FirstLineFrame =="" || !parent.frames[FirstLineFrame]){
                  FirstLineFrame=SecLineFrame=DocTargetFrame;
                  if(FirstLineFrame =="" || !parent.frames[FirstLineFrame])FirstLineFrame=SecLineFrame=DocTargetFrame=''}}
                  if(SecLineFrame =="" || !parent.frames[SecLineFrame]){
                  SecLineFrame=DocTargetFrame;
                  if(SecLineFrame =="" || !parent.frames[SecLineFrame])SecLineFrame=DocTargetFrame=FirstLineFrame}
                  if(DocTargetFrame =="" || !parent.frames[DocTargetFrame])DocTargetFrame=SecLineFrame;
                  if(WebMasterCheck){     if(!Check('Menu',NoOffFirstLineMenus)){status='build aborted';return}}
                  FrstLoc=FirstLineFrame!=""?parent.frames[FirstLineFrame]:window;
                  ScLoc=SecLineFrame!=""?parent.frames[SecLineFrame]:window;
                  DcLoc=DocTargetFrame!=""?parent.frames[DocTargetFrame]:window;
                  if (FrstLoc==ScLoc) AcrssFrms=0;
                  if (AcrssFrms)FirstLineHorizontal=MenuFramesVertical?0:1;
                  FrstWinWdth=ExpYes?FrstLoc.document.body.clientWidth:FrstLoc.innerWidth;
                  FrstWinHght=ExpYes?FrstLoc.document.body.clientHeight:FrstLoc.innerHeight;
                  ScWinWdth=ExpYes?ScLoc.document.body.clientWidth:ScLoc.innerWidth;
                  ScWinHght=ExpYes?ScLoc.document.body.clientHeight:ScLoc.innerHeight;
                  if(Nav4){     CntrTxt=MenuTextCentered!='left'?"<div align='"+MenuTextCentered+"'>":"";
    TxtClose="</font>"+MenuTextCentered!='left'?"</div>":""}}
    FirstColPos=Nav4?FrstLoc.document:FrstLoc.document.body;
    SecColPos=Nav4?ScLoc.document:ScLoc.document.body;
    DocColPos=Nav4?DcLoc.document:ScLoc.document.body;
    if (TakeOverBgColor)FirstColPos.bgColor=AcrssFrms?SecColPos.bgColor:DocColPos.bgColor;
    if(MenuCentered=='justify'&&FirstLineHorizontal)ClcJus();
    if(FrstCreat){
    FrstCntnr=CreateMenuStructure('Menu',NoOffFirstLineMenus);
    FrstCreat=AcrssFrms?0:1}
    else CreateMenuStructureAgain('Menu',NoOffFirstLineMenus);
    if(TargetLoc)ClcTrgt();
    if(MenuCentered)ClcLft();
    if(MenuVerticalCentered)ClcTp();
    PosMenu(FrstCntnr,StartTop,StartLeft);
    IniFlg=1;
    Initiate();
    Creatd=1;
    if (AcrssFrms)      //Added for Opera
    {      //Added for Opera
    ScLdAgainWin=ExpYes?ScLoc.document.body:ScLoc;
    ScLdAgainWin.onunload=UnLoaded;
    }      //Added for Opera
    Trigger.onresize=Nav4?ReDoWhole:RePos;
    AfterBuild();
    if(MenuVerticalCentered=='static'&&!AcrssFrms)setInterval('KeepPos()',250);
    status='Menu ready for use'}
    function KeepPos(){
    var TS=ExpYes?FrstLoc.document.body.scrollTop:FrstLoc.pageYOffset;
    if(TS!=StaticPos){
    var FCStyle=Nav4?FrstCntnr:FrstCntnr.style;
    FCStyle.top=FrstCntnr.OrgTop=StartTop+TS;StaticPos=TS}}
    function ClcJus(){
    var a=BorderBtwnElmnts?1:2,b=BorderBtwnElmnts?BorderWidth:0;
    var Size=Math.round(((FrstWinWdth-a*BorderWidth)/NoOffFirstLineMenus)-b),i,j;
    for(i=1;i<NoOffFirstLineMenus+1;i++){j=eval('Menu'+i);j[5]=Size}
                                 StartLeft=0}
                                 function ClcTrgt(){
                                 var TLoc=Nav4?FrstLoc.document.layers[TargetLoc]:DomYes?FrstLoc.document.getElementById(TargetLoc):FrstLoc.document.all[TargetLoc];
                                 StartTop=M_StrtTp;
                                 StartLeft=M_StrtLft;
                                 if(DomYes){
                                 while(TLoc){StartTop+=TLoc.offsetTop;StartLeft+=TLoc.offsetLeft;TLoc=TLoc.offsetParent}}
                                 else{     StartTop+=Nav4?TLoc.pageY:TLoc.offsetTop;StartLeft+=Nav4?TLoc.pageX:TLoc.offsetLeft}}
                                 function ClcLft(){
                                 if(MenuCentered!='left'&&MenuCentered!='justify'){
                                 var Size=FrstWinWdth-(!Nav4?parseInt(FrstCntnr.style.width):FrstCntnr.clip.width);
                                 StartLeft=M_StrtLft;
                                 StartLeft+=MenuCentered=='right'?Size:Size/2}}
                                 function ClcTp(){
                                 if(MenuVerticalCentered!='top'&&MenuVerticalCentered!='static'){
                                 var Size=FrstWinHght-(!Nav4?parseInt(FrstCntnr.style.height):FrstCntnr.clip.height);
                                 StartTop=M_StrtTp;
                                 StartTop+=MenuVerticalCentered=='bottom'?Size:Size/2}}
                                 function PosMenu(CntnrPntr,Tp,Lt){
                                 var Topi,Lefti,Hori;
                                 var Cntnr=CntnrPntr;
                                 var Mmbr=Cntnr.FrstMbr;
                                 var CntnrStyle=!Nav4?Cntnr.style:Cntnr;
                                 var MmbrStyle=!Nav4?Mmbr.style:Mmbr;
                                 var PadL=Mmbr.value.indexOf('<')==-1?LftXtra:0;
                                 var PadT=Mmbr.value.indexOf('<')==-1?TpXtra:0;
                                 var MmbrWt=!Nav4?parseInt(MmbrStyle.width)+PadL:MmbrStyle.clip.width;
                                 var MmbrHt=!Nav4?parseInt(MmbrStyle.height)+PadT:MmbrStyle.clip.height;
                                 var CntnrWt=!Nav4?parseInt(CntnrStyle.width):CntnrStyle.clip.width;
                                 var CntnrHt=!Nav4?parseInt(CntnrStyle.height):CntnrStyle.clip.height;
                                 var SubTp,SubLt;
                                 RcrsLvl++;
                                 if (RcrsLvl==1 && AcrssFrms)!MenuFramesVertical?Tp=FrstWinHght-CntnrHt+(Nav4?4:0):Lt=RightToLeft?0:FrstWinWdth-CntnrWt+(Nav4?4:0);
                                 if (RcrsLvl==2 && AcrssFrms)!MenuFramesVertical?Tp=0:Lt=RightToLeft?ScWinWdth-CntnrWt:0;
                                 if (RcrsLvl==2 && AcrssFrms){Tp+=VerCorrect;Lt+=HorCorrect}
                                 CntnrStyle.top=RcrsLvl==1?Tp:0;
                                 Cntnr.OrgTop=Tp;
                                 CntnrStyle.left=RcrsLvl==1?Lt:0;
                                 Cntnr.OrgLeft=Lt;
                                 if (RcrsLvl==1 && FirstLineHorizontal){
                                 Hori=1;Lefti=CntnrWt-MmbrWt-2*BorderWidth;Topi=0}
                                 else{     Hori=Lefti=0;Topi=CntnrHt-MmbrHt-2*BorderWidth}
                                 while(Mmbr!=null){
                                 MmbrStyle.left=Lefti+BorderWidth;
                                 MmbrStyle.top=Topi+BorderWidth;
                                 if(Nav4)Mmbr.CmdLyr.moveTo(Lefti+BorderWidth,Topi+BorderWidth);
                                 if(Mmbr.ChildCntnr){
                                 if(RightToLeft)ChldCntnrWdth=Nav4?Mmbr.ChildCntnr.clip.width:parseInt(Mmbr.ChildCntnr.style.width);
                                 if(Hori){     SubTp=Topi+MmbrHt+2*BorderWidth;
                                 SubLt=RightToLeft?Lefti+MmbrWt-ChldCntnrWdth:Lefti}
                                 else{     SubLt=RightToLeft?Lefti-ChldCntnrWdth+ChildOverlap*MmbrWt+BorderWidth:Lefti+(1-ChildOverlap)*MmbrWt+BorderWidth;
                                 SubTp=RcrsLvl==1&&AcrssFrms?Topi:Topi+ChildVerticalOverlap*MmbrHt}
                                 PosMenu(Mmbr.ChildCntnr,SubTp,SubLt)}
                                 Mmbr=Mmbr.PrvMbr;
                                 if(Mmbr){     MmbrStyle=!Nav4?Mmbr.style:Mmbr;
                                 PadL=Mmbr.value.indexOf('<')==-1?LftXtra:0;
                                 PadT=Mmbr.value.indexOf('<')==-1?TpXtra:0;
                                 MmbrWt=!Nav4?parseInt(MmbrStyle.width)+PadL:MmbrStyle.clip.width;
                                 MmbrHt=!Nav4?parseInt(MmbrStyle.height)+PadT:MmbrStyle.clip.height;
                                 Hori?Lefti-=BorderBtwnElmnts?(MmbrWt+BorderWidth):(MmbrWt):Topi-=BorderBtwnElmnts?(MmbrHt+BorderWidth):(MmbrHt)}}
                                 RcrsLvl--}
                                 function Initiate(){
                                 if(IniFlg){     Init(FrstCntnr);IniFlg=0;
                                 if(ShwFlg)AfterCloseAll();ShwFlg=0}}
                                 function Init(CntnrPntr){
                                 var Mmbr=CntnrPntr.FrstMbr;
                                 var MCStyle=Nav4?CntnrPntr:CntnrPntr.style;
                                 RcrsLvl++;
                                 MCStyle.visibility=RcrsLvl==1?M_Show:M_Hide;
                                 while(Mmbr!=null){
                                 if(Mmbr.Hilite){Mmbr.Hilite=0;if(KeepHilite)LowItem(Mmbr)}
                                 if(Mmbr.ChildCntnr) Init(Mmbr.ChildCntnr);
                                 Mmbr=Mmbr.PrvMbr}
                                 RcrsLvl--}
                                 function ClearAllChilds(Pntr){
                                 var CPCCStyle;
                                 while (Pntr){
                                 if(Pntr.Hilite){
                                 Pntr.Hilite=0;
                                 if(KeepHilite)LowItem(Pntr);
                                 if(Pntr.ChildCntnr){
                                 CPCCStyle=Nav4?Pntr.ChildCntnr:Pntr.ChildCntnr.style;
                                 CPCCStyle.visibility=M_Hide;
                                 ClearAllChilds(Pntr.ChildCntnr.FrstMbr)}
                                 break}
                                 Pntr=Pntr.PrvMbr}}
                                 function GoTo(){
                                 if(this.LinkTxt){
                                 status='';
                                 var HP=Nav4?this.LowLyr:this;
                                 LowItem(HP);
                                 this.LinkTxt.indexOf('javascript:')!=-1?eval(this.LinkTxt):DcLoc.location.href=this.LinkTxt}}
                                 function HiliteItem(P){
                                 if(Nav4){
                                 if(P.ro)P.document.images[P.rid].src=P.ri2;
                                 else{     if(P.HiBck)P.bgColor=P.HiBck;
                                 if(P.value.indexOf('<img')==-1){
                            P.document.write(P.Ovalue);
                            P.document.close()}}}
                            else{     if(P.ro){     var Lc=P.Level==1?FrstLoc:ScLoc;
                            Lc.document.images[P.rid].src=P.ri2}
                            else{     if(P.HiBck)P.style.backgroundColor=P.HiBck;
                            if(P.HiFntClr)P.style.color=P.HiFntClr}}
                            P.Hilite=1}
                            function LowItem(P){
                            if(P.ro){     if(Nav4)P.document.images[P.rid].src=P.ri1;
                            else{     var Lc=P.Level==1?FrstLoc:ScLoc;
                            Lc.document.images[P.rid].src=P.ri1}}
                            else{     if(Nav4){     if(P.LoBck)P.bgColor=P.LoBck;
                            if(P.value.indexOf('<img')==-1){
                            P.document.write(P.value);
                            P.document.close()}}
                            else{     if(P.LoBck)P.style.backgroundColor=P.LoBck;
                            if(P.LwFntClr)P.style.color=P.LwFntClr}}}
                            function OpenMenu(){
                            if(!Loadd||!Creatd) return;
                            var TpScrlld=ExpYes?ScLoc.document.body.scrollTop:ScLoc.pageYOffset;
                            var LScrlld=ExpYes?ScLoc.document.body.scrollLeft:ScLoc.pageXOffset;
                            var CCnt=Nav4?this.LowLyr.ChildCntnr:this.ChildCntnr;
                            var ThisHt=Nav4?this.clip.height:parseInt(this.style.height);
                            var ThisWt=Nav4?this.clip.width:parseInt(this.style.width);
                            var ThisLft=AcrssFrms&&this.Level==1&&!FirstLineHorizontal?0:Nav4?this.Container.left:parseInt(this.Container.style.left);
                            var ThisTp=AcrssFrms&&this.Level==1&&FirstLineHorizontal?0:Nav4?this.Container.top:parseInt(this.Container.style.top);
                            var HP=Nav4?this.LowLyr:this;
                            CurrntOvr=this;
                            IniFlg=0;
                            ClearAllChilds(this.Container.FrstMbr);
                            HiliteItem(HP);
                            if(CCnt!=null){
                            if(!ShwFlg){ShwFlg=1;     BeforeFirstOpen()}
                            var CCW=Nav4?this.LowLyr.ChildCntnr.clip.width:parseInt(this.ChildCntnr.style.width);
                            var CCH=Nav4?this.LowLyr.ChildCntnr.clip.height:parseInt(this.ChildCntnr.style.height);
                            var ChCntTL=Nav4?this.LowLyr.ChildCntnr:this.ChildCntnr.style;
                            var SubLt=AcrssFrms&&this.Level==1?CCnt.OrgLeft+ThisLft+LScrlld:CCnt.OrgLeft+ThisLft;
                            var SubTp=AcrssFrms&&this.Level==1?CCnt.OrgTop+ThisTp+TpScrlld:CCnt.OrgTop+ThisTp;
                            if(MenuWrap){
                            if(RightToLeft){
                            if(SubLt<LScrlld)SubLt=this.Level==1?LScrlld:SubLt+(CCW+(1-2*ChildOverlap)*ThisWt);
                    if(SubLt+CCW>ScWinWdth+LScrlld)SubLt=ScWinWdth+LScrlld-CCW}
                    else{     if(SubLt+CCW>ScWinWdth+LScrlld)SubLt=this.Level==1?ScWinWdth+LScrlld-CCW:SubLt-(CCW+(1-2*ChildOverlap)*ThisWt);
                    if(SubLt<LScrlld)SubLt=LScrlld}
                    if(SubTp+CCH>TpScrlld+ScWinHght)SubTp=this.Level==1?SubTp=TpScrlld+ScWinHght-CCH:SubTp-CCH+(1-2*ChildVerticalOverlap)*ThisHt;
                    if(SubTp<TpScrlld)SubTp=TpScrlld}
                     ChCntTL.top=SubTp;ChCntTL.left=SubLt;ChCntTL.visibility=M_Show}
                     status=this.LinkTxt}
                     function OpenMenuClick(){
                     if(!Loadd||!Creatd) return;
                     var HP=Nav4?this.LowLyr:this;
                     CurrntOvr=this;
                     IniFlg=0;
                     ClearAllChilds(this.Container.FrstMbr);
                     HiliteItem(HP);
                     status=this.LinkTxt}
                     function CloseMenu(){
                     if(!Loadd||!Creatd) return;
                     if(!KeepHilite){
                     var HP=Nav4?this.LowLyr:this;
                     LowItem(HP)}
                     status='';
                     if(this==CurrntOvr){
                     IniFlg=1;
                     if(CloseTmr)clearTimeout(CloseTmr);
                     CloseTmr=setTimeout('Initiate(CurrntOvr)',DissapearDelay)}}
                     function CntnrSetUp(Wdth,Hght,NoOff){
                     var x=RcrsLvl==1?BorderColor:BorderSubColor;
                     this.FrstMbr=null;
                     this.OrgLeft=this.OrgTop=0;
                     if(x)this.bgColor=x;
                     if(Nav4){     this.visibility='hide';
                     this.resizeTo(Wdth,Hght)}
                     else{     if(x)this.style.backgroundColor=x;
                     this.style.width=Wdth;
                     this.style.height=Hght;
                     this.style.fontFamily=FontFamily;
                     this.style.fontWeight=FontBold?'bold':'normal';
                     this.style.fontStyle=FontItalic?'italic':'normal';
                     this.style.fontSize=FontSize+'pt';
                     this.style.zIndex=RcrsLvl+Ztop}}
                     function MbrSetUp(MmbrCntnr,PrMmbr,WhatMenu,Wdth,Hght){
                     var Location=RcrsLvl==1?FrstLoc:ScLoc;
                     var MemVal=eval(WhatMenu+'[0]');
                     var t,T,L,W,H,S;
                     var a,b,c,d;
                     this.PrvMbr=PrMmbr;
                     this.Level=RcrsLvl;
                     this.LinkTxt=eval(WhatMenu+'[1]');
                     this.Container=MmbrCntnr;
                     this.ChildCntnr=null;
                     this.Hilite=0;
                     this.style.overflow='hidden';
                     this.style.cursor=ExpYes&&(this.LinkTxt||(RcrsLvl==1&&UnfoldsOnClick))?'hand':'default';
                     this.ro=0;
                     if(MemVal.indexOf('rollover')!=-1){
                     this.ro=1;
                     this.ri1=MemVal.substring(MemVal.indexOf(':')+1,MemVal.lastIndexOf(':'));
                     this.ri2=MemVal.substring(MemVal.lastIndexOf(':')+1,MemVal.length);
                     this.rid=WhatMenu+'i';MemVal="<img src='"+this.ri1+"' name='"+this.rid+"'>"}
    this.value=MemVal;
    if(RcrsLvl==1){
    a=LowBgColor;
    b=HighBgColor;
    c=FontLowColor;
    d=FontHighColor}
    else{     a=LowSubBgColor;
    b=HighSubBgColor;
    c=FontSubLowColor;
    d=FontSubHighColor}
    this.LoBck=a;
    this.LwFntClr=c;
    this.HiBck=b;
    this.HiFntClr=d;
    this.style.color=this.LwFntClr;
    if(this.LoBck)this.style.backgroundColor=this.LoBck;
    this.style.textAlign=MenuTextCentered;
    if(eval(WhatMenu+'[2]'))this.style.backgroundImage="url(\'"+eval(WhatMenu+'[2]')+"\')";
    if(MemVal.indexOf('<')==-1){
    this.style.width=Wdth-LftXtra;
    this.style.height=Hght-TpXtra;
    this.style.paddingLeft=LeftPaddng;
    this.style.paddingTop=TopPaddng}
    else{     this.style.width=Wdth;
    this.style.height=Hght}
    if(MemVal.indexOf('<')==-1&&DomYes){
    t=Location.document.createTextNode(MemVal);
    this.appendChild(t)}
    else this.innerHTML=MemVal;
    if(eval(WhatMenu+'[3]')&&ShowArrow){
    a=RcrsLvl==1&&FirstLineHorizontal?3:RightToLeft?6:0;
    S=Arrws[a];
    W=Arrws[a+1];
    H=Arrws[a+2];
    T=RcrsLvl==1&&FirstLineHorizontal?Hght-H-2:(Hght-H)/2;
    L=RightToLeft?2:Wdth-W-2;
    if(DomYes){
    t=Location.document.createElement('img');
    this.appendChild(t);
    t.style.position='absolute';
    t.src=S;
    t.style.width=W;
    t.style.height=H;
    t.style.top=T;
    t.style.left=L}
    else{     MemVal+="<div style='position:absolute; top:"+T+"; left:"+L+"; width:"+W+"; height:"+H+";visibility:inherit'><img src='"+S+"'></div>";
    this.innerHTML=MemVal}}
    if(ExpYes){this.onselectstart=CnclSlct;
    this.onmouseover=RcrsLvl==1&&UnfoldsOnClick?OpenMenuClick:OpenMenu;
    this.onmouseout=CloseMenu;
    this.onclick=RcrsLvl==1&&UnfoldsOnClick&&eval(WhatMenu+'[3]')?OpenMenu:GoTo     }
    else{     RcrsLvl==1&&UnfoldsOnClick?this.addEventListener('mouseover',OpenMenuClick,false):this.addEventListener('mouseover',OpenMenu,false);
    this.addEventListener('mouseout',CloseMenu,false);
    RcrsLvl==1&&UnfoldsOnClick&&eval(WhatMenu+'[3]')?this.addEventListener('click',OpenMenu,false):this.addEventListener('click',GoTo,false)}}
    function NavMbrSetUp(MmbrCntnr,PrMmbr,WhatMenu,Wdth,Hght){
    var a,b,c,d;
    if(RcrsLvl==1){
    a=LowBgColor;
    b=HighBgColor;
    c=FontLowColor;
    d=FontHighColor}
    else {     a=LowSubBgColor;
    b=HighSubBgColor;
    c=FontSubLowColor;
    d=FontSubHighColor     }
    this.value=eval(WhatMenu+'[0]');
    this.ro=0;
    if(this.value.indexOf('rollover')!=-1){
    this.ro=1;
    this.ri1=this.value.substring(this.value.indexOf(':')+1,this.value.lastIndexOf(':'));
    this.ri2=this.value.substring(this.value.lastIndexOf(':')+1,this.value.length);
    this.rid=WhatMenu+'i';this.value="<img src='"+this.ri1+"' name='"+this.rid+"'>"}
    if(LeftPaddng&&this.value.indexOf('<')==-1&&MenuTextCentered=='left')this.value='�\;'+this.value;
    if(FontBold)this.value=this.value.bold();
    if(FontItalic)this.value=this.value.italics();
    this.Ovalue=this.value;
    this.value=this.value.fontcolor(c);
    this.Ovalue=this.Ovalue.fontcolor(d);
    this.value=CntrTxt+"<font face='"+FontFamily+"' point-size='"+FontSize+"'>"+this.value+TxtClose;
    this.Ovalue=CntrTxt+"<font face='"+FontFamily+"' point-size='"+FontSize+"'>"+this.Ovalue+TxtClose;
    this.LoBck=a;
    this.HiBck=b;
    this.ChildCntnr=null;
    this.PrvMbr=PrMmbr;
    this.Hilite=0;
    this.visibility='inherit';
    if(this.LoBck)this.bgColor=this.LoBck;
    this.resizeTo(Wdth,Hght);
    if(!AcrssFrms&&eval(WhatMenu+'[2]'))this.background.src=eval(WhatMenu+'[2]');
    this.document.write(this.value);
    this.document.close();
    this.CmdLyr=new Layer(Wdth,MmbrCntnr);
    this.CmdLyr.Level=RcrsLvl;
    this.CmdLyr.LinkTxt=eval(WhatMenu+'[1]');
    this.CmdLyr.visibility='inherit';
    this.CmdLyr.onmouseover=RcrsLvl==1&&UnfoldsOnClick?OpenMenuClick:OpenMenu;
    this.CmdLyr.onmouseout=CloseMenu;
    this.CmdLyr.captureEvents(Event.MOUSEUP);
    this.CmdLyr.onmouseup=RcrsLvl==1&&UnfoldsOnClick&&eval(WhatMenu+'[3]')?OpenMenu:GoTo;
    this.CmdLyr.LowLyr=this;
    this.CmdLyr.resizeTo(Wdth,Hght);
    this.CmdLyr.Container=MmbrCntnr;
    if(eval(WhatMenu+'[3]')&&ShowArrow){
    a=RcrsLvl==1&&FirstLineHorizontal?3:RightToLeft?6:0;
    this.CmdLyr.ImgLyr=new Layer(Arrws[a+1],this.CmdLyr);
    this.CmdLyr.ImgLyr.visibility='inherit';
    this.CmdLyr.ImgLyr.top=RcrsLvl==1&&FirstLineHorizontal?Hght-Arrws[a+2]-2:(Hght-Arrws[a+2])/2;
    this.CmdLyr.ImgLyr.left=RightToLeft?2:Wdth-Arrws[a+1]-2;
    this.CmdLyr.ImgLyr.width=Arrws[a+1];
    this.CmdLyr.ImgLyr.height=Arrws[a+2];
    ImgStr="<img src='"+Arrws[a]+"' width='"+Arrws[a+1]+"' height='"+Arrws[a+2]+"'>";
    this.CmdLyr.ImgLyr.document.write(ImgStr);
    this.CmdLyr.ImgLyr.document.close()}}
    function CreateMenuStructure(MName,NumberOf){
    RcrsLvl++;
    var i,NoOffSubs,Mbr,Wdth=0,Hght=0;
    var PrvMmbr=null;
    var WMnu=MName+'1';
    var MenuWidth=eval(WMnu+'[5]');
    var MenuHeight=eval(WMnu+'[4]');
    var Location=RcrsLvl==1?FrstLoc:ScLoc;
    if (RcrsLvl==1&&FirstLineHorizontal){
    for(i=1;i<NumberOf+1;i++){
                      WMnu=MName+eval(i);
                      Wdth=eval(WMnu+'[5]')?Wdth+eval(WMnu+'[5]'):Wdth+MenuWidth}
                      Wdth=BorderBtwnElmnts?Wdth+(NumberOf+1)*BorderWidth:Wdth+2*BorderWidth;Hght=MenuHeight+2*BorderWidth}
                      else{     for(i=1;i<NumberOf+1;i++){
                            WMnu=MName+eval(i);
                            Hght=eval(WMnu+'[4]')?Hght+eval(WMnu+'[4]'):Hght+MenuHeight}
                            Hght=BorderBtwnElmnts?Hght+(NumberOf+1)*BorderWidth:Hght+2*BorderWidth;Wdth=MenuWidth+2*BorderWidth}
                            if(DomYes){
                            var MmbrCntnr=Location.document.createElement("div");
                            MmbrCntnr.style.position='absolute';
                            MmbrCntnr.style.visibility='hidden';
                            Location.document.body.appendChild(MmbrCntnr)}
                            else{     if(Nav4) var MmbrCntnr=new Layer(Wdth,Location)
                            else{     WMnu+='c';
                            Location.document.body.insertAdjacentHTML("AfterBegin","<div id='"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        

    Hi Harjeet,
    Reason of your Dump is that the enhancement "LFDCB001" which you used contains one Function module exit "EXIT_SAPLFDCB_001" and another one screen exit in calling screen  "SAPLFDCB" number 0150.
    So when you activate your project these above mentioned both components were activated.
    So when you execute transaction SAP looks for called screen "SAPLXM08" No-0400 but as you havn't created and program go for DUMP.
    Solution - Just Create called screen  "SAPLXM08" No-0400 and activate.
    Thanks,
    Vijay

  • JavaScript error using UIXML to generate frames

    Hello all,
    I am trying to use the uix:frameBoderLayout and uix:frame elements to generate an HTML page with frames. I get a Javascript error when running the testFrame.uix in JDeveloper 9.0.3. Both MSIE and Netscape yield the same error.
    The JavaScript error is:
    JavaScript Error:
    http://20.19.205.86:8988/pssWeb-pss-context-root/testFrame.uix,
    line 1:
    _checkLoad is not defined.
    The HTML generated is:
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
    <html dir="ltr" lang="en-US">
    <head>
    <title>Property Security System Application</title>
    <link rel="stylesheet" charset="UTF-8" type="text/css" href="/pssWeb-pss-context-root/cabo/styles/cache/blaf-en-netscape.css">
    </head>
    <body class="xc" style="background-color:#FFFFE1" onload="_checkLoad(event)" onunload="_checkUnload(event)">
    <script src="/pssWeb-pss-context-root/cabo/jsLibs/MarlinCore.js">
    </script>
    <frameset border="0" rows="100%,*">
    <frameset rows="*,0" onresize="if(!frames['_uixJS'].cached){location.reload();}">
    <frameset rows="null,*,null">
    <frame name="top" marginwidth="5" frameborder="0" marginheight="0" noresize src="topFrame.uix">
    <frame name="center" marginwidth="5" frameborder="0" marginheight="0" noresize src="centerFrame.uix">
    <frame name="bottom" marginwidth="5" frameborder="0" marginheight="0" noresize src="bottomFrame.uix">
    </frameset>
    <frame frameborder="0" marginwidth="0" marginheight="0" title="" name="_uixJS" noresize src="/pssWeb-pss-context-root/cabo/jsps/a.jsp?_t=jsCache">
    </frameset>
    <noframes>
    </noframes>
    </frameset>
    </body>
    </html>
    <!-- Created by Oracle UIX 2.1.7 -->
    _checkLoad is contained in the MarlinCore.js file.  That file should be in cabo/jslib/ directory.
    Two things strike me odd about the generated HTML code with relation to JavaScript. First, I expect to see JavaScript source files declared in the head portion. Second, the source files is declared after the onload call is made to the _checkLoad function.
    The third thing that I can see possibly causing the error is that the MarlinCore.js file is not visible to the server and therefore not delivered to the browser. But I am not certain where to find the files used by the embedded OC4J server.
    Is this a bug in 9.0.3?
    The uix files follow. All three framed pages (topFrame.uix, centerFrame.uix and bottomFrame.uix) display nicely in the uix preview and run nicely in the embedded OC4J.
    testFrame.uix
    <?xml version="1.0" encoding="windows-1252"?>
    <page xmlns="http://xmlns.oracle.com/uix/controller"
    xmlns:ctrl="http://xmlns.oracle.com/uix/controller"
    xmlns:html="http://www.w3.org/TR/REC-html40">
    <content>
    <dataScope xmlns="http://xmlns.oracle.com/uix/ui"
    xmlns:data="http://xmlns.oracle.com/uix/ui">
    <provider>
    <!-- Add DataProviders (<data> elements) here -->
    </provider>
    <contents>
    <document>
    <metaContainer>
    <!-- Set the page title -->
    <head title="Property Security System Application"/>
    </metaContainer>
    <contents>
    <body>
    <inlineStyle>
    <property name="background-color">#FFFFE1</property>
    </inlineStyle>
    <contents>
    <frameBorderLayout xmlns="http://xmlns.oracle.com/uix/ui">
    <top>
    <frame name="top" source="topFrame.uix">
    </frame>
    </top>
    <center>
    <frame name="center" source="centerFrame.uix">
    </frame>
    </center>
    <bottom>
    <frame name="bottom" source="bottomFrame.uix">
    </frame>
    </bottom>
    </frameBorderLayout>
    </contents>
    </body>
    </contents>
    </document>
    </contents>
    </dataScope>
    </content>
    </page>
    topFrame.uix
    <?xml version="1.0" encoding="windows-1252"?>
    <page xmlns="http://xmlns.oracle.com/uix/controller"
    xmlns:ctrl="http://xmlns.oracle.com/uix/controller"
    xmlns:html="http://www.w3.org/TR/REC-html40">
    <content>
    <dataScope xmlns="http://xmlns.oracle.com/uix/ui"
    xmlns:data="http://xmlns.oracle.com/uix/ui">
    <provider>
    <!-- Add DataProviders (<data> elements) here -->
    </provider>
    <contents>
    <document>
    <metaContainer>
    <!-- Set the page title -->
    <head title=""/>
    </metaContainer>
    <contents>
    <pageLayout>
    <contents>
    <text text ="Top frame"></text>
    </contents>
    </pageLayout>
    </contents>
    </document>
    </contents>
    </dataScope>
    </content>
    <handlers>
    <!-- Add EventHandlers (<event> elements) here -->
    </handlers>
    </page>
    center Frame.uix
    <?xml version="1.0" encoding="windows-1252"?>
    <page xmlns="http://xmlns.oracle.com/uix/controller"
    xmlns:ctrl="http://xmlns.oracle.com/uix/controller"
    xmlns:html="http://www.w3.org/TR/REC-html40">
    <content>
    <dataScope xmlns="http://xmlns.oracle.com/uix/ui"
    xmlns:data="http://xmlns.oracle.com/uix/ui">
    <provider>
    <!-- Add DataProviders (<data> elements) here -->
    </provider>
    <contents>
    <document>
    <metaContainer>
    <!-- Set the page title -->
    <head title=""/>
    </metaContainer>
    <contents>
    <pageLayout>
    <contents>
    <text text="center frame"></text>
    </contents>
    </pageLayout>
    </contents>
    </document>
    </contents>
    </dataScope>
    </content>
    <handlers>
    <!-- Add EventHandlers (<event> elements) here -->
    </handlers>
    </page>
    bottomFrame.uix
    <?xml version="1.0" encoding="windows-1252"?>
    <page xmlns="http://xmlns.oracle.com/uix/controller"
    xmlns:ctrl="http://xmlns.oracle.com/uix/controller"
    xmlns:html="http://www.w3.org/TR/REC-html40">
    <content>
    <dataScope xmlns="http://xmlns.oracle.com/uix/ui"
    xmlns:data="http://xmlns.oracle.com/uix/ui">
    <provider>
    <!-- Add DataProviders (<data> elements) here -->
    </provider>
    <contents>
    <document>
    <metaContainer>
    <!-- Set the page title -->
    <head title=""/>
    </metaContainer>
    <contents>
    <pageLayout>
    <contents>
    <text text="bottom frame"></text>
    </contents>
    </pageLayout>
    </contents>
    </document>
    </contents>
    </dataScope>
    </content>
    <handlers>
    <!-- Add EventHandlers (<event> elements) here -->
    </handlers>
    </page>
    Your assistance is appreciated,
    Bill

    Did you create the files with JDev 903 preview or JDEV 902? If you created with JDEV 902 and upgraded your project to
    903 you need to delete all the files in the cabo directory in your public_html directory. That should get rid of your
    javascript errors.

Maybe you are looking for

  • PL/SQL vs JSP vs Servlets

    We are in the stage of deciding which language to develop portlets. I lean towards JSP or servlets for the wide array of Java libraries we can use. I think the only advantage of PL/SQL is speed. Thanks.

  • Trouble in the configuration of a PCI-6013

    Hi: I´m triying to get the MAX to recognize my PCI-6013 but i haven´t been able to get the DAQ board configured. I installed the package included with the board that contains LabVIEW 6.01 evaluation software and NI-DAQ 6.9.Of7 repeatedly, and then in

  • Services of Object

    Hi, a user is responsible for Park Document release (thru WF). so when user goes to FBV2, he clicks 'Services of Object' button has WF overview, he sees 2 entries in WF Overview for that document number (1 for PR, 2 for Parked Documents) where actual

  • I subscribed to PDF Pack, seems like a waste of money since Adobe CreatePDF Desktop Printer fails. Please advise.

    subscribed to Acrobat Pack because my Acrobat 8 professional is no longer supported in Windows8.1. I can not create a PDF on my HD using Adobe CreatePDF Desktop Printer. My different tests do not even appear on cloud...My.files... How can I make this

  • Magic Mouse not working in 64-bit mode

    I just booted up in 64-bit on my new iMac i7, and it seems the magic mouse will not work. I tried to turn it off and on with no luck. Am I missing something?? Thanks.