/* This script and many more are available free online at
The JavaScript Source!! http://javascript.internet.com
Created by: Michael J. Damato | http://developing.damato.net/ */
// State lists
var states = new Array();
states['Select'] = new Array('[Select Developer]');
states['Residential'] = new Array('BPTP','KLJ','OMAXE','RPS','PURI','SPR','SRS','FERROUS');
states['Commercial'] = new Array('BPTP','KLJ','OMAXE','RPS','PURI','SPR','SRS');



// City lists
var cities = new Array();
cities['-------Select---------'] = new Array('-------Select---------');
cities['Residential'] = new Array();
cities['Residential']['BPTP'] = new Array('Amstoria','DUPLEX Villa 84','Discovery Park','Grandeura','Park Elite Premium','ParkLand Plots','Princess Park','Park Floors Sector 76','Park Floors Sector 77','Park Sarene','Park Prime','Park Elite Floor','Villas Sec 88','Parkland Pride');


cities['Residential']['OMAXE'] = new Array('Green Valley','Omaxe Hills','Omaxe Heights','The Forest','Omaxe Spa Village','Omaxe New Heights');

cities['Residential']['RPS'] = new Array('Savana','Rhythm','Paras Apartments','Green Valley Township');

cities['Residential']['PURI'] = new Array('The Pranayam','PRATHAM','VIP FLOORS');
cities['Residential']['FERROUS'] = new Array('Ferrous Megapolis City','Ferrous City Flat');



cities['Commercial'] = new Array();
cities['Commercial']['BPTP'] = new Array('CAPITAL CITY - Noida','Park Centra','Next Door','SHOP - 210 SqFt','Park Central, Sec-85 FBD');

cities['Select']=new Array();
cities['Select']['[Select Developer]']=new Array('[Project]');


function setStates() {
  cntrySel = document.getElementById('country');
  stateList = states[cntrySel.value];
  changeSelect('state', stateList, stateList);
  setCities();
}

function setCities() {
  cntrySel = document.getElementById('country');
  stateSel = document.getElementById('state');
  cityList = cities[cntrySel.value][stateSel.value];
  changeSelect('city', cityList, cityList);
}

function changeSelect(fieldID, newOptions, newValues) {
  selectField = document.getElementById(fieldID);
  selectField.options.length = 0;
  for (i=0; i<newOptions.length; i++) {
    selectField.options[selectField.length] = new Option(newOptions[i], newValues[i]);
  }
}

// Multiple onload function created by: Simon Willison
// http://simonwillison.net/2004/May/26/addLoadEvent/
function addLoadEvent(func) {
  var oldonload = window.onload;
  if (typeof window.onload != 'function') {
    window.onload = func;
  } else {
    window.onload = function() {
      if (oldonload) {
        oldonload();
      }
      func();
    }
  }
}

addLoadEvent(function() {
  setStates();
});


