///\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\\\
//*  and getting removed all the time.                                     *\\
//*  The intent is to create lot of abstraction in code. All browsers have *\\
//*  their own way(constructs) of handling page elements. This should be   *\\
//*  made browser neutral.                                                 *\\
//*                                                                        *\\
//*       Last modified on Thursday, 11th of February 2010 @12:57:00       *\\
//*         -----------------------------------------------------          *\\
//*       ---------------------------------------------------------        *\\
///\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\\\


    // The intent is to create abstraction and provide common interface to many(if not all) elements of a page    
    // Am I'm doing that to keep the following ugly away from my code...    
    //<script type='text/javascript'>
    //<!--
    //  function getTOP(layName){
    //    if(document.all)                    //e4,e5,e6,o6,o7—p
    //      return document.all(layName).style.pixelTop
    //    else if(document.getElementById)    //n6,n7,m1,s1—p  
    //      //Clsical C style ()?true:false; like statement         
    //      return (document.getElementById(layName).style.top!="")?parseInt(document.getElementById(layName).style.top):"";
    //    else if(document.layers)            //n4—p
    //      return document.layers[layName].top 
    //  }
    ////-->
    //</script

    var tmpLayerRef = null, layerRef = null;
    var layerVisibility = null, visibleLayer = null, hiddenLayer = null;
    var layerPosition = null, layerMarginTop = null, layerMarginLeft = null;
    var layerWidth; 

    //Closing parenthesis, opening parenthesis
    var cp = null, op = null;
    //Closing bracket or openinig bracket
    var cb = null, ob = null;
    
    captureEventMouseMove(); 

    function captureEventMouseMove(){
      switch (userAgent){

        case 1:
          //for netscape 4                                           
          window.captureEvents(Event.MOUSEMOVE);
          window.onmousemove = neMouseMove;           
        break;          
        case 2:
          //for internet explorer             
          window.document.onmousemove = ieMouseMove;  
          layerRef                    = "window.document.all";
          layerVisibility             = ".style.visibility";  
          visibleLayer                = "visible";
          hiddenLayer                 = "hidden"; 
          layerPosition               = ".style.position"; 
          layerMarginTop              = ".style.marginTop";          
          layerMarginLeft             = ".style.marginLeft";  
          layerWidth		      = ".width";
          layerSize                   = ".size";      
          op			      = ""; 
          cp			      = "";
          ob			      = "[";
          cb			      = "]";
        break;
        case 3:
          //for mozilla, firefox and new netscapes
//          window.captureEvents(Event.MOUSEMOVE);
//          window.onmousemove          = mzMouseMove; 
          ///////////////////////////////////////////////////////////////////// 
          //LITTLE NOTE ABOUT EVENT BUBBLING(false) AND EVENT CAPTURING(true)//
          /////////////////////////////////////////////////////////////////////
          //The false(last argument)
          //Event bubbling, only the event handlers(defined at the same element before this handler) set for the "Event capturing"(true instead of false) gets their event handlers executed first(and then event travels back to this element).
          //All the event handlers(defined at the same element before this handler) set for the "Event bubbling" gets their event handlers executed after this envent handler gets executed.   	  	  
          //------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
          window.addEventListener('mousemove', mzMouseMove, false);
	  layerRef		      = "window.document.getElementById";
          layerVisibility             = ".style.visibility";
          visibleLayer                = "visible";
          hiddenLayer                 = "hidden"; 
          layerPosition               = ".style.position";
          layerMarginTop              = ".style.top";          
          layerMarginLeft             = ".style.left";
          layerWidth	              = ".width";
          layerSize                   = ".size";                    
          op			      = "(";  
          cp			      = ")"; 
          ob			      = "(";
          cb			      = ")";
        break;  
        case 4:
          //for opera                   
          window.document.onmousemove = opMouseMove;
        break;
        case 5:
          //for konqueror
          window.captureEvents(Event.MOUSEMOVE);
          window.onmousemove = mzMouseMove;   
        break;    

        case 1000:
          //for unknown browser          
        break; 

      }
    }

    //the mousemove event handler of ne
    function neMouseMove(eventObject){

      window.status = "X = " + eventObject.pageX + " Y = " + eventObject.pageY;

      if( (eventObject.pageX >= 26 && eventObject.pageX <=177) && (eventObject.pageY >= 165 && eventObject.pageY <= 176) ){       
         return false;     
      }
      if( (eventObject.pageX >= 26 && eventObject.pageX <=177) && (eventObject.pageY >= 185 && eventObject.pageY <= 196) ){       
         return false; 
      }

      if( (eventObject.pageX >= 26 && eventObject.pageX <=177) && (eventObject.pageY >= 204 && eventObject.pageY <= 215) ){         
         return false; 
      }  

       if( (eventObject.pageX >= 26 && eventObject.pageX <=177) && (eventObject.pageY >= 225 && eventObject.pageY <= 251) ){
         return false; 
      } 

      return false;    
    }
 
    //the mousemove event handler for ie 
    function ieMouseMove(){

      window.status = "X = " +window.event.clientX + " Y = " +window.event.clientY;      
      return false; 
    }

    //the mousemove event handler for opera
    function opMouseMove(){

      window.status = "X = " +window.event.clientX + " Y = " +window.event.clientY;            
      return false; 
    }
    
    //the mousemove event handler for Mozilla
    function mzMouseMove(eventObj){
       
       //firefox, go to tools->options->advanced(javascript)->enable "status bar"      
       window.status = "X = " + eventObj.clientX + " Y = " + eventObj.clientY;       
       return false;
    }

    function setWidth(layerName, width) {
      
       eval(op+layerRef+ob+'"'+layerName+'"'+cb+cp+layerWidth+'='+'"'+width+'"');    
    }

    function getWidth(layerName) {

       return parseInt(eval(op+layerRef+ob+'"'+layerName+'"'+cb+cp+layerWidth));
    }

    function setSize(layerName, size) {

       eval(op+layerRef+ob+'"'+layerName+'"'+cb+cp+'.size'+'='+'"'+size+'"');  
    }

    function getSize(layerName) {

       return parseInt(eval(op+layerRef+ob+'"'+layerName+'"'+cb+cp+layerSize));
    }

    function positionLayer(layerName, position, top, left) {

       eval(op+layerRef+ob+'"'+layerName+'"'+cb+cp+layerPosition+'='+'"'+position+'"');
       eval(op+layerRef+ob+'"'+layerName+'"'+cb+cp+layerMarginTop+'='+'"'+top+'"');
       eval(op+layerRef+ob+'"'+layerName+'"'+cb+cp+layerMarginLeft+'='+'"'+left+'"');
    }

    function showLayer(layerName) {

       eval(op+layerRef+ob+'"'+layerName+'"'+cb+cp+layerVisibility+'='+'"'+visibleLayer+'"');
    } 

    function hideLayer(layerName) {         

       eval(op+layerRef+ob+'"'+layerName+'"'+cb+cp+layerVisibility+'='+'"'+hiddenLayer+'"');
    }

    function layerGetTop(layerName) {
       
       return parseInt(eval(op+layerRef+ob+'"'+layerName+'"'+cb+cp+layerMarginTop));
    }
    
    function layerGetLeft(layerName) {

       return parseInt(eval(op+layerRef+ob+'"'+layerName+'"'+cb+cp+layerMarginLeft)); 
    } 

    //it is executed by the event handler onLoad.
    function onLoadBody(){ 

      switch(userAgent){

            case 1:
              //for netscape 
              switch(screen.width){
                    case 640: 
                       window.document.layers.tableStupidDiv.top = 5; 
                       window.document.layers.tableStupidDiv.left = 189;
                       window.document.layers.tableComputingDiv.top = 5;
                       window.document.layers.tableComputingDiv.left = 345;
                       window.document.layers.tableSearchMessageADiv.top = 42;
                       window.document.layers.tableSearchMessageADiv.left = 93;
                       window.document.layers.tableSearchMessageBDiv.top = 62;
                       window.document.layers.tableSearchMessageBDiv.left = 94;
                       window.document.layers.tableBlankLineADiv.top = 62; 
                       window.document.layers.tableBlankLineADiv.left = 269;
                       window.document.layers.tableTextBoxADiv.top = 66;
                       window.document.layers.tableTextBoxADiv.left = 274;
                       window.document.layers.tableDownloadsAndProjectsDiv.top = 83;
                       window.document.layers.tableDownloadsAndProjectsDiv.left = 269;
                       window.document.layers.tableDownloadsHeadingDiv.top = 124;
                       window.document.layers.tableDownloadsHeadingDiv.left = 269;
                       window.document.layers.tableDateDiv.top = 6;
                       window.document.layers.tableDateDiv.left = 93;                        
                    break;
                    case 800:                                
                    break;
                    case 1024:
                    break;      
              }
              window.document.layers.tableJavaAlertDiv.visibility = 'hide';                                                                                              		                                                                                         
              window.document.layers.tableBrowserAlertDiv.visibility = 'hide';              
              window.document.layers.tableStupidDiv.visibility = 'show';
              window.document.layers.tableComputingDiv.visibility = 'show';
              window.document.layers.tableSearchMessageADiv.visibility = 'show';
              window.document.layers.tableSearchMessageBDiv.visibility = 'show';
              window.document.layers.tableBlankLineADiv.visibility = 'show';                    
              window.document.layers.tableTextBoxADiv.visibility = 'show';
              window.document.layers.tableDownloadsAndProjectsDiv.visibility = 'show';
              window.document.layers.tableDownloadsHeadingDiv.visibility = 'show';  
              window.document.layers.tableDateDiv.visibility = 'show';
            break;
            case 2:
              //for internet explorer
              switch(screen.width){
                    case 640:                      
                    break;
                    case 800:
                      window.document.all.tableStupidDiv.style.position = 'absolute';
                      window.document.all.tableStupidDiv.style.marginTop = -77;
                      window.document.all.tableStupidDiv.style.marginLeft = 344; 
                      //window.document.all.tableStupidDiv.style.fontSize = 1;
                      window.document.all.tableComputingDiv.style.position = 'absolute';                                                         
                      window.document.all.tableComputingDiv.style.marginTop = -77;
                      window.document.all.tableComputingDiv.style.marginLeft = 500;
                      window.document.all.tableSearchMessageADiv.style.position = 'absolute'; 
                      window.document.all.tableSearchMessageADiv.style.marginTop = -39;
                      window.document.all.tableSearchMessageADiv.style.marginLeft = 248;
                      window.document.all.tableSearchMessageBDiv.style.position = 'absolute'; 
                      window.document.all.tableSearchMessageBDiv.style.marginTop = -18;
                      window.document.all.tableSearchMessageBDiv.style.marginLeft = 251;   
                      window.document.all.tableBlankLineADiv.style.position = 'absolute'; 
                      window.document.all.tableBlankLineADiv.style.marginTop = -18;
                      window.document.all.tableBlankLineADiv.style.marginLeft = 426;   
                      window.document.all.blankLineATable.width = 334;  
                      window.document.all.tableTextBoxADiv.style.position = 'absolute'; 
                      window.document.all.tableTextBoxADiv.style.marginTop = -18;
                      window.document.all.tableTextBoxADiv.style.marginLeft = 427;    
                      window.document.all.tableDownloadsAndProjectsDiv.style.position = 'absolute'; 
                      window.document.all.tableDownloadsAndProjectsDiv.style.marginTop = 7;
                      window.document.all.tableDownloadsAndProjectsDiv.style.marginLeft = 426; 
                      window.document.all.tableDownloadsAndProjects.width = 334;   
                      window.document.all.tableDownloadsHeadingDiv.style.position = 'absolute'; 
                      window.document.all.tableDownloadsHeadingDiv.style.marginTop = 54;
                      window.document.all.tableDownloadsHeadingDiv.style.marginLeft = 426;   
                      window.document.all.tableDownloads.width = 334;     
                      window.document.all.tableDateDiv.style.position = 'absolute';
                      window.document.all.tableDateDiv.style.marginTop = -74; 
                      window.document.all.tableDateDiv.style.marginLeft = 248;                                                                                         
                    break;
                    case 1024:                                          
                      positionLayer('tableSearchMessageADiv', 'absolute', -127, 0); // -110
                      positionLayer('tableTextBoxADiv', 'absolute', -129, 118); // -111 
                      setSize('textBoxA', 43);

                      //////////////////////////////////////////////////////////
                      //        This is my personal message layer             //
                      // I WILL USE THIS LAYER TO PUT SPECIAL MESSAGES LIKE   //
                      // BIRTDAY AND EID GREETINGS.                           //
                      // ---------------------------------------------------- //
                      // This layer should be here, it must first be assigned //
                      // position here. The problem is that in my n00b state  //
                      // of mind I assigned the z-Index higher than the layers// 
                      // tableStupidDiv and others(but only tableStupidDiv    //
                      // matters).                                            //
                      ////////////////////////////////////////////////////////// 	                        
                      positionLayer('tableComputingDiv', 'absolute', -60, 100);
                      
                      positionLayer('tableStupidDiv', 'absolute', layerGetTop('tableSearchMessageADiv') + 20, layerGetLeft('tableSearchMessageADiv') + 0); //-77, 0
                      //For some reason I can only decrease the width, but cannot increase it. I think I should control it via stylesheet
                      //setWidth('tableStupid', 900);                      
                      positionLayer('tableBlankLineADiv', 'absolute', layerGetTop('tableStupidDiv') + 62, layerGetLeft('tableStupidDiv') + 3); //-66, 3                                           
                      setWidth('blankLineATable', 436);                     
                      positionLayer('tableDownloadsAndProjectsDiv', 'absolute', layerGetTop('tableBlankLineADiv') + 26, layerGetLeft('tableBlankLineADiv')); //-40, 3                        
                      setWidth('tableDownloadsAndProjects', getWidth('blankLineATable')); 
                      positionLayer('tableDownloadsHeadingDiv', 'absolute', layerGetTop('tableDownloadsAndProjectsDiv') + 49, layerGetLeft('tableDownloadsAndProjectsDiv')); //9, 3                          
                      setWidth('tableDownloads', getWidth('tableDownloadsAndProjects')); 
                      positionLayer('tableDownloads1HeadingDiv', 'absolute', layerGetTop('tableDownloadsHeadingDiv') + 25, layerGetLeft('tableDownloadsHeadingDiv')); //34, 3                     
                      setWidth('tableDownloads1', getWidth('tableDownloads')); 
                      positionLayer('tableDownloads2HeadingDiv', 'absolute', layerGetTop('tableDownloads1HeadingDiv') + 76, layerGetLeft('tableDownloads1HeadingDiv')); //110, 3 
                      setWidth('tableDownloads2', getWidth('tableDownloads1'));
                      positionLayer('tableDownloads3HeadingDiv', 'absolute', layerGetTop('tableDownloads2HeadingDiv') + 76, layerGetLeft('tableDownloads2HeadingDiv')); //186, 3                     
                      setWidth('tableDownloads3', getWidth('tableDownloads2'));
                      positionLayer('tableDownloads4HeadingDiv', 'absolute', layerGetTop('tableDownloads3HeadingDiv') + 76, layerGetLeft('tableDownloads3HeadingDiv')); //262, 3        
                      setWidth('tableDownloads4', getWidth('tableDownloads3'));			
                      positionLayer('tableProjectsHeadingDiv', 'absolute', layerGetTop('tableDownloads4HeadingDiv') + 76, layerGetLeft('tableDownloads4HeadingDiv')); //337, 3       
                      setWidth('tableProjects', getWidth('tableDownloads4'));
                      positionLayer('tableProjects1HeadingDiv', 'absolute', layerGetTop('tableProjectsHeadingDiv') + 25, layerGetLeft('tableProjectsHeadingDiv'));  //362, 3                                          
                      setWidth('tableProjects1', getWidth('tableProjects'));  
                                        
                      positionLayer('ablog', 'absolute', layerGetTop('tableTextBoxADiv'), 441);  
                      setWidth('tablog', 388); 

                      positionLayer('tableDateDiv', 'absolute', layerGetTop('ablog'), layerGetLeft('ablog') + getWidth('tablog') + 2);
                      setWidth('tableDate', 150);

                      // Don't get confused, tableSearchMessageBDiv and tableJavaAppletHeading are same
                      positionLayer('tableSearchMessageBDiv', 'absolute', layerGetTop('tableDateDiv') + 26, layerGetLeft('ablog') + getWidth('tablog') + 2);  
                      setWidth('tableJavaAppletsHeading', getWidth('tableDate'));
					  
					  positionLayer('game1', 'absolute', layerGetTop('tableSearchMessageBDiv') + 26, layerGetLeft('ablog') + getWidth('tablog') + 2);
					  setWidth('game1Table', getWidth('tableDate'));
					  positionLayer('game2', 'absolute', layerGetTop('game1') + 26, layerGetLeft('ablog') + getWidth('tablog') + 2);
					  setWidth('game2Table', getWidth('tableDate'));
					  
					  

                      positionLayer('ablogA', 'absolute', layerGetTop('ablog') + 27, 441);  
                      setWidth('tablogA', getWidth('tablog'));
                      positionLayer('ablogB', 'absolute', layerGetTop('ablogA') + 27, 441);  
                      setWidth('tablogB', getWidth('tablogA')); 
                      positionLayer('ablog1', 'absolute', layerGetTop('ablogB') + 27, 441);
                      setWidth('tablog1', getWidth('tablogB'));
                      positionLayer('ablog2', 'absolute', layerGetTop('ablog1') + 127, 441);
                      setWidth('tablog2', getWidth('tablog1'));                                                                                                                                                                                                       
                    break; 
                    case 1280:
                      ////Today's work starts here                                            
                      positionLayer('tableSearchMessageADiv', 'absolute', -114, 0); 
                      positionLayer('tableTextBoxADiv', 'absolute', -139, 130);
                      positionLayer('tableDateDiv', 'absolute', -136, 1080);
                      window.document.all.textBoxA.size = 62;                      
                      window.document.all.tableDate.width = 150;                       
                      /////////////////////////////////////////////////////////////// 
                      ////The initial left margin is set here for all the elements//                       
                      /////////////////////////////////////////////////////////////
                      positionLayer('tableStupidDiv', 'absolute', layerGetTop('tableSearchMessageADiv') + 56, layerGetLeft('tableSearchMessageADiv') + 315); //-77, 0
                      //window.document.all.tableStupidDiv.style.fontSize = 50;
                      //positionLayer('tableBlankLineADiv', 'absolute', layerGetBottom('tableStupidDiv') + 27, layerGetLeft('tableStupidDiv') + 3); //-66, 3     
                      positionLayer('tableBlankLineADiv', 'absolute', layerGetTop('tableStupidDiv') + 27, layerGetLeft('tableStupidDiv') + 3); //-66, 3                                           
                      window.document.all.blankLineATable.width = 564;
                      positionLayer('tableDownloadsAndProjectsDiv', 'absolute', layerGetTop('tableBlankLineADiv') + 31, layerGetLeft('tableBlankLineADiv')); //-40, 3                        
                      window.document.all.tableDownloadsAndProjects.width = 564; 
                      positionLayer('tableDownloadsHeadingDiv', 'absolute', layerGetTop('tableDownloadsAndProjectsDiv') + 67, layerGetLeft('tableDownloadsAndProjectsDiv')); //9, 3                          
                      window.document.all.tableDownloads.width = 564;
                      positionLayer('tableDownloads1HeadingDiv', 'absolute', layerGetTop('tableDownloadsHeadingDiv') + 26, layerGetLeft('tableDownloadsHeadingDiv')); //34, 3                     
                      window.document.all.tableDownloads1.width = 564; 
                      positionLayer('tableDownloads2HeadingDiv', 'absolute', layerGetTop('tableDownloads1HeadingDiv') + 86, layerGetLeft('tableDownloads1HeadingDiv')); //110, 3 
                      window.document.all.tableDownloads2.width = 564;
                      positionLayer('tableDownloads3HeadingDiv', 'absolute', layerGetTop('tableDownloads2HeadingDiv') + 86, layerGetLeft('tableDownloads2HeadingDiv')); //186, 3                     
                      window.document.all.tableDownloads3.width = 564; 
                      positionLayer('tableDownloads4HeadingDiv', 'absolute', layerGetTop('tableDownloads3HeadingDiv') + 86, layerGetLeft('tableDownloads3HeadingDiv')); //262, 3        
                      window.document.all.tableDownloads4.width = 564;  
                      positionLayer('tableProjectsHeadingDiv', 'absolute', layerGetTop('tableDownloads4HeadingDiv') + 86, layerGetLeft('tableDownloads4HeadingDiv')); //337, 3       
                      window.document.all.tableProjects.width = 564; 
                      positionLayer('tableProjects1HeadingDiv', 'absolute', layerGetTop('tableProjectsHeadingDiv') + 25, layerGetLeft('tableProjectsHeadingDiv'));  //362, 3                     
                      window.document.all.tableProjects1.width = 564;                                                                                                    
                      ////Today's work ends here
                      
                      ////positionLayer('tableComputingDiv', 'absolute', -60, 100);                     
                      ////positionLayer('tableSearchMessageBDiv', 'absolute', -18, 251);                        
                   break;                                                                
              }
              
              //hideLayer('tableJavaAlertDiv');               
              //hideLayer('tableBrowserAlertDiv');                            
            break;
            case 3:
              //for mozilla, new netscapes and firefox
              switch(screen.width){
                    case 640:       
                      (window.document.getElementById('tableStupidDiv')).style.position = 'absolute';
                      (window.document.getElementById('tableStupidDiv')).style.top = "5px"; 
                      (window.document.getElementById('tableStupidDiv')).style.left = "192px"; 
                      (window.document.getElementById('tableComputingDiv')).style.position = 'absolute';
                      (window.document.getElementById('tableComputingDiv')).style.top = "5px"; 
                      (window.document.getElementById('tableComputingDiv')).style.left = "348px";                                                            
                      (window.document.getElementById('tableSearchMessageADiv')).style.position = 'absolute';
                      (window.document.getElementById('tableSearchMessageADiv')).style.top = "46px";
                      (window.document.getElementById('tableSearchMessageADiv')).style.left = "96px";
                      (window.document.getElementById('tableSearchMessageBDiv')).style.position = 'absolute';
                      (window.document.getElementById('tableSearchMessageBDiv')).style.top = "65px";
                      (window.document.getElementById('tableSearchMessageBDiv')).style.left = "99px";
                      (window.document.getElementById('tableBlankLineADiv')).style.position = 'absolute';                     
                      (window.document.getElementById('blankLineATable')).width = 333;  
                      (window.document.getElementById('tableBlankLineADiv')).style.top = "65px";
                      (window.document.getElementById('tableBlankLineADiv')).style.left = "274px"; 
                      (window.document.getElementById('tableTextBoxADiv')).style.position = 'absolute'; 
                      (window.document.getElementById('tableTextBoxADiv')).style.top = "66px";
                      (window.document.getElementById('tableTextBoxADiv')).style.left = "275px";
                      (window.document.getElementById('textBoxA')).size = 27;
                      (window.document.getElementById('tableDownloadsAndProjectsDiv')).style.position = 'absolute';
                      (window.document.getElementById('tableDownloadsAndProjectsDiv')).style.top = "83px";
                      (window.document.getElementById('tableDownloadsAndProjectsDiv')).style.left = "274px";
                      (window.document.getElementById('tableDownloadsAndProjects')).width = "333px";
                      (window.document.getElementById('tableDownloadsHeadingDiv')).style.position = 'absolute';
                      (window.document.getElementById('tableDownloadsHeadingDiv')).style.top = "132px";
                      (window.document.getElementById('tableDownloadsHeadingDiv')).style.left = "274px";
                      (window.document.getElementById('tableDownloads')).style.width = "333px"; 
                      (window.document.getElementById('tableDateDiv')).style.position = 'absolute';             
                      (window.document.getElementById('tableDateDiv')).style.top = "9px";
                      (window.document.getElementById('tableDateDiv')).style.left = "96px";

                    break;
                    case 800:  
                      (window.document.getElementById('tableStupidDiv')).style.position = 'absolute';
                      (window.document.getElementById('tableStupidDiv')).style.top = "12px"; 
                      (window.document.getElementById('tableStupidDiv')).style.left = "357px";  
                      (window.document.getElementById('tableComputingDiv')).style.position = 'absolute';
                      (window.document.getElementById('tableComputingDiv')).style.top = "12px"; 
                      (window.document.getElementById('tableComputingDiv')).style.left = "513px";                       
                      (window.document.getElementById('tableSearchMessageADiv')).style.position = 'absolute';
                      (window.document.getElementById('tableSearchMessageADiv')).style.top = "52px";
                      (window.document.getElementById('tableSearchMessageADiv')).style.left = "261px";
                      (window.document.getElementById('tableSearchMessageBDiv')).style.position = 'absolute';
                      (window.document.getElementById('tableSearchMessageBDiv')).style.top = "72px";
                      (window.document.getElementById('tableSearchMessageBDiv')).style.left = "264px";
                      (window.document.getElementById('tableBlankLineADiv')).style.position = 'absolute';                                       
                      (window.document.getElementById('tableBlankLineADiv')).style.top = "72px";
                      (window.document.getElementById('tableBlankLineADiv')).style.left = "439px";  
                      (window.document.getElementById('blankLineATable')).width = 333;  
                      (window.document.getElementById('tableTextBoxADiv')).style.position = 'absolute'; 
                      (window.document.getElementById('tableTextBoxADiv')).style.top = "73px";
                      (window.document.getElementById('tableTextBoxADiv')).style.left = "440px";
                      (window.document.getElementById('textBoxA')).size = 27; 
                      (window.document.getElementById('tableDownloadsAndProjectsDiv')).style.position = 'absolute';
                      (window.document.getElementById('tableDownloadsAndProjectsDiv')).style.top = "90px";
                      (window.document.getElementById('tableDownloadsAndProjectsDiv')).style.left = "439px";
                      (window.document.getElementById('tableDownloadsAndProjectsDiv')).style.fontsize = "100px";
                      (window.document.getElementById('tableDownloadsAndProjects')).width = "333px";
                      (window.document.getElementById('tableDownloadsHeadingDiv')).style.position = 'absolute';
                      (window.document.getElementById('tableDownloadsHeadingDiv')).style.top = "139px";
                      (window.document.getElementById('tableDownloadsHeadingDiv')).style.left = "439px";
                      (window.document.getElementById('tableDownloads')).style.width = "333px";  
                      (window.document.getElementById('tableDateDiv')).style.position = 'absolute';             
                      (window.document.getElementById('tableDateDiv')).style.top = "16px";
                      (window.document.getElementById('tableDateDiv')).style.left = "261px";  
                    break;
                    case 1024:
                       positionLayer('tableSearchMessageADiv', 'absolute', 12, 10); 
                       positionLayer('tableTextBoxADiv', 'absolute', 10, 128);
		       setSize('textBoxA', 41);
                       positionLayer('tableDateDiv', 'absolute', layerGetTop('tableTextBoxADiv'), 849); 
                       setWidth('tableDate', 150);
                       /////////////////////////////////////////////////////////////// 
                       ////The initial left margin is set here for all the elements//                       
                       /////////////////////////////////////////////////////////////
                       positionLayer('tableStupidDiv', 'absolute', layerGetTop('tableTextBoxADiv') + 22, 10); //32, 10
                       //setWidth('tableStupid', "900px");
                       ////The two text layers, they both have been switched off 
                       ////positionLayer('tableComputingDiv', 'absolute', 200, 3);
                       ////positionLayer('tableSearchMessageBDiv', 'absolute', 200, 3);
                       positionLayer('tableBlankLineADiv', 'absolute', layerGetTop('tableStupidDiv') + 64, layerGetLeft('tableStupidDiv') + 3); //97, 13
                       //Same thing happens here as above
//		         setWidth('tableStupid', 500);
//                       window.alert(getWidth('tableStupid'));
//                       setWidth('blankLineATable', getWidth('tableStupid')); 
                       setWidth('blankLineATable', "443px");
                       positionLayer('tableDownloadsAndProjectsDiv', 'absolute', layerGetTop('tableBlankLineADiv') + 26, layerGetLeft('tableBlankLineADiv')); //123, 13
                       setWidth('tableDownloadsAndProjects', getWidth('blankLineATable')); 
                       positionLayer('tableDownloadsHeadingDiv', 'absolute', layerGetTop('tableDownloadsAndProjectsDiv') + 51, layerGetLeft('tableDownloadsAndProjectsDiv')); //174
                       setWidth('tableDownloads', getWidth('tableDownloadsAndProjects')); 
                       positionLayer('tableDownloads1HeadingDiv', 'absolute', layerGetTop('tableDownloadsHeadingDiv') + 25, layerGetLeft('tableDownloadsHeadingDiv')); //199                      
                       setWidth('tableDownloads1', getWidth('tableDownloads'));
                       positionLayer('tableDownloads2HeadingDiv', 'absolute', layerGetTop('tableDownloads1HeadingDiv') + 79, layerGetLeft('tableDownloads1HeadingDiv')); //278                       
                       setWidth('tableDownloads2', getWidth('tableDownloads1')); 
                       positionLayer('tableDownloads3HeadingDiv', 'absolute', layerGetTop('tableDownloads2HeadingDiv') + 79, layerGetLeft('tableDownloads2HeadingDiv')); //357
                       setWidth('tableDownloads3', getWidth('tableDownloads2'));                     
                       positionLayer('tableDownloads4HeadingDiv', 'absolute', layerGetTop('tableDownloads3HeadingDiv') + 79, layerGetLeft('tableDownloads3HeadingDiv')); //436
                       setWidth('tableDownloads4', getWidth('tableDownloads3')); 
                       positionLayer('tableProjectsHeadingDiv', 'absolute', layerGetTop('tableDownloads4HeadingDiv') + 78, layerGetLeft('tableDownloads4HeadingDiv'));                                              
                       setWidth('tableProjects', getWidth('tableDownloads4')); 
                       positionLayer('tableProjects1HeadingDiv', 'absolute', layerGetTop('tableProjectsHeadingDiv') + 24, layerGetLeft('tableProjectsHeadingDiv'));                                              
                       setWidth('tableProjects1', getWidth('tableProjects'));
                       /////////////////////////// TODAY START HERE /////////////////////////////////////////////////
                       positionLayer('ablog', 'absolute', layerGetTop('tableTextBoxADiv'), layerGetLeft('tableTextBoxADiv') + getSize('textBoxA') + 290); 
                       setWidth('tablog', "388px");
                       //(window.document.getElementById('tablog')).width = "388px";
                       //window.document.all.tablog.width = 388;
                       positionLayer('ablogA', 'absolute', layerGetTop('ablog') + 28,  layerGetLeft('ablog'));
                       setWidth('tablogA', getWidth('tablog')); 
                       //window.document.all.tablogA.width = 388;   
                       positionLayer('ablogB', 'absolute', layerGetTop('ablogA') + 28, layerGetLeft('ablogA'));
                       setWidth('tablogB', getWidth('tablogA'));
                       //window.document.all.tablogB.width = 388; 
                       positionLayer('ablog1', 'absolute', layerGetTop('ablogB') + 28, layerGetLeft('ablogB'));
                       setWidth('tablog1', getWidth('tablogB'));
                       //window.document.all.tablog1.width = 388;
                       positionLayer('ablog2', 'absolute', layerGetTop('ablog1') + 129, layerGetLeft('ablog1'));
                       setWidth('tablog2', getWidth('tablog1'));
                       //window.document.all.tablog2.width = 388;
                       positionLayer('tableSearchMessageBDiv', 'absolute', layerGetTop('tableDateDiv') + 27, layerGetLeft('ablog') + getWidth('tablog') + 2 );
                       setWidth('tableJavaAppletsHeading', getWidth('tableDate'));
                       positionLayer('game1', 'absolute', layerGetTop('tableSearchMessageBDiv') + 27, layerGetLeft('ablog') + getWidth('tablog') + 2);
		       setWidth('game1Table', getWidth('tableDate'));
                       positionLayer('game2', 'absolute', layerGetTop('game1') + 27, layerGetLeft('ablog') + getWidth('tablog') + 2);
                       setWidth('game2Table', getWidth('game1Table'));
                                    
                    break;                   
              }
              //Mandatory, these should stay here     
              hideLayer('tableJavaAlertDiv');              
              hideLayer('tableBrowserAlertDiv');
              
                 //showLayer('tableSearchMessageADiv');              
                 //showLayer('tableTextBoxADiv');              
                 //showLayer('tableDateDiv');              
                 //showLayer('tableStupidDiv');                           
              ////The two text layers, they both have been switched off
              ////showLayer('tableComputingDiv');
              ////(window.document.getElementById('tableComputingDiv')).style.visibility = 'visible';                
              ////showLayer('tableSearchMessageBDiv');
              ////(window.document.getElementById('tableSearchMessageBDiv')).style.visibility = 'visible';
                 //showLayer('tableBlankLineADiv');                
                 //showLayer('tableDownloadsAndProjectsDiv');               
                 //showLayer('tableDownloadsHeadingDiv');               
                 //showLayer('tableDownloads1HeadingDiv');
                 //showLayer('tableDownloads2HeadingDiv');
                 //showLayer('tableDownloads3HeadingDiv');
                 //showLayer('tableDownloads4HeadingDiv');                 
                 //showLayer('tableProjectsHeadingDiv');
                 //showLayer('tableProjects1HeadingDiv');
               
            break;
            case 4:
              //for opera   
              switch(screen.width){
                    case 640:   
                      window.document.all.tableStupidDiv.style.position = 'absolute';                                                         
                      window.document.all.tableStupidDiv.style.marginTop = -138;
                      window.document.all.tableStupidDiv.style.marginLeft = 181;
                      window.document.all.tableComputingDiv.style.position = 'absolute';                                                         
                      window.document.all.tableComputingDiv.style.marginTop = -138;
                      window.document.all.tableComputingDiv.style.marginLeft = 337;
                      window.document.all.tableSearchMessageADiv.style.position = 'absolute'; 
                      window.document.all.tableSearchMessageADiv.style.marginTop = -97;
                      window.document.all.tableSearchMessageADiv.style.marginLeft = 85;
                      window.document.all.tableSearchMessageBDiv.style.position = 'absolute'; 
                      window.document.all.tableSearchMessageBDiv.style.marginTop = -78;
                      window.document.all.tableSearchMessageBDiv.style.marginLeft = 88;
                      window.document.all.tableBlankLineADiv.style.position = 'absolute'; 
                      window.document.all.tableBlankLineADiv.style.marginTop = -78;
                      window.document.all.tableBlankLineADiv.style.marginLeft = 263;
                      window.document.all.blankLineATable.width = 333; 
                      window.document.all.tableTextBoxADiv.style.position = 'absolute'; 
                      window.document.all.tableTextBoxADiv.style.marginTop = -(66+10);
                      window.document.all.tableTextBoxADiv.style.marginLeft = 264; 
                      window.document.all.tableDownloadsAndProjectsDiv.style.position = 'absolute'; 
                      window.document.all.tableDownloadsAndProjectsDiv.style.marginTop = -(52+10);
                      window.document.all.tableDownloadsAndProjectsDiv.style.marginLeft = 263;  
                      window.document.all.tableDownloadsAndProjects.width = 333;  
                      window.document.all.tableDownloadsHeadingDiv.style.position = 'absolute'; 
                      window.document.all.tableDownloadsHeadingDiv.style.marginTop = -(3+10); 
                      window.document.all.tableDownloadsHeadingDiv.style.marginLeft = 263;   
                      window.document.all.tableDownloads.width = 333;
                      window.document.all.tableDateDiv.style.position = 'absolute';
                      window.document.all.tableDateDiv.style.marginTop = -134; 
                      window.document.all.tableDateDiv.style.marginLeft = 85; 
                    break;
                    case 800:
                      window.document.all.tableJavaAlertDiv.style.marginTop = -11;
                    break;
                    case 1024:
                    break;      
              }
              window.document.all.tableJavaAlertDiv.style.visibility  = 'hidden'; 
              window.document.all.tableBrowserAlertDiv.style.visibility = 'hidden';
              window.document.all.tableStupidDiv.style.visibility = 'visible'; 
              window.document.all.tableComputingDiv.style.visibility = 'visible';
              window.document.all.tableSearchMessageADiv.style.visibility = 'visible';
              window.document.all.tableSearchMessageBDiv.style.visibility = 'visible';
              window.document.all.tableBlankLineADiv.style.visibility = 'visible'; 
              window.document.all.tableTextBoxADiv.style.visibility = 'visible';
              window.document.all.tableDownloadsAndProjectsDiv.style.visibility = 'visible';
              window.document.all.tableDownloadsHeadingDiv.style.visibility = 'visible';
              window.document.all.tableDateDiv.style.visibility = 'visible';
            break;
            case 5:
              //for konqurer
              switch(screen.width){
                    case 640:
                    break;
                    case 800:
                      (window.document.getElementById('tableStupidDiv')).style.position = 'absolute';
                      (window.document.getElementById('tableStupidDiv')).style.top = "12px";
                      (window.document.getElementById('tableStupidDiv')).style.left = "204px";
                      (window.document.getElementById('tableComputingDiv')).style.position = 'absolute';
                      (window.document.getElementById('tableComputingDiv')).style.top = "12px"; 
                      (window.document.getElementById('tableComputingDiv')).style.left = "500px";
                      (window.document.getElementById('tableBlankLineADiv')).style.position = 'absolute';                                       
                      (window.document.getElementById('tableBlankLineADiv')).style.top = "51px";
                      (window.document.getElementById('tableBlankLineADiv')).style.left = "207px";
                      (window.document.getElementById('blankLineATable')).width = 481;
                       ////////////////
                      (window.document.getElementById('tableSearchMessageADiv')).style.position = 'absolute';
                      (window.document.getElementById('tableSearchMessageADiv')).style.top = "52px";
                      (window.document.getElementById('tableSearchMessageADiv')).style.left = "83px";
                      (window.document.getElementById('tableSearchMessageBDiv')).style.position = 'absolute';
                      (window.document.getElementById('tableSearchMessageBDiv')).style.top = "73px";
                      (window.document.getElementById('tableSearchMessageBDiv')).style.left = "86px";
                      (window.document.getElementById('tableTextBoxADiv')).style.position = 'absolute'; 
                      (window.document.getElementById('tableTextBoxADiv')).style.top = "66px";
                      (window.document.getElementById('tableTextBoxADiv')).style.left = "282px";
                      (window.document.getElementById('textBoxA')).size = 49;
                      (window.document.getElementById('tableDateDiv')).style.position = 'absolute';
                      (window.document.getElementById('tableDateDiv')).style.top = "15px";
                      (window.document.getElementById('tableDateDiv')).style.left = "116px";

                      (window.document.getElementById('tableDownloadsAndProjectsDiv')).style.position = 'absolute';
                      (window.document.getElementById('tableDownloadsAndProjectsDiv')).style.top = "94px";
                      (window.document.getElementById('tableDownloadsAndProjectsDiv')).style.left = "282px";
                      (window.document.getElementById('tableDownloadsAndProjectsDiv')).style.fontsize = "100px";
                      (window.document.getElementById('tableDownloadsAndProjects')).width = "407px";

                      (window.document.getElementById('tableDownloadsHeadingDiv')).style.position = 'absolute';
                      (window.document.getElementById('tableDownloadsHeadingDiv')).style.top = "145px";
                      (window.document.getElementById('tableDownloadsHeadingDiv')).style.left = "282px";
                      (window.document.getElementById('tableDownloads')).style.width = "407px";


                      (window.document.getElementById('tableDownloads1HeadingDiv')).style.position = 'absolute';
                      (window.document.getElementById('tableDownloads1HeadingDiv')).style.top = "168px";
                      (window.document.getElementById('tableDownloads1HeadingDiv')).style.left = (window.document.getElementById('tableDownloadsHeadingDiv')).style.left;
                      (window.document.getElementById('tableDownloads1')).style.width = (window.document.getElementById('tableDownloads')).style.width;
 

                      (window.document.getElementById('tableProjectsHeadingDiv')).style.position = 'absolute';
                      (window.document.getElementById('tableProjectsHeadingDiv')).style.top = "402px";
                      (window.document.getElementById('tableProjectsHeadingDiv')).style.left = "282px";
                      (window.document.getElementById('tableProjects')).style.width = (window.document.getElementById('tableDownloads')).style.width;

                      //(window.document.getElementById('tableProject1HeadingDiv')).style.position = 'absolute';
                      //(window.document.getElementById('tableProject1HeadingDiv')).style.top = "425px";
                      //(window.document.getElementById('tableProject1HeadingDiv')).style.left = (window.document.getElementById('tableProjectsHeadingDiv')).style.left;
                      //(window.document.getElementById('tableProject1')).style.width = (window.document.getElementById('tableProjects')).style.width;

  
                    break;
                    case 1024:
                    break;
              }
              (window.document.getElementById('tableJavaAlertDiv')).style.visibility = 'hidden';
              (window.document.getElementById('tableBrowserAlertDiv')).style.visibility = 'hidden';
              (window.document.getElementById('tableStupidDiv')).style.visibility = 'visible';
              (window.document.getElementById('tableComputingDiv')).style.visibility = 'visible';
              (window.document.getElementById('tableBlankLineADiv')).style.visibility = 'visible';
              (window.document.getElementById('tableSearchMessageADiv')).style.visibility = 'visible';
              (window.document.getElementById('tableSearchMessageBDiv')).style.visibility = 'visible';
              (window.document.getElementById('tableTextBoxADiv')).style.visibility = 'visible';
              (window.document.getElementById('tableDateDiv')).style.visibility = 'visible';
              (window.document.getElementById('tableDownloadsAndProjectsDiv')).style.visibility = 'visible';        
              (window.document.getElementById('tableDownloadsHeadingDiv')).style.visibility = 'visible'; 
              (window.document.getElementById('tableDownloads1HeadingDiv')).style.visibility = 'visible';
              (window.document.getElementById('tableProjectsHeadingDiv')).style.visibility = 'visible'; 
              //(window.document.getElementById('tableProject1HeadingDiv')).style.visibility = 'visible';
            break;  
            case 1000:
            break;
      }              


      return;
    }

    //TODO, There should be some order, layers with lower z-index should be called first    
    function stupidPage() {

       //Following two statements should be called as soon as this file gets loaded.            
       hideLayer('tableJavaAlertDiv');              
       hideLayer('tableBrowserAlertDiv');              

       showLayer('tableSearchMessageADiv');              
       showLayer('tableTextBoxADiv');              
       showLayer('tableDateDiv');              
       showLayer('tableStupidDiv');                           

       //////////////////////////////////////////////////////////
       //        This is my personal message layer             //
       // I WILL USE THIS LAYER TO PUT SPECIAL MESSAGES LIKE   //
       // BIRTDAY AND EID GREETINGS.                           //
       ////////////////////////////////////////////////////////// 
       //showLayer('tableComputingDiv');

       if (userAgent == 2 || userAgent == 3) {

          // The following layer is the Java applets heading.
          showLayer('tableSearchMessageBDiv');
             showLayer('game1');
             showLayer('game2');
       }
        
       showLayer('tableBlankLineADiv');                
       showLayer('tableDownloadsAndProjectsDiv');               
       showLayer('tableDownloadsHeadingDiv');               
       showLayer('tableDownloads1HeadingDiv');
       showLayer('tableDownloads2HeadingDiv');
       showLayer('tableDownloads3HeadingDiv');
       showLayer('tableDownloads4HeadingDiv');                 
       showLayer('tableProjectsHeadingDiv');
       showLayer('tableProjects1HeadingDiv'); 
       showLayer('ablog');
       showLayer('ablogA');
       showLayer('ablogB');
       showLayer('ablog1');
       showLayer('ablog2'); 
    }
 

