/* Copyright (c) 2006 Adobe Systems Inc. $Revision: 1.60 $ */

function initMembership() {

if(!$("globalnav") && !$('user-menu') && window.location.hostname.indexOf('adobe.com') == -1) return;

var membershipElements = {

'greeting': $('greeting'),

'screen_name': $('screenName'),

'account_link': $('account'),

'signout': $('signout')

}

for (var prop in membershipElements) {

if (membershipElements[prop] == null) return;

}

function showScreenName () {

var name = getCookie('SCREENNAME');

if (name != null && (name != '' || name != 'undefined')) {

membershipElements['screen_name'].innerHTML = name;

}

}

var authLevel = 0;

authLevel = (getCookie('RMID') != null) ? 1 : authLevel;

authLevel = (getCookie('AUID') != null) ? 2 : authLevel;

var listitem = ((browser.ua.indexOf('mac') != -1) && (browser.appN.indexOf('microsoft') != -1)) ? 'inline-block' : 'block';

switch (authLevel) {

case 0:

membershipElements.greeting.style.display = 'none';

membershipElements.account_link.style.display = listitem;

break;

case 1:

showScreenName();

membershipElements.greeting.style.display = listitem;

break;

case 2:

showScreenName();

membershipElements.greeting.style.display = listitem;

membershipElements.signout.style.display = listitem;

break;

default: break;

}

}

browser = browser || new BrowserDescription();

if ((!window.opera && browser.ua.indexOf('netscape6') == -1) || (window.opera && browser.appV >= 7)) { 

registerOnReady(initMembership);

}



function openLink(link,target) {

  if (target=="centrum") {

  	MM_openBrWindow(link,'centrum','');

  }else if(target=="_top"){

  	top.location.href = link;

  }else{

  	document.location.href = link;

  }

}







function MM_openBrWindow(theURL,winName,features) { //v2.0

  window.open(theURL,winName,features);

}



function openLink2(link,target) {

  if (target=="prawa") {

  	MM_openBrWindow(link,'prawa','');

  }else if(target=="_top"){

  	top.location.href = link;

  }else{

  	document.location.href = link;

  }

}

function openLink3(link,target) {

  if (target=="zamow") {

  	MM_openBrWindow(link,'zamow','');

  }else if(target=="_top"){

  	top.location.href = link;

  }else{

  	document.location.href = link;

  }

}



function openLink4(link,target) {

  if (target=="_self") {

  	MM_openBrWindow(link,'_self','');

  }else if(target=="_top"){

  	top.location.href = link;

  }else{

  	document.location.href = link;

  }

}



function openLink5(link,target) {

  if (target=="_top") {

  	MM_openBrWindow(link,'_top','');

  }else if(target=="_top"){

  	top.location.href = link;

  }else{

  	document.location.href = link;

  }

}



function openLink6(link,target) {

  if (target=="zestaw") {

  	MM_openBrWindow(link,'zestaw','');

  }else if(target=="_top"){

  	top.location.href = link;

  }else{

  	document.location.href = link;

  }

}



function openLink7(link,target) {

  if (target=="opcja") {

  	MM_openBrWindow(link,'opcja','');

  }else if(target=="_top"){

  	top.location.href = link;

  }else{

  	document.location.href = link;

  }

}



function openLink8(link,target) {

  if (target=="film") {

  	MM_openBrWindow(link,'film','');

  }else if(target=="_top"){

  	top.location.href = link;

  }else{

  	document.location.href = link;

  }

}



function openLink9(link,target) {

  if (target=="foto") {

  	MM_openBrWindow(link,'foto','');

  }else if(target=="_top"){

  	top.location.href = link;

  }else{

  	document.location.href = link;

  }

}



function openLink10(link,target) {

  if (target=="dane") {

  	MM_openBrWindow(link,'dane','');

  }else if(target=="_top"){

  	top.location.href = link;

  }else{

  	document.location.href = link;

  }

}



function openLink11(link,target) {

  if (target=="_blanc") {

  	MM_openBrWindow(link,'_blanc','');

  }else if(target=="_top"){

  	top.location.href = link;

  }else{

  	document.location.href = link;

  }

}





function MM_openBrWindow(theURL,winName,features) { //v2.0

  window.open(theURL,winName,features);

}

function openLink3(link,target) {

  if (target=="prawa") {

  	MM_openBrWindow(link,'prawa','');

  }else if(target=="_top"){

  	top.location.href = link;

  }else{

  	document.location.href = link;

  }

}



function openLink4(link,target) {

  if (target=="blank") {

  	MM_openBrWindow(link,'blank','');

  }else if(target=="_blank"){

  	top.location.href = link;

  }else{

  	document.location.href = link;

  }

}
