/* [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','214945',jdecode('Welcome'),jdecode(''),'/214945.html','true',[],'',''],
	['PAGE','27901',jdecode('Introduction'),jdecode(''),'/27901.html','true',[],'',''],
	['PAGE','145301',jdecode('5+Steps'),jdecode(''),'/145301.html','true',[],'',''],
	['PAGE','48322',jdecode('Formats'),jdecode(''),'/48322.html','true',[],'',''],
	['PAGE','204345',jdecode('Prices'),jdecode(''),'/204345.html','true',[],'',''],
	['PAGE','73301',jdecode('Patterns'),jdecode(''),'/73301.html','true',[],'',''],
	['PAGE','147001',jdecode('Colour+Swatch'),jdecode(''),'/147001.html','true',[],'',''],
	['PAGE','97201',jdecode('Fonts'),jdecode(''),'/97201.html','true',[],'',''],
	['PAGE','80001',jdecode('Wed+Stationery'),jdecode(''),'/80001.html','true',[],'',''],
	['PAGE','124001',jdecode('NZ+Bride+%26+Groom'),jdecode(''),'/124001.html','true',[],'',''],
	['PAGE','124022',jdecode('NZ+Weddings'),jdecode(''),'/124022.html','true',[],'',''],
	['PAGE','120985',jdecode('NEW%21'),jdecode(''),'/120985.html','true',[],'',''],
	['PAGE','218145',jdecode('Leaves'),jdecode(''),'/218145.html','true',[],'',''],
	['PAGE','14201',jdecode('Invite+Wording'),jdecode(''),'/14201.html','true',[],'',''],
	['PAGE','101022',jdecode('Wording+Extras'),jdecode(''),'/101022.html','true',[],'',''],
	['PAGE','46901',jdecode('Bridal+Showers'),jdecode(''),'/46901.html','true',[],'',''],
	['PAGE','52527',jdecode('SpecialtyTeas'),jdecode(''),'/52527.html','true',[],'',''],
	['PAGE','52590',jdecode('Event+Specialists+'),jdecode(''),'/52590.html','true',[],'',''],
	['PAGE','89301',jdecode('Quick+Links'),jdecode(''),'/89301.html','true',[],'','']];
var siteelementCount=19;
theSitetree.topTemplateName='Alpha';
theSitetree.paletteFamily='555454';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='10461';
theSitetree.graphicsetId='10892';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='FFFFFF';
var localeDef={
  language: 'en',
  country: 'US'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Alpha',
				paletteFamily: 	'555454',
				keyvisualId: 	'-1',
				keyvisualName: 	'keyv.jpg',
				fontsetId: 		'10461',
				graphicsetId: 	'10892',
				contentColor: 	'000000',
				contentBGColor: 'FFFFFF',
				a_color: 		'000000',
				b_color: 		'000000',
				c_color: 		'000000',
				d_color: 		'555454',
				e_color: 		'555454',
				f_color: 		'555454',
				hasCustomLogo: 	'false',
				contentFontFace:'Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'true'
			  };
var webappMappings = {};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '27901',
internalId:  '',
customField: '20100320-154136'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '145301',
internalId:  '',
customField: '20091022-044101'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '80001',
internalId:  '',
customField: '20090930-230521'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '124001',
internalId:  '',
customField: '20100222-010720'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '124022',
internalId:  '',
customField: '20090930-231511'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '120985',
internalId:  '',
customField: '20100222-211607'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '73301',
internalId:  '',
customField: '20091022-045001'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '14201',
internalId:  '',
customField: '20090917-222717'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '101022',
internalId:  '',
customField: '20090917-222542'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '214945',
internalId:  '',
customField: '20100622-234057'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '147001',
internalId:  '',
customField: '20090917-224108'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '97201',
internalId:  '',
customField: '20091022-045234'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '204345',
internalId:  '',
customField: '20091022-044619'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '48322',
internalId:  '',
customField: '20091022-044420'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '46901',
internalId:  '',
customField: '20090918-000328'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '52527',
internalId:  '',
customField: '20090918-005048'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '52590',
internalId:  '',
customField: '20090918-183637'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '89301',
internalId:  '',
customField: '20090918-183515'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '218145',
internalId:  '',
customField: '20100414-234205'
};
webappMappings['7008']=webappMappings['7008-17977']={
webappId:    '7008',
documentId:  '214945',
internalId:  '17977',
customField: 'language:en;country:US;'
};
var canonHostname = 'diywk02.verio.stngva01.us.diy-servers.net';
var accountId     = 'AVEC10IN31HZ';
var companyName   = 'alyssandra+striking+stationery';
var htmlTitle	  = 'Wedding+Stationery%2C+Corporate+Greeting+Cards+%26+Conference+Accesories';
var metaKeywords  = 'wedding%2C+weddings%2C++wedding+ideas%2C+wedding+stationery%2C+Printed+invitations%2C+wedding+invitations+New+Zealand%2C+Wedding+envelopes%2C+Save+The+Date%2C+wedding+invites+New+Zealand%2C++bridal%2C+ideas%2C+unique%2C+Custom+Christmas+cards%2C+bridal+shower%2C+centrepieces%2C+bride%2C+bride+%26+groom%2C+NZ+Weddings%2C+alyssandra%2C+invitations%2C+NZ+%2C+stationary%2C+specialist%2C+DIY%2C+luxurious%2C+Handmade+Wedding+Invitations%2C+Wedding+Stationery+Images%2C+Themes%2C+Stationery%2C+Beach+invitation%2C+stationary%2C+Corporate+Greeting+Cards%2C+Stationery%2C+Wanaka%2C+Queenstown%2C+Christchurch%2C+Otago%2C+Southland%2C+unique%2C+DIY+Invites%2C+exquisite%2C+Couture+invitation%2C+chocolates%2C+wedding+invite%2C+Wording%2C+special+occasions%2C+New+Zealand';
var metaContents  = 'weddings+%28Wedding+Stationery+-+Announcements%2C+Save+The+Day+Cards%2C+and+Wedding+Invitations+%2F+Wedding+Invites%29';
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();
};
