// Pull Down Menu Script
// ----------------------------------------------------------------

var secs2
var timerID2 = null
var timerRunning2 = false
var delay2 = 1000

function InitializeTimer2()
{
    secs2 = 20
    StopTheClock2()
    StartTheTimer2()
}

function StopTheClock2()
{
    if(timerRunning2)
        clearTimeout(timerID2)
    timerRunning2 = false
}

function StartTheTimer2()
{
    if (secs2==0)
    {
        StopTheClock2()
        resetMenu()
    }
    else
    {
        secs2 = secs2 - 1
        timerRunning2 = true
        timerID2 = self.setTimeout("StartTheTimer2()", delay2)
    }
}

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}



function resetMenu()
{
  // Reset Menu
  setMenuPos("mnuHome");document.getElementById("mnuHome").style.visibility="Hidden";
  setMenuPos("mnuFeatures");document.getElementById("mnuFeatures").style.visibility="Hidden";
  setMenuPos("mnuServices");document.getElementById("mnuServices").style.visibility="Hidden";
  setMenuPos("mnuSolutions");document.getElementById("mnuSolutions").style.visibility="Hidden";
  setMenuPos("mnuSignUp");document.getElementById("mnuSignUp").style.visibility="Hidden";
  setMenuPos("mnuPartner");document.getElementById("mnuPartner").style.visibility="Hidden";
}

function setMenuPos(sMenuItem)
{
  var winW = 630, winH = 460;
  var iFactor;

  if (parseInt(navigator.appVersion)>3) {
   if (navigator.appName=="Netscape") {
    winW = window.innerWidth;
    winH = window.innerHeight;
   }
   if (navigator.appName.indexOf("Microsoft")!=-1) {
    winW = document.body.offsetWidth;
    winH = document.body.offsetHeight;
   }
  }
  // Set New Menu  
  switch (sMenuItem)
  {
     case "mnuHome"       : iFactor=0;break;
     case "mnuFeatures"   : iFactor=1;break;
     case "mnuServices"   : iFactor=2;break;
     case "mnuSolutions"  : iFactor=3;break;
     case "mnuSignUp"     : iFactor=4;break;
     case "mnuPartner"    : iFactor=5;break;
  }
  iFactor = iFactor * 88;
  document.getElementById(sMenuItem).style.left=parseInt((winW/2)-400)+40+iFactor-2;
}

function menu(sMenuItem,sStatus)
{
  resetMenu();
  document.getElementById(sMenuItem).style.visibility=sStatus;
  InitializeTimer2();
}

function subMenu(oSubMenuItem, sStatus)
{
  // Set Sub Menu Color
  if (sStatus=='on')
  {
    oSubMenuItem.style.backgroundColor="#AED57A";
  }
  else
  {
    oSubMenuItem.style.backgroundColor="#CEE9A6";
  } 
}

