/* [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','671',jdecode('About+Us'),jdecode(''),'/671.html','true',[],'',''],
	['PAGE','692',jdecode('Pins1+'),jdecode(''),'/692.html','true',[],'',''],
	['PAGE','40243',jdecode('Pins+2'),jdecode(''),'/40243.html','true',[],'',''],
	['PAGE','2318',jdecode('Pendants1+'),jdecode(''),'/2318.html','true',[],'',''],
	['PAGE','2327',jdecode('Pin%2FPendants+1'),jdecode(''),'/2327.html','true',[],'',''],
	['PAGE','2336',jdecode('Necklaces+1'),jdecode(''),'/2336.html','true',[],'',''],
	['PAGE','2753',jdecode('Bracelets+1'),jdecode(''),'/2753.html','true',[],'',''],
	['PAGE','12361',jdecode('Bracelets+2'),jdecode(''),'/12361.html','true',[],'',''],
	['PAGE','2648',jdecode('Earrings+1'),jdecode(''),'/2648.html','true',[],'',''],
	['PAGE','21701',jdecode('Earrings+2'),jdecode(''),'/21701.html','true',[],'',''],
	['PAGE','3985',jdecode('Earrings%2FClip1'),jdecode(''),'/3985.html','true',[],'',''],
	['PAGE','55957',jdecode('Barretts%2FHair+Ties'),jdecode(''),'/55957.html','true',[],'',''],
	['PAGE','2666',jdecode('Buckles+1'),jdecode(''),'/2666.html','true',[],'',''],
	['PAGE','2744',jdecode('Dog%2FCat+Collars'),jdecode(''),'/2744.html','true',[],'',''],
	['PAGE','3994',jdecode('Bolos'),jdecode(''),'/3994.html','true',[],'',''],
	['PAGE','4003',jdecode('Watchbands'),jdecode(''),'/4003.html','true',[],'',''],
	['PAGE','10281',jdecode('Fetishes1'),jdecode(''),'/10281.html','true',[],'',''],
	['PAGE','4012',jdecode('2010+Calendar'),jdecode(''),'/4012.html','true',[],'',''],
	['PAGE','51557',jdecode('Driving+Directions'),jdecode(''),'/51557.html','true',[],'',''],
	['PAGE','728',jdecode('Contact+%2F+Order'),jdecode(''),'/728.html','true',[],'',''],
	['PAGE','2187',jdecode('Photo+Album'),jdecode(''),'/2187.html','true',[],'','']];
var siteelementCount=21;
theSitetree.topTemplateName='Akropolis';
theSitetree.paletteFamily='936251';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='10554';
theSitetree.graphicsetId='10450';
theSitetree.contentColor='FFFFFF';
theSitetree.contentBGColor='936251';
var localeDef={
  language: 'en',
  country: 'US'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Akropolis',
				paletteFamily: 	'936251',
				keyvisualId: 	'-1',
				keyvisualName: 	'keyv.jpg',
				fontsetId: 		'10554',
				graphicsetId: 	'10450',
				contentColor: 	'FFFFFF',
				contentBGColor: '936251',
				a_color: 		'936251',
				b_color: 		'FFFFFF',
				c_color: 		'FFFFFF',
				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:  '671',
internalId:  '1006',
customField: '1006'
};
webappMappings['7060']=webappMappings['7060-b2834c992ae51f1d7f1a438efc5d45d9']={
webappId:    '7060',
documentId:  '2187',
internalId:  'b2834c992ae51f1d7f1a438efc5d45d9',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '671',
internalId:  '',
customField: '20100903-192039'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2318',
internalId:  '',
customField: '20091106-222931'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '692',
internalId:  '',
customField: '20091215-232916'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2327',
internalId:  '',
customField: '20090613-003459'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2336',
internalId:  '',
customField: '20091103-090522'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '40243',
internalId:  '',
customField: '20090619-094726'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2753',
internalId:  '',
customField: '20091103-073436'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '12361',
internalId:  '',
customField: '20091103-081156'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2648',
internalId:  '',
customField: '20091103-100339'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3985',
internalId:  '',
customField: '20090712-055840'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2666',
internalId:  '',
customField: '20091205-233744'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2744',
internalId:  '',
customField: '20080302-114631'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3994',
internalId:  '',
customField: '20091106-224336'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4003',
internalId:  '',
customField: '20090605-193543'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4012',
internalId:  '',
customField: '20100903-192140'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '10281',
internalId:  '',
customField: '20090727-181815'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '728',
internalId:  '',
customField: '20100227-220405'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2187',
internalId:  '',
customField: '20091006-011130'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '51557',
internalId:  '',
customField: '20100903-195208'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '21701',
internalId:  '',
customField: '20090614-121201'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '55957',
internalId:  '',
customField: '20091106-182727'
};
var canonHostname = 'wsc-worker02.chi.us.siteprotect.com';
var accountId     = 'AHW050INXE6H';
var companyName   = 'SUNFACE+Indian+Jewelry+Fetishes+%26+Pawn+++++++++++++';
var htmlTitle	  = 'Indian+jewelry%2C+fetishes%2C+and+pawn%2C+silver.+dog+collars';
var metaKeywords  = 'Indian+jewelry%2CNative+American+Indian+Jewelry%2CSilver+Jewelry%2CIndian+pawn%2Cjewelry%2C+pawn+jewelry%2CNavajo+jewelry.Zuni+jewelry%2CHopi+jewelry%2CSanto+Domingo+jewelry%2C+turquoise+jewelry%2Cearrings%2Cpins%2Cbracelets%2Cbuckles%2Cdog+collars%2Ccat+collars';
var metaContents  = 'Indian+jewelry+fetishes+and+pawn%2C+sterling+silver+jewelry+and+silver+concho+dog+collars+and+cat+collars+';
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();
};
