/* [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 POS_TARGET=8;
var theSitetree=[ 
	['PAGE','1501',jdecode('Home'),jdecode(''),'/1501.html','true',[],'',''],
	['PAGE','5901',jdecode('Manage+Your+Account'),jdecode(''),'/5901.html','true',[],'',''],
	['PAGE','6027',jdecode('Pay+Your+Bill'),jdecode(''),'/6027.html','true',[],'',''],
	['PAGE','15001',jdecode('Lifeline%2FLink-Up'),jdecode(''),'/15001.html','true',[],'',''],
	['PAGE','28201',jdecode('Need+Repair%3F'),jdecode(''),'/28201.html','true',[],'',''],
	['PAGE','5943',jdecode('Available+Packages'),jdecode(''),'/5943/index.html','true',[ 
		['PAGE','24501',jdecode('Lifeline+Package'),jdecode(''),'/5943/24501.html','false',[],'',''],
		['PAGE','25422',jdecode('Non-Lifeline+Packages+30+Mile'),jdecode(''),'/5943/25422.html','false',[],'',''],
		['PAGE','6006',jdecode('AT%26T+Lifelien+packages'),jdecode(''),'/5943/6006.html','false',[],'',''],
		['PAGE','22201',jdecode('AT%26T+NON+Lifeline+Packages'),jdecode(''),'/5943/22201.html','false',[],'','']
	],'',''],
	['PAGE','6132',jdecode('Sign+Up+For+Service'),jdecode(''),'/6132.html','true',[],'',''],
	['PAGE','18701',jdecode('Enhanced+Internet+Access'),jdecode(''),'/18701.html','true',[],'',''],
	['PAGE','7301',jdecode('Locate+Agents'),jdecode(''),'/7301.html','true',[],'',''],
	['PAGE','7322',jdecode('Frequently+Asked+Questions'),jdecode(''),'/7322.html','true',[],'',''],
	['PAGE','6048',jdecode('News'),jdecode(''),'/6048.html','true',[],'',''],
	['PAGE','6069',jdecode('Contact+Us'),jdecode(''),'/6069.html','true',[],'',''],
	['PAGE','24001',jdecode('Employment+Opportunities'),jdecode(''),'/24001.html','true',[],'',''],
	['PAGE','7343',jdecode('State+Tariffs'),jdecode(''),'/7343/index.html','true',[ 
		['PAGE','11027',jdecode('Kentucky'),jdecode(''),'/7343/11027.html','false',[],'',''],
		['PAGE','11048',jdecode('Michigan'),jdecode(''),'/7343/11048.html','false',[],'',''],
		['PAGE','11069',jdecode('Mississippi'),jdecode(''),'/7343/11069.html','false',[],'',''],
		['PAGE','11090',jdecode('North+Carolina'),jdecode(''),'/7343/11090.html','false',[],'',''],
		['PAGE','11111',jdecode('Ohio'),jdecode(''),'/7343/11111.html','false',[],'',''],
		['PAGE','11132',jdecode('South+Carolina'),jdecode(''),'/7343/11132.html','false',[],'',''],
		['PAGE','11153',jdecode('Wisconsin'),jdecode(''),'/7343/11153.html','false',[],'','']
	],'',''],
	['PAGE','43301',jdecode('Agent+Login'),jdecode(''),'/43301.html','true',[],'',''],
	['PAGE','51201',jdecode('Contest+Rules+and+Winners'),jdecode(''),'/51201.html','true',[],'','']];
var siteelementCount=27;
theSitetree.topTemplateName='Steps';
theSitetree.paletteFamily='315881';
theSitetree.keyvisualId='2282';
theSitetree.keyvisualName='telecommunication.jpg';
theSitetree.fontsetId='368';
theSitetree.graphicsetId='419';
theSitetree.contentColor='FFFFFF';
theSitetree.contentBGColor='315881';
var localeDef={
  language: 'en',
  country: 'US'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Steps',
				paletteFamily: 	'315881',
				keyvisualId: 	'2282',
				keyvisualName: 	'telecommunication.jpg',
				fontsetId: 		'368',
				graphicsetId: 	'419',
				contentColor: 	'FFFFFF',
				contentBGColor: '315881',
				a_color: 		'315881',
				b_color: 		'2985B5',
				c_color: 		'3366CC',
				d_color: 		'FFFFFF',
				e_color: 		'FFFFFF',
				f_color: 		'FFFFFF',
				hasCustomLogo: 	'true',
				contentFontFace:'Times New Roman, Times, serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '1501',
internalId:  '1006',
customField: '1006'
};
webappMappings['7008']=webappMappings['7008-733']={
webappId:    '7008',
documentId:  '6132',
internalId:  '733',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1501',
internalId:  '',
customField: '20091130-123220'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5901',
internalId:  '',
customField: '20081010-144316'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6027',
internalId:  '',
customField: '20091204-121421'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15001',
internalId:  '',
customField: '20100720-102750'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '28201',
internalId:  '',
customField: '20081113-171924'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5943',
internalId:  '',
customField: '20091125-152642'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '24501',
internalId:  '',
customField: '20091125-170422'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '25422',
internalId:  '',
customField: '20091125-170544'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6006',
internalId:  '',
customField: '20091125-170659'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '22201',
internalId:  '',
customField: '20091125-170808'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '51201',
internalId:  '',
customField: '20100729-102924'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6132',
internalId:  '',
customField: '20091204-122148'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '18701',
internalId:  '',
customField: '20090605-090627'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7301',
internalId:  '',
customField: '20090220-160946'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7322',
internalId:  '',
customField: '20071010-081119'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6048',
internalId:  '',
customField: '20091014-125803'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6069',
internalId:  '',
customField: '20081113-135934'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '24001',
internalId:  '',
customField: '20091130-125633'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7343',
internalId:  '',
customField: '20070927-145624'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11027',
internalId:  '',
customField: '20070924-175456'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11048',
internalId:  '',
customField: '20070924-175456'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11069',
internalId:  '',
customField: '20070924-175456'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11090',
internalId:  '',
customField: '20070924-175456'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11111',
internalId:  '',
customField: '20070924-175456'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11132',
internalId:  '',
customField: '20070924-175456'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11153',
internalId:  '',
customField: '20070924-175456'
};
webappMappings['1501']=webappMappings['1501-12879489']={
webappId:    '1501',
documentId:  '1501',
internalId:  '12879489',
customField: '1501'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '43301',
internalId:  '',
customField: '20100720-103217'
};
var canonHostname = 'diywk02.verio.stngva01.us.diy-servers.net';
var accountId     = 'AVEC10INLX6B';
var companyName   = 'MTI......WE+KEEP+YOU+TALKING%21';
var htmlTitle	  = '';
var metaKeywords  = 'PrePay+Home+Telephone++Pre+Pay+Home+Telephone++Prepaid+Home+Telephone++Home+Telephone';
var metaContents  = 'PrePay+Home+Telephone++Pre+Pay+Home+Telephone++Prepaid+Home+Telephone++Home+Telephone++Telephone+Landbased+Telephone';
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();
};
