<!----All Rights reserved--www.listingbazaar.com-->
var groups=document.isc.example.options.length
var group=new Array(groups)
for (i=0; i<groups; i++)
group[i]=new Array()

group[0][0]=new Option("---Select2---"," ");

group[1][0]=new Option("Now Select This One"," "); 
group[1][1]=new Option("Residential","47");
group[1][2]=new Option("Commercial","46");

group[2][0]=new Option("Now Select This One"," "); 
group[2][1]=new Option("Residential","115");
group[2][2]=new Option("Commercial","116");

group[3][0]=new Option("Now Select This One"," ");
group[3][1]=new Option("Residential","183"); 
group[3][2]=new Option("Commercial","184");

var temp=document.isc.stage2

function redirect(x){
for (m=temp.options.length-1 ;m>0;m--)
temp.options[m]=null
for (r=0;r<group[x].length;r++){ 
temp.options[r]=new Option(group[x][r].text,group[x][r].value)
}
temp.options[0].selected=true
redirect1(0)
}



var secondGroups= document.isc.stage2.options.length
var secondGroup=new Array(groups) 
for (i=0; i<groups; i++)  {
secondGroup[i]=new Array(group[i].length)
for (j=0; j<group[i].length; j++)  {
secondGroup[i][j]=new Array()  }}

secondGroup[0][0][0]=new Option("---Select 3---"," "); 
secondGroup[1][0][0]=new Option("---Select 3---"," ");
secondGroup[1][1][0]=new Option("Now Select This One"," ");
secondGroup[1][1][1]=new Option("Apartments/ Flats"," ");
secondGroup[1][1][2]=new Option("Homes/ Houses"," ");
secondGroup[1][1][3]=new Option("Residential Land","");

secondGroup[1][2][0]=new Option("Now Select This One"," "); 
secondGroup[1][2][1]=new Option("Office Space"," ");
secondGroup[1][2][2]=new Option("Shops/ Retail Space"," ");
secondGroup[1][2][3]=new Option("Commercial Land"," ");

secondGroup[2][0][0]=new Option("---Select 3---"," ");
secondGroup[2][1][0]=new Option("Now Select This One"," "); 
secondGroup[2][1][1]=new Option("Apartments/ Flats"," ");
secondGroup[2][1][2]=new Option("Homes/ Houses"," ");
secondGroup[2][1][3]=new Option("Residential Land"," ");

secondGroup[2][2][0]=new Option("Office Space"," "); 
secondGroup[2][2][1]=new Option("Shops/ Retail Space"," ");
secondGroup[2][2][2]=new Option("Commercial Land"," ");

secondGroup[3][1][0]=new Option("Apartments/ Flats"," ");
secondGroup[3][1][1]=new Option("Homes/ Houses"," ");
secondGroup[3][1][2]=new Option("Payin Guest/ Service Apartments"," ");

secondGroup[3][2][0]=new Option("Office Space"," "); 
secondGroup[3][2][1]=new Option("Shops/ Retail Space"," ");
secondGroup[3][2][2]=new Option("----"," ");

var temp1=document.isc.stage3
function redirect1(y){
for (m=temp1.options.length-1;m>0;m--)
temp1.options[m]=null
for (i=0;i<secondGroup[document.isc.example.options.selectedIndex ][y].length;i++){
temp1.options[i]=new Option(secondGroup[document.isc.example.options.selectedIndex][y][i].text,secondGroup[document.isc.example.options.selectedIndex][y][i].value)
}
temp1.options[0].selected=true 
}

function page()
{
var loc1 = document.isc.state.options.selectedIndex
var ctval = document.isc.state.options[loc1].value
var loc =  ctval.toLowerCase();
var est1 = document.isc.example.options.selectedIndex
var prope = document.isc.stage2.options.selectedIndex
var ptype = document.isc.stage3.options.selectedIndex
//switch (est1)
if (loc1 == 1 || loc1 == 5 || loc1 == 7 || loc1 == 9 || loc1 == 12 || loc1 == 15 || loc1 == 21 || loc1 == 24 || loc1 == 28 || loc1 == 32 || loc1 == 35 || loc1 == 38 || loc1 == 41 || loc1 == 45)
{
window.location.href = "http://www.listingbazaar.com/" + loc + "/" + loc + ".php";
}

else
{
if (est1 == 0)
 {
 tloc1 = document.isc.state.options[loc1].text
 tloc = tloc1.toLowerCase();
 window.location.href = "http://www.listingbazaar.com/" + loc + "/" + tloc + ".php"
 }
 
else if (est1 == 1)
 {
 switch (prope)
 {
  case 0:
  window.location.href = "http://www.listingbazaar.com/" + loc + "/buy.php";
  break
  case 1:
  switch (ptype)
  {
    case 0:
	window.location.href = "http://www.listingbazaar.com/" + loc + "/buy.php";
    break 
	case 1:
    window.location.href = "http://www.listingbazaar.com/" + loc + "/buy-apartments.php";
    break
    case 2:
    window.location.href = "http://www.listingbazaar.com/" + loc + "/buy-independent-home.php"; 
    break
    case 3:
    window.location.href = "http://www.listingbazaar.com/" + loc + "/buy-residential-land.php";
    break
	defualt:
	window.location.href = "http://www.listingbazaar.com/" + loc + ".php";
   }
  break 
  case 2:
  switch (ptype)
  {
    case 0:
    window.location.href = "http://www.listingbazaar.com/" + loc + ".php";
    break
    case 1:
    window.location.href = "http://www.listingbazaar.com/" + loc + "/buy-office-space.php";
    break
    case 2:
    window.location.href = "http://www.listingbazaar.com/" + loc + "/buy-shops.php";
    break
    case 3:
    window.location.href = "http://www.listingbazaar.com/" + loc + "/buy-commercial-land.php";
    break
   }
  break
  defualt:
  alert ("Please Select any State/ City vis-a-vis Property")
  }
 } 

else if (est1 == 2)
{
window.location.href = "http://www.listingbazaar.com/sell.php";
}

else if (est1 == 3)
{
 switch (prope)
 {
  case 0:
  window.location.href = "http://www.listingbazaar.com/" + loc + "/rent-lease.php";
  break
  case 1:
  switch (ptype)
  {
    case 0: 
    window.location.href = "http://www.listingbazaar.com/" + loc + "/rent-apartment.php";
    break
    case 1:
    window.location.href = "http://www.listingbazaar.com/" + loc + "/rent-home.php";
    break
    case 2:
    window.location.href = "http://www.listingbazaar.com/" + loc + "/paying-guest.php";
    break
  }
  break 
  case 2:
  switch (ptype)
  {
    case 0:
    window.location.href = "http://www.listingbazaar.com/" + loc + "/rent-office-space.php";
    break
    case 1:
    window.location.href = "http://www.listingbazaar.com/" + loc + "/rent-shop.php";
    break
    case 2:
    window.location.href = "http://www.listingbazaar.com/" + loc + "/rent-lease.php";
    break
   }
  break
  defualt:
  alert ("Please Select State/City vis-a-vis Property/ Category")
 }
}
}
return true;
}