function displayMenu()
{
  var sIndent    = "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;";
  var sSeparator = "<tr><td height='1' bgcolor='#679E29'></td></tr>";
//679E29

  // --- Main Pull Down Menu
  document.write("<table  cellspacing='0' cellpadding='0' bgcolor='#525252'>");
  document.write("<tr align='left' valign='bottom'>");
  document.write("<td><img src=\"images/menupad.gif\"></td>");
  document.write("<td><a href=\"index.html\" onMouseOut=\"MM_swapImgRestore()\" onMouseOver=\"MM_swapImage('Home','','images/btn_homeb.jpg',1);menu('mnuHome','visible')\"><img src=\"images/btn_home.jpg\" alt=\"Home\" name=\"Home\" border=\"0\"></a></td>");
  document.write("<td><a href=\"features.html\" onMouseOut=\"MM_swapImgRestore()\" onMouseOver=\"MM_swapImage('Features','','images/btn_featuresb.jpg',1);menu('mnuFeatures','visible')\"><img src=\"images/btn_features.jpg\" alt=\"Features\" name=\"Features\" border=\"0\"></a></td>");
  document.write("<td><a href=\"services.html\" onMouseOut=\"MM_swapImgRestore()\" onMouseOver=\"MM_swapImage('Services','','images/btn_servicesb.jpg',1);menu('mnuServices','visible')\"><img src=\"images/btn_services.jpg\" alt=\"Services\" name=\"Services\" border=\"0\"></a></td>");
  document.write("<td><a href=\"solutions.html\" onMouseOut=\"MM_swapImgRestore()\" onMouseOver=\"MM_swapImage('Solutions','','images/btn_solutionsb.jpg',1);menu('mnusolutions','visible')\"><img src=\"images/btn_solutions.jpg\" alt=\"Solutions\" name=\"Solutions\" border=\"0\"></a></td>");
  document.write("<td><a href=\"signup.html\" onMouseOut=\"MM_swapImgRestore()\" onMouseOver=\"MM_swapImage('SignUp','','images/btn_signupb.jpg',1);menu('mnuSignUp','visible')\"><img src=\"images/btn_signup.jpg\" alt=\"SignUp\" name=\"SignUp\" border=\"0\"></a></td>");
  document.write("<td><a href=\"partners.html\" onMouseOut=\"MM_swapImgRestore()\" onMouseOver=\"MM_swapImage('Partners','','images/btn_partnerb.jpg',1);menu('mnuPartner','visible')\"><img src=\"images/btn_partner.jpg\" alt=\"Partners\" name=\"Partners\" border=\"0\"></a></td>");
  document.write("<td><a href=\"login.html\" onMouseOut=\"MM_swapImgRestore()\" onMouseOver=\"MM_swapImage('Login','','images/btn_loginb.jpg',1);resetMenu()\"><img src=\"images/btn_login.jpg\" alt=\"Login\" name=\"Login\"  border=\"0\"></a></td>");
  document.write("<td><a href=\"contactus.html\" onMouseOut=\"MM_swapImgRestore()\" onMouseOver=\"MM_swapImage('Contacts','','images/btn_contactb.jpg',1);resetMenu()\"><img src=\"images/btn_contact.jpg\" alt=\"Contacts\" name=\"Contacts\"  border=\"0\"></a></td>");
  document.write("<td><img src=\"images/menupadright.gif\"></td>");
  document.write("</tr>");
  document.write("</table>");

  // --- Home Sub Menu
  document.write("<div id=\"mnuHome\" style=\"position:absolute; left:41px; top: 244px; width:168px; z-index:2; visibility:hidden; float:left;filter:alpha(opacity=90);-moz-opacity:0.9;opacity:0.9;\" onMouseOver=\"menu('mnuHome','visible')\" >");
  document.write("  <table width=\"100%\" border=\"0\" cellpadding=\"2\" cellspacing=\"1\" bgcolor=\"#679E29\">");
  document.write("    <tr><td height=20 bgcolor=\"#CEE9A6\" class=\"PanelItem\"  onMouseOver=\"subMenu(this,'on')\" onMouseOut=\"subMenu(this,'off')\"><a class=\"SubMenu\" href=\"aboutus.html\">About Us</a></td></tr>");
  document.write("    <tr><td height=20 bgcolor=\"#CEE9A6\" class=\"PanelItem\"  onMouseOver=\"subMenu(this,'on')\" onMouseOut=\"subMenu(this,'off')\"><a class=\"SubMenu\" href=\"awards.html\">Awards & Achievements</a></td></tr>");
  document.write("    <tr><td height=20 bgcolor=\"#CEE9A6\" class=\"PanelItem\"  onMouseOver=\"subMenu(this,'on')\" onMouseOut=\"subMenu(this,'off')\"><a class=\"SubMenu\" href=\"testimonial.html\">Testimonials</a></td></tr>");
  document.write("    <tr><td height=20 bgcolor=\"#CEE9A6\" class=\"PanelItem\"  onMouseOver=\"subMenu(this,'on')\" onMouseOut=\"subMenu(this,'off')\"><a class=\"SubMenu\" href=\"client_list.html\">Client List</a></td></tr>");
  document.write("    <tr><td height=20 bgcolor=\"#CEE9A6\" class=\"PanelItem\"  onMouseOver=\"subMenu(this,'on')\" onMouseOut=\"subMenu(this,'off')\"><a class=\"SubMenu\" href=\"http://www.dynamicsoftware.com/newsletters/\" target=\"_blank\">Newsletters</a></td></tr>");
  document.write("  </table>");
  document.write("</div>");

  // --- Features Sub Menu
  document.write("<div id=\"mnuFeatures\" style=\"position:absolute; left:41px; top: 244px; width:168px; z-index:2; visibility:hidden; float:left;filter:alpha(opacity=90);-moz-opacity:0.9;opacity:0.9;\" onMouseOver=\"menu('mnuFeatures','visible')\" >");
  document.write("  <table width=\"100%\" border=\"0\" cellpadding=\"2\" cellspacing=\"1\" bgcolor=\"#679E29\">");
  document.write("    <tr><td height=20 bgcolor=\"#CEE9A6\" class=\"PanelItem\"  onMouseOver=\"subMenu(this,'on')\" onMouseOut=\"subMenu(this,'off')\"><a class=\"SubMenu\" href=\"urlmanager.html\">URL Manager</a></td></tr>");
  document.write("    <tr><td height=20 bgcolor=\"#CEE9A6\" class=\"PanelItem\"  onMouseOver=\"subMenu(this,'on')\" onMouseOut=\"subMenu(this,'off')\"><a class=\"SubMenu\" href=\"keywordbuilder.html\">Keyword Builder</a></td></tr>");
  document.write("    <tr><td height=20 bgcolor=\"#CEE9A6\" class=\"PanelItem\"  onMouseOver=\"subMenu(this,'on')\" onMouseOut=\"subMenu(this,'off')\"><a class=\"SubMenu\" href=\"weboptimizer.html\">Web Optimizer</a></td></tr>");
  document.write("    <tr><td height=20 bgcolor=\"#CEE9A6\" class=\"PanelItem\"  onMouseOver=\"subMenu(this,'on')\" onMouseOut=\"subMenu(this,'off')\"><a class=\"SubMenu\" href=\"metagenerator.html\">Meta Tag Generator</a></td></tr>");
  document.write("    <tr><td height=20 bgcolor=\"#CEE9A6\" class=\"PanelItem\"  onMouseOver=\"subMenu(this,'on')\" onMouseOut=\"subMenu(this,'off')\"><a class=\"SubMenu\" href=\"doorwaycreator.html\">Doorway Page Creator</a></td></tr>");
  document.write("    <tr><td height=20 bgcolor=\"#CEE9A6\" class=\"PanelItem\"  onMouseOver=\"subMenu(this,'on')\" onMouseOut=\"subMenu(this,'off')\"><a class=\"SubMenu\" href=\"webranking.html\">Web Ranking</a></td></tr>");
  document.write("    <tr><td height=20 bgcolor=\"#CEE9A6\" class=\"PanelItem\"  onMouseOver=\"subMenu(this,'on')\" onMouseOut=\"subMenu(this,'off')\"><a class=\"SubMenu\" href=\"linkpopularity.html\">Link Popularity Checkier</a></td></tr>");
  document.write("    <tr><td height=20 bgcolor=\"#CEE9A6\" class=\"PanelItem\"  onMouseOver=\"subMenu(this,'on')\" onMouseOut=\"subMenu(this,'off')\"><a class=\"SubMenu\" href=\"sitesubmitter.html\">Site Submitter</a></td></tr>");
  document.write("    <tr><td height=20 bgcolor=\"#CEE9A6\" class=\"PanelItem\"  onMouseOver=\"subMenu(this,'on')\" onMouseOut=\"subMenu(this,'off')\"><a class=\"SubMenu\" href=\"submitreport.html\">Submission Report</a></td></tr>");
  document.write("    <tr><td height=20 bgcolor=\"#CEE9A6\" class=\"PanelItem\"  onMouseOver=\"subMenu(this,'on')\" onMouseOut=\"subMenu(this,'off')\"><a class=\"SubMenu\" href=\"manualsubmit.html\">Manual Submission</a></td></tr>");
  document.write("  </table>");
  document.write("</div>");

  // --- Services Sub Menu
  document.write("<div id=\"mnuServices\" style=\"position:absolute; left:57px; top: 244px; width:168px; z-index:2; visibility:hidden float:left;filter:alpha(opacity=90);-moz-opacity:0.9;opacity:0.9;\" onMouseOver=\"menu('mnuServices','visible')\" >"); 
  document.write("  <table width=\"100%\" border=\"0\" cellpadding=\"2\" cellspacing=\"1\" bgcolor=\"#679E29\">");
  document.write("    <tr><td height=20 bgcolor=\"#CEE9A6\" class=\"PanelItem\"  onMouseOver=\"subMenu(this,'on')\" onMouseOut=\"subMenu(this,'off')\"><a class=\"SubMenu\" href=\"seooptimizationservice.html\">SEO Service</a></td></tr>");
  document.write("    <tr><td height=20 bgcolor=\"#CEE9A6\" class=\"PanelItem\"  onMouseOver=\"subMenu(this,'on')\" onMouseOut=\"subMenu(this,'off')\"><a class=\"SubMenu\" href=\"http://www.dynamicsoftware.com/searchmarketing.html\" target=\"_blank\">Search Marketing Service</a></td></tr>");
  document.write("    <tr><td height=20 bgcolor=\"#CEE9A6\" class=\"PanelItem\"  onMouseOver=\"subMenu(this,'on')\" onMouseOut=\"subMenu(this,'off')\"><a class=\"SubMenu\" href=\"http://www.dynamicsoftware.com/products.html\" target=\"_blank\">Web Promotion Software</a></td></tr>");
  document.write("    <tr><td height=20 bgcolor=\"#CEE9A6\" class=\"PanelItem\"  onMouseOver=\"subMenu(this,'on')\" onMouseOut=\"subMenu(this,'off')\"><a class=\"SubMenu\" href=\"http://www.dynamicsitestats.com\" target=\"_blank\">Web Traffic Analysis</a></td></tr>");
  document.write("    <tr><td height=20 bgcolor=\"#CEE9A6\" class=\"PanelItem\"  onMouseOver=\"subMenu(this,'on')\" onMouseOut=\"subMenu(this,'off')\"><a class=\"SubMenu\" href=\"webdesign.html\">Web Design Service</a></td></tr>");
  document.write("  </table>");
  document.write("</div>");

  // --- Solutions Sub Menu
  document.write("<div id=\"mnuSolutions\" style=\"position:absolute; left:57px; top: 244px; width:168px; z-index:2; visibility:hidden float:left;filter:alpha(opacity=90);-moz-opacity:0.9;opacity:0.9;\" onMouseOver=\"menu('mnuSolutions','visible')\" >"); 
  document.write("  <table width=\"100%\" border=\"0\" cellpadding=\"2\" cellspacing=\"1\" bgcolor=\"#679E29\">");
  document.write("    <tr><td height=20 bgcolor=\"#CEE9A6\" class=\"PanelItem\"  onMouseOver=\"subMenu(this,'on')\" onMouseOut=\"subMenu(this,'off')\"><a class=\"SubMenu\" href=\"marketer.html\">Marketer Solution</a></td></tr>");
  document.write("    <tr><td height=20 bgcolor=\"#CEE9A6\" class=\"PanelItem\"  onMouseOver=\"subMenu(this,'on')\" onMouseOut=\"subMenu(this,'off')\"><a class=\"SubMenu\" href=\"agency.html\">Agency Solution</a></td></tr>");
  document.write("    <tr><td height=20 bgcolor=\"#CEE9A6\" class=\"PanelItem\"  onMouseOver=\"subMenu(this,'on')\" onMouseOut=\"subMenu(this,'off')\"><a class=\"SubMenu\" href=\"reseller.html\">Reseller Solution</a></td></tr>");
  document.write("  </table>");
  document.write("</div>");

  // --- Sign Up Sub Menu
  document.write("<div id=\"mnuSignUp\" style=\"position:absolute; left:57px; top: 244px; width:168px; z-index:2; visibility:hidden float:left;filter:alpha(opacity=90);-moz-opacity:0.9;opacity:0.9;\" onMouseOver=\"menu('mnuSignUp','visible')\" > ");
  document.write("  <table width=\"100%\" border=\"0\" cellpadding=\"2\" cellspacing=\"1\" bgcolor=\"#679E29\">");
  document.write("    <tr><td height=20 bgcolor=\"#CEE9A6\" class=\"PanelItem\"  onMouseOver=\"subMenu(this,'on')\" onMouseOut=\"subMenu(this,'off')\"><a class=\"SubMenu\" href=\"signup.html\">Sign Up</a></td></tr>");
  document.write("    <tr><td height=20 bgcolor=\"#CEE9A6\" class=\"PanelItem\"  onMouseOver=\"subMenu(this,'on')\" onMouseOut=\"subMenu(this,'off')\"><a class=\"SubMenu\" href=\"termscondition.html\">Terms & Conditions</a></td></tr>");
  document.write("  </table>");
  document.write("</div>");

  // --- Partner Sub Menu
  document.write("<div id=\"mnuPartner\" style=\"position:absolute; left:57px; top: 244px; width:168px; z-index:2; visibility:hidden float:left;filter:alpha(opacity=90);-moz-opacity:0.9;opacity:0.9;\" onMouseOver=\"menu('mnuPartner','visible')\" > ");
  document.write("  <table width=\"100%\" border=\"0\" cellpadding=\"2\" cellspacing=\"1\" bgcolor=\"#679E29\">");
  document.write("    <tr><td height=20 bgcolor=\"#CEE9A6\" class=\"PanelItem\"  onMouseOver=\"subMenu(this,'on')\" onMouseOut=\"subMenu(this,'off')\"><a class=\"SubMenu\" href=\"partners.html\">Program Overview</a></td></tr>");
  document.write("    <tr><td height=20 bgcolor=\"#CEE9A6\" class=\"PanelItem\"  onMouseOver=\"subMenu(this,'on')\" onMouseOut=\"subMenu(this,'off')\"><a class=\"SubMenu\" href=\"ressignup.html\">Sign Up</a></td></tr>");
  document.write("    <tr><td height=20 bgcolor=\"#CEE9A6\" class=\"PanelItem\"  onMouseOver=\"subMenu(this,'on')\" onMouseOut=\"subMenu(this,'off')\"><a class=\"SubMenu\" href=\"reslogin.html\">Partner Login</a></td></tr>");
  document.write("  </table>");
  document.write("</div>");

  resetMenu();
}

