/* [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','6801',jdecode('Home'),jdecode(''),'/6801.html','true',[],'',''],
	['PAGE','9001',jdecode('Client+Comments'),jdecode(''),'/9001.html','true',[],'',''],
	['PAGE','19001',jdecode('Why+Use+A+DJ%3F'),jdecode(''),'/19001.html','true',[],'',''],
	['PAGE','15401',jdecode('Weddings'),jdecode(''),'/15401.html','true',[],'',''],
	['PAGE','15601',jdecode('Partys'),jdecode(''),'/15601.html','true',[],'',''],
	['PAGE','7101',jdecode('Packages'),jdecode(''),'/7101.html','true',[],'',''],
	['PAGE','7901',jdecode('Additional+Services'),jdecode(''),'/7901.html','true',[],'',''],
	['PAGE','7122',jdecode('Get+A+Quote'),jdecode(''),'/7122.html','true',[],'',''],
	['PAGE','7143',jdecode('Make+A+Booking'),jdecode(''),'/7143.html','true',[],'',''],
	['PAGE','7501',jdecode('Buy+Your+Package'),jdecode(''),'/7501.html','true',[],'',''],
	['PAGE','6936',jdecode('Contact'),jdecode(''),'/6936.html','true',[],'',''],
	['PAGE','34201',jdecode('Links'),jdecode(''),'/34201.html','true',[],'',''],
	['PAGE','6957',jdecode('Terms+And+Privacy'),jdecode(''),'/6957.html','true',[],'','']];
var siteelementCount=13;
theSitetree.topTemplateName='Metal';
theSitetree.paletteFamily='A3CAFE';
theSitetree.keyvisualId='723';
theSitetree.keyvisualName='tanzen.jpg';
theSitetree.fontsetId='142';
theSitetree.graphicsetId='161';
theSitetree.contentColor='FFFFFF';
theSitetree.contentBGColor='000000';
var localeDef={
  language: 'en',
  country: 'US'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Metal',
				paletteFamily: 	'A3CAFE',
				keyvisualId: 	'723',
				keyvisualName: 	'tanzen.jpg',
				fontsetId: 		'142',
				graphicsetId: 	'161',
				contentColor: 	'FFFFFF',
				contentBGColor: '000000',
				a_color: 		'A3CAFE',
				b_color: 		'87A7D2',
				c_color: 		'000000',
				d_color: 		'000000',
				e_color: 		'FFFFFF',
				f_color: 		'FFFFFF',
				hasCustomLogo: 	'false',
				contentFontFace:'Verdana, Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6801',
internalId:  '',
customField: '20090920-121621'
};
webappMappings['7008']=webappMappings['7008-260']={
webappId:    '7008',
documentId:  '7122',
internalId:  '260',
customField: 'language:en;country:US;'
};
webappMappings['7008']=webappMappings['7008-261']={
webappId:    '7008',
documentId:  '7143',
internalId:  '261',
customField: 'language:en;country:US;'
};
webappMappings['1501']=webappMappings['1501-17736769']={
webappId:    '1501',
documentId:  '6801',
internalId:  '17736769',
customField: '1501'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '6801',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7101',
internalId:  '',
customField: '20090920-122521'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7122',
internalId:  '',
customField: '20090308-145920'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7143',
internalId:  '',
customField: '20090308-150343'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7501',
internalId:  '',
customField: '20090920-122136'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6936',
internalId:  '',
customField: '20090307-235237'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6957',
internalId:  '',
customField: '20090308-150737'
};
webappMappings['4001']=webappMappings['4001-17733008']={
webappId:    '4001',
documentId:  '7501',
internalId:  '17733008',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7901',
internalId:  '',
customField: '20090920-122651'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9001',
internalId:  '',
customField: '20090308-150528'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15401',
internalId:  '',
customField: '20090308-145520'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15601',
internalId:  '',
customField: '20090420-134348'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '19001',
internalId:  '',
customField: '20090308-145109'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '34201',
internalId:  '',
customField: '20091030-131617'
};
var canonHostname = 'wscwrk02.ehost-services.com';
var accountId     = 'AEN330INZB38';
var companyName   = 'Vancouver+Professional+DJ+Service';
var htmlTitle	  = 'Vancouver+Professional+DJ+Service+Vancouver+Wedding+DJ+Karaoke';
var metaKeywords  = 'Vancouver+Video+DJ%2C+Vancouver+Karaoke+DJ%2C+Vancouver+Wedding+DJ%2C+Vancouver+DJ+Casinos%2C+Vancouver+DJ+Corporate+Parties%2C+Vancouver+Grad+DJ%2C+Vancouver+DJ+Christmas+Parties%2C+Vancouver+DJ%2C+Vancouver+DJ+Boat+Cruises%2C+Vancouver+DJ+Weddings%2C+Whistler+DJ%2C+Squamish+DJ%2C+North+Vancouver+DJ+Christmas+Parties%2CNorth+Vancouver+DJ%2C+North+Vancouver+Wedding+DJ%2C+North+Vancouver+Grad+DJ%2C+West+Vancouver+DJ%2C+West+Vancouver+Wedding+DJ%2C+West+Vancouver+DJ+Christmas+Parties%2C+West+Vancouver+Grad+DJ%2C+Burnaby+DJ%2C+Burnaby+Wedding+DJ%2C+Burnaby+DJ+Christmas+Parties%2C+Burnaby+Grad+DJ%2C+New+Westminster+DJ%2C+New+Westminster+Wedding+DJ%2C+New+Westminster+DJ+Christmas+Parties%2C+New+Westminster+Grad+DJ%2C+Coquitlam+DJ%2C+Coquitlam+Wedding+DJ%2C+Coquitlam+DJ+Christmas+Parties%2C+Coquitlam+Grad+DJ%2C+Port+Coquitlam+DJ%2C+Port+Coquitlam+Wedding+DJ%2C++Port+Coquitlam+DJ+Christmas+Parties%2C+Port+Coquitlam+Grad+DJ%2C+Pitt+Meadows+DJ%2C+Pitt+Meadows+Wedding+DJ%2C+Pitt+Meadows+DJ+Christmas+Parties%2C+Pitt+Meadows+Grad+DJ%2C+Maple+Ridge+DJ%2C+Maple+Ridge+Wedding+DJ%2C+Maple+Ridge+DJ+Christmas+Parties%2C+Maple+Ridge+Grad+DJ%2C+Mission+DJ%2C+Mission+Wedding+DJ%2C+Mission+DJ+Christmas+Parties%2C+Mission+Grad+DJ%2C+Richmond+DJ%2C+Richmond+Wedding+DJ%2C++Richmond+DJ+Christmas+Parties%2C+Richmond+Grad+DJ%2CFraser+Valley+DJ%2C+Delta+DJ%2C+Delta+Wedding+DJ%2C+Delta+DJ+Christmas+Parties%2C+Delta+Grad+DJ%2C+White+Rock+DJ%2C+White+Rock+Wedding+DJ%2C+White+Rock+DJ+Christmas+Parties%2C+White+Rock+Grad+DJ%2C+Fraser+Valley+Wedding+DJ%2CFraser+Valley+DJ+Christmas+Parties%2C+Surrey+DJ%2C+Surrey+Wedding+DJ%2C+Surrey+DJ+Christmas++Party%2C+Langley+DJ%2C+Langley+Wedding+DJ%2C+Langley+DJ+Christmas+Parties%2CLangley+Grad+DJ%2C+Abbotsford+DJ%2C+Abbotsford+Wedding+DJ%2CAbbotsford+DJ+Christmas+Parties%2C+Aldergrove+DJ%2C+Chilliwack+DJ%2C+Chilliwack+Wedding+DJ%2C+Chilliwack+DJ+Christmas+Parties%2C+Chilliwack+Grad+DJ%2C+Harrison+Hot+Springs+DJ%2C+Harrison+Hot+Springs++Wedding+DJ+%2CHarrison+Hot+Springs+DJ+Parties%2C+Whistler+DJ+Weddings%2C+Vancouver+DJ+Wedding+Ceremonies%2C+Vancouver+DJ+Karaoke%2C+Vancouver+DJ+Boat+Cruises%2C+Vancouver+DJ+Grads%2C+Burnaby+DJ+Grads%2C+Surrey+DJ+Grads%2C+Langley+DJ+Grads%2C+White+Rock+DJ+Grads%2C+Abbotsford+DJ+Grads%2C+Chilliwack+DJ+Grads%2C+Maple+Ridge+DJ+Grads%2C+New+Westminster+Grads%2C+Corporate++Private+Parties%2C+Vancouver+Christmas+Parties+DJ%2C+Surrey+Christmas+Parties+DJ%2C+Fraser+Valley+Christmas+Parties+DJ%2C+Lower+Mainland+Christmas+Parties+DJ%2C+Sports+Banquets+DJ%2C+Fashion+Shows+DJ%2C+Product+Launches+DJ%2C+New+Years+Parties+DJ%2C+Fundraisers';
var metaContents  = 'Vancouver+Professional+DJ+Service%2C+serving++Vancouver%2CWhistler%2C+Squamish%2C+West+Vancouver%2C+North+Vancouver%2C+Burnaby%2C+New+Westminster%2C+Surrey%2C+Richmond%2C+Delta%2C+White+Rock%2C+Langley%2C+Coquitlam%2C+Port+Coquitlam%2C+Pitt+Meadows%2C+Maple+Ridge%2C+Mission%2C+Aldergrove%2C+Abbotsford%2C+Chilliwack%2C+Harrison+Hot+Springs%2C+Minter+Gardens%2C+Hope+and++The+Fraser+Valley%21+We+are+your+Wedding++DJ+and+Corporate+DJ+Entertainment+Specialists%21+We+offer+professional%2C%C2%A0highly+experienced+DJs%2C+excellent+equipment+and%C2%A0value-added+professional+service+at+competitive+prices%21+We+specialize+in+Professional+DJ+Services%2C+Karaoke+DJ+Services+and+Video+DJ+Services+for+Weddings%2C+Wedding+Ceremonies%2C+Corporate+Events%2C+Casinos%2C+Christmas+Parties%2C+Grads%2C+Dry+Grads%2C+Birthdays%2C+Anniversaries%2C+Reunions%2C+Destination+Management+Companies%2C+Boat+Cruises%2C+....and+more%21+We+are+booking+2009-2010+weddings+and+events........limited+space+available%21';
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();
};
