var hgt,wth;

function doLoad() {
 document.attachEvent ('onmouseover', Hilite);
 document.attachEvent ('onmouseout', Restore);
 document.attachEvent ('onkeydown', checkcr);
 document.attachEvent ('onclick', handleclick);
}

function handleclick() {
 var s=event.srcElement;
 var t=s.id;
 if (t!=null) {
  if(t=="faq") {
   gotopage('faq.htm');
  }
  else {
   if(t=="cu") {
    contactUs();
   }
   else {
    if(t=="qt") {
     doQuote();
    }
    else {
     if(t=="su") {
      Moveonto('new');
     }
     else {
      if(t=="ar") {
       gotopage('aboutus.htm');
      }
      else {
       if(t=="sd") {
        gotopage('taketour.asp');
       }
       else {
        if(t=="tp") {
         gotopage('techncal.htm');
        }
        else {
         if(t=="sf") {
          gotopage('smplform.htm');
         }
         else {
          if(t=="goadm") {
           goadm();
          }
          else {
           if(t=="ohno") {
            gethelp(s);
           }
          }
         }
        }
       }
      }
     }
    }
   }
  }
 }
}


function swapin(el,elid) {
 if (elid=="A") {el.src="images/about_us_over.jpg";}
 if (elid=="B") {el.src="images/contact_us_over.jpg";}
 if (elid=="C") {el.src="images/faq_over.jpg";}
 if (elid=="D") {el.src="images/sign_up_over.jpg";}
 if (elid=="E") {el.src="images/pricing_over.jpg";}
 if (elid=="F") {el.src="images/get_quote_over.jpg";}
 if (elid=="G") {el.src="images/form_samp_over.jpg";}
 if (elid=="H") {el.src="images/site_samp_over.jpg";}
}

function swapout(el,elid) {
 if (elid=="A") {el.src="images/about_us.jpg";}
 if (elid=="B") {el.src="images/contact_us.jpg";}
 if (elid=="C") {el.src="images/faq.jpg";}
 if (elid=="D") {el.src="images/sign_up.jpg";}
 if (elid=="E") {el.src="images/pricing.jpg";}
 if (elid=="F") {el.src="images/get_quote.jpg";}
 if (elid=="G") {el.src="images/form_samp.jpg";}
 if (elid=="H") {el.src="images/site_samp.jpg";}
}

function showUse(id) {
 var goin="showuse.asp?use="+id;
 window.open(goin,"","center= Yes, help= Yes, scrollbars=yes, resizable=Yes, status= No");
}

function Hilite() {
 var s=event.srcElement;
 var t=s.className;
 if (t=="lnk") {
  s.style.cursor = "hand";
  s.style.borderStyle = "ridge";  
  s.style.color="#eeaa44";
 }
 else {
  if (t=="special") {
   s.style.borderStyle = "ridge";  
   s.style.cursor = "hand";
  }
  else {
   if(t=="dored") {
    s.style.cursor = "hand";
    s.style.borderWidth=2;
    s.style.borderStyle="outset";
    s.style.borderColor="#ff0000";
   }
   else {
    if(t=="tbm") {
     Hilite2(s);
    }
   }
  }
 }
}


function Restore() {
 var s=event.srcElement
 var t=s.className;
 if (t=="lnk") {
  s.style.cursor = "default";  
  s.style.borderStyle = "none";  
  s.style.color="#0000cc";
 }
 else {
  if (t=="special" || t=="dored") {
   s.style.borderStyle = "none";  
   s.style.cursor = "default";
  }
  else {
   if(t=="tbm") {
    Restore2(s);
   }
  }
 }
}


function Hilite2(sItem) {
   sItem.style.backgroundColor = "#ffffff";
   sItem.style.color = "#555522";
   sItem.style.cursor = "hand";
}

function Restore2(sItem) {
  sItem.style.backgroundColor = "#eeeeaa";  
  sItem.style.color = "#000000";
  sItem.style.cursor = "default";
}


function checkcr() {
 var a=window.event.keyCode;
 if (a==13) {
  var s=window.event.srcElement;
  if (s.id=="plog") {
   checklog(s);
  }
  else {
   window.event.keyCode=9;
  }
 }
}


function checklog(scooby) {
 if (scooby.value>' ') {
 window.event.keyCode=9;
 goadm();}
}


function contactUs() {
 var goin="contact.asp";
 window.open(goin,"","top=0, left=0, scrollbars=yes, resizable=Yes, status= No");
}


