Solved

Need help with this script.

Posted on 2004-04-24
20
278 Views
Last Modified: 2013-12-03
I created this code with the exception of some help with the pros of this site. What I need is on each sub link no matter where the user presses, so long as on the same line it will link to the page on the word. Another feature I am trying to add to this is a feature in which the mouse moves out of the range it should hide the box. Just cut and paste this to your editor and run you will see what I am talking about. Thank you for your time.


<style type="text/css"> <!--
.submenuStyle {
   position: absolute;
   visibility: hidden;
}
.menuStyle {
    visibility: visable;
}
.m
{
   FONT-SIZE: 12;
   COLOR: #444444;
   FONT-FAMILY: Arial;
   font style: BOLD;
   TEXT-DECORATION: none
}
//--></style>

<script language="JavaScript"><!--

  // How many pixels to adjust down:
 var steps = 20;
 // How many total items untill the table is splits:
 var split = 10;
 // How many pixels to adjust left:
 var rsteps = 6;
 
 
 // Try these for vertical menus:
 // var steps = -6;
 // How many total items untill the table is splits:
 // var split = 200     ;
 // How many pixels to adjust left:
 // var rsteps = -74;

// Create new main array.
var menuitems =      [["popup:email_cdo.asp", "Add Message", "StaffEmail.asp", "View Email","faxlogin.asp","Fax Center"],
                               ["staffemployeebook.asp", "Employee Phone Book","Staffeditprofile.asp", "Edit Profile"],
                               ["HTTP://SEF.MLXCHANGE.COM", "MLS", "HTTP://MIAMIRE.COM", "Board of Realtors", "StaffFinancial.asp", "Financial Calculator", "staffzipform.asp","Create Contract"],
                             ["Staffviewofficelisting.asp", "Office Listings","staffaddofficelisting.asp", "Add Office Listing"],
                   ["staffaddtransaction.asp","Add Transaction","staffviewactive.asp?ID=Active", "Active Pipeline", "staffviewactive.asp?ID=Closed", "Closed Pipeline", "staffviewactive.asp?ID=Dropped", "Dropped Pipeline", "StaffTransactionreport.asp", "Report"],
                        ["popup:staffaddlead.html", "Add Lead","staffleadviewer.asp", "Office Leads", "StaffMyleadviewer.asp", "My Leads", "popup:Staffaddmylead.html","Add My Lead"]]

//LIST ITEMS YOU WANT TO OPEN UP IN A NEW WINDOW HERE
var newWin=new Array("HTTP://SEF.MLXCHANGE.COM","MLS","HTTP://MIAMIRE.COM", "Board of Realtors");

//Generate Span Layers
function generate_layers()
{
  newWin="|"+newWin.join("|")+"|";
 var x=0;
  browser_type = navigator.appName;

  for (x=0; x< menuitems.length; x++)
       {
          if (browser_type ==  "Microsoft Internet Explorer") {
          document.writeln ('<div id=submenu'+ (x+1)  +' name=submenu'+ (x+1)  +' class=submenuStyle style="z-index:1;">');
         }
         else {
         document.writeln ('<div id=submenu'+ (x+1)  +' name=submenu'+ (x+1)  +' class=submenuStyle>');
         }          
         document.writeln ('<table border=1 bgcolor=#ffffff bordercolor=#89AE79 cellspacing=0 cellpadding=5><tr><td valign=top>')
          var intmaxsplit = 50
              if ((menuitems[x].length/5) > (split/2)) {
               var intmaxsplit = (menuitems[x].length/2)
               if  (((intmaxsplit) % 2) == 0.5) {var intmaxsplit = intmaxsplit + 1;}
               }

             for (xx=0; xx< menuitems[x].length; xx++)
            {
             
                  if (browser_type ==  "Microsoft Internet Explorer") {
              document.writeln ('<TABLE width=114 border=0 cellspacing=0 cellpadding=0><TR>')
              document.writeln ('<TD style=width:100%;  onMouseover=this.style.backgroundColor="#89AE79"; onMouseout=this.style.backgroundColor="";>')
                  if(menuitems[x][xx].match("popup:"))
                    {
                         document.writeln ('<a  href=# onclick=\'window.open("'+menuitems[x][xx].split("popup:")[1]+'","","width=530,height=460");return false;\' class=m>');                    
                    }
                    else
                    {
                         document.writeln ('<a href = ' + menuitems[x][xx] + ' class=m'+(newWin.indexOf('|'+menuitems[x][xx+1]+'|')!=-1?' target=blank':'')+'>');              
                    }
                 
              document.writeln ('' + menuitems[x][xx+1] + '</a><br>');
              document.writeln ('</TD></TR></TABLE>');
               }
              else {
              document.writeln ('<a href = ' + menuitems[x][xx] + ' class=m >');
              document.writeln ('' + menuitems[x][xx+1] + '</a><br>');
              }
            xx = xx +1
             if ((xx) > intmaxsplit - 2) { document.writeln('</td><td valign=top>')
              var intmaxsplit = 500
             }  
            }
         document.writeln ('<br>');
          document.writeln ('</td></tr></table></div>');  
           }
      }
generate_layers();

if (browser_type == "Netscape" && (browser_version >= 4) && navigator.platform.indexOf("Mac") >= 0) { var steps = steps - 20 }

function getAnchorPosition(anchorname) {
    var useWindow = false;
    var coordinates = new Object();
    var x=0;
    var y=0;
    var w_gebi = false;
    var w_css = false;
    var w_layers = false;
    if (document.getElementById) { w_gebi = true; }
    else if (document.all) { w_css = true; }
    else if (document.layers) { w_layers = true; }

     if (w_gebi && document.all) {
         x = AnchorPosition_getPageOffsetLeft(document.all[anchorname]);
         y = AnchorPosition_getPageOffsetTop(document.all[anchorname]);
         }
    else if (w_gebi) {
         var o = document.getElementById(anchorname);
         x = o.offsetLeft;
         y = o.offsetTop;
         }
     else if (w_css) {
         x = AnchorPosition_getPageOffsetLeft(document.all[anchorname]);
         y = AnchorPosition_getPageOffsetTop(document.all[anchorname]);
         }
    else if (w_layers) {
         var found=0;
         for (var i=0; i<document.anchors.length; i++) {
              if (document.anchors[i].name == anchorname) {
                   found=1;
                   break;
                   }
              }
         if (found == 0) {
              coordinates.x=0; coordinates.y=0; return coordinates;
              }
         x = document.anchors[i].x;
         y = document.anchors[i].y;
         }
    else {
         coordinates.x=0; coordinates.y=0; return coordinates;
         }
    coordinates.x = x;
    coordinates.y = y;
    return coordinates;
    }




