/* [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','4701',jdecode('Home'),jdecode(''), jdecode('%2F4701%2Findex.html'), 'true',[ 
		['PAGE','46401',jdecode('About+Us'),jdecode(''), jdecode('%2F4701%2F46401.html'), 'true',[],'',''],
		['PAGE','46901',jdecode('Location'),jdecode(''), jdecode('%2F4701%2F46901.html'), 'true',[],'','']
	],'',''],
	['PAGE','26601',jdecode('Products'),jdecode(''), jdecode('%2F26601%2Findex.html'), 'true',[ 
		['PAGE','46422',jdecode('What%26%23x27%3Bs+New%3F%21'),jdecode(''), jdecode('%2F26601%2F46422.html'), 'true',[],'',''],
		['PAGE','28385',jdecode('Sheet+Fed+Inks'),jdecode(''), jdecode('%2F26601%2F28385.html'), 'true',[],'',''],
		['PAGE','43301',jdecode('Aqua+Free+Inks'),jdecode(''), jdecode('%2F26601%2F43301.html'), 'true',[],'',''],
		['PAGE','43322',jdecode('UV+Inks'),jdecode(''), jdecode('%2F26601%2F43322.html'), 'true',[],'',''],
		['PAGE','43343',jdecode('Rotary+Forms'),jdecode(''), jdecode('%2F26601%2F43343.html'), 'true',[],'',''],
		['PAGE','43364',jdecode('Specialty+Inks'),jdecode(''), jdecode('%2F26601%2F43364.html'), 'true',[],'',''],
		['PAGE','46443',jdecode('Varnish'),jdecode(''), jdecode('%2F26601%2F46443.html'), 'true',[],'','']
	],'',''],
	['PAGE','26706',jdecode('MSDS'),jdecode(''), jdecode('%2F26706%2Findex.html'), 'true',[ 
		['PAGE','27801',jdecode('Standard+Process+Inks'),jdecode(''), jdecode('%2F26706%2F27801.html'), 'true',[],'',''],
		['PAGE','46485',jdecode('PMS+Colors'),jdecode(''), jdecode('%2F26706%2F46485.html'), 'true',[],'',''],
		['PAGE','46506',jdecode('Varnish'),jdecode(''), jdecode('%2F26706%2F46506.html'), 'true',[],'','']
	],'',''],
	['PAGE','28301',jdecode('Contact'),jdecode(''), jdecode('%2F28301%2Findex.html'), 'true',[ 
		['PAGE','26685',jdecode('Our+team'),jdecode(''), jdecode('%2F28301%2F26685.html'), 'true',[],'',''],
		['PAGE','28322',jdecode('Contact+Us'),jdecode(''), jdecode('%2F28301%2F28322.html'), 'true',[],'','']
	],'','']];
var siteelementCount=18;
theSitetree.topTemplateName='Mondrian';
theSitetree.paletteFamily='7281CC';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='10460';
theSitetree.graphicsetId='10887';
theSitetree.contentColor='FFFFFF';
theSitetree.contentBGColor='3E51B5';
var localeDef={
  language: 'en',
  country: 'US'
};
var prodDef={
  wl_name: 'grp35-attweb',
  product: 'WSCSYSSSSLY0X9RC'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Mondrian',
				paletteFamily: 	'7281CC',
				keyvisualId: 	'-1',
				keyvisualName: 	'keyv.jpg',
				fontsetId: 		'10460',
				graphicsetId: 	'10887',
				contentColor: 	'FFFFFF',
				contentBGColor: '3E51B5',
				a_color: 		'000000',
				b_color: 		'000000',
				c_color: 		'000000',
				d_color: 		'D3D3D3',
				e_color: 		'D3D3D3',
				f_color: 		'D3D3D3',
				hasCustomLogo: 	'true',
				contentFontFace:'Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4701',
internalId:  '',
customField: '20100318-090227'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '4701',
internalId:  '1006',
customField: '1006'
};
webappMappings['1501']=webappMappings['1501-13558585']={
webappId:    '1501',
documentId:  '4701',
internalId:  '13558585',
customField: '1501'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '26601',
internalId:  '',
customField: '20090722-121303'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '26706',
internalId:  '',
customField: '20090721-165330'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '46422',
internalId:  '',
customField: '20090721-161717'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '46401',
internalId:  '',
customField: '20090722-120933'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '26685',
internalId:  '',
customField: '20100607-164417'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '27801',
internalId:  '',
customField: '20090721-170222'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '43301',
internalId:  '',
customField: '20090721-161750'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '28385',
internalId:  '',
customField: '20090721-155354'
};
webappMappings['7008']=webappMappings['7008-4700']={
webappId:    '7008',
documentId:  '28322',
internalId:  '4700',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '46901',
internalId:  '',
customField: '20090722-121018'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '28301',
internalId:  '',
customField: '20100607-164307'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '43322',
internalId:  '',
customField: '20090721-163440'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '28322',
internalId:  '',
customField: '20090727-114622'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '43364',
internalId:  '',
customField: '20090721-164433'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '43343',
internalId:  '',
customField: '20090721-163539'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '46443',
internalId:  '',
customField: '20090721-165247'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '46485',
internalId:  '',
customField: '20090721-170837'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '46506',
internalId:  '',
customField: '20090721-171257'
};
var webAppHostname = 'diycgi.cluster.stngva01.us.diy-servers.net:80';
var canonHostname = 'diywk00.verio.stngva01.us.diy-servers.net';
var accountId     = 'AVFL30INHCR0';
var companyName   = 'Atlas+Ink+And+Supply%2C+LLC+++++++++++++++++++++++++++MADE+IN+AMERICA';
var htmlTitle	  = 'Printing+Ink';
var metaKeywords  = '';
var metaContents  = '';
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();
};

