function newform1(theURL,winName,features)

{ 

	//v2.0
                var date = new Date()
                var second = date.getSeconds()
                winName = winName + second
	window.open(theURL,winName,features);

}
function buildSelect(x) { //alert(x) ; //return

document.qsearch.desde.length=0;
if (x == "a") { 
  /* set choices 1 and 2 */
  option0 = new Option("RD$ 0 / Mes       ",0)
  option1 = new Option("RD$ 2,000 / Mes   ",2000)
  option2 = new Option("RD$ 5,000 / Mes   ",5000)
  option3 = new Option("RD$ 10,000 / Mes  ",10000)
  option4 = new Option("RD$ 15,000 / Mes  ",15000)
  option5 = new Option("RD$ 20,000 / Mes  ",20000)
  option6 = new Option("RD$ 25,000 / Mes  ",25000)
  option7 = new Option("RD$ 30,000 / Mes  ",30000)
  option8 = new Option("RD$ 40,000 / Mes  ",40000)
  option9 = new Option("RD$ 50,000 / Mes  ",50000)
  option10 = new Option("RD$ 60,000 / Mes ",60000)
  option11 = new Option("RD$ 80,000 / Mes ",80000)
  option12 = new Option("RD$ 100,000 / Mes",100000)
  option13 = new Option("RD$ 150,000 / Mes",150000)
  option14 = new Option("RD$ 200,000 / Mes",200000)  
  option15 = new Option("RD$ 250,000 / Mes",250000)  
  // write them
  document.qsearch.desde.options[0] = option0
  document.qsearch.desde.options[1] = option1
  document.qsearch.desde.options[2] = option2
  document.qsearch.desde.options[3] = option3
  document.qsearch.desde.options[4] = option4
  document.qsearch.desde.options[5] = option5
  document.qsearch.desde.options[6] = option6
  document.qsearch.desde.options[7] = option7
  document.qsearch.desde.options[8] = option8
  document.qsearch.desde.options[9] = option9
  document.qsearch.desde.options[10] = option10
  document.qsearch.desde.options[11] = option11
  document.qsearch.desde.options[12] = option12
  document.qsearch.desde.options[13] = option13
  document.qsearch.desde.options[14] = option14
  document.qsearch.desde.options[15] = option15
  return;
  }

if (x == "c") { 
  /* set choices 3 and 4 */ 
  
  option0 = new Option("RD$ 0",0)
  option1 = new Option("RD$ 500,000        ",500000)
  option2 = new Option("RD$ 1,000,000      ",1000000)
  option3 = new Option("RD$ 1,500,000      ",1500000)
  option4 = new Option("RD$ 2,000,000      ",2000000)
  option5 = new Option("RD$ 3,000,000      ",3000000)
  option6 = new Option("RD$ 5,000,000      ",5000000)
  option7 = new Option("RD$ 7,000,000      ",7000000)
  option8 = new Option("RD$ 10,000,000     ",10000000)
  option9 = new Option("RD$ 15,000,000     ",15000000)
  option10 = new Option("RD$ 25,000,000    ",25000000)
  // write them  
  document.qsearch.desde.options[0] = option0
  document.qsearch.desde.options[1] = option1
  document.qsearch.desde.options[2] = option2
  document.qsearch.desde.options[3] = option3
  document.qsearch.desde.options[4] = option4
  document.qsearch.desde.options[5] = option5
  document.qsearch.desde.options[6] = option6
  document.qsearch.desde.options[7] = option7
  document.qsearch.desde.options[8] = option8
  document.qsearch.desde.options[9] = option9
  document.qsearch.desde.options[10] = option10  
  return;
  }
}

function moneyRange(id) {
	var price1 = document.forms.qsearch.desde;
	var price2 = document.forms.qsearch.hasta;


	if (price2.selectedIndex == 0 && id == 2) {
		price1.selectedIndex = 0
		
	} else if (price1.selectedIndex >= price2.selectedIndex && id == 1 && price2.selectedIndex == 0) {
		price2.selectedIndex = price1.selectedIndex

	} else if (price1.selectedIndex == 0 && id == 1) {
		price2.selectedIndex = 0

	} else if (price1.selectedIndex >= price2.selectedIndex && id == 1) {
		price2.selectedIndex = price1.selectedIndex

	} else {
		if (price1.selectedIndex >= price2.selectedIndex) {
			if (price2.selectedIndex != 0) {
				price1.selectedIndex = price2.selectedIndex
			} else {
				price1.selectedIndex = 0
			}
		}
	}
	
	
}
function ftProperties(theURL,winName,features)
{ 

	//v2.0
	var date = new Date()
	var second = date.getSeconds()
	winName = winName + second	
	//window.open("http://www.inmobiguia.net/propert/ficha1.php?id="+theURL,winName,"width=650,height=600,scrollbars=yes,left=0,top=0");
	window.open("http://www.inmobiguia.net/ficha/"+theURL+".html",winName,"width=650,height=600,scrollbars=yes,left=0,top=0");

}
