function AdvancedSearch() {
	document.getElementById('property-search').innerHTML='Advanced Search';
	document.getElementById('AdvancedSearch').innerHTML='- <a href="javascript:PropertySearch();">Close</a>';
	document.getElementById('advanced-search').style.display='block';
	}
function PropertySearch() {
	document.getElementById('property-search').innerHTML='Property Search';
	document.getElementById('AdvancedSearch').innerHTML='+ <a href="javascript:AdvancedSearch();">Advanced Search</a>';
	document.getElementById('advanced-search').style.display='none';
	}

function getElementsByClass(searchClass,node,tag) {
	var classElements = new Array();
	if ( node == null )
		node = document;
	if ( tag == null )
		tag = '*';
	var els = node.getElementsByTagName(tag);
	var elsLen = els.length;

	var pattern = new RegExp("(^|\\s)"+searchClass+"(\\s|$)");
	for (i = 0, j = 0; i < elsLen; i++) {
		if ( pattern.test(els[i].className) ) {
			classElements[j] = els[i];
			j++;
		}
	}
	return classElements;
}


function subMenu(){
	document.getElementById('Link-Lifestyle').onmouseover = function () {document.getElementById('subMenu').style.display='block';}
	document.getElementById('Link-Lifestyle').onmouseout = function () {document.getElementById('subMenu').style.display='none';}
	document.getElementById('subMenu').onmouseover = function () {this.style.display='block';}
	document.getElementById('subMenu').onmouseout = function () {this.style.display='none';}

}



function form_b()
{
	if (document.getElementsByTagName)
		var x = document.getElementsByTagName('input');
	else if (document.all)
		var x = document.all.tags('input');
	else return;
	for (var i=0;i<x.length;i++)
	{
		x[i].onclick = function () {this.value='';}
	}
}

/*function index() {

	document.getElementById('Prop-Search').onmouseover = function () {document.getElementById('h2_Prop-Search').style.backgroundPosition='0 -132px';document.getElementById('Prop-Search_a').style.backgroundPosition='0 -96px';}
	document.getElementById('Prop-Search').onmouseout = function () {document.getElementById('h2_Prop-Search').style.backgroundPosition='0 0';document.getElementById('Prop-Search_a').style.backgroundPosition='0 0';}

	document.getElementById('Mobile-Box').onmouseover = function () {document.getElementById('h2_Mobile-Box').style.backgroundPosition='0 -132px';document.getElementById('Mobile-Box_a').style.backgroundPosition='0 -96px';}
	document.getElementById('Mobile-Box').onmouseout = function () {document.getElementById('h2_Mobile-Box').style.backgroundPosition='0 -33px';document.getElementById('Mobile-Box_a').style.backgroundPosition='0 0';}

	document.getElementById('Podcast-Box').onmouseover = function () {document.getElementById('h2_Podcast-Box').style.backgroundPosition='0 -132px';document.getElementById('Podcast-Box_a').style.backgroundPosition='0 -96px';}
	document.getElementById('Podcast-Box').onmouseout = function () {document.getElementById('h2_Podcast-Box').style.backgroundPosition='0 -66px';document.getElementById('Podcast-Box_a').style.backgroundPosition='0 0';}

	document.getElementById('Windows-Vista').onmouseover = function () {document.getElementById('h2_Windows-Vista').style.backgroundPosition='0 -132px';document.getElementById('Windows-Vista_a').style.backgroundPosition='0 -96px';}
	document.getElementById('Windows-Vista').onmouseout = function () {document.getElementById('h2_Windows-Vista').style.backgroundPosition='0 -99px';document.getElementById('Windows-Vista_a').style.backgroundPosition='0 0';}
	
}*/

function mail_f(box) {
	id_1 = 'mail_a_'+box;
	id_2 = "mail_f_"+box;
	document.getElementById(id_2).style.display='block';
	document.getElementById(id_1).style.display='none';
}
function mail_f_1(box) {
	id_1 = 'mail_a_'+box;
	id_2 = "mail_f_"+box;
	document.getElementById(id_1).style.display='block';
	document.getElementById(id_2).style.display='none';
}

function mail_f_2(box) {
	id_1 = 'mail_a_'+box;
	id_2 = "mail_f_"+box;
	id_3 = "mail_b_"+box;
	document.getElementById(id_3).style.width='220px';
	document.getElementById(id_2).style.display='block';
	document.getElementById(id_1).style.display='none';
}
function mail_f_2_1(box) {
	id_1 = 'mail_a_'+box;
	id_2 = "mail_f_"+box;
	id_3 = "mail_b_"+box;
	document.getElementById(id_3).style.width='150px';
	document.getElementById(id_1).style.display='block';
	document.getElementById(id_2).style.display='none';
}

function mortage_calculator_box() {
	document.getElementById('box_mortage_calculator_a').style.display='block';
	document.getElementById('det_l1').style.display='none';
}
function mortage_calculator_box_a() {
	document.getElementById('det_l1').style.display='block';
	document.getElementById('box_mortage_calculator_a').style.display='none';
}