function AnchorPosition_getPageOffsetLeft (el) {
    var ol = el.offsetLeft;
    while ((el = el.offsetParent) != null) {
          ol += el.offsetLeft;
          }
    return ol;
    }
function AnchorPosition_getWindowOffsetLeft (el) {
    var scrollamount = document.body.scrollLeft;
    return AnchorPosition_getPageOffsetLeft(el)-scrollamount;
    }    
function AnchorPosition_getPageOffsetTop (el) {
    var ot = el.offsetTop;
    while((el = el.offsetParent) != null) {
          ot += el.offsetTop;
          }
    return ot;
    }

function AnchorPosition_getWindowOffsetTop (el) {
    var scrollamount = document.body.scrollTop;
    return AnchorPosition_getPageOffsetTop(el)-scrollamount;
    }

function removeall() {
    for(i = 1; i <= menuitems.length; i++) { remove(i);  }
}

function show(object) {

    var c = getAnchorPosition(object.replace(/submenu/, "menu"));
    if (c.x < 1) { c.x = 31; }
    if (c.y < 1) { c.y = 155; }
   
     
   if (document.getElementById && document.getElementById(object) != null) {
       document.getElementById(object).style.top=c.y + steps+"px";
       document.getElementById(object).style.left= c.x - rsteps+"px";
       node = document.getElementById(object).style.visibility='visible';
       document.body.onclick= removeall;
   }
   else if (document.layers && document.layers[object] != null) {
          document.layers[object].visibility = 'visible';
          document.layers[object].top = c.y + steps;
          document.layers[object].left = c.x - rsteps;
          document.captureEvents(Event.MOUSEMOVE | Event.MOUSEDOWN);
          document.onmousedown = removeall;
          }
   else if (document.all)
       {
       document.all[object].style.visibility = 'visible';
       document.all[object].style.pixelTop = c.y + steps;
         document.all[object].style.pixelLeft = c.x - rsteps;
         document.body.onclick= removeall;
         }

    var id = object.replace(/submenu/, "");
    for(i = 1; i <= menuitems.length; i++)
    {
         if  (i != id) {
         remove(i);
         }
    }
    var c = null
}


function removeall() {
    for(i = 1; i <= menuitems.length; i++) { remove(i);  }
}



function remove(id) {
   
     if (document.getElementById && document.getElementById('submenu'+id) != null) {
       node = document.getElementById('submenu'+id).style.visibility='hidden';
   }
   else if (document.layers && document.layers['submenu'+id] != null) {
          document.layers['submenu'+id].visibility = 'hidden';
          }
   else if (document.all)
       {
       document.all['submenu'+id].style.visibility = 'hidden';
         }
}

//--></script>

                   <body bgcolor="#F4F8E1">

                   <table width="760" border="0" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF" style="border-collapse: collapse" bordercolor="#111111">
                        <tr>
<span align="center">
                     <td>
         <table border="1" cellpadding="0" cellspacing="0"
          style="border-collapse: collapse" bordercolor="#000000" width="760" bgcolor="#89AE79">
              <tr><td>
                   <table width="100%" border="0" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF">
                        <tr>
<span align="center">
                     <td bordercolor="#89AE79">
         <table border="1" cellpadding="0" cellspacing="0"
          style="border-collapse: collapse" bordercolor="#89AE79" width="760">
              <tr><td>
                   <table width="100%" border="0" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF">
                        <tr>
                        <td width="50%">
                             <img border="0" src="ima\logo1.jpg" width="171" height="73">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                             <font face="Arial" size="2">&nbsp;<b><span align="center"><span ID="linktext0"><a href= "staffmainpage.asp?"><font color="#000000">Home</font></a></span></span></b></font></td>
                        <td width="50%">
<span align="center">
                             <p align="center">
                             <b><font size="2" face="Arial" color="#444444">Welcome
                        to the CTVO<br>
                       </font>
                       <font face="Arial" color="#444444" style="font-size: 9pt">
                       CT's&nbsp; Virtual Office©</font></b></span></td>
                        </tr>
                   </table>
              </td></tr>
         </table>
    </td>

</span>

                   </tr>
                   </table>
              </td></tr>
         </table>
    </td>

</span>

                   </tr>
                   </table>

<table border="1" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="760" id="AutoNumber1" height="23">
<tr>
<td height="23">
<table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="760" id="AutoNumber1" height="22">
    <tr>
<td width="132" height="22"><b><font size="2" color="#444444">&nbsp; <a onMouseOver="show('submenu1')" class="m" id="menu1" name="menu1">
<font size="2">Message Center</font></a></font></b></td>
<td width="124" height="22"><b><a onMouseOver="show('submenu2')" class="m" id="menu2" name="menu2"><font size="2" color="#444444">Employee Center</font></a></b></td>
<td width="116" height="22"><b><a onMouseOver="show('submenu3')" class="m" id="menu3" name="menu3"><font size="2" color="#444444">Realtor Tools</font></a></b></td>
<td width="87" height="22"><b><a onMouseOver="show('submenu4')" class="m" id="menu4" name="menu4"><font size="2" color="#444444">Listings</font></a></b></td>
<td width="166" height="22"><b><a onMouseOver="show('submenu5')" class="m" id="menu5" name="menu5"><font size="2" color="#444444">Manage
Transactions</font></a></b></td>
<td width="125" height="22"><b><a onMouseOver="show('submenu6')" class="m" id="menu6" name="menu6"><font size="2" color="#444444">Lead Center</font></a></b></td>
    </tr>
    </table>
</td>
</tr>
</table>
<table border="1" cellpadding="0" cellspacing="0"
style="border-collapse:collapse;color=#444444;font-size=12;font-family=Arial;font-weight=bold"
width="760" bgcolor="#BED9C4" bordercolor="#BED9C4" height="1">
    <tr>
<span align="center">
<span ID="linktext">
    <td width="630" height="16" align="left" bgcolor="#89AE79">
    <p align="center">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
    <font color="#000000">&nbsp;&nbsp;&nbsp; </font></td>
    </span>

</span>

    </tr>
</table>
0
Comment
Question by:eteran
  • 10
  • 5
  • 2
  • +3
20 Comments
 
LVL 18

Expert Comment

by:Plucka
ID: 10910601
Hi eteran,

You just need to put your <a href around the <tr or <td not just around the text.

Regards
Plucka
0
 

Author Comment

by:eteran
ID: 10910664
I did that and still not working.
0
 
LVL 63

Expert Comment

