/* [nodename, id, name, navigationtext, href, isnavigation, childs[], templatename] */

if (typeof(decodeURIComponent) == 'undefined') {
  decodeURIComponent = function(s) {
    return unescape(s);
  }
}

function jdecode(s) {
    s = s.replace(/\+/g, "%20")
    return decodeURIComponent(s);
}

var POS_NODENAME=0;
var POS_ID=1;
var POS_NAME=2;
var POS_NAVIGATIONTEXT=3;
var POS_HREF=4;
var POS_ISNAVIGATION=5;
var POS_CHILDS=6;
var POS_TEMPLATENAME=7;
var theSitetree=[ 
	['PAGE','701',jdecode('Home'),jdecode(''),'/701.html','true',[],''],
	['PAGE','752',jdecode('Products'),jdecode(''),'/752/index.html','true',[ 
		['PAGE','773',jdecode('Forklift'),jdecode(''),'/752/773.html','true',[],''],
		['PAGE','794',jdecode('Heavy+Equipment'),jdecode(''),'/752/794.html','true',[],''],
		['PAGE','815',jdecode('Generator'),jdecode(''),'/752/815.html','true',[],''],
		['PAGE','836',jdecode('Truck'),jdecode(''),'/752/836.html','true',[],''],
		['PAGE','857',jdecode('Engine'),jdecode(''),'/752/857.html','true',[],''],
		['PAGE','878',jdecode('Parts'),jdecode(''),'/752/878.html','true',[],'']
	],''],
	['PAGE','899',jdecode('Contact'),jdecode(''),'/899.html','true',[],''],
	['PAGE','920',jdecode('About+us'),jdecode(''),'/920/index.html','true',[ 
		['PAGE','941',jdecode('Our+team'),jdecode(''),'/920/941.html','true',[],''],
		['PAGE','962',jdecode('How+to+find+us'),jdecode(''),'/920/962.html','true',[],'']
	],''],
	['PAGE','983',jdecode('Feedback+%2F+Inquiry'),jdecode(''),'/983.html','true',[],''],
	['PAGE','1004',jdecode('Search'),jdecode(''),'/1004.html','true',[],''],
	['PAGE','1025',jdecode('News'),jdecode(''),'/1025.html','true',[],''],
	['PAGE','29801',jdecode('Photo+Gallery'),jdecode(''),'/29801.html','true',[],'']];
var siteelementCount=16;
theSitetree.topTemplateName='Konzept';
theSitetree.paletteFamily='6C05A7';
theSitetree.keyvisualId='560';
theSitetree.keyvisualName='transport.jpg';
theSitetree.fontsetId='120';
theSitetree.graphicsetId='139';
theSitetree.contentColor='000066';
theSitetree.contentBGColor='FFFFFF';
var localeDef={
  language: 'en',
  country: 'US'
};
var theTemplate={
				name: 			'Konzept',
				paletteFamily: 	'6C05A7',
				keyvisualId: 	'560',
				keyvisualName: 	'transport.jpg',
				fontsetId: 		'120',
				graphicsetId: 	'139',
				contentColor: 	'000066',
				contentBGColor: 'FFFFFF',
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				a_color: 		'6C05A7',
				b_color: 		'C8D0ED',
				c_color: 		'000000',
				d_color: 		'15094B',
				e_color: 		'C5B39F',
				f_color: 		'900B4D',
				hasCustomLogo: 	'false',
				contentFontFace:'Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '701',
internalId:  '1006',
customField: '1006'
};
webappMappings['7060']=webappMappings['7060-615d155bc397893be43b963e72f3c444']={
webappId:    '7060',
documentId:  '29801',
internalId:  '615d155bc397893be43b963e72f3c444',
customField: 'language:en;country:US;'
};
webappMappings['7008']=webappMappings['7008-7020']={
webappId:    '7008',
documentId:  '899',
internalId:  '7020',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '701',
internalId:  '',
customField: '20070801-221104'
};
webappMappings['7008']=webappMappings['7008-7019']={
webappId:    '7008',
documentId:  '983',
internalId:  '7019',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '752',
internalId:  '',
customField: '20070914-021611'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '773',
internalId:  '',
customField: '20090429-135914'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '794',
internalId:  '',
customField: '20090429-141403'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '815',
internalId:  '',
customField: '20070623-022715'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '836',
internalId:  '',
customField: '20070623-022739'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '857',
internalId:  '',
customField: '20070623-022808'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '878',
internalId:  '',
customField: '20070623-022857'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '899',
internalId:  '',
customField: '20070801-221151'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '920',
internalId:  '',
customField: '20070709-051414'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '941',
internalId:  '',
customField: '20070622-023813'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '962',
internalId:  '',
customField: '20070622-023813'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '983',
internalId:  '',
customField: '20070801-221252'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1004',
internalId:  '',
customField: '20070622-023813'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1025',
internalId:  '',
customField: '20070709-051831'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '29801',
internalId:  '',
customField: '20070709-032818'
};
var canonHostname = 'diywk01.verio.stngva01.us.diy-servers.net';
var accountId     = 'AVEC10INVXAM';
var companyName   = 'Ong%27s+Auto+Parts%2C+Inc.';
var htmlTitle	  = 'ong-s.com.ph';
var metaKeywords  = 'ong++ongs+++used++surplus+++engine++truck++forklift+bearing++parts++spare+parts++excavator++backhoe++wheel+loader++loader++bulldozer++vibratory+roller++roller++grader++motor+grader++bobcat';
var metaContents  = 'Ongs+Auto+Parts++used+diesel+engines++used+forklifts++used+spare+parts++used+surplus+military++Philippines+used+surplus++us+military+truck+parts++used+electric+generators++used+excavators++used+backhoe++used+bulldozer++used+loader++used+wheel+loader++used+bobcat++used+roller++used+vibratory+roller++used+motor+grader++heavy+equipment++used+cummins+engines++new+spare+parts++used+Japanese+trucks++used+Japanese++transport++equipment++lifting++generators++used+ball+bearings';
theSitetree.getById = function(id, ar) {
	if (typeof(ar) == 'undefined'){
		ar = this;
	}
	for (var i=0; i < ar.length; i++) {
		if (ar[i][POS_ID] == id){
			return ar[i];
		}
		if (ar[i][POS_CHILDS].length > 0) {
			var result=this.getById(id, ar[i][POS_CHILDS]);
			if (result != null){
				return result;
			}
		}
	}
	return null;
};

