// random INSIDE!
function mmLoadMenus() {

} // mmLoadMenus()
var imagenumber = 12;
var randomnumber = Math.random() ;
var rand1 = Math.round( (imagenumber-1) * randomnumber) + 1 ;
images = new Array
images[1] = "images/imagebar/1.jpg"
images[2] = "images/imagebar/2.jpg"
images[3] = "images/imagebar/3.jpg"
images[4] = "images/imagebar/4.jpg"
images[5] = "images/imagebar/5.jpg"
images[6] = "images/imagebar/6.jpg"
images[7] = "images/imagebar/7.jpg"
images[8] = "images/imagebar/8.jpg"
images[9] = "images/imagebar/9.jpg"
images[10] = "images/imagebar/10.jpg"
images[11] = "images/imagebar/11.jpg"
images[12] = "images/imagebar/12.jpg"
var image = images[rand1]
//END RANDOM INSIDE

// random INDEX
var theImages = new Array()
 
//Random-loading images
theImages[0] = 'images/imagebar/1.jpg'
theImages[1] = 'images/imagebar/2.jpg'
theImages[2] = 'images/imagebar/3.jpg'
theImages[3] = 'images/imagebar/4.jpg'
theImages[4] = 'images/imagebar/5.jpg'
theImages[5] = 'images/imagebar/6.jpg'
theImages[6] = 'images/imagebar/1.jpg'
theImages[7] = 'images/imagebar/2.jpg'
theImages[8] = 'images/imagebar/3.jpg'
theImages[9] = 'images/imagebar/4.jpg'
theImages[10] = 'images/imagebar/2.jpg'
theImages[11] = 'images/imagebar/6.jpg'
theImages[12] = 'images/imagebar/1.jpg'
theImages[13] = 'images/imagebar/2.jpg'
theImages[14] = 'images/imagebar/3.jpg'
theImages[15] = 'images/imagebar/4.jpg'
theImages[16] = 'images/imagebar/4.jpg'
theImages[17] = 'images/imagebar/6.jpg'
 
var j = 0
var p = theImages.length;
var preBuffer = new Array()
 
for (i = 0; i < p; i++){
preBuffer[i] = new Image()
preBuffer[i].src = theImages[i]
}
var whichImage = Math.round(Math.random()*(p-1));
 
function showImage(){
    if(whichImage==0){
    document.write('<img src="'+theImages[whichImage]+'" border=0 width=278 height=167 align="right" alt="Cash Advance & Payday Centers"></a>');
    }
	 if(whichImage==1){
    document.write('<img src="'+theImages[whichImage]+'" border=0 width=278 height=167 align="right" alt="Cash Advance & Payday Centers"></a>');
    }
	if(whichImage==2){
    document.write('<img src="'+theImages[whichImage]+'" border=0 width=278 height=167 align="right" alt="Cash Advance & Payday Centers"></a>');
    }
	if(whichImage==3){
    document.write('<img src="'+theImages[whichImage]+'" border=0 width=278 height=167 align="right" alt="Cash Advance & Payday Centers"></a>');
    }
	if(whichImage==4){
    document.write('<img src="'+theImages[whichImage]+'" border=0 width=278 height=167 align="right" alt="Cash Advance & Payday Centers"></a>');
    }
	if(whichImage==5){
    document.write('<img src="'+theImages[whichImage]+'" border=0 width=278 height=167 align="right" alt="Cash Advance & Payday Centers"></a>');
    }
	if(whichImage==6){
    document.write('<img src="'+theImages[whichImage]+'" border=0 width=278 height=167 align="right" alt="Cash Advance & Payday Centers"></a>');
    }
	if(whichImage==7){
    document.write('<img src="'+theImages[whichImage]+'" border=0 width=278 height=167 align="right" alt="Cash Advance & Payday Centers"></a>');
    }
	if(whichImage==8){
    document.write('<img src="'+theImages[whichImage]+'" border=0 width=278 height=167 align="right" alt="Cash Advance & Payday Centers"></a>');
    }
	if(whichImage==9){
    document.write('<img src="'+theImages[whichImage]+'" border=0 width=278 height=167 align="right" alt="Cash Advance & Payday Centers"></a>');
    }
	if(whichImage==10){
    document.write('<img src="'+theImages[whichImage]+'" border=0 width=278 height=167 align="right" alt="Cash Advance & Payday Centers"></a>');
    }
	if(whichImage==11){
    document.write('<img src="'+theImages[whichImage]+'" border=0 width=278 height=167 align="right" alt="Cash Advance & Payday Centers"></a>');
    }
	if(whichImage==12){
    document.write('<img src="'+theImages[whichImage]+'" border=0 width=278 height=167 align="right" alt="Cash Advance & Payday Centers"></a>');
    }
	if(whichImage==13){
    document.write('<img src="'+theImages[whichImage]+'" border=0 width=278 height=167 align="right" alt="Cash Advance & Payday Centers"></a>');
    }
	if(whichImage==14){
    document.write('<img src="'+theImages[whichImage]+'" border=0 width=278 height=167 align="right" alt="Cash Advance & Payday Centers"></a>');
    }
	if(whichImage==15){
    document.write('<img src="'+theImages[whichImage]+'" border=0 width=278 height=167 align="right" alt="Cash Advance & Payday Centers"></a>');
    }
	if(whichImage==16){
    document.write('<img src="'+theImages[whichImage]+'" border=0 width=278 height=167 align="right" alt="Cash Advance & Payday Centers"></a>');
    }
	if(whichImage==17){
    document.write('<img src="'+theImages[whichImage]+'" border=0 width=278 height=167 align="right" alt="Cash Advance & Payday Centers"></a>');
    }
	
}//END RANDOM INDEX


