function sandyPageLink (s) {

	this.s = s;
	this.elems = new Array();
	if (s.length > 1) {
		var a = s.split('/');
		for (var i = 0; i < a.length; i++) {
			if (a[i].length) this.elems.push(a[i]);
		} 
	} 

}

sandyPageLink.prototype.count = function () {

	return this.elems.length;

}

sandyPageLink.prototype.hashed = function (s) {

	s = !s ? document.location.hash : s;
	if (s.length > 1) {
		var a = s.substring(1).split('/');
		for (var i = 0; i < a.length; i++) {
			if (a[i].length) this.elems.push(a[i]);
		} 
	} return this.elems.length > 1 ? true : false;

}

sandyPageLink.prototype.href = function () {

	if (this.elems.length) {
		return '/'+this.elems.join('/') + '/';
	} else {
		return '/';
	}

}

sandyPageLink.prototype.rel = function () {

	if (!this.elems.length) return "";
	var link = '/'+this.elems[0]+'/';
	if (this.elems.length > 1) link += '#/';
	for (var i = 1; i < this.elems.length; i++) link = link + this.elems[i]+'/';
	return link;

}

var sandyScript = {

	count : 0,
	items : null,

	reset : function () {

		this.count = 0;
		this.items = new Array();

	},

	add : function (cBack,w,a) {

		var o = {};
		o.cBack = cBack;
		o.wait = w ? w : 0;
		o.arg = a ? a : false;
		o.active = true;
		this.items[this.count++] = o;

	},

	run : function () {

		if (!this.count) return false;
		sandyPage.fBuzy = true;
		for (var i = 0; i < this.count; i++) {
			if (this.items[i].active) {
				this.items[i].active = false;
				var cBack = function () {
					sandyScript.items[i].cBack(sandyScript.items[i].arg);
				}; setTimeout(cBack,this.items[i].wait);
				return false;
			}
		} sandyPage.fBuzy = false;
		
	}

}