by:Zvonko
ID: 10911268
Search this lines and take the new version:

             document.writeln ('<TABLE width=114 border=0 cellspacing=0 cellpadding=0><TR>')
             document.writeln ('<TD style=width:100%;  onMouseover=this.style.backgroundColor="#89AE79"; onMouseout=this.style.backgroundColor=""; ')
                 if(menuitems[x][xx].match("popup:"))
                   {
                        document.writeln (' onclick=\'window.open("'+menuitems[x][xx].split("popup:")[1]+'","","width=530,height=460");return false;\' class=m ');                    
                   }
                   else
                   {
                        document.writeln (' onclick=\'window.location= "' + menuitems[x][xx] + '"\' ');              
                    }
               
             document.writeln ('>' + menuitems[x][xx+1] + '');
             document.writeln ('</TD></TR></TABLE>');

0
 
LVL 23

Expert Comment

by:rama_krishna580
ID: 10911400
0
 

Author Comment

by:eteran
ID: 10912430
Zvonko,
I do not see what I replace
0
 
LVL 63

Expert Comment

by:Zvonko
ID: 10913320
Never mind.

Take the complette page:
<style type="text/css"> <!--
.submenuStyle {
   position: absolute;
   visibility: hidden;
}
.menuStyle {
    visibility: visable;
}
.m
{
   FONT-SIZE: 12;
   COLOR: #444444;
   FONT-FAMILY: Arial;
   font style: BOLD;
   TEXT-DECORATION: none
}
//--></style>

<script language="JavaScript"><!--

  // How many pixels to adjust down:
 var steps = 20;
 // How many total items untill the table is splits:
 var split = 10;
 // How many pixels to adjust left:
 var rsteps = 6;
 
 
 // Try these for vertical menus:
 // var steps = -6;
 // How many total items untill the table is splits:
 // var split = 200     ;
 // How many pixels to adjust left:
 // var rsteps = -74;

// Create new main array.
var menuitems =      [["popup:email_cdo.asp", "Add Message", "StaffEmail.asp", "View Email","faxlogin.asp","Fax Center"],
                               ["staffemployeebook.asp", "Employee Phone Book","Staffeditprofile.asp", "Edit Profile"],
                               ["HTTP://SEF.MLXCHANGE.COM", "MLS", "HTTP://MIAMIRE.COM", "Board of Realtors", "StaffFinancial.asp", "Financial Calculator", "staffzipform.asp","Create Contract"],
                             ["Staffviewofficelisting.asp", "Office Listings","staffaddofficelisting.asp", "Add Office Listing"],
                   ["staffaddtransaction.asp","Add Transaction","staffviewactive.asp?ID=Active", "Active Pipeline", "staffviewactive.asp?ID=Closed", "Closed Pipeline", "staffviewactive.asp?ID=Dropped", "Dropped Pipeline", "StaffTransactionreport.asp", "Report"],
                        ["popup:staffaddlead.html", "Add Lead","staffleadviewer.asp", "Office Leads", "StaffMyleadviewer.asp","My Leads", "popup:Staffaddmylead.html","Add My Lead"]]

//LIST ITEMS YOU WANT TO OPEN UP IN A NEW WINDOW HERE
var newWin=new Array("HTTP://SEF.MLXCHANGE.COM","MLS","HTTP://MIAMIRE.COM", "Board of Realtors");

//Generate Span Layers
function generate_layers()
{
  newWin="|"+newWin.join("|")+"|";
 var x=0;
  browser_type = navigator.appName;

  for (x=0; x< menuitems.length; x++)
       {
          if (browser_type ==  "Microsoft Internet Explorer") {
          document.writeln ('<div id=submenu'+ (x+1)  +' name=submenu'+ (x+1)  +' class=submenuStyle style="z-index:1;">');
         }
         else {
         document.writeln ('<div id=submenu'+ (x+1)  +' name=submenu'+ (x+1)  +' class=submenuStyle>');
         }          
         document.writeln ('<table border=1 bgcolor=#ffffff bordercolor=#89AE79 cellspacing=0 cellpadding=5><tr><td valign=top>')
          var intmaxsplit = 50
              if ((menuitems[x].length/5) > (split/2)) {
               var intmaxsplit = (menuitems[x].length/2)
               if  (((intmaxsplit) % 2) == 0.5) {var intmaxsplit = intmaxsplit + 1;}
               }

             for (xx=0; xx< menuitems[x].length; xx++)
            {
             
                  if (browser_type ==  "Microsoft Internet Explorer") {
             document.writeln ('<TABLE width=114 border=0 cellspacing=0 cellpadding=0><TR>')
             document.writeln ('<TD style=width:100%;  onMouseover=\'this.style.backgroundColor="#89AE79";\' onMouseout=\'this.style.backgroundColor="";\' class=m ')
                 if(menuitems[x][xx].match("popup:"))
                   {
                        document.writeln (' onclick=\'window.open("'+menuitems[x][xx].split("popup:")[1]+'","","width=530,height=460");return false;\' ');                    
                   }
                   else
                   {
                        document.writeln (' onclick=\'window.location= "' + menuitems[x][xx] + '"\' ');              
                    }
               
             document.writeln ('>' + menuitems[x][xx+1] + '');
             document.writeln ('</TD></TR></TABLE>');

               }
              else {
              document.writeln ('<a href = ' + menuitems[x][xx] + ' class=m >');
              document.writeln ('' + menuitems[x][xx+1] + '</a><br>');
              }
            xx = xx +1
             if ((xx) > intmaxsplit - 2) { document.writeln('</td><td valign=top>')
              var intmaxsplit = 500
             }  
            }
         document.writeln ('<br>');
          document.writeln ('</td></tr></table></div>');  
           }
      }
generate_layers();

if (browser_type == "Netscape" && (browser_version >= 4) && navigator.platform.indexOf("Mac") >= 0) { var steps = steps - 20 }

function getAnchorPosition(anchorname) {
    var useWindow = false;
    var coordinates = new Object();
    var x=0;
    var y=0;
    var w_gebi = false;
    var w_css = false;
    var w_layers = false;
    if (document.getElementById) { w_gebi = true; }
    else if (document.all) { w_css = true; }
    else if (document.layers) { w_layers = true; }

     if (w_gebi && document.all) {
         x = AnchorPosition_getPageOffsetLeft(document.all[anchorname]);
         y = AnchorPosition_getPageOffsetTop(document.all[anchorname]);
         }
    else if (w_gebi) {
         var o = document.getElementById(anchorname);
         x = o.offsetLeft;
         y = o.offsetTop;
         }
     else if (w_css) {
         x = AnchorPosition_getPageOffsetLeft(document.all[anchorname]);
         y = AnchorPosition_getPageOffsetTop(document.all[anchorname]);
         }
    else if (w_layers) {
         var found=0;
         for (var i=0; i<document.anchors.length; i++) {
              if (document.anchors[i].name == anchorname) {
                   found=1;
                   break;
                   }
              }
         if (found == 0) {
              coordinates.x=0; coordinates.y=0; return coordinates;
              }
         x = document.anchors[i].x;
         y = document.anchors[i].y;
         }
    else {
         coordinates.x=0; coordinates.y=0; return coordinates;
         }
    coordinates.x = x;
    coordinates.y = y;
    return coordinates;
    }




