var navBarParameters = new Object();navBarParameters.backgroundColor = "#FFFFFF";navBarParameters.navBarWidth = "98%";navBarParameters.linkColor = "#999999";navBarParameters.linkColorHover = "#FF6600";navBarParameters.linkToCurrentPageColor = "#000000";navBarParameters.disabledLinkColor = "#e0e0e0";navBarParameters.userSignedAs = "";navBarParameters.helpBox_urlRootPath = "http://web.pozbierane.pl/";navBarParameters.helpBox_lang = "en";navBarParameters.helpBox_fileSuffix = "_pozbierane";navBarParameters.helpBox_helpTitle = "help";navBarParameters.helpBox_aboutTitle = "about";navBarParameters.navBar_style_position= "absolute";var leftLinkArray = new Array();var homeLink = new Object();homeLink.id = 'homeLink';homeLink.name = 'home';homeLink.isAccessible = false;homeLink.isVisible = false;homeLink.href = 'http://www.djinngo.com/masterPage/site/djinngo/index.php';homeLink.onclick = '';homeLink.actived = '';leftLinkArray.push(homeLink);var webLink = new Object();webLink.id = 'webLink';webLink.name = 'web';webLink.isAccessible = true;webLink.isVisible = true;webLink.href = 'http://web.pozbierane.pl/wt/site/pozbierane/index.php';webLink.onclick = '';webLink.actived = '1';leftLinkArray.push(webLink);var mobileLink = new Object();mobileLink.id = 'mobileLink';mobileLink.name = 'mobile';mobileLink.isAccessible = true;mobileLink.isVisible = true;mobileLink.href = 'http://www.pozbierane.pl/masterPage/site/pozbierane/mobile.php';mobileLink.onclick = '';mobileLink.actived = '';leftLinkArray.push(mobileLink);var blogLink = new Object();blogLink.id = 'blogLink';blogLink.name = 'społeczność';blogLink.isAccessible = true;blogLink.isVisible = true;blogLink.href = 'http://spolecznosc.pozbierane.pl/communityPage/site/index.php';blogLink.onclick = '';blogLink.actived = '';leftLinkArray.push(blogLink);var galleryLink = new Object();galleryLink.id = 'galleryLink';galleryLink.name = 'gallery';galleryLink.isAccessible = false;galleryLink.isVisible = true;galleryLink.href = 'http://gallery.djinngo.com/gallery/index.html?locale=en_EN';galleryLink.onclick = '';galleryLink.actived = '';leftLinkArray.push(galleryLink);var birthdayLink = new Object();birthdayLink.id = 'birthdayLink';birthdayLink.name = 'birthday';birthdayLink.isAccessible = false;birthdayLink.isVisible = false;birthdayLink.href = '#';birthdayLink.onclick = '';birthdayLink.actived = '';leftLinkArray.push(birthdayLink);var publisherLink = new Object();publisherLink.id = 'publisherLink';publisherLink.name = 'publisher';publisherLink.isAccessible = false;publisherLink.isVisible = true;publisherLink.href = 'http://publisher.djinngo.com/publisher/index.html';publisherLink.onclick = '';publisherLink.actived = '';leftLinkArray.push(publisherLink);navBarParameters.leftLinks = leftLinkArray;var rightLinkArray = new Array();var signin = new Object();signin.id = 'signin';signin.name = 'sign-in';signin.isAccessible = true;signin.isVisible = true;signin.href = '#';signin.onclick = 'Authentication.showLoginDialog("AuthenticationWidgetId", "http://web.pozbierane.pl/wt/site/pozbierane/index.php", "..", "pozbierane", "pozbierane");';signin.actived = '';rightLinkArray.push(signin);var signup = new Object();signup.id = 'signup';signup.name = 'sign-up';signup.isAccessible = true;signup.isVisible = true;signup.href = '#';signup.onclick = 'window.open(Authentication.getRegistrationUrl("http://web.pozbierane.pl/wt/site/pozbierane/index.php", "pozbierane", "pozbierane", "", ""), "_self");';signup.actived = '';rightLinkArray.push(signup);var help = new Object();help.id = 'help';help.name = 'help';help.isAccessible = true;help.isVisible = true;help.href = '#';help.onclick = 'HelpDlg.display("../../../", "_pozbierane", "Pozbierane");';help.actived = '';rightLinkArray.push(help);navBarParameters.rightLinks = rightLinkArray;/**
* @author Sylvain LALANDE (SII)
* @created 02/04/2009
* @file navBarTemplate.js
*/
var navBar = new Object();
// DEBUG VARS
navBar.debug = false;
navBar.error = null;
navBar.isIE = function(){ try { return parseFloat(navigator.appVersion.split("MSIE ")[1].split(";")[0]); } catch (e) {}; }();
navBar.consoleOK = ((navBar.isIE == null) || (navBar.isIE && typeof(console) != 'undefined'));
// STYLE Parameters
navBar.styleSheetRules = '';
navBar.backgroundColor = '#FFFFFF';
navBar.navBarWidth = '100%';
navBar.linkColor = '#000000';
navBar.linkColorHover = '#FF6600';
navBar.linkToCurrentPageColor = '#000000';
navBar.disabledLinkColor = '#e0e0e0';
navBar.userSignedAs = '';
navBar.navBar_style_position = 'absolute';
// HELP PARAMS
navBar.helpBox_urlRootPath = ''; // Used to find file about "help" and "about"
navBar.helpBox_lang = 'en'; // en, fr, pl...
navBar.helpBox_fileSuffix = ''; // Empty for djinngo, can be set as '_pozbierane' for example
navBar.helpBox_helpTitle = '';
navBar.helpBox_aboutTitle = '';
navBar.helpBox_created = false;
navBar.leftLinks = new Array();
navBar.rightLinks = new Array();
if (typeof(navBarParameters) != 'undefined') {
if (typeof navBarParameters.backgroundColor != 'undefined') navBar.backgroundColor = navBarParameters.backgroundColor;
if (typeof navBarParameters.linkColor != 'undefined') navBar.linkColor = navBarParameters.linkColor;
if (typeof navBarParameters.linkColorHover != 'undefined') navBar.linkColorHover = navBarParameters.linkColorHover;
if (typeof navBarParameters.linkToCurrentPageColor != 'undefined') navBar.linkToCurrentPageColor = navBarParameters.linkToCurrentPageColor;
if (typeof navBarParameters.disabledLinkColor != 'undefined') navBar.disabledLinkColor = navBarParameters.disabledLinkColor;
if (typeof navBarParameters.leftLinks != 'undefined') navBar.leftLinks = navBarParameters.leftLinks;
if (typeof navBarParameters.rightLinks != 'undefined') navBar.rightLinks = navBarParameters.rightLinks;
if (typeof navBarParameters.navBarWidth != 'undefined') navBar.navBarWidth = navBarParameters.navBarWidth;
if (typeof navBarParameters.userSignedAs != 'undefined') navBar.userSignedAs = navBarParameters.userSignedAs;
if (typeof navBarParameters.helpBox_urlRootPath != 'undefined') navBar.helpBox_urlRootPath = navBarParameters.helpBox_urlRootPath;
if (typeof navBarParameters.helpBox_lang != 'undefined') navBar.helpBox_lang = navBarParameters.helpBox_lang;
if (typeof navBarParameters.helpBox_fileSuffix != 'undefined') navBar.helpBox_fileSuffix = navBarParameters.helpBox_fileSuffix;
if (typeof navBarParameters.helpBox_helpTitle != 'undefined') navBar.helpBox_helpTitle = navBarParameters.helpBox_helpTitle;
if (typeof navBarParameters.helpBox_aboutTitle != 'undefined') navBar.helpBox_aboutTitle = navBarParameters.helpBox_aboutTitle;
if (typeof navBarParameters.navBar_style_position!= 'undefined') navBar.navBar_style_position = navBarParameters.navBar_style_position;
}
/**
* Display navigation Bar.
* @return false if an error occurs, true otherwise
*/
navBar.display = function() {
navBar.trace("affichage de la barre de navigation ...");
navBar.trace(navBar);
if (navBar.buildNavigationDiv() == false) {
navBar.setError("Cannot get djinngoNavBar div in page");
return false;
}
navBar.addLinkToDiv(navBar.leftLinks, navBar.djinngoNavBarLeft, 'left');
navBar.addUserSignedAsLabel(navBar.djinngoNavBarRight);
navBar.addLinkToDiv(navBar.rightLinks, navBar.djinngoNavBarRight, 'right');
navBar.insertStyleSheet();
navBar.trace("affichage de la barre de navigation OK");
}
/**
* Get Navigation Bar
* @return false if an error occurs, the navigation Bar otherwise
*/
navBar.buildNavigationDiv = function() {
navBar.trace("buildNavigationDiv...");
navBar.djinngoNavBar = document.getElementById('djinngoNavBar');
if (navBar.djinngoNavBar == null) {
return false;
}
navBar.djinngoNavBarBody = document.createElement('div');
navBar.djinngoNavBarBody.id = 'djinngoNavBarBody';
navBar.djinngoNavBarLeft = document.createElement('div');
navBar.djinngoNavBarLeft.id = 'djinngoNavBarLeft';
navBar.djinngoNavBarRight = document.createElement('div');
navBar.djinngoNavBarRight.id = 'djinngoNavBarRight';
navBar.djinngoNavBar.appendChild(navBar.djinngoNavBarBody);
navBar.djinngoNavBarBody.appendChild(navBar.djinngoNavBarLeft);
navBar.djinngoNavBarBody.appendChild(navBar.djinngoNavBarRight);
// Apply style
navBar.applyDjinngoNavBarStyle(navBar.djinngoNavBar);
navBar.applyDjinngoNavBarBodyStyle(navBar.djinngoNavBarBody);
navBar.applyDjinngoNavBarLeftStyle(navBar.djinngoNavBarLeft);
navBar.applyDjinngoNavBarRightStyle(navBar.djinngoNavBarRight);
}
navBar.addUserSignedAsLabel = function(div) {
if (navBar.userSignedAs != '') {
var span = document.createElement('span');
div.appendChild(span);
span.innerHTML = navBar.userSignedAs;
span.className = 'signedAsLabel';
var cssRule = 'margin: 0; padding: 0px;';
cssRule += 'margin-right:6px; padding-right:6px;';
cssRule += 'font-family: Arial, Helvetica, sans-serif;';
cssRule += 'font-size: 11px;';
cssRule += 'color: ' + navBar.linkColor + ';';
navBar.addCssRule('.navBar .navBarBody span.signedAsLabel', cssRule);
}
}
navBar.addLinkToDiv = function(links, div, position) {
for (i = 0; i < links.length; i++) {
var link = links[i];
var span = document.createElement('span');
var aLink = document.createElement('a');
span.appendChild(aLink);
div.appendChild(span);
aLink.id = link.id;
aLink.innerHTML = link.name;
if (link.isAccessible == true && link.actived == false) {
aLink.href = link.href;
}
if (link.onclick != '') {
aLink.executeonclick = link.onclick;
aLink.onclick = function() {
navBar.trace(this.executeonclick);
try {
eval(this.executeonclick);
} catch (e) {
navBar.setError(e);
}
};
}
if (position == 'left') {
navBar.applyLeftLinkStyle(span, aLink, link);
} else if (position == 'right') {
var isLeftPiped = false;
if (i > 0) {
isLeftPiped = true;
}
navBar.applyRightLinkStyle(span, aLink, link, isLeftPiped);
}
}
navBar.applyLinkStyle();
}
navBar.insertStyleSheet = function() {
var styleHead = document.createElement('style');
styleHead.setAttribute('type', 'text/css');
try {
if (styleHead.styleSheet) {
styleHead.styleSheet.cssText = navBar.styleSheetRules;
} else {
styleHead.appendChild(document.createTextNode(navBar.styleSheetRules));
}
} catch (e) {
navBar.setError(e);
}
document.getElementsByTagName('head')[0].appendChild(styleHead);
}
navBar.applyDjinngoNavBarStyle = function() {
navBar.djinngoNavBar.style.position = navBar.navBar_style_position;
navBar.djinngoNavBar.style.zIndex = '990';
navBar.djinngoNavBar.style.top = '0px';
navBar.djinngoNavBar.style.paddingTop = '11px';
navBar.djinngoNavBar.style.left = '0';
navBar.djinngoNavBar.style.height = '23px';
navBar.djinngoNavBar.style.margin = '0px auto';
//navBar.djinngoNavBar.style.padding = '11px 0 0';
navBar.djinngoNavBar.className = 'navBar';
navBar.djinngoNavBar.style.border = '0 none';
//navBar.djinngoNavBar.style.borderLeft = '1px solid #DDDDDD';
//navBar.djinngoNavBar.style.borderRight = '1px solid #DDDDDD';
navBar.djinngoNavBar.style.width = navBar.navBarWidth;
var cssRule = 'background-color: ' + navBar.backgroundColor + ';';
cssRule += 'border-left: 1px solid #DDDDDD;';
cssRule += 'border-right: 1px solid #DDDDDD;';
navBar.addCssRule('.navBar', cssRule);
}
navBar.setTop = function(topValue) {
navBar.djinngoNavBar.style.top = topValue;
}
navBar.applyDjinngoNavBarBodyStyle = function() {
navBar.djinngoNavBarBody.style.position = 'relative';
navBar.djinngoNavBarBody.className = 'navBar navBarBody';
var cssRule = 'margin: 0; padding: 0 15px;';
cssRule += 'font-family: Arial, Helvetica, sans-serif;';
cssRule += 'font-size: 12px;';
cssRule += 'border-left: 0px none;';
cssRule += 'border-right: 0px none;';
navBar.addCssRule('.navBar .navBarBody', cssRule);
cssRule = 'font-family: Arial, Helvetica, sans-serif;';
cssRule += 'font-size: 12px;';
cssRule += 'color: ' + navBar.linkColor + ';';
cssRule += 'text-decoration: none;';
navBar.addCssRule('.navBar .navBarBody a', cssRule);
navBar.addCssRule('.navBar .navBarBody a:hover', 'color: ' + navBar.linkColorHover + ';text-decoration: underline;');
}
navBar.applyDjinngoNavBarLeftStyle = function() {
navBar.djinngoNavBarLeft.className = 'navBar navBarLeft';
var cssRule = 'float: left;';
cssRule += 'border-left: 0px none;';
cssRule += 'border-right: 0px none;';
navBar.addCssRule('.navBar .navBarLeft', cssRule);
navBar.addCssRule('.navBar .navBarLeft a', 'font-weight: bold;text-decoration: none;');
navBar.addCssRule('.navBar .navBarLeft a.linkToCurrentPageColor', 'color: ' + navBar.linkToCurrentPageColor + ';text-decoration: none;');
navBar.addCssRule('.navBar .navBarLeft a.disabledLink', 'color: ' + navBar.disabledLinkColor + ';text-decoration: none; cursor: default;');
}
navBar.applyDjinngoNavBarRightStyle = function() {
navBar.djinngoNavBarRight.className = 'navBar navBarRight';
var cssRule = 'float: right;';
cssRule += 'border-left: 0px none;';
cssRule += 'border-right: 0px none;';
navBar.addCssRule('.navBar .navBarRight', cssRule);
navBar.addCssRule('.navBar .navBarRight a', 'font-weight: normal;text-decoration: none;');
navBar.addCssRule('.navBar .navBarRight a.disabledLink', 'color: ' + navBar.linkColor + ';text-decoration: none; cursor: default;');
}
navBar.applyLinkStyle = function() {
navBar.addCssRule('.navBar .navBarLeft span.leftLink', 'margin-left: 0px; margin-right: 30px;');
var cssRule = 'margin-left: 0px; margin-right: 0px;';
cssRule = 'padding-left: 6px; padding-right: 6px;';
navBar.addCssRule('.navBar .navBarRight span.rightLink', cssRule);
cssRule += 'border-left: 1px solid ' + navBar.linkColor + ';';
navBar.addCssRule('.navBar .navBarRight span.rightLinkPiped', cssRule);
}
navBar.applyLeftLinkStyle = function(span, link, linkData) {
span.className = 'leftLink';
if (linkData.isVisible == false) {
span.style.display = 'none';
} else if (linkData.actived == true) {
link.className = 'linkToCurrentPageColor';
} else if (linkData.isAccessible == false) {
link.className = 'disabledLink';
}
}
navBar.applyRightLinkStyle = function(span, link, linkData, isLeftPiped){
span.className = 'rightLink';
if (isLeftPiped) {
span.className = 'rightLinkPiped';
}
if (linkData.isAccessible == false) {
link.className = 'disabledLink';
}
}
navBar.addCssRule = function(className, cssContent) {
/*if (document.styleSheets && document.styleSheets[0]) {
var css = document.styleSheets[0];
if (navBar.isIE) {
css.addRule(className, cssContent);
} else {
try {
cssRule = className + '{' + cssContent + '}';
css.insertRule(cssRule, css.cssRules.length);
} catch(e) {
navBar.setError(e);
}
}
}*/
navBar.styleSheetRules += className + '{' + cssContent + '} ';
}
navBar.initHelp = function () {
// init helpBox
helpBox = '';
helpBox += '
';
helpBox += '';
navBar.helpBox = document.createElement('div');
navBar.helpBox.id = 'helpBox';
//navBar.djinngoNavBar.appendChild(navBar.helpBox);
document.getElementsByTagName("body")[0].appendChild(navBar.helpBox);
document.getElementById(navBar.helpBox.id).innerHTML = helpBox;
}
navBar.showHelp = function() {
navBar.trace("navBar.showHelp ...");
if(navBar.helpBox_created == false){
// Add helpBox
navBar.initHelp();
navBar.helpBox_created = true;
}
document.documentElement.style.overflow = 'hidden';
document.documentElement.style.overflowX = 'hidden';
document.documentElement.style.overflowY = 'hidden';
document.getElementById("aboutContent").style.display = "none";
document.getElementById("nodojo_popup_title").innerHTML = navBar.helpBox_helpTitle;
document.getElementById("nodojo_popup_main_content").style.height = "500px";
document.getElementById("helpContent").style.display = "block";
document.getElementById("nodojo_popup_scope").style.display = "block";
}
navBar.showAbout = function() {
navBar.trace("navBar.showHelp ...");
if(navBar.helpBox_created == false){
// Add helpBox
navBar.initHelp();
navBar.helpBox_created = true;
}
document.documentElement.style.overflow = 'hidden';
document.documentElement.style.overflowX = 'hidden';
document.documentElement.style.overflowY = 'hidden';
document.getElementById("helpContent").style.display = "none";
document.getElementById("nodojo_popup_title").innerHTML = navBar.helpBox_aboutTitle;
document.getElementById("nodojo_popup_main_content").style.height = "440px";
document.getElementById("aboutContent").style.display = "block";
document.getElementById("nodojo_popup_scope").style.display = "block";
}
navBar.closeHelp = function() {
navBar.trace("navBar.closeHelp ...");
document.documentElement.style.overflow = 'auto';
document.documentElement.style.overflowX = 'hidden';
document.documentElement.style.overflowY = 'auto';
document.getElementById("nodojo_popup_scope").style.display = "none";
}
navBar.getError = function() {
return navBar.error;
}
navBar.setError = function(error) {
navBar.error = error;
if (navBar.debug && navBar.consoleOK) {
console.error(error);
}
}
navBar.trace = function(contenu) {
if (navBar.debug && navBar.consoleOK) {
console.debug(contenu);
}
}