var sandyPage = {

	fBuzy : false,
	pageId : 0,
	started : false,
	langBlock : null,
	oElem : null,
	pElem : null,
	oForm : null,

	init : function (oDiv,oMenu,sCfg) {

		
		this.oElem = oDiv;
		this.oElem.style.display = 'none';
		this.langBlock = document.getElementById('SiteLang');
		var pUrl = new sandyPageLink(document.location.pathname);
		if (pUrl.count() > 1) {
			document.location.replace(pUrl.rel());
			return false;
		} sandyLoader.init();
		sandyLoader.start();
		sandyLoader.defer('/img/em.gif');
		var a = sandyUtils.unshiftChild(this.oElem.parentNode.parentNode,'div');
		a.className = 'SplineContainer';
		a = sandyUtils.unshiftChild(a,'div');
		a.className = 'SplineBox';
		a = sandyUtils.unshiftChild(a,'div');
		a.className = 'Splinder';
		a = sandyUtils.unshiftChild(a,'div');
		a.className = 'SplinderBox';
		sandyPageSplines.init(sCfg,a);
		if (pUrl.hashed()) {
			this.navigate(pUrl.href());			
		} else {
			sandyPageMenu.init(oMenu);
			if (sandyPageSplines.sCount && sandyPageMenu.sCount) {
				sandyScript.reset();
				this.live();
				sandyScript.add(function () {sandyPageMenu.show()},500);
				sandyLoader.preload(function () {sandyScript.run()});
			} else {
				sandyLoader.stop();
			}
		}

	},

	live : function () {

		if (!this.started) {
			this.started = true;
			sandyPageSplines.reveal(false);
			this.oElem.style.display = 'block';
		}

	},
	
	toggleLang : function (fShow,fPos) {
		
		if (fShow) {
			if (this.langBlock) {				
				this.langBlock.childNodes[0].style.left = fPos ? '200px' : '600px';
				this.langBlock.style.visibility = 'visible';
			}
		} else {
			if (this.langBlock) this.langBlock.style.visibility = 'hidden';
		} 

	},

	catalog : function (oId) {

		this.fBuzy = true;
		sandyPageMenu.expand(oId);
		this.fBuzy = false;

	},

	section : function (oId) {

		if (sandyPageMenu.items[oId].active) return false;
		sandyScript.reset();
		sandyScript.add(function () {sandyPageMenu.hide()},0);			
		sandyScript.add(function () {sandyPageSplines.slide(oId)},200);
		sandyScript.add(function () {sandyPageMenu.select(oId)});
		sandyScript.run();

	},

	navigate : function (pUrl) {

		this.fBuzy = true;
		var cBack = function (msg,state) {
			sandyPage.preload(msg,state);
		}; 	sandyXml.getString(pUrl+'?ajax=1',cBack);

	},

	showPage : function () {
		
		this.pElem.childNodes[0].style.left = '550px';
		var anim = function (a) {
			sandyPage.pElem.childNodes[0].style.left = Math.round(sandyUtils.fCubicOut(a,0,550,20) * -1 +550)+'px';
		}; var cBack = function () {
			sandyScript.run();
		}; var a = sandyUtils.animator(20,30,anim,cBack);
		a.run();		

	},

	preload : function (tData,oState) {

		var a,b,pid;
		if (oState) {
			var cache = document.createElement("DIV");
			cache.innerHTML = tData;
			if (!cache.childNodes.length || !(a = sandyUtils.getElem(cache.childNodes[0],'div','sitePage'))) {				
				return this.showError('Unable to process selected template.');
			} if ((pid = Number(a.getAttribute("pid"))) == 0) {
				return this.showError('Unable to process selected template.');
			} if (!this.pageId) {
				while (this.oElem.childNodes.length) {
					this.oElem.removeChild(this.oElem.childNodes[0]);
				} this.oElem.className = 'ContainerText';
				if (cache.childNodes.length && (b = sandyUtils.getElem(cache.childNodes[0],'div','SiteMenu'))) {
					sandyPageMenu.init(this.oElem.appendChild(b),true);
				} this.pElem = this.oElem.appendChild(document.createElement("div"));
				this.pElem.className = 'TextBox';
				b = this.pElem.appendChild(document.createElement("div"));
				sandyUtils.props(b.style,'position,relative,visibility,visible,width,550px,top,0');
			} this.pElem.childNodes[0].style.left = '550px';
			this.pElem.childNodes[0].innerHTML = a.innerHTML;
			if (a.getAttribute("rel") == 'hasform') {
				this.initForm(this.pElem.childNodes[0]);
			} this.pageId = pid;
			sandyScript.reset();
			sandyPage.live();
			sandyPageSplines.minimize();
			sandyScript.add(function () {sandyPageMenu.show()},500);
			sandyScript.add(function () {sandyPage.showPage()},0);
			sandyLoader.preload(function () {sandyScript.run()});
		} else {
			this.showError('An error occured while loading data from server...');
		}

	},

	initForm : function (oDiv) {

		this.oForm = {};
		var a = oDiv.getElementsByTagName("form");
		if (!a.length) return false;
		this.oForm.elem = a[0];
		this.oForm.target = a[0].getAttribute("rel");
		if (this.oForm.btn = this.oForm.elem['sbtn']) {
			this.oForm.btn.disabled = true;
			this.oForm.btn.onclick = function () {
				if (sandyPage.fBuzy) return sandyUtils.block(e);
				sandyPage.processForm();
				return false;
			};
		} for (var i = 0; i < this.oForm.elem.length; i++) {
			if (this.oForm.elem[i].getAttribute("rel")) {
				this.oForm.elem[i].onkeyup = function () {
					for (var a = 0; a < sandyPage.oForm.elem.length; a++) {
						if (sandyPage.oForm.elem[a].value == '') {
							sandyPage.oForm.btn.disabled = true;
							return true;
						}
					} sandyPage.oForm.btn.disabled = false;
					return true;
				}
			}
		}
		
	},

	processForm : function () {

		var a,b;
		sandyPage.fBuzy = true;
		var data = new Array();
		this.oForm.btn.disabled = true;
		for (var i = 0; i < this.oForm.elem.length; i++) {
			if (this.oForm.elem[i].getAttribute("rel")) {
				data.push(this.oForm.elem[i].name+"="+this.oForm.elem[i].value);
			}
		} var cBack = function (msg,state) {
			sandyPage.getForm(msg,state);
		}; sandyXml.postString(this.oForm.target,data.join('&'),cBack);		

	},

	getForm : function (tData,oState) {

		if (oState) {
			sandyPage.fBuzy = false;
			this.oForm.elem.style.display = 'none';
		} else {
			this.showError('An error occured while loading data from server...');
		}

	},

	showError : function (msg) {

		alert(msg);
		sandyLoader.stop();
		return false;

	}

}

