function AddRooms() {
  var ni = document.getElementById('AddRooms');
  var numi = document.getElementById('RoomsValue');
  var num = (document.getElementById('RoomsValue').value -1)+ 2;
  numi.value = num;
  var newdiv = document.createElement('div');
  var divIdName = 'Add'+num+'Rooms';
  newdiv.setAttribute('id',divIdName);
  newdiv.innerHTML = '<label for="room-name'+num+'">Room name</label><input name="room-name'+num+'" id="room-name'+num+'"><br class="clear-both" /><label for="room-dimensions'+num+'">Room Dimensions:</label><textarea class="textarea address" name="room-dimensions'+num+'" id="room-dimensions'+num+'" /></textarea><br class="clear-both" /><label for="room-type'+num+'">Room Type:</label><select name="room-type'+num+'" id="room-type'+num+'" class="dropdown"><option>Bedroom</option><option>Living Room</option><option>Kitchen</option><option>Bathroom</option></select><br class="clear-both" /><label for="delete">Delete</label><select name="deleteroom'+num+'" class="dropdown"><option value="0">No</option><option value="1">Yes</option></select><br class="clear-both" /><br  />';
  ni.appendChild(newdiv);
}

function AddImages() {
  var ni = document.getElementById('AddImages');
  var numi = document.getElementById('ImagesValue');
  var num = (document.getElementById('ImagesValue').value -1)+ 2;
  numi.value = num;
  var newdiv = document.createElement('div');
  var divIdName = 'Add'+num+'Images';
  newdiv.setAttribute('id',divIdName);
  newdiv.innerHTML = '<br /><label for="image'+num+'">Image:</label><input type="file" name="image'+num+'" id="image'+num+'" /><br class="clear-both" /><label for="imagename'+num+'">Image Name:</label><input type="text" name="imagename'+num+'" id="imagename'+num+'" /><label for="imagedescription'+num+'">Image Description:</label><br class="clear-both" /><textarea name="imagedescription'+num+'" id="imagedescription'+num+'" class="textarea"></textarea><br class="clear-both" /><label for="delete">Delete</label><select name="deleteimage'+num+'" class="dropdown"><option value="0">No</option><option value="1">Yes</option></select><br class="clear-both" /><br />';
  ni.appendChild(newdiv);
}

function AddPrices() {
  var ni = document.getElementById('AddPrices');
  var numi = document.getElementById('PricesValue');
  var num = (document.getElementById('PricesValue').value -1)+ 2;
  numi.value = num;
  var newdiv = document.createElement('div');
  var divIdName = 'Add'+num+'Prices';
  newdiv.setAttribute('id',divIdName);
  newdiv.innerHTML = '<br /><label for="ppcm'+num+'">Rent (&pound;):</label><input type="text" name="ppcm'+num+'" id="ppcm'+num+'" /><br class="clear-both" /><label for="price-name'+num+'">Price name:</label><input type="text" name="price-name'+num+'" id="price-name'+num+'" />';
  ni.appendChild(newdiv);
}

function fCreateBookmark() 
{
	if ((navigator.appVersion.indexOf("MSIE") > 0)&&(parseInt(navigator.appVersion)>= 4))
  	{	 
  		window.external.AddFavorite("http:/www.parklets.co.uk","Park Lets");
  	}

	else
  	{
  alert('Sorry, your browser does not/nsupport automatic bookmarking./n /n' + 'For Netscape Navigator or Firefox, press Ctrl-D/n(or Command-D on the Mac).');
  location.href = location.href;
  }
}