function validateForm() {
		
		var errmess=" ";
		retval=true;
		country=document.test.country.value;
		state=document.test.state.value;
		city=document.test.city.value;
		
		if (country=="Residential" && state=="BPTP" && city=="Amstoria")
  		{
		window.location="http://www.bptp-amstoria.co.in/index.html";
		retval=false;
		}     
			
			
			 if (country=="Residential" && state=="BPTP" && city=="DUPLEX Villa 84")
  		{
		window.location="http://www.bptp.asia/Projects/BPTP%20Park%20Elite%20Villa%20Sec-84/BPTP%20Elite%20Villa%2084%20Rates%20Detail.htm";
		retval=false;
		} 
		 if (country=="Residential" && state=="BPTP" && city=="Discovery Park")
  		{
		window.location="http://www.bptp.asia/Projects/bptp-discovery-park/bptp-discovery-park.html";
		retval=false;
		} 
		
		if (country=="Residential" && state=="BPTP" && city=="Grandeura")
  		{
		window.location="http://www.bptp.asia/Projects/BPTP-ParkGrandeura/RatesDetail.htm";
		retval=false;
		}
		
		if (country=="Residential" && state=="BPTP" && city=="Park Elite Premium")
  		{ 	
                window.location="http://www.bptp.asia/Projects/bptp-park-elite-premium/bptp-park-elite-premium-ratesdetail.htm";
         	retval=false;
		} 
		
      if (country=="Residential" && state=="BPTP" && city=="ParkLand Plots")
  	        {
  		window.location="http://www.bptp.asia/Projects/bptp-parkland-plot/bptp-plot-ratesdetail.htm";
  		retval=false;
        	 }
       
     
     if (country=="Residential" && state=="BPTP" && city=="Park Sarene")
  		{
		window.location="http://www.bptp.asia/Projects/BPTP-ParkSarene/RatesDetail.htm";
		retval=false;
		} 
     if (country=="Residential" && state=="BPTP" && city=="Park Prime")
  		{
		window.location="http://www.bptp.asia/projects/Bptp-ParkPrime/ratesdetail.htm";
		retval=false;
		} 
    
     if (country=="Residential" && state=="BPTP" && city=="Princess Park")
  		{
		window.location="http://www.bptp.asia/Projects/bptp-princess-park/bptp-princess-park.html";
		retval=false;
		} 
     if (country=="Residential" && state=="BPTP" && city=="Park Floors Sector 76")
  		{
		window.location="http://www.bptp.asia/Projects/BPTP-ParkFloorsSec-76/BPTP Park Floor 76_ratesdetail.htm";
		retval=false;
		} 
     if (country=="Residential" && state=="BPTP" && city=="Park Floors Sector 77")
  		{
		window.location="http://www.bptp.asia/Projects/BPTP-ParkFloorsSec-77/BPTP Park Floor 77_ratesdetail.htm";
		retval=false;
		} 
    
     if (country=="Residential" && state=="BPTP" && city=="Park Elite Floor")
  		{
		window.location="http://www.bptp.asia/Projects/BPTP%20Park%20Elite%20Floor/BPTP%20Park%20Elite%20ratesdetail.htm";
		retval=false;
		} 
		
		
    if (country=="Commercial" && state=="BPTP" && city=="CAPITAL CITY - Noida")
  		{
		window.location="http://www.bptp.asia/Projects/BPTP-Capital-City-Office-Space/BPTP Capital City RatesDetail.htm";
		retval=false;
		} 
     
      if (country=="Commercial" && state=="BPTP" && city=="SHOP - 210 SqFt")
  		{
		window.location="http://www.bptp.asia/Projects/BPTP_Shops_PP_PG/bptp-shops-rates-detail.htm";
		retval=false;
		}
      if (country=="Commercial" && state=="BPTP" && city=="Park Squares")
  		{
		window.location="http://www.bptp.asia/Projects/BPTP-ParkSQUARE/ratesdetail.htm";
		retval=false;
		}   
      if (country=="Commercial" && state=="BPTP" && city=="Park Central, Sec-85 FBD")
  		{
		window.location="http://www.bptp.asia/Projects/bptp-park-central/bptp-park-central-ratesdetail.htm";
		retval=false;    
		}   
		 if (country=="Residential" && state=="BPTP" && city=="Villas Sec 88")
  		{
		window.location="http://www.bptp.asia/Projects/BPTP%20%20Villas%2088%20Parkland/BPTP%20Villa%2088%20RatesDetail.htm";
		retval=false;
		} 
		if (country=="Residential" && state=="BPTP" && city=="Parkland Pride")
  		{
		window.location="http://www.bptp.asia/Projects/bptp-parkland-pride/bptp-parkland-pride.html";
		retval=false;
		} 
		if (country=="Residential" && state=="FERROUS" && city=="Ferrous Megapolis City")
  		{
		window.location="http://www.uchoudhary.com/Projects/ferrous-township-sec-70/ferrous-township.html";
		retval=false;
		} 
		
		if (country=="Residential" && state=="FERROUS" && city=="Ferrous City Flat")
  		{
		window.location="http://www.uchoudhary.com/Projects/ferrous-city-phase-1/ferrous-city-phase-1.html";
		retval=false;
		} 


 
      
        return retval;
   }
