//Font resizer
//var tags = new Array( 'div','td','tr','p','b','table','strong','emphasis','a','h1','h2','h3','pre','sub','sup','i','th','cp','ul','ol','li','dt','dd',);
var tags = new Array( 'div','td','tr','p','b','table','strong','emphasis','a','pre','sub','sup','i','th','cp','ul','ol','li','dt','dd');

var pixelArray =  new Array('10','12','14','16');
var emArray =  new Array('0.7','0.9','1.0','1.5','2.0','2.5','3');
var initSize = 1;

function fontSizer(inc,unit)
{
	if (!document.getElementById) return;
	
	var size = initSize;
	size += inc;
	
	if (size < 1 )
	{
		size = 1;
	}
	
	if (size > 3 )
	{
		size = 3;
	}
		
	initSize = size;
	getBody = document.getElementsByTagName('body')[0];
	for (i = 0 ; i < tags.length ; i++ )
	{
		getallTags = getBody.getElementsByTagName(tags[i]);
		for (k = 0 ; k < getallTags.length ; k++) 
		{
				getallTags[k].style.fontSize = (unit=='px') ? pixelArray[size]+unit: emArray[size]+unit;
		}
	}
}




//Getting it Right breadcrumb
function gettingItRightBreadCrumbs()
{
	output = "<a href=\"/\">Home</a>  &#187; <a href=\"/Repairs%20And%20Improvements/Getting%20it%20Right%20Selector/default.aspx\">Getting it Right Property Selector</a>";

	document.write(output);
}


//Breadcrumb function
function breadcrumbs()
{
	sURL = new String;
	bits = new Object;
	var x = 0;
	var stop = 0;
	var output = "<a href=\"/\">Home</a>  &#187;  ";
	sURL = location.href;
	sURL = sURL.slice(8,sURL.length);
	chunkStart = sURL.indexOf("/");
	sURL = sURL.slice(chunkStart+1,sURL.length)
	while(!stop)
	{
		chunkStart = sURL.indexOf("/");
		if (chunkStart != -1)
		{
		  bits[x] = sURL.slice(0,chunkStart)
		  sURL = sURL.slice(chunkStart+1,sURL.length);
		}else{
		  stop = 1;
		}
		x++;

	 }

	if (x == 1)
	{
		output = "<a href=\"/\">Home</a>";
		document.write(output);
		return;
	}

	for(var i in bits)
	{
		output += "<a href=\"";
		for(y=1;y<x-i;y++){
		  output += "../";
		}

		if (i < (x - 2))
		{
			output += bits[i] + "/\">" + processLinkText(bits[i]) + "</a>  &#187;  ";

		}
		else
		{
			output += bits[i] + "/\">" + processLinkText(bits[i]) + "</a>";
		}

	 }

	  document.write(output);
}