function goadm() {
//See 102604.txt
 var a,b,c,d,e,f,g,i,h,lg,cg,m,n,ln,hr,mn;
 var fm=document.forms[0];
 var j=fm.elements["log"].value;
 var k=fm.elements["plog"].value;
 if (j<=" " || k<=" ") {
  alert("Please enter both your administrative logon code and password to continue");
 }
 else {
  lg="";
  cg="",
  m="";
  d = fm.elements["currtime"].value;
  g=/\:/;
  h=d.search(g);
  hr=d.substr(0,h);
  h++;
  d=d.substr(h,4);
  h=d.search(g);
  mn=d.substr(0,h);
  mn= parseInt(mn);
  hr= parseInt(hr);
  j=j.toUpperCase();
  k=k.toUpperCase();
  n=j;
  e=Math.random() * 9;
  e=parseInt(e) + 1;
  g=e;
  i=14-j.length;
  h=0;
  while (h<i) {
   f=e.toString();
   a=e + 67;
   m=m + String.fromCharCode(a);
   j=j + f;
   e++;
   if(e>9) {e=1;}
   h++;
  }
  e=g;
  i=k.length;
  h=0;
  while (h<i) {
   b=j.charCodeAt(e);
   b=b ^ e;
   c=k.charCodeAt(h);
   b=b ^ c;
   if(b>63) {
    a=Math.random() * 25;
    a=parseInt(a) + 97;
    b=b-64;
   }
   else {
    a=Math.random() * 25;
    a=parseInt(a) + 65;}
    cg=cg + String.fromCharCode(a);
   b=b + 64;
   f=String.fromCharCode(b);
   lg=lg + f;
   e++;
   if (e>9) {e=1;}
   h++;
  }
  b=g + 67;
  i=n.length + 66;
  f=String.fromCharCode(i);
  j=n + m + f ;
  f=String.fromCharCode(b);
  j=j + f;
  f=String.fromCharCode(mn + b - 6);
  j=j + f;
  f=String.fromCharCode(hr + b);
  j=j + f;
  h=0;
  n="";
  m="";
  while(h<18) {
   n=n + j.substr(h,1);
   h++;
   m=m + j.substr(h,1);
   h++;
  }
  j=m + n;
  h=0;
  e=g;
  n="";
  while (h<18) {
   if(h==7 || h==8 || h>15) {
    n=n + j.substr(h,1)
   }
   else {
    b=j.charCodeAt(h);
    b=b ^ e;
    n=n + String.fromCharCode(b);
   }
   e++;
   if (e>9) {e=1;}
   h++;
  }
  j=cg + lg + n;

  var xs=screen.availWidth - 100;
  var ys=screen.availHeight - 50;
  xs=xs.toString();
  ys=ys.toString();
  var b="top=25,left=50,height=" + ys + ",width=" + xs + ",scrollbars=yes,resizable=yes,status=no,toolbar=no,menubar=no,location=no";
  var s1="admroute.asp?info=" + escape(j);
  s1=s1 + "&currdate=" + fm.elements["currdate"].value;
  s1=s1 + "&currtime=" + fm.elements["currtime"].value;
  open (s1,"",b);
 }
}

 

function gotopage(s1) {
// s1=s1 + ".htm";
// var b="height=" + hgt + ",width=" + wth + ",top=0,left=0,scrollbars=yes,resizable=yes,status=no,toolbar=no,menubar=no,location=no";
 var b="top=0,left=0,scrollbars=yes,resizable=yes,status=no,toolbar=no,menubar=no,location=no";
 open (s1,"",b);
}

function gotosample(page) {
 var s1=" ";
 var a="";
 if (page=="soccer") {
  s1="XYZ_Soccer/welcome.asp";
 }
 else {
  if (page=="vet") {
   s1="All-Critters_Vets/welcome.asp";
  }
  else {
   if (page=="ezee") {
    s1="Ezee_Realestate/welcome.asp";
   }
   else {
    if (page=="dna") {
     s1="Demo_Nurse_Association/welcome.asp";
    }
    else {
     if (page=="truck") {
      s1="Truck-O-Rama/welcome.asp";
     }
     else {
      if (page=="pizza") {
       s1="Dancing_Monkey/welcome.asp";
      }
      else {
       if (page=="chamber") {
        s1="Yourtown_Chamber/welcome.asp";
       }
      }
     }
    }
   }
  }
 }
 if (s1>" ") {
  if (a=="x") {s1="loader.asp?sdir=" + s1 + "&pid=0";}
  var b="scrollbars=yes,top=0,left=0,resizable=yes,status=no,toolbar=no,menubar=no,location=no";
  open (s1,"",b);
 }
}

function gethelp(dooby) {
 var sMail;
 sMail=prompt("Please enter your primary e-mail address","") ;
 if (sMail>" ") {
  loghelp.action="backlog.asp";
  loghelp.method="post";
  loghelp.mail.value=sMail;
  loghelp.submit;
 }
}

function Moveonto(doit) {
 var s1;
 s1="adminlog.asp?loglock=G&myid=" + doit;
 window.navigate(s1);
}

function doQuote() {
 var s1;
 s1="getquote.asp";
 window.navigate(s1);
}


function nsclick(t) {
 if (t!=null) {
  if(t=="faq") {
   gotopage('faq.htm');
  }
  else {
   if(t=="cu") {
    contactUs();
   }
   else {
    if(t=="qt") {
     doQuote();
    }
    else {
     if(t=="su") {
      Moveonto('new');
     }
     else {
      if(t=="ar") {
       gotopage('aboutus.htm');
      }
      else {
       if(t=="sd") {
        gotopage('taketour.asp');
       }
       else {
        if(t=="tp") {
         gotopage('techncal.htm');
        }
        else {
         if(t=="sf") {
          gotopage('smplform.htm');
         }
         else {
          if(t=="goadm") {
           GoAdmin(s);
          }
          else {
           if(t=="ohno") {
            gethelp(s);
           }
          }
         }
        }
       }
      }
     }
    }
   }
  }
 }
}
function dosignup() {
 var a="In order to use the RSmart web design center, you must access using";
 a=a+ "  Microsoft Internet Explorer version 4.0 or higher. If you have access";
 a=a+ " to this browser and wish to continue your RSmart registration, please close";
 a=a+ " your current browser and register using Internet Explorer version 4.0 or higher.";
 a=a+ " Note that if you wish to have RSmart design your web site an do not require access to the";
 a=a+ " site designer, please contact RSmart support.";
 alert(a);
}

