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.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 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 locVal(V1,V2){	
	this.Id = V1;
	this.Description = V2;
}
citiesMA = new Array();
citiesMA[0] = new locVal("11","Framingham");
citiesMA[1] = new locVal("05","Natick");
citiesMA[2] = new locVal("09","Newton");

citiesMI = new Array();
citiesMI[0] = new locVal("11","Southfield");

citiesPA = new Array();
citiesPA[0] = new locVal("PH","Philadelphia");
citiesPA[1] = new locVal("03","Huntington Valley");
citiesPA[2] = new locVal("PI","Pittsburgh");
citiesPA[3] = new locVal("01","Monroeville");
citiesPA[4] = new locVal("04","Ross Township");
citiesPA[5] = new locVal("02","Green Tree");
citiesPA[6] = new locVal("06","Elkins Park");
citiesPA[7] = new locVal("07","Montgomery");

function cityDisplay(drop,fn,sname){
	if (drop.selectedIndex == 1){
		cityTemp = citiesMA;
	} else if (drop.selectedIndex == 2){
		cityTemp = citiesMI;
	} else if (drop.selectedIndex == 3){
		cityTemp = citiesPA;
	}	
	cityList = eval("document." + fn + "." + sname);
	cityList.options.length = 0;
	if (drop.selectedIndex > 0){
		cityList.options[0] = new Option("- Select City -","- Select City -");
		for ( i1 = 1; i1 <= cityTemp.length; i1++ ){		
			cityList.options[i1] = new Option(cityTemp[i1-1].Description,cityTemp[i1-1].Id);
		}
	}
}

function cityDisplayByValue(drop, fn, sname) {
    switch (drop.value) {
        case 'MA':
            cityTemp = citiesMA;
            break;
        case 'MI':
            cityTemp = citiesMI;
            break;
        case 'PA':
            cityTemp = citiesPA;
            break;
        default:
            return;
    }
 
    cityList = eval("document." + fn + "." + sname);
    cityList.options.length = 0;
    if (drop.selectedIndex > 0) {
        cityList.options[0] = new Option("- Select City -", "- Select City -");
        for (i1 = 1; i1 <= cityTemp.length; i1++) {
            cityList.options[i1] = new Option(cityTemp[i1 - 1].Description, cityTemp[i1 - 1].Id);
        }
    }
}


function cityJump(drop,fn,sname) {
	stateList = eval("document." + fn + "." + sname); 
	if (drop.selectedIndex != 0 && stateList.selectedIndex != 0) {
	 switch (drop.value) {
       case 'PH': 
         window.location = ( "miniselfstoragephiladelphiaminiselfstoragepennsylvania.asp");
       break;
	   case 'PI': 
         window.location = ( "miniselfstoragepittsburghminiselfstoragepennsylvania.asp");
       break;
	   default:
	   window.location = ("locator_" + stateList.value + "_" + drop.value + ".asp");
	   break; 
	 }
	
	
	
	
	}
}

function rollover(text) {
  var desc = "";
  document.ezsymbol.src="images/top-roll-ez.jpg";
  switch (text) {
    case 'about': 
    desc = "Learn more about EZ Storage&reg;, our EZ Rental Process, and all the amenities we can offer you!"; 
    break;
    case 'locator': 
    desc = "Find the EZ Storage&reg; location nearest you, plus download a discount coupon!";
    break;
    case 'guides': 
    desc = "Let us help make your move EZ. Check out our free Space Guide, Rental Guide, and Packing Guide!"; 
    break;
    case 'coupons': 
    desc = "Want to save some bucks on your EZ rental space? Then click here!"; 
    break;
    case 'usage': 
    desc = "Do you need business storage? Personal storage? How about both? Our usage pages will help you find the perfect solution!"; 
    break;
    case 'employment': 
    desc = "Find out about the employment possibilities at your neighborhood EZ Storage&reg;!"; 
    break;
  }
document.getElementById("rollovertext").innerHTML = desc;
}

function rollout() {
document.ezsymbol.src="images/top-roll-ez-off.jpg";
document.getElementById("rollovertext").innerHTML = "&nbsp;";
}

