function hide(){
	window.scroll(0,0);
	MM_showHideLayers('waitScreen','','show');
	MM_showHideLayers('mainScreen','','hide');
}
function MM_findObj(n, d) { //v4.0
  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 && document.getElementById) x=document.getElementById(n); return x;
}
function tmt_findObj(n){
	var x,t; if((n.indexOf("?"))>0&&parent.frames.length){t=n.split("?");
	x=eval("parent.frames['"+t[1]+"'].document.getElementById('"+t[0]+"')");
	}else{x=document.getElementById(n)}return x;
}
function MM_showHideLayers() { //v3.0A Modified by Al Sparber and Massimo Foti for NN6 Compatibility
  var i,p,v,obj,args=MM_showHideLayers.arguments;if(document.getElementById){
   for (i=0; i<(args.length-2); i+=3){ obj=tmt_findObj(args[i]);v=args[i+2];
   v=(v=='show')?'visible':(v='hide')?'hidden':v;
   if(obj)obj.style.visibility=v;}} else{
  for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2];
    if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v='hide')?'hidden':v; }
    obj.visibility=v; }}
}


function changeImages() {
    if (document.images) {
        for (var i=0; i<changeImages.arguments.length; i+=2) {
            document[changeImages.arguments[i]].src = changeImages.arguments[i+1];
        }
    }
}

var preloadFlag = false;
function preloadImages() {
    if (document.images) {
//        home_over = newImage("images_v4/home-over.gif");
//        about_over = newImage("images_v4/about-over.gif");
//        faq_over = newImage("images_v4/faq-over.gif");
//		search_over = newImage("images_v4/search-over.gif");
//        email_over = newImage("images_v4/email-over.gif");
//		account_over = newImage("images_v4/login.gif");
//        mast_16_email_over = newImage("images_v4/mastfile_16-email_over.gif");
//        mast_16_faq_over = newImage("images_v4/mastfile_16-faq_over.gif");
//        mast_16_about_over = newImage("images_v4/mastfile_16-about_over.gif");
//        mast_16_home_over = newImage("images_v4/mastfile_16-home_over.gif");
//		mast_16_account_over = newImage("images_v4/login-over.gif");
        preloadFlag = true;
		if(document.frmSEARCH) {document.frmSEARCH.q5.focus();}
		if(document.Login) {document.Login.Email.focus();}
		if(document.frmUser) {document.frmUser.Email.focus();}
		if(document.WriteForm) {document.WriteForm.Entity_Name.focus();}		
    }
}

// Here's one illustrating a decimal tipStick value so it tags along behind the cursor.
var stickyTip = new TipObj('stickyTip');
with (stickyTip)
{
 tips.file = new Array(125, -25, 250, '<b>It’s free and easy!</b><br>Sign-in to file your Report and it will be seen by millions of readers instantly!');
 tips.update = new Array(125, -25, 250, '<b>Add to your Report.</b><br> Do you have more info or pictures you want to add? Did you negotiate or settle the Rip-Off? Did someone file a REBUTTAL? Return anytime and update your report.');
 tips.search = new Array(125, -25, 250, '<b>Search the latest Rip-off Reports.</b><br>New Reports posted constantly.');
 tips.picture = new Array(125, -25, 250, '<b>View Rip-off Reports with pictures.</b><br>How to Add pictures to your Report anytime for free. Reports with pictures may also be featured on the Home Page.');
 tips.editorial = new Array(125, -25, 250, '<b>From the EDitor</b><br>Why this site was created and EDitor’s comments in defense of victims.');
 tips.volunteer = new Array(125, -25, 250, '<b>WANTED!</b><br>Consumer Advocates<br>Lawyers & Experienced Business People.');
 tips.reporters = new Array(125, -25, 250, '<b>Get Involved!</b><br>Become a Consumer Advocate<br>Rip-Off Reporter.');
 tips.thankyou = new Array(125, -25, 250, '<b>We receive hundreds of thank you e-mails</b><br>a day, saving consumers millions of dollars. Click here to read many of them. UNDER CONSTRUCTION');
 tips.lawsuit = new Array(125, -25, 250, '<b>COMING SOON. Join a pending class action. View Reports involving lawsuits.</b><br>Many law firms show interest in<br>our Rip-Off Reports.');
 tips.guide = new Array(125, -25, 250, '<b>A Do-it-Yourself Guide to Rip-off Revenge</b><br>Get revenge and your money back too! Written by ED Magedson, founder of <br>Rip-off Report.com.');
 tips.link = new Array(125, -25, 250, '<b>Link to our web site.</b><br>Webmasters can use our banners<br>to link to our site.');
 tips.donate = new Array(125, -25, 250, '<b>Help us fight for your rights!</b><br>Your support is appreciated.');
 tips.about = new Array(125, -25, 250, '<b>Find out who is behind Rip-off Report.com & <b><i><u>bad</u></i></b>businessbureau.com</b><br>Who started it, and why, who is the staff and why are they a part of the Rip-off Report.com, the many volunteers that assist us, and why the many regular contributors keep on contributing.');
 tips.faq = new Array(125, -25, 250, '<b>Frequently Asked Questions.</b> Have a question? check here first.');

 template = '<table bgcolor="#ffff00" cellpadding="1" cellspacing="0" width="%2%" height="100%" border="0">' +
  '<tr><td><table bgcolor="#ffff99" cellpadding="4" cellspacing="0" width="100%" height="100%" border="0">' +
  '<tr><td align="center" class="tipClass">%3%</td></tr></table></td></tr></table>';

 tipStick = 0.2;
}