theSitetree.getParentById = function(id, ar) {
	if (typeof(ar) == 'undefined'){
		ar = this;
	}
	for (var i=0; i < ar.length; i++) {
		for (var j = 0; j < ar[i][POS_CHILDS].length; j++) {
			if (ar[i][POS_CHILDS][j][POS_ID] == id) {
				// child found
				return ar[i];
			}
			var result=this.getParentById(id, ar[i][POS_CHILDS]);
			if (result != null){
				return result;
			}
		}
	}
	return null;
};

theSitetree.getName = function(id) {
	var elem = this.getById(id);
	if (elem != null){
		return elem[POS_NAME];
	}
	return null;
};

theSitetree.getNavigationText = function(id) {
	var elem = this.getById(id);
	if (elem != null){
		return elem[POS_NAVIGATIONTEXT];
	}
	return null;
};

theSitetree.getHREF = function(id) {
	var elem = this.getById(id);
	if (elem != null){
		return elem[POS_HREF];
	}
	return null;
};

theSitetree.getIsNavigation = function(id) {
	var elem = this.getById(id);
	if (elem != null){
		return elem[POS_ISNAVIGATION];
	}
	return null;
};

theSitetree.getTemplateName = function(id, lastTemplateName, ar) {
	if (typeof(lastTemplateName) == 'undefined'){
		lastTemplateName = this.topTemplateName;
	}
	if (typeof(ar) == 'undefined'){
		ar = this;
	}
	for (var i=0; i < ar.length; i++) {
		var actTemplateName = ar[i][POS_TEMPLATENAME];
		if (actTemplateName == ''){
			actTemplateName = lastTemplateName;
		}
		if (ar[i][POS_ID] == id) {
			return actTemplateName;
		}
		if (ar[i][POS_CHILDS].length > 0) {
			var result=this.getTemplateName(id, actTemplateName, ar[i][POS_CHILDS]);
			if (result != null){
				return result;
			}
		}
	}
	return null;
};

theSitetree.getByXx = function(lookup, xx, ar) {
    if (typeof(ar) == 'undefined'){
    	ar = this;
    }
    for (var i=0; i < ar.length; i++) {
        if (ar[i][xx] == lookup){
        	return ar[i];
        }
        if (ar[i][POS_CHILDS].length > 0) {
        	var result=this.getByXx(lookup, xx, ar[i][POS_CHILDS]);
            if (result != null){
                return result;
               }
        }
    }
    return null;
};

function gotoPage(lookup) {
	if(__path_prefix__ == "/servlet/CMServeRES" && typeof (changePage) == 'function'){
		changePage(lookup);
		return;
	}
	var page = theSitetree.getHREF(lookup);
	if (!page) {
		var testFor = [ POS_NAME, POS_NAVIGATIONTEXT ];
		for (var i=0 ; i < testFor.length ; i++) {
			var p = theSitetree.getByXx(lookup, testFor[i]);
			if (p != null) {
				page = p[POS_HREF];
				break;
			}
		}
	}
	document.location.href = (new URL(__path_prefix__ + page, true, true)).toString();
};