function AnchorPosition_getPageOffsetLeft (el) {
    var ol = el.offsetLeft;
    while ((el = el.offsetParent) != null) {
          ol += el.offsetLeft;
          }
    return ol;
    }
function AnchorPosition_getWindowOffsetLeft (el) {
    var scrollamount = document.body.scrollLeft;
    return AnchorPosition_getPageOffsetLeft(el)-scrollamount;
    }    
function AnchorPosition_getPageOffsetTop (el) {
    var ot = el.offsetTop;
    while((el = el.offsetParent) != null) {
          ot += el.offsetTop;
          }
    return ot;
    }

function AnchorPosition_getWindowOffsetTop (el) {
    var scrollamount = document.body.scrollTop;
    return AnchorPosition_getPageOffsetTop(el)-scrollamount;
    }

function removeall() {
    for(i = 1; i <= menuitems.length; i++) { remove(i);  }
}

function show(object) {

    var c = getAnchorPosition(object.replace(/submenu/, "menu"));
    if (c.x < 1) { c.x = 31; }
    if (c.y < 1) { c.y = 155; }
   
     
   if (document.getElementById && document.getElementById(object) != null) {
       document.getElementById(object).style.top=c.y + steps+"px";
       document.getElementById(object).style.left= c.x - rsteps+"px";
       node = document.getElementById(object).style.visibility='visible';
       document.body.onclick= removeall;
   }
   else if (document.layers && document.layers[object] != null) {
          document.layers[object].visibility = 'visible';
          document.layers[object].top = c.y + steps;
          document.layers[object].left = c.x - rsteps;
          document.captureEvents(Event.MOUSEMOVE | Event.MOUSEDOWN);
          document.onmousedown = removeall;
          }
   else if (document.all)
       {
       document.all[object].style.visibility = 'visible';
       document.all[object].style.pixelTop = c.y + steps;
         document.all[object].style.pixelLeft = c.x - rsteps;
         document.body.onclick= removeall;
         }

    var id = object.replace(/submenu/, "");
    for(i = 1; i <= menuitems.length; i++)
    {
         if  (i != id) {
         remove(i);
         }
    }
    var c = null
}


function removeall() {
    for(i = 1; i <= menuitems.length; i++) { remove(i);  }
}



function remove(id) {
   
     if (document.getElementById && document.getElementById('submenu'+id) != null) {
       node = document.getElementById('submenu'+id).style.visibility='hidden';
   }
   else if (document.layers && document.layers['submenu'+id] != null) {
          document.layers['submenu'+id].visibility = 'hidden';
          }
   else if (document.all)
       {
       document.all['submenu'+id].style.visibility = 'hidden';
         }
}

//--></script>

                   <body bgcolor="#F4F8E1">

                   <table width="760" border="0" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF" style="border-collapse: collapse" bordercolor="#111111">
                        <tr>
<span align="center">
                     <td>
         <table border="1" cellpadding="0" cellspacing="0"
          style="border-collapse: collapse" bordercolor="#000000" width="760" bgcolor="#89AE79">
              <tr><td>
                   <table width="100%" border="0" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF">
                        <tr>
<span align="center">
                     <td bordercolor="#89AE79">
         <table border="1" cellpadding="0" cellspacing="0"
          style="border-collapse: collapse" bordercolor="#89AE79" width="760">
              <tr><td>
                   <table width="100%" border="0" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF">
                        <tr>
                        <td width="50%">
                             <img border="0" src="ima\logo1.jpg" width="171" height="73">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                             <font face="Arial" size="2">&nbsp;<b><span align="center"><span ID="linktext0"><a href="staffmainpage.asp?"><font color="#000000">Home</font></a></span></span></b></font></td>
                        <td width="50%">
<span align="center">
                             <p align="center">
                             <b><font size="2" face="Arial" color="#444444">Welcome
                        to the CTVO<br>
                       </font>
                       <font face="Arial" color="#444444" style="font-size: 9pt">
                       CT's&nbsp; Virtual Office©</font></b></span></td>
                        </tr>
                   </table>
              </td></tr>
         </table>
    </td>

</span>

                   </tr>
                   </table>
              </td></tr>
         </table>
    </td>

</span>

                   </tr>
                   </table>

<table border="1" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="760" id="AutoNumber1" height="23">
<tr>
<td height="23">
<table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="760" id="AutoNumber1" height="22">
    <tr>
<td width="132" height="22"><b><font size="2" color="#444444">&nbsp; <a onMouseOver="show('submenu1')" class="m" id="menu1" name="menu1">
<font size="2">Message Center</font></a></font></b></td>
<td width="124" height="22"><b><a onMouseOver="show('submenu2')" class="m" id="menu2" name="menu2"><font size="2" color="#444444">Employee Center</font></a></b></td>
<td width="116" height="22"><b><a onMouseOver="show('submenu3')" class="m" id="menu3" name="menu3"><font size="2" color="#444444">Realtor Tools</font></a></b></td>
<td width="87" height="22"><b><a onMouseOver="show('submenu4')" class="m" id="menu4" name="menu4"><font size="2" color="#444444">Listings</font></a></b></td>
<td width="166" height="22"><b><a onMouseOver="show('submenu5')" class="m" id="menu5" name="menu5"><font size="2" color="#444444">Manage
Transactions</font></a></b></td>
<td width="125" height="22"><b><a onMouseOver="show('submenu6')" class="m" id="menu6" name="menu6"><font size="2" color="#444444">Lead Center</font></a></b></td>
    </tr>
    </table>
</td>
</tr>
</table>
<table border="1" cellpadding="0" cellspacing="0"
style="border-collapse:collapse;color=#444444;font-size=12;font-family=Arial;font-weight=bold"
width="760" bgcolor="#BED9C4" bordercolor="#BED9C4" height="1">
    <tr>
<span align="center">
<span ID="linktext">
    <td width="630" height="16" align="left" bgcolor="#89AE79">
    <p align="center">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
    <font color="#000000">&nbsp;&nbsp;&nbsp; </font></td>
    </span>

</span>

    </tr>
</table>



0
 

Author Comment

by:eteran
ID: 10915291
the pop ups are not working
0
 

Author Comment

by:eteran
ID: 10935043
that script that you posted is not wokring correctly can anyone help
0
 
LVL 33

Expert Comment