// Capture the onmousemove event so tips can follow the mouse. Add in all your tip objects here
// and also any functions from other scripts that need this event (e.g. my DHTML Scroller) too.
if (isNS4) document.captureEvents(Event.MOUSEMOVE);
document.onmousemove = function(evt)
{

 // Add or remove all your tip objects from here!
 stickyTip.track(evt);

 if (isNS4) return document.routeEvent(evt);
}


// A small function that refreshes NS4 on horizontal resize.
var nsWinW = window.innerWidth, nsWinH = window.innerHeight;
function ns4BugCheck()
{
 if (isNS4 && (nsWinW!=innerWidth || nsWinH!=innerHeight)) location.reload()
}

window.onresize = function()
{
 ns4BugCheck();
}
//-->

function MM_clearForm(val) { 
   if (val.defaultValue==val.value) val.value=""
}

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_validateForm() { //v4.0
  var i,p,q,nm,test,num,min,max,errors='',args=MM_validateForm.arguments;
  for (i=0; i<(args.length-2); i+=3) { test=args[i+2]; val=MM_findObj(args[i]);
    if (val) { nm=val.name; if ((val=val.value)!="") {
      if (test.indexOf('isEmail')!=-1) { p=val.indexOf('@');
        if (p<1 || p==(val.length-1)) errors+='- '+nm+' must contain an e-mail address.\n';
      } else if (test!='R') {
        if (isNaN(val)) errors+='- '+nm+' must contain a number.\n';
        if (test.indexOf('inRange') != -1) { p=test.indexOf(':');
          min=test.substring(8,p); max=test.substring(p+1);
          if (val<min || max<val) errors+='- '+nm+' must contain a number between '+min+' and '+max+'.\n';
    } } } else if (test.charAt(0) == 'R') errors += 'Search field is required.\n'; }
  } if (errors) alert(errors);
  document.MM_returnValue = (errors == '');
}

function openWin(html)
{
 // convert all characters to lowercase to simplify testing 
    var agt=navigator.userAgent.toLowerCase(); 

    // *** BROWSER VERSION *** 
    // Note: On IE5, these return 4, so use is_ie5up to detect IE5. 
    var is_major = parseInt(navigator.appVersion); 
    var is_minor = parseFloat(navigator.appVersion); 

    // Note: Opera and WebTV spoof Navigator.  We do strict client detection. 
    // If you want to allow spoofing, take out the tests for opera and webtv. 
    var is_nav  = ((agt.indexOf('mozilla')!=-1) && (agt.indexOf('spoofer')==-1) 
                && (agt.indexOf('compatible') == -1) && (agt.indexOf('opera')==-1) 
                && (agt.indexOf('webtv')==-1)); 
    var is_nav3 = (is_nav && (is_major == 3)); 
    var is_nav4up = (is_nav && (is_major >= 4)); 
    var is_navonly      = (is_nav && ((agt.indexOf(";nav") != -1) || 
                          (agt.indexOf("; nav") != -1)) ); 
 
    var is_ie   = (agt.indexOf("msie") != -1); 
    var is_ie3  = (is_ie && (is_major < 4)); 
    var is_ie4  = (is_ie && (is_major == 4) && (agt.indexOf("msie 5.0")==-1) ); 
    var is_ie4up  = (is_ie  && (is_major >= 4)); 
    var is_ie5  = (is_ie && (is_major == 4) && (agt.indexOf("msie 5.0")!=-1) ); 
    var is_ie5up  = (is_ie  && !is_ie3 && !is_ie4); 

    // KNOWN BUG: On AOL4, returns false if IE3 is embedded browser 
    // or if this is the first browser window opened.  Thus the 
    // variables is_aol, is_aol3, and is_aol4 aren't 100% reliable. 
    var is_aol   = (agt.indexOf("aol") != -1); 
    var is_aol3  = (is_aol && is_ie3); 
    var is_aol4  = (is_aol && is_ie4); 

      if (is_nav3 || is_nav4up)
           {
            win1 = window.open(html,"NW","toolbar=yes,menubar=yes,scrollbars=yes,resizable=YES,height=300,width=550")
                win1.focus()
      }
      else if (is_ie4up)
                {
            win1 = window.open(html,"NW","toolbar=yes,menubar=yes,scrollbars=yes,resizable=YES,height=300,width=550")
                win1.focus()
      }
      else{
                        window.open(html,"NW","toolbar=yes,menubar=yes,scrollbars=yes,resizable=YES,height=300,width=550"); 
     }
      
}