var sandyPageMenu = {

	items : null,
	sCount : 0,
	oElem : null,
	active: 0,
	isPage : null,
	shown : false,

	init : function (oDiv,isPage) {

		this.sCount = 0;		
		this.isPage = isPage ? true : false;
		this.items = new Array();
		this.oElem = oDiv;
		this.oElem.style.visibility = 'hidden';
		var oLinks = oDiv.getElementsByTagName("a");
		for (var i = 0; i < oLinks.length; i++) {
			if (oLinks[i].getAttribute("rel") == 'section') {
				this.sCount++;
				var block = this.isPage ? sandyUtils.getElem(oDiv.childNodes[0],'div','block'+oLinks[i].getAttribute("pid")) : document.getElementById("section"+oLinks[i].getAttribute("pid"));
				this.items[this.sCount] = this.create(oLinks[i],block);
			}
		}

	},

	create : function (oElem,oBlock) {
		
		var oRef = {};
		var oId = this.sCount;
		oRef.elem = oElem;
		oRef.active = false;
		oRef.elem.className = "";
		oRef.items = new Array();
		if (oElem.getAttribute("rel") == 'section' && (oRef.block = oBlock)) {
			oRef.block.style.display = 'none';
			if (this.isPage) {
				oRef.elem.onclick = function (e) {
					if (!sandyPage.fBuzy) {
						sandyPage.catalog(oId); 
					} return false;
				}; 
			} else {
				oRef.elem.onclick = function (e) {
					if (!sandyPage.fBuzy) {
						sandyPage.section(oId); 
					} return false;
				}; 
			} var oLinks = oRef.block.getElementsByTagName("a");
			for (var i = 0; i < oLinks.length; i++) {
				if (oLinks[i].getAttribute("rel") == 'dynalink') {
					if (this.isPage) {
						var oLink = {};
						oLink.id = Number(oLinks[i].getAttribute("pid"));
						oLink.elem = oLinks[i].parentNode;
						oRef.items.push(oLink);
					} var a = new sandyPageLink(oLinks[i].pathname);
					oLinks[i].href = a.rel();
					oLinks[i].setAttribute("rel",a.href());
					oLinks[i].onclick = function (e) {						
						return sandyPageMenu.click(e);
					};
				}
			} 
		} return oRef;

	},
		
	show : function () {

		if (sandyPage.pageId) this.activate(sandyPage.pageId);
		if (this.oElem.style.visibility == 'visible') {
			return sandyScript.run();
		} sandyUtils.opacity(0,this.oElem);
		this.oElem.style.visibility = 'visible';
		var cBack = function () {
			sandyUtils.opacity(100,sandyPageMenu.oElem);
			sandyPageMenu.oElem.style.background='transparent';
			sandyScript.run();
		}; var anim = function (a) {
			sandyUtils.opacity(a * 5,sandyPageMenu.oElem);
		}; var a = sandyUtils.animator(20,50,anim,cBack);
		a.run();

	},
	
	hide : function () {

		for (var i = 1; i <= this.sCount; i++) {
			if (this.items[i].active) {
				this.items[i].active = false;
				this.items[i].elem.className = "";
				if (this.items[i].block) this.items[i].block.style.display = 'none';
			}
		} sandyScript.run();

	},

	expand : function (oId) {

		for (var i = 1; i <= this.sCount; i++) {
			if (!this.items[i].active) {
				if (this.items[i].block) this.items[i].block.style.display = (i == oId) ? 'block' : 'none';
			}
		} 

	},

	activate : function (oId) {

		var state;
		for (var i = 1; i <= this.sCount; i++) {
			state = false;
			for (var a = 0; a < this.items[i].items.length; a++) {								
				if (oId == this.items[i].items[a].id) {
					state = true;
					this.items[i].items[a].elem.className = 'active';
				} else {
					this.items[i].items[a].elem.className = '';
				}
			} if (state) {
				this.items[i].active = true;
				this.items[i].elem.className = 'active';
				if (this.items[i].block) this.items[i].block.style.display = 'block';
			} else {
				this.items[i].active = false;
				this.items[i].elem.className = '';				
				if (this.items[i].block) this.items[i].block.style.display = 'none';
			}
		} 

	},

	click : function (e) {

		if (sandyPage.fBuzy) return false;
		var target = e ? e.target : window.event.srcElement;
		var pageId = Number(target.getAttribute("pid"));
		if (sandyPage.pageId == pageId) return false;
		sandyPage.navigate(target.getAttribute("rel"));
		return true;

	},

	select : function (oId) {

		this.items[oId].active = true;
		this.items[oId].elem.className = 'active';
		if (this.items[oId].block) {
			this.items[oId].block.childNodes[0].style.left = '190px';
			this.items[oId].block.style.display = 'block';			
			var anim = function (a) {
				sandyPageMenu.items[oId].block.childNodes[0].style.left = Math.round(sandyUtils.fCubicOut(a,0,195,20) * -1 +195)+'px';
			}; var cBack = function () {
				sandyScript.run();
			}; var a = sandyUtils.animator(20,30,anim,cBack);
			a.run();
		} else {
			sandyScript.run();
		}

	}

}