//Process link text for breadcrumb function
function processLinkText(inText)
{
	//Removes unwanted characters.
	//Add more lines to remove others
	//in general form:
	//inText = inText.replace(/<bit to be replaced>/g,"<bit to replace it with>");

	inText = inText.replace(/%20/g," "); //Replace %20 with a space
	inText = inText.replace(/%96/g,"-"); //Replace %96 with a hypen
	inText = inText.replace(/%92/g,"'"); //Replace %96 with a '
	inText = inText.replace(/Leasholders And Right To Buy/g,"Leaseholders And Right To Buy"); //Replace Leasholders And Right To Buy with Leaseholders And Right To Buy
	inText = inText.replace(/How to complain/g,"Comments and Complaints"); //Replace How to complain with Comments and Complaints
	inText = inText.replace(/PFI1/g,"PFI 1 and PFI 2"); //Replace PFI1 with PFI1 and PFI2
	inText = inText.replace(/PFI2/g,"PFI 1 and PFI 2"); //Replace PFI2 with PFI1 and PFI2
	inText = inText.replace(/Charges/g,"Service Charges"); //Replace Charges with Service Charges
	inText = inText.replace(/Tenancy Conditions/g,"Tenancy Information"); //Tenancy Conditions with Tenancy Information
	inText = inText.replace(/Transfers/g,"Transfers / Moving Home"); //Transfers with Transfers / Moving Home
	inText = inText.replace(/Your right to buy - Your questions and how to get answers/g,"Right to Buy"); //Your right to buy - Your questions and how to get answers with Right to Buy
	inText = inText.replace(/Changes to the right to buy/g,"Changes to the Right to Buy"); //Changes to the right to buy with Changes to the Right to Buy
	inText = inText.replace(/Independent advice/g,"Advice"); //Independent advice with Advice
	inText = inText.replace(/Insurance/g,"Building Insurance"); //Insurance with Building Insurance
	inText = inText.replace(/Head of Performance and Service Development/g,"Director Of Performance And Service Development"); //Head Of Performance And Service Development with Director Of Performance And Service Development
    inText = inText.replace(/Gas safety checks for tenants/g,"Gas Safety"); //Replace Gas safety checks for tenants with Gas Safety
	inText = inText.replace(/Actual Management Fees for 2006 - 07/g,"Actual Management Fees for 2007 - 08"); //Actual Management Fees for 2006 - 07 with Actual Management Fees for 2007 - 08
	inText = inText.replace(/Leaseholder forum/g,"Leaseholder Consultation"); //Leaseholder forum with Leaseholder Consultation
	inText = inText.replace(/Corgi Registered Contractors Useful Information/g,"Gas Safe Registered Contractors Useful Information"); //Corgi Registered Contractors Useful Information with Gas Safe Registered Contractors Useful Information
	inText = inText.replace(/Housing Area Changes/g,"Useful Information"); //Housing Area Changes with Useful Information
	inText = inText.replace(/News and Information/g,"News and Events"); //News and Information with News and Events
	inText = inText.replace(/Meeting Calendar and Reports/g,"Meetings Calendar"); //Meeting Calendar and Reports with Meetings Calendar
	inText = inText.replace(/Bulletins and HFI Publications/g,"Bulletins"); //Bulletins and HFI Publications with Bulletins
	inText = inText.replace(/Best Value Local Performance Indicators/g,"Local Performance Indicators"); //Best Value Local Performance Indicators with Local Performance Indicators
	inText = inText.replace(/Environment/g,"Energy & Environment"); //Environment with Energy & Environment
	inText = inText.replace(/Central Street Area/g,"Old Street Area"); //Central Street Area with Old Street Area
	inText = inText.replace(/Central Street Services/g,"Old Street Services"); //Central Street Services with Old Street Services
	inText = inText.replace(/Law and your Tenancy Agreement/g,"Gas Safety Checks for Residents"); //Law and your Tenancy Agreement with Gas Safety Checks for Residents
	inText = inText.replace(/Bright Sparks/g,"Bright Sparks - Repair, reuse and recycle!"); //Bright Sparks with Bright Sparks - Repair, reuse and recycle!
	inText = inText.replace(/Comments and Complaints/g,"Customer Feedback"); //Comments and Complaints with Customer Feedback
	inText = inText.replace(/Buying an HFI managed property/g,"Buying or selling an HFI managed property"); //Buying an HFI managed property with Buying or selling an HFI managed property
	inText = inText.replace(/Resident Service Statements/g,"Estate Services"); //Resident Service Statements with Estate Services
	inText = inText.replace(/ISO 9001 2000 Certification/g,"ISO 9001:2000 Certification"); //ISO 9001 2000 Certification with ISO 9001:2000 Certification
	inText = inText.replace(/Holbrooke Court Sites 8 and 9/g,"Holbrooke Court"); //Holbrooke Court Sites 8 and 9 with Holbrooke Court
	inText = inText.replace(/Belfont Walk Sites 1 and 2/g,"Belfont Walk"); //Belfont Walk Sites 1 and 2 with Belfont Walk
	inText = inText.replace(/What is a complaint/g,"How to make a complaint"); //What is a complaint with How to make a complaint
	inText = inText.replace(/Other help with making a complaint/g,"Help with making a complaint"); //Other help with making a complaint with Help with making a complaint
	inText = inText.replace(/Homes for Islington Performance Reports/g,"Performance Reports"); //Homes for Islington Performance Reports with Help with Performance Reports
	inText = inText.replace(/Damp in your home - Prevention and Cure/g,"Condensation and mould - prevention and cure"); //Damp in your home - Prevention and Cure with Help with Condensation and mould - prevention and cure
	inText = inText.replace(/Edible Islington/g,"Food growing"); //Edible Islington with Food growing
	inText = inText.replace(/Energy Doctor in the Home/g,"Energy Doctor"); //Energy Doctor in the Home with Help with Energy Doctor
	inText = inText.replace(/Respect Standard/g,"Respect Charter"); //Respect Standard with Help with Respect Charter
	inText = inText.replace(/Respect Standard for Housing Management/g,"What is it"); //Respect Standard for Housing Management with Help with What is it
	inText = inText.replace(/HFI and Respect/g,"How is HFI performing"); //HFI and Respect with Help with How is HFI performing
	inText = inText.replace(/New Build & Development/g,"New Build & Regeneration"); //New Build & Development with New Build & Regeneration
	inText = inText.replace(/Development/g,"Regeneration"); //Development with Regeneration




	
	myArray = inText.split(" ");

	for(var i in myArray)
	{
		myTemp = myArray[i].substring(0,1);
		myTemp = myTemp.toUpperCase();
		myTemp += myArray[i].substring(1);

		if (i == 0)
		{
			inText = myTemp;
		}
		else
		{
			inText += " " + myTemp;
		}
	}

	return inText;
}

function MM_jumpMenu(targ,selObj,restore){ //v3.0
  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
}

