/* [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','4594',jdecode('Home+%26+News'),jdecode(''), jdecode('%2F4594.html'), 'true',[],'',''],
	['PAGE','239701',jdecode('Referenzen+%26+Fotos'),jdecode(''), jdecode('%2F239701.html'), 'true',[],'',''],
	['PAGE','4732',jdecode('%C3%9Cber+mich'),jdecode(''), jdecode('%2F4732.html'), 'true',[],'',''],
	['PAGE','66550',jdecode('Ausstellungen'),jdecode(''), jdecode('%2F66550.html'), 'true',[],'',''],
	['PAGE','297101',jdecode('Kalender+2012'),jdecode(''), jdecode('%2F297101.html'), 'true',[],'',''],
	['PAGE','608901',jdecode('Moni%26%23x27%3Bs+JUMBO+Karte'),jdecode(''), jdecode('%2F608901.html'), 'true',[],'',''],
	['PAGE','587601',jdecode('Original+MoniART'),jdecode(''), jdecode('%2F587601.html'), 'true',[],'',''],
	['PAGE','468201',jdecode('Leinwand-Forex-Dibond'),jdecode(''), jdecode('%2F468201.html'), 'true',[],'',''],
	['PAGE','438501',jdecode('Kunst-+%26+Foto+Print'),jdecode(''), jdecode('%2F438501%2Findex.html'), 'true',[ 
		['PAGE','155701',jdecode('FOTO+Bilder'),jdecode(''), jdecode('%2F438501%2F155701.html'), 'true',[],'',''],
		['PAGE','12790',jdecode('KUNST+Bilder'),jdecode(''), jdecode('%2F438501%2F12790.html'), 'true',[],'','']
	],'',''],
	['PAGE','522901',jdecode('Postkarten+Serie'),jdecode(''), jdecode('%2F522901.html'), 'true',[],'',''],
	['PAGE','503401',jdecode('HERZeria+klein+++%3A-%29'),jdecode(''), jdecode('%2F503401.html'), 'true',[],'',''],
	['PAGE','492901',jdecode('HERZeria+gross++%3A-%29%29'),jdecode(''), jdecode('%2F492901.html'), 'true',[],'',''],
	['PAGE','577901',jdecode('Schieferstein+Herzen'),jdecode(''), jdecode('%2F577901.html'), 'true',[],'',''],
	['PAGE','358501',jdecode('Geckos'),jdecode(''), jdecode('%2F358501.html'), 'true',[],'',''],
	['PAGE','346701',jdecode('Schmetterlinge'),jdecode(''), jdecode('%2F346701.html'), 'true',[],'',''],
	['PAGE','81550',jdecode('MoniArt++III'),jdecode(''), jdecode('%2F81550.html'), 'true',[],'',''],
	['PAGE','11401',jdecode('MoniArt++II+'),jdecode(''), jdecode('%2F11401.html'), 'true',[],'',''],
	['PAGE','4705',jdecode('MoniArt++I+'),jdecode(''), jdecode('%2F4705.html'), 'true',[],'',''],
	['PAGE','411201',jdecode('Fotohefte+14x14'),jdecode(''), jdecode('%2F411201%2Findex.html'), 'true',[ 
		['PAGE','501001',jdecode('Fotobuch+21x21'),jdecode(''), jdecode('%2F411201%2F501001.html'), 'true',[],'','']
	],'',''],
	['PAGE','393401',jdecode('FOTO+Karten+Collagen'),jdecode(''), jdecode('%2F393401.html'), 'true',[],'',''],
	['PAGE','167101',jdecode('FOTO+Karten+hoch'),jdecode(''), jdecode('%2F167101.html'), 'true',[],'',''],
	['PAGE','54177',jdecode('Kunstkarten'),jdecode(''), jdecode('%2F54177.html'), 'true',[],'',''],
	['PAGE','76904',jdecode('PowerPoint+pps'),jdecode(''), jdecode('%2F76904.html'), 'true',[],'',''],
	['PAGE','558201',jdecode('Ich+mag+Dich%2C+weil...'),jdecode(''), jdecode('%2F558201.html'), 'true',[],'',''],
	['PAGE','512501',jdecode('Foto+Collagen'),jdecode(''), jdecode('%2F512501.html'), 'true',[],'',''],
	['PAGE','493801',jdecode('FOTOstory+-+sch%C3%B6%C3%B6%C3%B6n'),jdecode(''), jdecode('%2F493801.html'), 'true',[],'',''],
	['PAGE','4759',jdecode('Kontakt+-+Links'),jdecode(''), jdecode('%2F4759.html'), 'true',[],'','']];
var siteelementCount=30;
theSitetree.topTemplateName='Brush';
theSitetree.paletteFamily='6F7DC8';
theSitetree.keyvisualId='11942';
theSitetree.keyvisualName='kv_11942.jpg';
theSitetree.fontsetId='33214';
theSitetree.graphicsetId='14102';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='FFFFFF';
var localeDef={
  language: 'de',
  country: 'CH'
};
var prodDef={
  wl_name: 'bluewin',
  product: 'WSCBLUSSSLYTC2MX'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Brush',
				paletteFamily: 	'6F7DC8',
				keyvisualId: 	'11942',
				keyvisualName: 	'kv_11942.jpg',
				fontsetId: 		'33214',
				graphicsetId: 	'14102',
				contentColor: 	'000000',
				contentBGColor: 'FFFFFF',
				a_color: 		'000000',
				b_color: 		'000000',
				c_color: 		'000000',
				d_color: 		'000000',
				e_color: 		'000000',
				f_color: 		'000000',
				hasCustomLogo: 	'false',
				contentFontFace:'Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4594',
internalId:  '',
customField: '20120131-120805'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4732',
internalId:  '',
customField: '20120131-121157'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '239701',
internalId:  '',
customField: '20120131-120947'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '297101',
internalId:  '',
customField: '20111231-181130'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '66550',
internalId:  '',
customField: '20120131-121321'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '12790',
internalId:  '',
customField: '20111028-095430'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4705',
internalId:  '',
customField: '20111028-094943'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11401',
internalId:  '',
customField: '20111028-095010'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '81550',
internalId:  '',
customField: '20110220-175641'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '438501',
internalId:  '',
customField: '20110727-223751'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '155701',
internalId:  '',
customField: '20110723-235724'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '54177',
internalId:  '',
customField: '20110728-223309'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '167101',
internalId:  '',
customField: '20110728-225016'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '393401',
internalId:  '',
customField: '20111103-105642'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '468201',
internalId:  '',
customField: '20120111-122102'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '358501',
internalId:  '',
customField: '20110523-220458'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '411201',
internalId:  '',
customField: '20110220-175245'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '76904',
internalId:  '',
customField: '20111229-155046'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4759',
internalId:  '',
customField: '20111231-183027'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '4594',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '346701',
internalId:  '',
customField: '20110901-200531'
};
webappMappings['1501']=webappMappings['1501-913256']={
webappId:    '1501',
documentId:  '4594',
internalId:  '913256',
customField: '1501'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '492901',
internalId:  '',
customField: '20110724-223531'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '493801',
internalId:  '',
customField: '20110514-130532'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '501001',
internalId:  '',
customField: '20110202-110826'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '503401',
internalId:  '',
customField: '20110724-223612'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '512501',
internalId:  '',
customField: '20111227-165629'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '522901',
internalId:  '',
customField: '20111129-134444'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '577901',
internalId:  '',
customField: '20110727-223929'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '558201',
internalId:  '',
customField: '20110731-100343'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '587601',
internalId:  '',
customField: '20111231-181629'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '608901',
internalId:  '',
customField: '20110901-194644'
};
var webAppHostname = 'cgi.hpt001.bluewin.ch:80';
var canonHostname = 'hptworkerdb01a.bluewin.ch';
var accountId     = 'ABW0X0INXXLL';
var companyName   = 'MoniArt';
var htmlTitle	  = '';
var metaKeywords  = 'Moniart%2C+Art%2C+Kunst%2C+Bilder%2C+Karten%2C+gerahmte+Bilder%2C+Kunstkarten%2C+Smart%2C+Galerie%2C+Schafisheim%2C+Monika%2C+M%EF%BF%BDller%2C+Aargau%2C+Schweiz%2C+Moni%2C+Powerpoint%2C+Verkaufsstellen%2C+Angebot%2C+Foto%2C+Photo%2C+Reisen%2C+Teddy%2C+Teddy-Summer%2C+B%EF%BF%BDr%2C+Bleistift%2C+Kreide%2C+Ausstellung%2C+Links%2C+Update%2C+News%2C+Home%2C+Quad%2C+Tessin%2C+Ascona%2C+Verzasca%2C+Hallwil%2C+Bio-Bad%2C+Sommer%2C+Herbst%2C+Winter%2C+Fruehling%2C+Schmetterling%2C+Gecko%2C+Herz%2C+Herbuch%2C+Regenbogenrosen%2C+pps%2C+ppt%2C+Figuren%2C+Dammweg%2C+';
var metaContents  = 'Moniart+Bilder+und+Kunstkarten';
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();
};