var sandyPageSplines = {

	splines : null,
	groups : null,
	group_ref : null,
	loaded : false,
	sCount : 0,
	fCount : 30,
	active: 0,
	fStills : 0,

	init : function (sCfg,oDiv) {

		var o;
		this.sCount = 0;
		this.splines = new Array();
		this.groups = new Array();
		this.group_ref = new Array();
		var a = sCfg.split('|');
		for (var i = 0; i < a.length; i++) {
			if ((o = this.create(a[i].split(':'))) !== false) {
				this.sCount++;
				this.splines[this.sCount] = o;
				oDiv.appendChild(o.elem);				
			}
		} 

	},

	create : function (s) {

		var o = {shown:false};
		o.src = '/img/'+s.shift()+'.png';
		o.wait = Number(s.shift());
		o.group = s.shift();
		if (!this.groups[o.group]) {
			this.group_ref[this.group_ref.length] = o.group;
			this.groups[o.group] = new Array();
		} this.groups[o.group].push(o);
		o.width = s.shift();
		o.height = s.shift();
		o.topM = s.shift();
		o.leftM = s.shift();
		o.topP = s.shift();
		o.leftP = s.shift();
		if (o.wait > this.fStills) this.fStills = o.wait;
		o.elem = document.createElement('div');
		sandyUtils.props(o.elem.style,'position,absolute,width,'+o.width+'px,height,'+o.height+'px,zIndex,'+o.group+',top,'+o.topM+'px,left,'+o.leftM+'px,visibility,hidden');
		var a = o.elem.appendChild(document.createElement('img'));
		sandyUtils.props(a.style,"width,"+o.width+"px,height,"+o.height+"px,padding,0px,margin,0px");		
		sandyLoader.defer(o.src);
		o.curve = this.createCurve(Number(o.leftM),s,Number(o.leftP));
		o.curve[6] = this.calcCurve(Number(o.topM) - Number(o.topP),-1,Number(o.topM));
		return o;

	},

	createCurve : function (s,z,w) {

		var a,b;
		var y = new Array ();
		if (z.length) {
			for (a = 0; a < z.length; a++) z[a] = Number(z[a]);
			y[0] = new Array();
			for (a = 0; a < z.length; a++) {
				y[a+1] = new Array();
				y[0][5] = this.calcCurve(s < w ? w - s : s - w,s < w ? 1 : -1,s);
				y[0][a+1] = this.calcCurve(s < z[a] ? z[a] - s : s - z[a],s < z[a] ? 1 : -1,s);
				y[a+1][5] = this.calcCurve(w < z[a] ? z[a] - w : w - z[a],w < z[a] ? -1 : 1,z[a]);				
			} for (a = 0; a < z.length - 1; a++) {				
				for (b = a; b < z.length - 1; b++) {
					y[a+1][b+2] = this.calcCurve(z[a] < z[b+1] ? z[b+1] - z[a] : z[a] - z[b+1],z[a] < z[b+1] ? 1 : -1,z[a]);					
					y[b+2][a+1] = this.calcCurve(z[a] < z[b+1] ? z[b+1] - z[a] : z[a] - z[b+1],z[b+1] < z[a] ? 1 : -1,z[b+1]);
				}
			}
		} return y;

	},

	calcCurve : function (pos,sign,s) {

		var a = new Array();
		for (var i = 1; i <= this.fCount; i++) {					
			a.push(Math.round(sandyUtils.fCubicInOut(i,0,pos,this.fCount) * sign)+s);
		} return a;

	},

	show : function (g) {

		this.postload();
		for (var z = 0; z < this.groups[g].length; z++) {
			this.groups[g][z].shown = true;
			sandyUtils.opacity(0,this.groups[g][z].elem);
			this.groups[g][z].elem.style.visibility = 'visible';
		} var anim = function (a) {
			for (var z = 0; z < sandyPageSplines.groups[g].length; z++) {
				sandyUtils.opacity(a * 10,sandyPageSplines.groups[g][z].elem);
			} 
		}; var cBack = function () {
			for (var z = 0; z < sandyPageSplines.groups[g].length; z++) {
				sandyUtils.opacity(100,sandyPageSplines.groups[g][z].elem);
			} sandyScript.run();
		}; var a = sandyUtils.animator(10,40,anim,cBack,0);
		a.run();

	},

	reveal : function (m) {

		if (m) return this.postload(true);
		for (var i = 0; i < this.group_ref.length; i++) {
			sandyScript.add(function (a) {sandyPageSplines.show(a);},250,this.group_ref[i]);
		}

	},

	minimize : function () {

		if (this.active != 6) {
			sandyScript.add(function () {sandyPageSplines.slide(5)},200);
			sandyScript.add(function () {sandyPageSplines.move(true)},500);			
		}

	},
	
	postload : function (m) {

		if (this.loaded) return true;
		for (var i = 1; i <= this.sCount; i++) {
			sandyUtils.png(this.splines[i].elem.childNodes[0],this.splines[i].src);
			if (m) {
				this.splines[i].elem.style.visibility = 'visible';
				this.splines[i].shown = true;
			}
		} 

	},

	move : function () {

		if (this.active == 6) {
			sandyScript.run();
			return false;
		} this.active = 6;
		sandyPage.toggleLang(false);
		var c = this.active;
		var anim = function (a) {
			for (var i = 1; i <= sandyPageSplines.sCount; i++) {
				if (a < sandyPageSplines.splines[i].wait || a >= sandyPageSplines.splines[i].curve[6].length+sandyPageSplines.splines[i].wait) continue;
				sandyPageSplines.splines[i].elem.style.top = sandyPageSplines.splines[i].curve[6][a-sandyPageSplines.splines[i].wait]+'px';
			}; 
		}; var cBack = function () {
			sandyPage.toggleLang(true,true);
			sandyScript.run();
		}; var a = sandyUtils.animator(this.fCount+this.fStills,30,anim,cBack);
		a.run();

	},

	slide : function (oId) {
		
		if (this.active == 6) {
			sandyScript.run();
			return false;
		} var c = this.active;
		this.active = oId;
		var anim = function (a) {
			for (var i = 1; i <= sandyPageSplines.sCount; i++) {
				if (a < sandyPageSplines.splines[i].wait || a >= sandyPageSplines.splines[i].curve[c][oId].length+sandyPageSplines.splines[i].wait) continue;
				sandyPageSplines.splines[i].elem.style.left = sandyPageSplines.splines[i].curve[c][oId][a-sandyPageSplines.splines[i].wait]+'px';
			}; 
		}; var cBack = function () {sandyScript.run()} 
		var a = sandyUtils.animator(this.fCount+this.fStills,30,anim,cBack);
		a.run();

	}

}