by:sajuks
ID: 10935617
eteran ,
 the code that Zvonko provided is perfect, am able to get the popups in my browser.Did you cut and paste the page properly. Would be better if you posted your new page again so that we can see if there are any other errors.
0
 

Author Comment

by:eteran
ID: 10965937
 
this links do not pop up
["HTTP://SEF.MLXCHANGE.COM", "MLS", "HTTP://MIAMIRE.COM", "Board of Realtors", "StaffFinancial.asp",
0
Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

 
LVL 6

Expert Comment

by:Lord_McFly
ID: 10966752
Hi eteran...

I've changed this function a little so that if performs as you want...

//Generate Span Layers
function generate_layers()
{
  newWin="|"+newWin.join("|")+"|";
 var x=0;
  browser_type = navigator.appName;

  for (x=0; x< menuitems.length; x++)
       {
          if (browser_type ==  "Microsoft Internet Explorer") {
          document.writeln ('<div   id=submenu'+ (x+1)  +' name=submenu'+ (x+1)  +' class=submenuStyle  style="z-index:1;">');
         }
         else {
         document.writeln ('<div id=submenu'+ (x+1)  +' name=submenu'+ (x+1)  +' class=submenuStyle>peter');
         }          
         document.writeln ('<table  onMouseOut=Check() border=1 bgcolor=#ffffff bordercolor=#89AE79 cellspacing=0 cellpadding=5><tr><td valign=top>')
          var intmaxsplit = 50
              if ((menuitems[x].length/5) > (split/2)) {
               var intmaxsplit = (menuitems[x].length/2)
               if  (((intmaxsplit) % 2) == 0.5) {var intmaxsplit = intmaxsplit + 1;}
               }

             for (xx=0; xx< menuitems[x].length; xx++)
            {
             
                  if (browser_type ==  "Microsoft Internet Explorer") {
              document.writeln ('<TABLE  width=114 border=0 cellspacing=0 cellpadding=0 onMouseOver=Check()><TR>')
              //document.writeln ('<TD style=width:100%;  onMouseover=this.style.backgroundColor="#89AE79"; onMouseout=this.style.backgroundColor="";>')
                  if(menuitems[x][xx].match("popup:"))
                    {
                                    document.writeln ('<TD style=width:100%; style="cursor: hand"; onMouseover=this.style.backgroundColor="#89AE79"; onMouseout=this.style.backgroundColor=""; onclick=window.open("'+menuitems[x][xx].split("popup:")[1]+'","","width=530,height=460");return false;')
                        document.writeln('<span class=m>')
                         //document.writeln ('<a  href=# onclick=\'window.open("'+menuitems[x][xx].split("popup:")[1]+'","","width=530,height=460");return false;\' class=m>');                    
                    }
                    else
                    {
                                    document.writeln ('<TD style=width:100%; style="cursor: hand"; onMouseover=this.style.backgroundColor="#89AE79"; onMouseout=this.style.backgroundColor=""; onclick=window.location.href="'+menuitems[x][xx]+'";')
                                    document.writeln('<span class=m>')
                         //document.writeln ('<a href = ' + menuitems[x][xx] + ' class=m'+(newWin.indexOf('|'+menuitems[x][xx+1]+'|')!=-1?' target=blank':'')+'>');              
                    }
                 
              //document.writeln ('' + menuitems[x][xx+1] + '</a><br>');
              document.writeln(menuitems[x][xx+1] + '</span><br>');
              document.writeln ('</TD></TR></TABLE>');
               }
              else {
              document.writeln ('<a href = ' + menuitems[x][xx] + ' class=m >');
              document.writeln ('' + menuitems[x][xx+1] + '</a><br>');
              }
            xx = xx +1
             if ((xx) > intmaxsplit - 2) { document.writeln('</td><td valign=top>')
              var intmaxsplit = 500
             }  
            }
         document.writeln ('<br>');
          document.writeln ('</td></tr></table></div>');  
           }
      }

The following additions do the bit where it closes the menu once you move away from them...

function Check()
      {
            if(job)
                  {
                        clearTimeout(job)
                        job = 0
                  }
            
            job = setTimeout("removeall()",1000)
      }

function SetTime()
      {
            job = setTimeout("removeall()",1000)
      }

you will also need to add this to the <body> tag.

onLoad="SetTime()"

I've tested and it seems to work fine. Where the 1000 is this is 1 second.
0
 

Author Comment

by:eteran
ID: 10968755
?????????????????????????????/
I have tried to paste the code in the menu asnd it is not working
0
 
LVL 6

Expert Comment

by:Lord_McFly
ID: 10968816
Ok, I've put it online so you can see it working and then put the bits that I've changed in a <textarea> so you can copy it.

You need to replace the whole of the function generate_layers() with the one I supplied.

http://www.internection.co.uk/Source/eteran.htm

Cheers

McFly
0
 

Author Comment

by:eteran
ID: 10969553
OKay, I got it. can I make it disapear faster. and also there are links located that need to target in a new window
var newWin=new Array("HTTP://SEF.MLXCHANGE.COM","MLS","HTTP://MIAMIRE.COM", "Board of Realtors");
0
 
LVL 6

Expert Comment

by:Lord_McFly
ID: 10969639
to change the quickness change the...

job = setTimeout("removeall()",1000)   <---- 1000 = 1 second

Ok, sorted the new window bit - I changed it a tiny bit coz I don't understand this bit - class=m'+(newWin.indexOf('|'+menuitems[x][xx+1]+'|')!=-1?' target=blank':'')+'>'); - but my modifications do work.

Ignore (remove - not needed now) this bit....

var newWin=new Array("HTTP://SEF.MLXCHANGE.COM","MLS","HTTP://MIAMIRE.COM", "Board of Realtors");


In this bit...

var menuitems =      [["popup:email_cdo.asp", "Add Message", "StaffEmail.asp", "View Email","faxlogin.asp","Fax Center"],
                               ["staffemployeebook.asp", "Employee Phone Book","Staffeditprofile.asp", "Edit Profile"],
                               ["newwin:HTTP://SEF.MLXCHANGE.COM", "MLS", "newwin:HTTP://MIAMIRE.COM", "Board of Realtors", "StaffFinancial.asp", "Financial Calculator", "staffzipform.asp","Create Contract"],
                             ["Staffviewofficelisting.asp", "Office Listings","staffaddofficelisting.asp", "Add Office Listing"],
                   ["staffaddtransaction.asp","Add Transaction","staffviewactive.asp?ID=Active", "Active Pipeline", "staffviewactive.asp?ID=Closed", "Closed Pipeline", "staffviewactive.asp?ID=Dropped", "Dropped Pipeline", "StaffTransactionreport.asp", "Report"],
                        ["popup:staffaddlead.html", "Add Lead","staffleadviewer.asp", "Office Leads", "StaffMyleadviewer.asp", "My Leads", "popup:Staffaddmylead.html","Add My Lead"]]


