// PhysioTec scripts.
// rgInfo.js.  Version 0.1.0.
// CyDot, 2009-12-20.
function PageInfo (title, subtitle, text) {
this.title =title;
this.subtitle =subtitle;
this.text =text;
}
rgInfos =new Array();
rgInfos[0] =new PageInfo(
"Einfühlsamkeit", 
"", 
""
);
rgInfos[1] =new PageInfo(
"Beziehung", 
"", 
""
);
rgInfos[2] =new PageInfo(
"Erdung", 
"Gehhilfen", 
""
);
rgInfos[3] =new PageInfo(
"Halt / Geborgenheit", 
"Sitzsysteme", 
""
);
rgInfos[4] =new PageInfo(
"Mobilität", 
"Kinderwagen / Kinderrollstühle", 
""
);
rgInfos[5] =new PageInfo(
"Stehvermögen / Augenhöhe", 
"Stehhilfen", 
""
);
rgInfos[6] =new PageInfo(
"Verantwortung", 
"Verwaltung / Vertrieb", 
"Im Vordergrund steht das Bemühen, \n" +
"ein kindgerechtes Leben zu ermöglichen."
);
rgInfos[7] =new PageInfo(
"Individualität", 
"Ortho-Werkstatt / Reha-Werkstatt", 
"Unser Ziel ist es die Einzigartigkeit jedes Kindes \n" +
"so zu unterstützen, um durch optimale Entwicklung \n" +
"den Weg in ein eigenständiges Leben zu finden."
);
// PhysioTec scripts.
// rgContent.js.  Version 0.1.2.
// CyDot, 2009-12-21.
// Rundgang (rg)  -------------------------------------------
var sections;
var rgSize =8;
var pageNr =1;
var leadingZero ="0";
var horizontalX =210;
var horizontalY =140;
var verticalFormats =[2];
var imgOrientation =false;
var imgPath ="_img/_gallery/"
// IF ------------------------------------------------
function goPage (nr) {
pageNr =nr *1;
leadingZero =(pageNr <10) ? "0" : "";
setImgOrientation();
setPageContent();
}
function nextPage () {
pageNr++;
select();
}
function previousPage () {
pageNr--;
select();
}
function select () {
if (pageNr >rgSize) pageNr =1;
else if (pageNr <1) pageNr =rgSize;
if (sections) sections.select(pageNr);
}
// -------------------------------------------------
function setPageContent () {
setTitleBar();
loadImgA();
loadText();
loadImgB();
}
function loadImgA () {
getTrg("imgA").src =imgPath +"gA_" +leadingZero +pageNr +".jpg";
if (!imgOrientation) {
var w =horizontalX;
var h =horizontalY;
}
else {
var w =horizontalY;
var h =horizontalX;
}
getTrg("imgA").width =w;
getTrg("imgA").height =h;
}
function loadImgB () {
getTrg("imgB").src =imgPath +"gB_" +leadingZero +pageNr +".jpg";
}
function loadText () {
var info =rgInfos[pageNr -1];
// Load title.
getTrg("title").firstChild.nodeValue =info.title;
// Load subtitle.
var elemST =getTrg("subtitle").firstChild;
elemST.nodeValue =info.subtitle;
if (!info.subtitle.length) {
elemST.nodeValue =".";
setTimeout(function () {elemST.nodeValue ="";}, 50);
}
// Load text.
getTrg("text").firstChild.nodeValue =info.text;
}
function setTitleBar () {
}
function setImgOrientation(){
for (var i =0; i <verticalFormats.length; i++) {
if (pageNr==verticalFormats[i]) return imgOrientation =true;
}
imgOrientation =false;
}
// Arrows -----------------------------------------
function changeIcon(id, name, status) {	
var path ="_img/" +name +"_" +status +".gif";
getTrg(id).src =path;
}
// PhysioTec scripts.
// section.js.  Version 0.1.2.
// CyDot, 2010-01-14.
// Costructor function -----------------------------------------------
function Sections (menu, amount) {
// Public properties --------------
this.menu =menu;
this.amount =amount;
this.overColor ="#FFFFFF";
this.outColor ="transparent";
this.selectedColor ="#EE7700";
this.deselectedColor ="#4E80B0";
// Private properties --------------
var inst =this;
var selection;
// Public method asignment ------
this.activateSection =activateSection;
this.deactivateSection =deactivateSection;
this.highlightSection =highlightSection;
this.selectElement =selectElement;
this.markSelection =markSelection;
this.unmarkSelection =unmarkSelection;
// Private methods ----------------
sections =inst;
// Public methods ----------------
function activateSection (element) {
element.onmouseover =function () {
inst.menu.overStatus =true;
inst.highlightSection(this, true);
}
element.onmouseout =function () {
inst.menu.overStatus =false;
inst.highlightSection(this, false);
}
element.onmouseup =function () {
inst.selectElement(this);
}
}
function deactivateSection (element) {
element.onmouseover =function () {}
element.onmouseup =function () {}
}
function highlightSection (element, on) {
var col =(on) ? inst.overColor : inst.outColor;
element.style.backgroundColor =col;
}
function selectElement (element) {
var idB =inst.menu.name;
var id =element.id;
var nr =1 *id.substr(idB.length);
if (inst.menu.current) {
updateSection(nr, element);	
goPage(nr);
deactivateSection(element);
}
else {
storeSection(nr);
var url =idB +".html";
location.href =url;
}
}
function storeSection (nr) {
Storage.set("selection", nr);
setCookie("selection", nr, 2);
}
function updateSection (nr, element) {	
if (selection) {
unmarkSelection();
activateSection(selection);
selection.onmouseout();
}
markSelection(nr, element);
element.onmouseout();
}
function markSelection (nr, element) {
selection =element;
var titleElement =getTrg("runTitle" +nr);
titleElement.style.color =inst.selectedColor;
}
function unmarkSelection () {
var idB =inst.menu.name;
var id =selection.id;
var nr =1 *id.substr(idB.length);
var titleElement =getTrg("runTitle" +nr);
titleElement.style.color =inst.deselectedColor;
}
}
// Method anexation -----------------------------------------------
Sections.prototype.activate =function (nr) {
var element;
var amount =nr || this.amount;
nr =nr || 1;
for (var i =nr; i <=amount; i++) {
element =getTrg(this.menu.name +i);
this.activateSection(element);
}
}
Sections.prototype.deactivate =function (nr) {
var element;
var amount =nr || this.amount;
nr =nr || 1;
for (var i =nr; i <=amount; i++) {
element =getTrg(this.menu.name +i);
this.deactivateSection(element);
}
}
Sections.prototype.select =function (nr) {
var element =getTrg(this.menu.name +nr);
this.selectElement(element);
}
// PhysioTec scripts.
// menu.js.  Version 0.1.2
// CyDot, 2009-12-20.
// Costructor function -----------------------------------------------
function Menu (name, naviLink, amount, fromY, toY, duration) {
// Public properties --------------
this.name =name;
this.id =this.name +"Menu";
this.linkID =this.name +"Link";
this.duration =duration || 330;
this.fromY =fromY;
this.toY =toY;
this.positionY =fromY;
this.posStatus ="down";
this.overStatus =false;
this.sections =new Sections(this, amount);
this.naviLink =naviLink;
this.current =false;
this.tween =new PositionTween(this.id, duration, fromY, toY, "y", ["OUT", "expo", 3], this);
// Private properties --------------
var inst =this;
// Private methods ----------------
function initEvents () {
var element =getTrg(inst.id);
element.onmouseover =function () {
inst.overStatus =true;
}
element.onmouseout =function () {
inst.close();
}
inst.sections.activate();
}
initEvents();
// Public methods ----------------
// PositionTween event.
this.onTweenStop =function (eO) {
this.tween.reverse();
if (eO.pos==1) inst.posStatus="up";
if (eO.pos==0) inst.posStatus="down";
}
this.move =function (dir) {
this.highlightLink(this.overStatus);
if (dir=="up") {
if (! this.overStatus) return;
this.posStatus =undefined;
this.tween.play();
}
else {
if (this.overStatus) return;
this.posStatus =undefined;
this.tween.play();
}
}
}
// Method anexation -----------------------------------------------
Menu.prototype.open =function () {
this.overStatus =true;
var inst =this;
if (this.posStatus=="down") {
this.waiting =setTimeout(function () {inst.move('up');}, 200);
}
}
Menu.prototype.close =function () {
this.overStatus =false;
var inst =this;
if (this.posStatus=="up") {
this.waiting =setTimeout(function () {inst.move('down');}, 200);
}
}
Menu.prototype.highlightLink =function (on) {
if (on) this.naviLink.highlight("over");
else this.naviLink.highlight("out");
}
// PhysioTec scripts.
// navi.js.  Version 0.1.2.
// CyDot, 2009-12-20.
function init(name) {
initResize();
initNavi(name);
}
var naviName;
var allLinkNames =["philosophie", "rundgang", "kontakt"];
var linkNames =["philosophie", "kontakt"];
var menuNames =["rundgang"];
var linkImgPath ="_img/_navi/";
var links ={};
var menus ={};
var activeMenu;
var linkOverColor ="#FFFFFF";
var linkOutColor ="#C9D1D6";
var linkSelColor ="#EE7700";
// NaviLinks --------------------------------------------------
function NaviLink (name, id, path) {
this.name =name;
this.id =id;
this.path =path;
this.element =getTrg(id);
var inst =this;
this.activate =activate;
this.getObj =function () {
return getTrg(this.id);
}
function activate () {
this.element.onmouseover =function () {
inst.highlight("over");
}
this.element.onmouseout =function () {
inst.highlight("out");
}
}
this.highlight =function (state) {
this.element.src =this.path +name +"_" +state +".gif";
}
this.mark =function () {
this.element.src =this.path +name +"_marked.gif";
}
}
// --------------------------------------------------------------
function initNavi (name) {
naviName =name;
initNaviLinks();
actvateMenus();
}
function initNaviLinks () {
var name, id;
for (var i =0; i <allLinkNames.length; i++) {
name =allLinkNames[i];
id =name +"Link";
links[name] =new NaviLink(name, id, linkImgPath);
if (naviName !=name) links[name].activate();
}
}
function actvateMenus () {
var idB, idM, idL, nr;
for (var i =0; i <menuNames.length; i++) {
idB =menuNames[i];
idL =idB +"Link";
menus[idB] =new Menu(idB, links[idB], 8, 0, -327, 0.4);
proofCurrent(idB);
getTrg(idL).onmouseover =function () {
activeMenu =getMenu(this.id);
activeMenu.open();
}
getTrg(idL).onmouseout =function () {
activeMenu =undefined;
getMenu(this.id).close();
}
}
}
// -----------------------------------------------------
function proofCurrent (idB) {
var menu =menus[idB];
if (idB==naviName) {
menu.current =true;
menu.sections.select(getStrored("selection"));
return true;
}
menu.current =false;
return false;
}
function isCurrent (idB) {
var b =(idB==naviName) ? true : false;
return b;
}
function getMenu (idL) {
return menus[getIDB(idL)];
}
function getIDB (idL) {
return idL.substr(0, idL.length -4);
}
function getStrored (name) {
var value =readCookie(name) || Storage.get(name);
if (!value) value =1;
return value;
}