var sandyLoader = {

	oElem : null,
	fCount : 10,	
	oSrc : '/img/loader.gif',
	oDim : {x : 68, y : 67},
	fState : 0,
	fStep : 0,
	uSec : 75,
	fTimer : null,
	cBack : false,

	init : function () {		
		
		this.oElem = document.body.appendChild(document.createElement("DIV"));		
		sandyUtils.props(this.oElem.style,"display,none,position,absolute,top,50%,marginTop,-"+Math.round(this.oDim.y/2)+"px,marginLeft,-"+Math.round(this.oDim.x/2)+"px,left,50%,zIndex,100,width,"+this.oDim.x+"px,height,"+this.oDim.y+"px");
		var a = document.createElement("img");
		sandyUtils.props(a.style,"width,"+this.oDim.x+"px,height,"+this.oDim.y+"px,padding,0px,margin,0px");
		a.src = this.oSrc;
		this.oElem.appendChild(a);
		this.fTimer = null;

	},

	animate : function () {

		this.fState += this.fStep;
		if (this.fStep > 0) {
			if (this.fState >= 100) {
				this.fState = 100;
				this.fStep = this.fCount * -1;
			}
		} else {
			if (this.fState <= 0) {
				this.fState = 0;
				this.fStep = this.fCount;
			}
		} sandyUtils.opacity(this.fState,this.oElem);
	
	},

	defer : function (pUrl) {

		this.pictures.push(pUrl);

	},

	preload : function (cBack) {

		var a;
		this.cBack = cBack;
		if (this.pictures.length == 0) {
			this.stop();
			this.cBack();
		} else {
			this.lCount = this.pictures.length;			
			this.items = new Array();
			for (var i = 0; i < this.pictures.length; i++) {
				this.items.push(new Image());
				this.items[i].onload = function () { sandyLoader.loaded(); }
				this.items[i].src = this.pictures[i];
			}
		}

	},
	
	loaded : function () {

		this.lCount--;
		if (this.lCount <= 0 && this.cBack) {			
			this.stop();
			this.cBack();
		}

	},

	start : function () {

		this.fState = 0;
		this.fStep = this.fCount;
		this.pictures = new Array();
		this.oElem.style.display = 'block';
		sandyUtils.opacity(this.fState,this.oElem);
		this.fTimer = setInterval("sandyLoader.animate()",this.uSec);

	},

	stop : function () {

		if (this.fTimer) clearInterval(this.fTimer);
		this.fTimer = null;
		this.oElem.style.display = 'none';

	}

}