function togglepro()
{
	if(document.getElementById('currenttype').value == "STU")
	{
		/*document.getElementById('professional1').style.display = "block";
		document.getElementById('professional2').style.display = "block";
		document.getElementById('professional3').style.display = "block";
		document.getElementById('professional4').style.display = "block";
		document.getElementById('professional5').style.display = "block";
		document.getElementById('professional6').style.display = "block";
		document.getElementById('professional7').style.display = "block";
		document.getElementById('professional8').style.display = "block";*/
		
		document.getElementById('proprice').style.display = "inline";
		
		/*document.getElementById('student1').style.display = "none";
		document.getElementById('student2').style.display = "none";
		document.getElementById('student3').style.display = "none";
		document.getElementById('student4').style.display = "none";
		document.getElementById('student5').style.display = "none";
		document.getElementById('student6').style.display = "none";
		document.getElementById('student7').style.display = "none";
		document.getElementById('student8').style.display = "none";
		document.getElementById('student9').style.display = "none";*/
		
		document.getElementById('studentprice').style.display = "none";
		
		document.getElementById('rentalpriceholder').innerHTML = "<select name='rentalprice-min' id='rentalprice-min' class='dropdown'><option value='100'>MIN</option><option value='300' id='pro1'>300</option><option value='400' id='pro2'>400</option><option value='500' id='pro3'>500</option><option value='600' id='pro4'>600</option><option value='700' id='pro5'>700</option><option value='800' id='pro6'>800</option><option value='900' id='pro7'>900</option><option value='1000' id='pro8'>1000</option><option value='2000' id='pro9'>1000 +</option></select><select name='rentalprice-max' id='rentalprice-max' class='dropdown'><option value='2000'>MAX</option><option value='300' id='pro1'>300</option><option value='400' id='pro2'>400</option><option value='500' id='pro3'>500</option><option value='600' id='pro4'>600</option><option value='700' id='pro5'>700</option><option value='800' id='pro6'>800</option><option value='900' id='pro7'>900</option><option value='1000' id='pro8'>1000</option><option value='200' id='pro9'>1000 +</option></select>"; 
		
		document.getElementById('currenttype').value = "PRO";
	}
	
	else
	{
		/*document.getElementById('professional1').style.display = "none";
		document.getElementById('professional2').style.display = "none";
		document.getElementById('professional3').style.display = "none";
		document.getElementById('professional4').style.display = "none";
		document.getElementById('professional5').style.display = "none";
		document.getElementById('professional6').style.display = "none";
		document.getElementById('professional7').style.display = "none";
		document.getElementById('professional8').style.display = "none";*/
		
		document.getElementById('proprice').style.display = "none";
		
		/*document.getElementById('student1').style.display = "block";
		document.getElementById('student2').style.display = "block";
		document.getElementById('student3').style.display = "block";
		document.getElementById('student4').style.display = "block";
		document.getElementById('student5').style.display = "block";
		document.getElementById('student6').style.display = "block";
		document.getElementById('student7').style.display = "block";
		document.getElementById('student8').style.display = "block";
		document.getElementById('student9').style.display = "block";*/
		
		document.getElementById('studentprice').style.display = "inline";
		
		document.getElementById('rentalpriceholder').innerHTML = "<select name='rentalprice-min' id='rentalprice-min' class='dropdown'><option value='0'>MIN</option><option value='20' id='student1'>20</option><option value='30' id='student2'>30</option><option value='40' id='student3'>40</option><option value='50' id='student4'>50</option><option value='60' id='student5'>60</option><option value='70' id='student6'>70</option><option value='80' id='student7'>80</option><option value='90' id='student8'>90</option><option value='100' id='student9'>100</option><option value='200' id='student10'>100 +</option></select><select name='rentalprice-max' id='rentalprice-max' class='dropdown'><option value='200'>MAX</option><option value='20' id='student1'>20</option><option value='30' id='student2'>30</option><option value='40' id='student3'>40</option><option value='50' id='student4'>50</option><option value='60' id='student5'>60</option><option value='70' id='student6'>70</option><option value='80' id='student7'>80</option><option value='90' id='student8'>90</option><option value='100' id='student9'>100</option><option value='200' id='student10'>100 +</option></select>";
		
		document.getElementById('currenttype').value = "STU";
	}
	
	/*if(document.getElementById('kingston').style.display == 'none')
	{
		document.getElementById('kingston').style.display = "block";
		document.getElementById('northtyneside').style.display = "block";
		document.getElementById('highheaton').style.display = "block";
	}
	
	else
	{
		document.getElementById('kingston').style.display = "none";
		document.getElementById('northtyneside').style.display ="none";
		document.getElementById('highheaton').style.display = "none";
	}*/
}