...there is popup: - which is the popup windows, and then just normal pages, say staffemployeebook.asp for example.

I created a new one called newwin: - you can see in the menuitems I have prefixed HTTP://SEF.MLXCHANGE.COM with the new one I created - this is tested and works - hope thats ok.

I have posted the updates online (so you can test it if you like) but they are here below as well.....


var menuitems =      [["popup:email_cdo.asp", "Add Message", "StaffEmail.asp", "View Email","faxlogin.asp","Fax Center"],
                               ["staffemployeebook.asp", "Employee Phone Book","Staffeditprofile.asp", "Edit Profile"],
                               ["newwin:HTTP://SEF.MLXCHANGE.COM", "MLS", "newwin:HTTP://MIAMIRE.COM", "Board of Realtors", "StaffFinancial.asp", "Financial Calculator", "staffzipform.asp","Create Contract"],
                             ["Staffviewofficelisting.asp", "Office Listings","staffaddofficelisting.asp", "Add Office Listing"],
                   ["staffaddtransaction.asp","Add Transaction","staffviewactive.asp?ID=Active", "Active Pipeline", "staffviewactive.asp?ID=Closed", "Closed Pipeline", "staffviewactive.asp?ID=Dropped", "Dropped Pipeline", "StaffTransactionreport.asp", "Report"],
                        ["popup:staffaddlead.html", "Add Lead","staffleadviewer.asp", "Office Leads", "StaffMyleadviewer.asp", "My Leads", "popup:Staffaddmylead.html","Add My Lead"]]



function generate_layers()
{
  newWin="|"+newWin.join("|")+"|";
 var x=0;
  browser_type = navigator.appName;

  for (x=0; x< menuitems.length; x++)
       {
          if (browser_type ==  "Microsoft Internet Explorer") {
          document.writeln ('<div   id=submenu'+ (x+1)  +' name=submenu'+ (x+1)  +' class=submenuStyle  style="z-index:1;">');
         }
         else {
         document.writeln ('<div id=submenu'+ (x+1)  +' name=submenu'+ (x+1)  +' class=submenuStyle>peter');
         }          
         document.writeln ('<table  onMouseOut=Check() border=1 bgcolor=#ffffff bordercolor=#89AE79 cellspacing=0 cellpadding=5><tr><td valign=top>')
          var intmaxsplit = 50
              if ((menuitems[x].length/5) > (split/2)) {
               var intmaxsplit = (menuitems[x].length/2)
               if  (((intmaxsplit) % 2) == 0.5) {var intmaxsplit = intmaxsplit + 1;}
               }

             for (xx=0; xx< menuitems[x].length; xx++)
            {
             
                  if (browser_type ==  "Microsoft Internet Explorer") {
              document.writeln ('<TABLE  width=114 border=0 cellspacing=0 cellpadding=0 onMouseOver=Check()><TR>')
              //document.writeln ('<TD style=width:100%;  onMouseover=this.style.backgroundColor="#89AE79"; onMouseout=this.style.backgroundColor="";>')
                  if(menuitems[x][xx].match("popup:"))
                    {
                                    document.writeln ('<TD style=width:100%; style="cursor: hand"; onMouseover=this.style.backgroundColor="#89AE79"; onMouseout=this.style.backgroundColor=""; onclick=window.open("'+menuitems[x][xx].split("popup:")[1]+'","","width=530,height=460");return false;')
                        document.writeln('<span class=m>')
                         //document.writeln ('<a  href=# onclick=\'window.open("'+menuitems[x][xx].split("popup:")[1]+'","","width=530,height=460");return false;\' class=m>');                    
                    }
                   else if (menuitems[x][xx].match("newwin:"))
                              {
                                    document.writeln ('<TD style=width:100%; style="cursor: hand"; onMouseover=this.style.backgroundColor="#89AE79"; onMouseout=this.style.backgroundColor=""; onclick=window.open("'+menuitems[x][xx].split("newwin:")[1]+'","","");return false;')
                        document.writeln('<span class=m>')
                              }
                    else
                    {
                                    document.writeln ('<TD style=width:100%; style="cursor: hand"; onMouseover=this.style.backgroundColor="#89AE79"; onMouseout=this.style.backgroundColor=""; onclick=window.location.href="'+menuitems[x][xx]+'";')
                                    document.writeln('<span class=m>')
                         //document.writeln ('<a href = ' + menuitems[x][xx] + ' class=m'+(newWin.indexOf('|'+menuitems[x][xx+1]+'|')!=-1?' target=blank':'')+'>');              
                    }
                 
              //document.writeln ('' + menuitems[x][xx+1] + '</a><br>');
              document.writeln(menuitems[x][xx+1] + '</span><br>');
              document.writeln ('</TD></TR></TABLE>');
               }
              else {
              document.writeln ('<a href = ' + menuitems[x][xx] + ' class=m >');
              document.writeln ('' + menuitems[x][xx+1] + '</a><br>');
              }
            xx = xx +1
             if ((xx) > intmaxsplit - 2) { document.writeln('</td><td valign=top>')
              var intmaxsplit = 500
             }  
            }
         document.writeln ('<br>');
          document.writeln ('</td></tr></table></div>');  
           }
      }







0
 

Author Comment

by:eteran
ID: 10969775
I am getting an error??? I cut and paste the new code and the drop downs are not working.
0
 
LVL 6

Expert Comment

by:Lord_McFly
ID: 10969785
What is the error?
0
 

Author Comment

by:eteran
ID: 10970050
No pop ups
0
 

Author Comment

by:eteran
ID: 10970053
on the mouse over. Anyway of pasting the working code so I can Compare the diffrence/.
0
 
LVL 6

Accepted Solution

by:
Lord_McFly earned 500 total points
ID: 10970074
Whole Page...

<html>
<head>
<title>Example</title>
<style type="text/css"> <!--
.submenuStyle {
   position: absolute;
   visibility: hidden;
}
.menuStyle {
    visibility: visable;
}
.m
{
   FONT-SIZE: 12;
   COLOR: #444444;
   FONT-FAMILY: Arial;
   font style: BOLD;
   TEXT-DECORATION: none
}
//--></style>

<script language="JavaScript"><!--

  // How many pixels to adjust down:
 var steps = 20;
 // How many total items untill the table is splits:
 var split = 10;
 // How many pixels to adjust left:
 var rsteps = 6;
 
 
 // Try these for vertical menus:
 // var steps = -6;
 // How many total items untill the table is splits:
 // var split = 200     ;
 // How many pixels to adjust left:
 // var rsteps = -74;