var sandyUtils = {

	block : function (e) {e = !e ? window.event : e;e.cancelBubble = true;return false;},	
	unshiftChild : function (o,t) {if (o.childNodes.length) return o.insertBefore(document.createElement(t),o.childNodes[0]);return o.appendChild(document.createElement(t));},
	fLinear : function (t, b, c, d) {return c*t/d + b;},
	fCubicOut : function (t, b, c, d) {return c*((t=t/d-1)*t*t + 1) + b;},
	fCubicInOut : function (t, b, c, d) {if ((t/=d/2) < 1) return c/2*t*t*t + b;return c/2*((t-=2)*t*t + 2) + b;},
	getElem : function (o,t,c) {var p = o;do{if (p.tagName && p.tagName.toLowerCase() == t) {if (c) {if (p.className == c || p.getAttribute("id") == c) return p} else {return p}}} while (p = p.nextSibling);return false},
	animator : function (f,u,c,k,z) {var o = {};o.f = f;o.u = u;o.c = c;o.k = k;o.z = z ? z : 0;o.a = function () {if (o.b == o.f) {clearInterval(o.i);if (o.k) {if (o.z) {setTimeout(o.k,o.z);} else {o.k();}}return;} o.c(o.b);o.b++;}; o.run = function () {o.b = 0;o.i = setInterval(o.a,o.u);}; return o;},
	png : function (o,i) {var a = navigator.appVersion.split("MSIE");var b = parseFloat(a[1]);if ((b >= 5.5) && (document.body.filters)) {o.src = '/img/em.gif';o.style.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='" + i + "', sizingMethod='scale')";} else {o.src = i;}},
	props : function (o,s) {var h = s.split(",");for (var i = 0; i < h.length; i+=2) eval('o.'+h[i]+' = "'+h[i+1]+'"');},
	opacity : function (v,o) {if (v == 100) {if (o.style.removeAttribute) o.style.removeAttribute('filter');} else {o.style.filter = "alpha(opacity=" + v + ")";} o.style.opacity = (v / 100);}

}

var sandyXml = {

	fetchString:function(u){var r=this.c(u);if(r.e)return false;return r.d()},
	getString:function(u,f){var r=this.c(u,0,f);if(r.e)return false;return r.d()},
	sendString:function(u,d){var r=this.c(u,0,false,d);if(r.e)return false;r.d();return true},
	postString:function(u,d,f){var r=this.c(u,0,f,d);if(r.e)return false;r.d();return true},
	fetchXml:function(u){var r=this.c(u,1);if(r.e)return false;return r.d()},	
	getXml:function(u,f){var r=this.c(u,1,f);if(r.e)return false;r.d();return true},
	c:function(){
		var a=arguments;
		var r={e:false,u:a.length?a[0]:false,t:a.length>1?a[1]:0,a:a.length>2?true:false,c:a.length>2?a[2]:false,m:a.length>3?"POST":"GET",b:a.length>3?a[3]:null};
		try{r.x=new ActiveXObject("Microsoft.XMLHTTP")}catch(e){try{r.x=new ActiveXObject("Msxml2.XMLHTTP")}catch(e){try{r.x=new XMLHttpRequest()}catch(e){r.e=true;return false}}}
		r.d=function(){r.x.open(this.m,this.u,this.a);
		if(this.m == "POST"){r.x.setRequestHeader("Content-type", "application/x-www-form-urlencoded");r.x.setRequestHeader("Content-length", this.b.length);r.x.setRequestHeader("Connection", "close")}
		if(this.a && this.c){r.x.onreadystatechange=function(){if(r.x.readyState != 4){return}clearTimeout(r.timeout);
		if(r.x.status != 200){if(r.timeout){r.c(new Error(101,'XML_BAD_REQUEST'),false)}else{r.c(new Error(102,'XML_SERVER_TIMEOUT'),false)}}else{r.c(r.t?r.x.responseXML:r.x.responseText,true)}};
		r.timeout=setTimeout(function(){r.timeout=false;r.x.abort()},15000);r.x.send(this.b);
		}else{r.x.send(this.b);if(r.x.status != 200){throw new Error(101,'XML_BAD_REQUEST')}return this.t?r.x.responseXML:r.x.responseText}
		}; return r;			
	} 

}

window.onload = function () {
	var a,b;
	if ((a = document.getElementById("sitePane")) && (b = document.getElementById('SiteMenu'))) {
		var c = 'spline1left:3:4:709:650:0:250:-250:160:100:150:350:400|spline1right:3:4:708:650:0:2042:-250:1990:1892:1942:2142:2192|spline2left:2:3:613:415:100:580:-110:530:380:510:660:780|spline2right:2:3:613:415:100:1767:-110:1720:1567:1697:1847:1967|spline3:1:2:900:200:203:1040:0:935:750:930:1100:1290|spline4:0:1:520:120:260:1230:60:1105:906:1105:1305:1505|circle:4:5:276:439:142:1150:-210:970:825:1025:1226:1427';
		sandyPage.init(a,b,c);
	} 
}