function findObj(n, d) { //v4.0
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=findObj(n,d.layers[i].document);
  if(!x && document.getElementById) x=document.getElementById(n); return x;
}

function setTextOfLayer(objName,x,section) { 
	var newText = '<br>';
	var categories = new Array();
	var cat_list   = new Array();
	
	cat_list.push('Exterior Painting');
	 
	cat_list.push('Interior Painting');
	 
	cat_list.push('Paints');
	 

	
		 

			var category_1052459701 = 'Exterior Painting';
			var question_1052459701 = 'What is surface preparation?';
			var   answer_1052459701 = 'To prepare an exterior surface for paint our highly trained staff will sand, scrape, caulk, patch stucco, and reset nails.  If necessary they will also remove loose paint with a wire brush, caulk windows & doors, casings, prime bare wood and pressure wash the surface to be painted.';
			categories.push(new Array(category_1052459701,
                                                                question_1052459701,
                                                                answer_1052459701,
								'1052459701'));

		

			var category_1059072282 = 'Exterior Painting';
			var question_1059072282 = 'How long should an exterior painting last?';
			var   answer_1059072282 = 'Using a quality paint product and a professional company to perform the work, the paint job should last between 5 and 10 years.';
			categories.push(new Array(category_1059072282,
                                                                question_1059072282,
                                                                answer_1059072282,
								'1059072282'));

		

			var category_1059072365 = 'Exterior Painting';
			var question_1059072365 = 'Why is the paint on my wood siding peeling and chipping off?';
			var   answer_1059072365 = 'Depending on the age of the house and the last time it was painted, it could be time for a new paint job.';
			categories.push(new Array(category_1059072365,
                                                                question_1059072365,
                                                                answer_1059072365,
								'1059072365'));

		
	
		 

			var category_1059072116 = 'Interior Painting';
			var question_1059072116 = 'What is surface preparation?';
			var   answer_1059072116 = 'For the inside of a structure surface preparation typically includes patching holes and priming surfaces where needed.  However, the majority of the time is spent covering carpets, wood floors, tile and furniture to protect from paint and chemicals.';
			categories.push(new Array(category_1059072116,
                                                                question_1059072116,
                                                                answer_1059072116,
								'1059072116'));

		

			var category_1059072722 = 'Interior Painting';
			var question_1059072722 = 'Can I paint over my childs marker pen?';
			var   answer_1059072722 = 'No.  We recommend that a stain blocking primer be applied before painting over the area to match the original color.';
			categories.push(new Array(category_1059072722,
                                                                question_1059072722,
                                                                answer_1059072722,
								'1059072722'));

		
	
		 

			var category_1059073076 = 'Paints';
			var question_1059073076 = 'Should I use latex or oil paint?';
			var   answer_1059073076 = 'Latex paintn is a great choice for most instances, but theer are still situations where a solvent-based paint may be preferable.  Latex Paints have less oder than oil paints and they clean up with soap and water which means no need for paint thinner.  Also, latex paints have better color retention making them look like new for a longer period of time.';
			categories.push(new Array(category_1059073076,
                                                                question_1059073076,
                                                                answer_1059073076,
								'1059073076'));

		

			var category_1059073183 = 'Paints';
			var question_1059073183 = 'What are the advantages of higher sheen paints?';
			var   answer_1059073183 = 'Higher sheen paints have better scuff and wear resistance, so they are good for high traffic areas and on surfaces that are handled, washed or scrubbed frequently.  They also have better moisture resistance, which makes them ideal for surfaces and areas that are frequently exposed to high humidity levels.';
			categories.push(new Array(category_1059073183,
                                                                question_1059073183,
                                                                answer_1059073183,
								'1059073183'));

		

			var category_1059073311 = 'Paints';
			var question_1059073311 = 'What are the advantages of flat and lower sheen paints?';
			var   answer_1059073311 = 'Flat and lower sheen paints provide even light reflection to give the surface a softer and more uniform appearance.  They also help hide surface imperfections like patching, texturing and sanding.';
			categories.push(new Array(category_1059073311,
                                                                question_1059073311,
                                                                answer_1059073311,
								'1059073311'));

		
	
    if(objName == 'answer') {
	switch (section)
	{
	
		
		case 1052459701: 
			newText = '<strong>' + question_1052459701 + '</strong><br>' +
				  answer_1052459701 + '<br>';
			break; 
		
		case 1059072282: 
			newText = '<strong>' + question_1059072282 + '</strong><br>' +
				  answer_1059072282 + '<br>';
			break; 
		
		case 1059072365: 
			newText = '<strong>' + question_1059072365 + '</strong><br>' +
				  answer_1059072365 + '<br>';
			break; 
			
	
		
		case 1059072116: 
			newText = '<strong>' + question_1059072116 + '</strong><br>' +
				  answer_1059072116 + '<br>';
			break; 
		
		case 1059072722: 
			newText = '<strong>' + question_1059072722 + '</strong><br>' +
				  answer_1059072722 + '<br>';
			break; 
			
	
		
		case 1059073076: 
			newText = '<strong>' + question_1059073076 + '</strong><br>' +
				  answer_1059073076 + '<br>';
			break; 
		
		case 1059073183: 
			newText = '<strong>' + question_1059073183 + '</strong><br>' +
				  answer_1059073183 + '<br>';
			break; 
		
		case 1059073311: 
			newText = '<strong>' + question_1059073311 + '</strong><br>' +
				  answer_1059073311 + '<br>';
			break; 
			
	
	}
    }
	

    if(objName == 'category') {


		if(section == 'back') {
		window.location = "http://richardspaints.com/faq";
		}
		else {
    			var questions = new Array();
		 	newText += '  <p>&nbsp;</p><ul class="question">';

			var i = 0;	
				while(i<categories.length){

					if(categories[i][0] == section){
			

          				newText += '<li onClick="setTextOfLayer(' 	+ 
				   		"'answer',''," 			+
				   		categories[i][3] 			+
				   		')">' 				+
				   		categories[i][1] + '</li>';
					}
				i++;
				}

	
			newText += '<li onClick="setTextOfLayer('       +
		   			"'category','','back')"              +
		   			'" >'                                +
                   			'<strong><< back to categories</strong></li>';

			newText += '</ul>';
		}

    }
	  document.getElementById(objName).innerHTML = newText;


}