// Create new main array.
var menuitems =      [["popup:email_cdo.asp", "Add Message", "StaffEmail.asp", "View Email","faxlogin.asp","Fax Center"],
                               ["staffemployeebook.asp", "Employee Phone Book","Staffeditprofile.asp", "Edit Profile"],
                               ["newwin:HTTP://SEF.MLXCHANGE.COM", "MLS", "newwin:HTTP://MIAMIRE.COM", "Board of Realtors", "StaffFinancial.asp", "Financial Calculator", "staffzipform.asp","Create Contract"],
                             ["Staffviewofficelisting.asp", "Office Listings","staffaddofficelisting.asp", "Add Office Listing"],
                   ["staffaddtransaction.asp","Add Transaction","staffviewactive.asp?ID=Active", "Active Pipeline", "staffviewactive.asp?ID=Closed", "Closed Pipeline", "staffviewactive.asp?ID=Dropped", "Dropped Pipeline", "StaffTransactionreport.asp", "Report"],
                        ["popup:staffaddlead.html", "Add Lead","staffleadviewer.asp", "Office Leads", "StaffMyleadviewer.asp", "My Leads", "popup:Staffaddmylead.html","Add My Lead"]]

//LIST ITEMS YOU WANT TO OPEN UP IN A NEW WINDOW HERE
var newWin=new Array("HTTP://SEF.MLXCHANGE.COM","MLS","HTTP://MIAMIRE.COM", "Board of Realtors");

//Generate Span Layers
function generate_layers()
{
  newWin="|"+newWin.join("|")+"|";
 var x=0;
  browser_type = navigator.appName;

  for (x=0; x< menuitems.length; x++)
       {
          if (browser_type ==  "Microsoft Internet Explorer") {
          document.writeln ('<div   id=submenu'+ (x+1)  +' name=submenu'+ (x+1)  +' class=submenuStyle  style="z-index:1;">');
         }
         else {
         document.writeln ('<div id=submenu'+ (x+1)  +' name=submenu'+ (x+1)  +' class=submenuStyle>peter');
         }          
         document.writeln ('<table  onMouseOut=Check() border=1 bgcolor=#ffffff bordercolor=#89AE79 cellspacing=0 cellpadding=5><tr><td valign=top>')
          var intmaxsplit = 50
              if ((menuitems[x].length/5) > (split/2)) {
               var intmaxsplit = (menuitems[x].length/2)
               if  (((intmaxsplit) % 2) == 0.5) {var intmaxsplit = intmaxsplit + 1;}
               }

             for (xx=0; xx< menuitems[x].length; xx++)
            {
             
                  if (browser_type ==  "Microsoft Internet Explorer") {
              document.writeln ('<TABLE  width=114 border=0 cellspacing=0 cellpadding=0 onMouseOver=Check()><TR>')
              //document.writeln ('<TD style=width:100%;  onMouseover=this.style.backgroundColor="#89AE79"; onMouseout=this.style.backgroundColor="";>')
                  if(menuitems[x][xx].match("popup:"))
                    {
                                    document.writeln ('<TD style=width:100%; style="cursor: hand"; onMouseover=this.style.backgroundColor="#89AE79"; onMouseout=this.style.backgroundColor=""; onclick=window.open("'+menuitems[x][xx].split("popup:")[1]+'","","width=530,height=460");return false;')
                        document.writeln('<span class=m>')
                         //document.writeln ('<a  href=# onclick=\'window.open("'+menuitems[x][xx].split("popup:")[1]+'","","width=530,height=460");return false;\' class=m>');                    
                    }
                   else if (menuitems[x][xx].match("newwin:"))
                              {
                                    document.writeln ('<TD style=width:100%; style="cursor: hand"; onMouseover=this.style.backgroundColor="#89AE79"; onMouseout=this.style.backgroundColor=""; onclick=window.open("'+menuitems[x][xx].split("newwin:")[1]+'","","");return false;')
                        document.writeln('<span class=m>')
                              }
                    else
                    {
                                    document.writeln ('<TD style=width:100%; style="cursor: hand"; onMouseover=this.style.backgroundColor="#89AE79"; onMouseout=this.style.backgroundColor=""; onclick=window.location.href="'+menuitems[x][xx]+'";')
                                    document.writeln('<span class=m>')
                         //document.writeln ('<a href = ' + menuitems[x][xx] + ' class=m'+(newWin.indexOf('|'+menuitems[x][xx+1]+'|')!=-1?' target=blank':'')+'>');              
                    }
                 
              //document.writeln ('' + menuitems[x][xx+1] + '</a><br>');
              document.writeln(menuitems[x][xx+1] + '</span><br>');
              document.writeln ('</TD></TR></TABLE>');
               }
              else {
              document.writeln ('<a href = ' + menuitems[x][xx] + ' class=m >');
              document.writeln ('' + menuitems[x][xx+1] + '</a><br>');
              }
            xx = xx +1
             if ((xx) > intmaxsplit - 2) { document.writeln('</td><td valign=top>')
              var intmaxsplit = 500
             }  
            }
         document.writeln ('<br>');
          document.writeln ('</td></tr></table></div>');  
           }
      }
generate_layers();

if (browser_type == "Netscape" && (browser_version >= 4) && navigator.platform.indexOf("Mac") >= 0) { var steps = steps - 20 }

function getAnchorPosition(anchorname) {
    var useWindow = false;
    var coordinates = new Object();
    var x=0;
    var y=0;
    var w_gebi = false;
    var w_css = false;
    var w_layers = false;
    if (document.getElementById) { w_gebi = true; }
    else if (document.all) { w_css = true; }
    else if (document.layers) { w_layers = true; }

     if (w_gebi && document.all) {
         x = AnchorPosition_getPageOffsetLeft(document.all[anchorname]);
         y = AnchorPosition_getPageOffsetTop(document.all[anchorname]);
         }
    else if (w_gebi) {
         var o = document.getElementById(anchorname);
         x = o.offsetLeft;
         y = o.offsetTop;
         }
     else if (w_css) {
         x = AnchorPosition_getPageOffsetLeft(document.all[anchorname]);
         y = AnchorPosition_getPageOffsetTop(document.all[anchorname]);
         }
    else if (w_layers) {
         var found=0;
         for (var i=0; i<document.anchors.length; i++) {
              if (document.anchors[i].name == anchorname) {
                   found=1;
                   break;
                   }
              }
         if (found == 0) {
              coordinates.x=0; coordinates.y=0; return coordinates;
              }
         x = document.anchors[i].x;
         y = document.anchors[i].y;
         }
    else {
         coordinates.x=0; coordinates.y=0; return coordinates;
         }
    coordinates.x = x;
    coordinates.y = y;
    return coordinates;
    }




