/*
-------------------------------------------------------------------------------------------
				 WATSON ERROR RESET PAGE FUNCTION
-------------------------------------------------------------------------------------------
*/

function resetPage(pageType)
{
	if (!document.layers){
		//var allDIVS = document.getElementsByTagName('DIV');
		//var el, i = 0, numDIVS = 0;
		//while ((el = allDIVS.item(i++))) if (el.id.substr(0,3) == 'div') numDIVS++; 

		var numOfElem = 8;
		// define the multi-dimensional array
		var divArray = new Array(numOfElem);
		for (y=0; y <= numOfElem; y++) {
			divArray[y] = new Array(2);
			for (z=0; z < 2; z++) {
				divArray[y][z] = '';
			}
		}

		divArray[0][0] = 'getSectionRef("section1").sectionRef';
		divArray[0][1] = 'divMsgTop';
		divArray[0][2] = null;
		//------------
		divArray[1][0] = 'getSectionRef("section1").sectionRef';
		divArray[1][1] = 'divAddress';
		divArray[1][2] = 'Street address (U.S. only)';
		//------------
		divArray[2][0] = 'getSectionRef("section1").sectionRef';
		divArray[2][1] = 'divCity';
		divArray[2][2] = 'City<br>';
		//------------
		if (pageType == 'advSearch'){
		divArray[3][0] = 'getSectionRef("section1").sectionRef';
		divArray[3][1] = 'divStateProvince';
		divArray[3][2] = 'State/Province<br>';
		}else{
		divArray[3][0] = 'getSectionRef("section1").sectionRef';
		divArray[3][1] = 'divStateProvince';
		divArray[3][2] = null;
		}
		//------------
		if (pageType == 'advSearch'){
		divArray[4][0] = 'getSectionRef("section1").sectionRef';
		divArray[4][1] = 'divCountry';
		divArray[4][2] = 'Country<br>';
		}else{
		divArray[4][0] = 'getSectionRef("section1").sectionRef';
		divArray[4][1] = 'divCountry';
		divArray[4][2] = null;
		}
		//------------
		divArray[5][0] = 'getSectionRef("section1").sectionRef';
		divArray[5][1] = 'divZip';
		divArray[5][2] = 'Zip Code (U.S. only)';
		//------------
		divArray[6][0] = 'getSectionRef("section1").sectionRef';
		divArray[6][1] = 'divCI';
		divArray[6][2] = 'Check-in';
		//------------
		divArray[7][0] = 'getSectionRef("section1").sectionRef';
		divArray[7][1] = 'divCO';
		divArray[7][2] = 'Check-out';
		//------------
		divArray[8][0] = 'getSectionRef("section1").sectionRef';
		divArray[8][1] = 'divRateRange';
		divArray[8][2] = 'Rate Range (USD)';
		//------------
		
		for(i=0; i<divArray.length; i++){
			//tabSwitch('section1',pageType);//switch the tab to see the error message
			writetoDiv(divArray[i][0],divArray[i][1],divArray[i][2],pageType);
		}
	}
}