function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);

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 MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

<!-- Yahoo! Inc.

var ysm_accountid  = "1UKOT5VDIUP0138USC4D1BQLC3C";

document.write("<SCR" + "IPT language='JavaScript' type='text/javascript' " 

+ "SRC=//" + "srv1.wa.marketingsolutions.yahoo.com" + "/script/ScriptServlet" + "?aid=" + ysm_accountid 

+ "></SCR" + "IPT>");

// -->

<!--//--><![CDATA[//><!--

sfHover = function() {
	var sfEls = document.getElementById("nav").getElementsByTagName("LI");
	for (var i=0; i<sfEls.length; i++) {
		sfEls[i].onmouseover=function() {
			this.className+=" sfhover";
		}
		sfEls[i].onmouseout=function() {
			this.className=this.className.replace(new RegExp(" sfhover\\b"), "");
		}
	}
}
if (window.attachEvent) window.attachEvent("onload", sfHover);

//--><!]]>
function MM_jumpMenu(targ,selObj,restore){ //v3.0
  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
}

//Google API

function GetLocation() 
{ 
      var myUrl
      var myZip1 = document.getElementById('txtZipCode1').value; 
      var myZip2 
      var myCity
      var myState

      //for pages with only 1 search box...
      try {
      myZip2 = document.getElementById('txtZipCode2').value; 
      } catch (e) {
      myZip2 =myZip1; 
      }
      
      //Try to get the city
      try
      {
      if (document.getElementById('txtCity').value != "Enter Your City")
      {
      myCity = document.getElementById('txtCity').value;
      }
      else
      {
      myCity = "";
      }
      } catch (e) {
      myCity = "";
      }
      
      //Try to get the State
      try
      {
      if (document.getElementById('ddlState').value != "#")
      {
      myState = document.getElementById('ddlState').value;
      }
      else
      {
      myState = "";
      }
      } catch (e) {
      myState = "";
      }
      
      //Quick validation to be sure all the fields are not blank.
      if (((myZip1== "" && myZip2== "")||(myZip1== null && myZip2== null))&&((myCity == "" && myState == "")||(myCity==null && myState == null)))
      {
      alert("Please enter a 5 digit zip code or a city and state");
      return;
      }

      //Choose which box they entered their zip into.
      if (myZip1!= "" && myZip2!= ""){
      myUrl=myZip1;
      } else{
            if (myZip1!= "")
            {
            myUrl=myZip1;
            }else{
                  if (myZip2!= "")
                  {
                  myUrl=myZip2;
      }}}
      
      if (myUrl == "" || myUrl == null)
      {
      myUrl="";
      }
      
      

      //Get the maps...
      myUrl = 'http://loc.checkintocash.com/searchLocations.aspx?zipcode=' + myUrl + '&city=' + myCity + '&state=' + myState
      //window.open(myUrl,'location','width=800,height=800,resizable=yes'); 
      window.location =myUrl;
}

//-->

//form info to LBP

function sendForm(form)
{
 valid = true;
 var Querystring;
 var fName = form.strFName.value;
    if ( fName == "")
    {
        alert ( "Please enter your First Name" );
        valid = false;
    }
 var lName = document.getElementById('strLName').value;
    if ( lName == "")
    {
        alert ( "Please enter your Last Name" );
        valid = false;
    }
 var eMail = document.getElementById('strEmail').value;
    if ( eMail == "")
    {
        alert ( "Please enter your E-Mail Address" );
        valid = false;
    }
 var State = document.getElementById('strState').value;
    if ( State == "" )
    {
        alert ( "Please select your State." );
        valid = false;
    }
if ( valid == true )
{
    if ( State == "AK" || State == "AR" || State == "CT" || State == "DC" || State == "FL" || State == "GA" || State == "HI" || State == "IA" || State == "IL" || State == "IN" || State == "KY" || State == "ME" || State == "MD" || State == "MN" || State == "MS" || State == "NE" || State == "PA" || State == "NY" || State == "OK" || State == "TX" || State == "MI" || State == "MA" || State == "NH" || State == "NJ" || State == "NM" || State == "RI" || State == "SC" || State == "TN" || State == "VT" || State == "VA" || State == "WV" )
    {
         Querystring = 'https://www.checkintocashonline.com/newapply/default.aspx?state=' + State + '&eMail=' + eMail + '&fName=' + fName + '&lName=' + lName;
         window.location = Querystring;
     } else {
         Querystring = 'https://www.loanbyphone.com/apply/default.aspx?state=' + State + '&eMail=' + eMail + '&fName=' + fName + '&lName=' + lName;
         window.location = Querystring;
     }
}
}
//-->