function AnchorPosition_getPageOffsetLeft (el) {
    var ol = el.offsetLeft;
    while ((el = el.offsetParent) != null) {
          ol += el.offsetLeft;
          }
    return ol;
    }
function AnchorPosition_getWindowOffsetLeft (el) {
    var scrollamount = document.body.scrollLeft;
    return AnchorPosition_getPageOffsetLeft(el)-scrollamount;
    }    
function AnchorPosition_getPageOffsetTop (el) {
    var ot = el.offsetTop;
    while((el = el.offsetParent) != null) {
          ot += el.offsetTop;
          }
    return ot;
    }

function AnchorPosition_getWindowOffsetTop (el) {
    var scrollamount = document.body.scrollTop;
    return AnchorPosition_getPageOffsetTop(el)-scrollamount;
    }

function removeall() {
    for(i = 1; i <= menuitems.length; i++) { remove(i);  }
}

function show(object) {

    var c = getAnchorPosition(object.replace(/submenu/, "menu"));
    if (c.x < 1) { c.x = 31; }
    if (c.y < 1) { c.y = 155; }
   
     
   if (document.getElementById && document.getElementById(object) != null) {
       document.getElementById(object).style.top=c.y + steps+"px";
       document.getElementById(object).style.left= c.x - rsteps+"px";
       node = document.getElementById(object).style.visibility='visible';
       document.body.onclick= removeall;
   }
   else if (document.layers && document.layers[object] != null) {
          document.layers[object].visibility = 'visible';
          document.layers[object].top = c.y + steps;
          document.layers[object].left = c.x - rsteps;
          document.captureEvents(Event.MOUSEMOVE | Event.MOUSEDOWN);
          document.onmousedown = removeall;
          }
   else if (document.all)
       {
       document.all[object].style.visibility = 'visible';
       document.all[object].style.pixelTop = c.y + steps;
         document.all[object].style.pixelLeft = c.x - rsteps;
         document.body.onclick= removeall;
         }

    var id = object.replace(/submenu/, "");
    for(i = 1; i <= menuitems.length; i++)
    {
         if  (i != id) {
         remove(i);
         }
    }
    var c = null
}


function Check()
      {
            if(job)
                  {
                        clearTimeout(job)
                        job = 0
                  }
            
            job = setTimeout("removeall()",1000)
      }

function SetTime()
      {
            job = setTimeout("removeall()",1000)
      }


function removeall() {
    for(i = 1; i <= menuitems.length; i++) { remove(i);  }
}



function remove(id) {
   
     if (document.getElementById && document.getElementById('submenu'+id) != null) {
       node = document.getElementById('submenu'+id).style.visibility='hidden';
   }
   else if (document.layers && document.layers['submenu'+id] != null) {
          document.layers['submenu'+id].visibility = 'hidden';
          }
   else if (document.all)
       {
       document.all['submenu'+id].style.visibility = 'hidden';
         }
}

//--></script></head>
<body bgcolor="#F4F8E1" onload="SetTime()">

                   <table width="760" border="0" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF" style="border-collapse: collapse" bordercolor="#111111">
                        <tr>
<span align="center">
                     <td>
         <table border="1" cellpadding="0" cellspacing="0"
          style="border-collapse: collapse" bordercolor="#000000" width="760" bgcolor="#89AE79">
              <tr><td>
                   <table width="100%" border="0" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF">
                        <tr>
<span align="center">
                     <td bordercolor="#89AE79">
         <table border="1" cellpadding="0" cellspacing="0"
          style="border-collapse: collapse" bordercolor="#89AE79" width="760">
              <tr><td>
                   <table width="100%" border="0" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF">
                        <tr>
                        <td width="50%">
                             <img border="0" src="ima\logo1.jpg" width="171" height="73">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                             <font face="Arial" size="2">&nbsp;<b><span align="center"><span ID="linktext0"><a href= "staffmainpage.asp?"><font color="#000000">Home</font></a></span></span></b></font></td>
                        <td width="50%">
<span align="center">
                             <p align="center">
                             <b><font size="2" face="Arial" color="#444444">Welcome
                        to the CTVO<br>
                       </font>
                       <font face="Arial" color="#444444" style="font-size: 9pt">
                       CT's&nbsp; Virtual Office©</font></b></span></td>
                        </tr>
                   </table>
              </td></tr>
         </table>
    </td>

</span>

                   </tr>
                   </table>
              </td></tr>
         </table>
    </td>

</span>

                   </tr>
                   </table>

<table border="1" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="760" id="AutoNumber1" height="23">
<tr>
<td height="23">
<table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="760" id="AutoNumber1" height="22">
    <tr>
<td width="132" height="22"><b><font size="2" color="#444444">&nbsp; <a onMouseOver="show('submenu1')" class="m" id="menu1" name="menu1">
<font size="2">Message Center</font></a></font></b></td>
<td width="124" height="22"><b><a onMouseOver="show('submenu2')"  class="m" id="menu2" name="menu2"><font size="2" color="#444444">Employee Center</font></a></b></td>
<td width="116" height="22"><b><a onMouseOver="show('submenu3')" class="m" id="menu3" name="menu3"><font size="2" color="#444444">Realtor Tools</font></a></b></td>
<td width="87" height="22"><b><a onMouseOver="show('submenu4')" class="m" id="menu4" name="menu4"><font size="2" color="#444444">Listings</font></a></b></td>
<td width="166" height="22"><b><a onMouseOver="show('submenu5')" class="m" id="menu5" name="menu5"><font size="2" color="#444444">Manage
Transactions</font></a></b></td>
<td width="125" height="22"><b><a onMouseOver="show('submenu6')" class="m" id="menu6" name="menu6"><font size="2" color="#444444">Lead Center</font></a></b></td>
    </tr>
    </table>
</td>
</tr>
</table>
<table border="1" cellpadding="0" cellspacing="0"
style="border-collapse:collapse;color=#444444;font-size=12;font-family=Arial;font-weight=bold"
width="760" bgcolor="#BED9C4" bordercolor="#BED9C4" height="1">
    <tr>
<span align="center">
<span ID="linktext">
    <td width="630" height="16" align="left" bgcolor="#89AE79">
    <p align="center">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
    <font color="#000000">&nbsp;&nbsp;&nbsp; </font></td>
    </span>

</span>

    </tr>
</table>
</body>
</html>
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

The task A number given should be formatted for easy reading by separating digits into triads. Format must be made inline via JavaScript, i.e., frameworks / functions are not welcome. So let’s take a number like this “12345678.91¿ and format i…
This article discusses the difference between strict equality operator and equality operator in JavaScript. The Need: Because JavaScript performs an implicit type conversion when performing comparisons, we have to take this into account when wri…
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…

708 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now