//CONFIGURER
 
//************************************************************************************************ 
var R; 
var seCount, elCount, moveStyle=">", delay=500; 
var raphWidth=694; raphHeight=570; 
var marginLeft=180, marginRight=180, marginTop=160, marginBottom=0; 
var sect=new Array(seCount), sectNames=new Array(seCount); 
var activeSeCount=0; 
var image, initial, loadingCover, desc; 
var configStr; 
var lockInitial=20, myPath=""; 
var DPH=1; 
var serviceStructure=""; 
var orderStructure=""; 
var serviceNotes=""; 
var actualPrice, orderPrice, orderRelDiscount, orderAbsDiscount; 
var mozilla=false, explorer=false, movingSections=false, initializing=true; 
if($.browser.msie) explorer=true; 
if($.browser.mozilla) mozilla=true; 
//************************************************************************************************ 
function changeDPH(){ 
if(DPH==1) { DPH=1.2; $('#DPHlink').text("net VAT"); } 
else { DPH=1; $('#DPHlink').text("including VAT"); } 
updatePrice(); 
} 
function updateConfigStr(){ 
configStr=""; 
for(var i=0; i<seCount; i++){ 
if(configStr!="") configStr+="/"; 
if(sect[i].state) 
for(var j=0; j<elCount; j++) if(sect[i].el[j].state==2) configStr+=j; 
} 
} 
function setPrice(price){ 
$('#price').text(parseInt(price)); 
} 
function setDiscount(discount){ 
$('#discount').html(discount); 
} 
function updatePrice(){ 
if(initializing==false){ 
var oldPrice=parseInt($('#price').text()); 
var actionName="", actionText="", price=0, discount=0; specialCase=0;
for(var y=0; y<seCount; y++) for(var x=0; x<elCount; x++) if(sect[y].state&&sect[y].el[x].state==2) price+=sect[y].el[x].price; 
 
if(meetsPackage("geobackup")) price+=sect[20].pickedEl.price; 
 
if(meetsPackage("AKCEdedi")) { discount=15; actionText+="=> Special offer Dedicated Starter<br/>"; specialCase=false;} 
else if(meetsPackage("AKCEmana")) { discount=48; actionText+="=> Special offer Managed Master<br/>"; specialCase=false;} 
else if(meetsPackage("AKCEhp")) { discount=12; actionText+="=> Special offer Dedicated HP B<br/>"; specialCase=false;}  
else if(meetsPackage("AKCEvirt")) { discount=8; actionText+="=> Special offer Virtual E-shop<br/>"; specialCase=false;} 
else if(meetsPackage("AKCEhous")) { discount=12; actionText+="=> Special offer Housing Single<br/>"; specialCase=false;} 
else if(meetsPackage("AKCEhosp")) { discount=12; actionText+="=> Special offer Housing Single+<br/>"; specialCase=false;}  
/*else if(meetsPackage("AKCEcloud")) { discount=135; actionText+="Special offer (for the first 3 months)<br/>"; specialCase=true;  }*/
  
orderPrice=price; orderAbsDiscount=discount; orderRelDiscount=0; 
if(meetsPackage("pololetne")) { orderRelDiscount=2; discount+=parseInt(2*(price-discount)/100); actionText+="=> biannual payments (discount 2%)<br/>"; } 
if(meetsPackage("rocne")) { orderRelDiscount=5; discount+=parseInt(5*(price-discount)/100); actionText+="=> annual payment (discount 5%)<br/>"; }  
 
price-=discount; 
actualPrice=price; 
/*if(mozilla&&movingSections) for(var i=1; i<=15; i++) setTimeout("setPrice("+parseInt(oldPrice+(price*DPH-oldPrice)/15*i)+")", i*i+delay); 
else if(explorer)*/ setPrice(price*DPH); 
/*else for(var i=1; i<=15; i++) setTimeout("setPrice("+parseInt(oldPrice+(price*DPH-oldPrice)/15*i)+")", i*i);*/ 
if(discount) { 
  if(specialCase==true) setDiscount(actionText+'IN TOTAL YOU SAVE: <strong>'+parseInt(discount*3*DPH)+',-</strong><br/>(Original price €150 / m)'); 
    else setDiscount(actionText+'IN TOTAL YOU SAVE: <strong>'+parseInt(discount*12*DPH)+',- / year</strong>'); 
  } 
  else setDiscount("");   
    
updateConfigStr(); 
updateServiceInfo(); 
} 
} 
//************************************************************************************************ 
function turnElOn(){ 
if(this.parent.state){ 
if(ieLower9) this.circle.show().attr({opacity:1}); 
else this.circle.show().animate({opacity:1}, delay, moveStyle); 
} 
if(this.state==0) this.state=1; 
updatePrice(); 
} 
function turnElOff(){ 
if(this.state==2) this.choose(); 
this.state=0; 
if(this.parent.state) 
if(ieLower9) this.circle.attr({opacity:0}).hide(); 
else this.circle.animate({opacity:0}, delay, moveStyle).hide(); 
updatePrice(); 
} 
function chooseEl(){ 
if(this.parent.state) this.circle.show(); 
if(this.type==0){ 
for(var x=0; x<elCount; x++) if(this.parent.el[x].type==0 && this.parent.el[x].state==2) this.parent.el[x].state=1; 
if(this.parent.state){ 
this.parent.picker.show(); 
this.parent.picker.animate({cx:this.circle.attr("cx")}, delay, moveStyle); 
} 
this.parent.pickedEl=this; 
this.state=2; 
} 
if(this.type==1){ 
if(this.state==2){ 
if(this.parent.state) this.circle.animate({stroke: "#808080", "stroke-width": 1.3}, delay, moveStyle); 
this.state=1; 
} 
else{ 
if(this.parent.state) this.circle.animate({stroke: "#27285f", "stroke-width": 3}, delay, moveStyle); 
this.state=2; 
} 
} 
updatePrice(); 
this.parent.updateText2(); 
} 
function updateElText(){ 
var t=""; 
for(var i=0; i<elCount; i++){ 
if(this.el[i].type==0 && this.el[i].state==2) t=this.el[i].name; 
if(this.el[i].type==1){ 
var myString = new String(this.el[i].name);  
var myArray = myString.split('|'); 
if(this.el[i].state==1) t+=myArray[0]; 
if(this.el[i].state==2) t+=myArray[1]; 
} 
} 
if(!initializing||!ieLower9) this.text2.attr('text', t); 
} 
function turnSeOn(){ 
if(this.state!=1){ 
this.state=1; 
this.set.show(); 
if(ieLower9) this.set.attr({opacity:1}); 
else this.set.animate({opacity:1}, delay, moveStyle); 
if(this.el[0].type) this.picker.hide(); 
for(x=0; x<elCount; x++) if(this.el[x].type){ 
if(this.el[x].state==1) this.el[x].circle.attr({stroke: "#808080", "stroke-width": 1.3}); 
if(this.el[x].state==2) this.el[x].circle.attr({stroke: "#27285f", "stroke-width": 3}); 
} 
activeSeCount++; 
if(!initializing) { moveSections(); movingSections=true; setTimeout("movingSections=false", delay); } 
updatePrice(); 
} 
this.state=1; 
} 
function turnSeOff(){ 
if(this.state==1){ 
this.state=0; 
this.set.hide(); 
if(ieLower9) this.set.attr({opacity:0}); 
else this.set.animate({opacity:0}, delay, moveStyle); 
activeSeCount--; 
if(!initializing) { moveSections(); movingSections=true; setTimeout("movingSections=false", delay); } 
updatePrice(); 
} 
this.state=0; 
} 
function element(){ 
this.parent; this.type; this.name; this.decs; this.imagePath; this.price; this.state; this.circle; 
this.turnOn=turnElOn; this.turnOff=turnElOff; this.choose=chooseEl; this.service; 
} 
function section(){ 
this.state=state; this.picker; this.line1; this.line2; this.text1; this.text2; this.pickedEl; this.el=new Array(elCount), this.set; 
this.turnOn=turnSeOn; this.turnOff=turnSeOff; this.updateText2=updateElText; 
} 
//************************************************************************************************ 
function moveSections(){ 
var v=1; 
var verticalSegment=parseInt((raphHeight-marginTop-marginBottom)/(activeSeCount+2)); 
  for(var i=0; i<seCount; i++){
    if(sect[i].state){
      if(ieLower9){
         sect[i].set.attr({cy:marginTop+verticalSegment*v});
         sect[i].line1.attr({y:marginTop+verticalSegment*v-1});
         sect[i].line2.attr({y:marginTop+verticalSegment*v+1});
         sect[i].text1.attr({y:marginTop+verticalSegment*v-8});
         sect[i].text2.attr({y:marginTop+verticalSegment*v-8});
         v++; if(i==0) v++;
      } 
      else{
         sect[i].set.animate({cy:marginTop+verticalSegment*v}, delay, moveStyle);
         sect[i].line1.animate({y:marginTop+verticalSegment*v-1}, delay, moveStyle);
         sect[i].line2.animate({y:marginTop+verticalSegment*v+1}, delay, moveStyle);
         sect[i].text1.animate({y:marginTop+verticalSegment*v-8}, delay, moveStyle);
         sect[i].text2.animate({y:marginTop+verticalSegment*v-8}, delay, moveStyle);
         v++; if(i==0) v++;
      }
    } 
    else{
         sect[i].set.attr({cy:marginTop});
         sect[i].line1.attr({y:marginTop});
         sect[i].line2.attr({y:marginTop});
         sect[i].text1.attr({y:marginTop});
         sect[i].text2.attr({y:marginTop}); 
    }  
  }
} 
//************************************************************************************************ 
function waitInitial(){ 
if(lockInitial>0) lockInitial--; 
if(lockInitial==0) { 
if(ieLower9) initial.show().attr({opacity:1}); 
else initial.animate({opacity:1}, delay); 
if(ieLower9) image.attr({opacity:0, x: raphWidth-280, y: 40, width: 0, height: 0}); 
else image.animate({opacity:0, x: raphWidth-280, y: 40, width: 186, height: 96}, delay, moveStyle); 
} 
setTimeout("waitInitial()", delay); 
} 
function initConfigurer(data){ 
elCount=data[0].length; 
seCount=data.length; 
image=R.image("/images/configurer/default.png", raphWidth-280, 40, 186, 96).attr({opacity: 0, width: 25, height: 15}); 
initial=R.image("/images/configurer/initial.png", 0, 5, 694, 127).attr({opacity: 0}).hide(); 
loadingCover=R.image("/images/configurer/loading-cover.png", 260, 228, 159, 67).hide(); 
waitInitial(); 
desc=R.text(180, 70, "").attr({"font-family":"Verdana", "font-weight":"bold", "font-size":13, fill:"#27285f", "text-anchor":"middle", opacity: 0}); 
for(var y=0; y<seCount; y++){ 
sect[y]=new section(); 
sect[y].line1=R.rect(1, marginTop+(raphHeight-marginTop-marginBottom)/seCount*y-1, 692, 1).attr({fill:"#27285f", "stroke": "none"}).hide();; 
sect[y].line2=R.rect(1, marginTop+(raphHeight-marginTop-marginBottom)/seCount*y+1, 692, 1).attr({fill:"#2cacc9", "stroke": "none"}).hide();; 
sect[y].text1=R.text(15, marginTop+(raphHeight-marginTop-marginBottom)/seCount*y-8, sectNames[y]).attr({"font-family":"Verdana", "font-size":13, fill:"#27285f", "text-anchor":"start"}).hide(); 
sect[y].text2=R.text(raphWidth-15, marginTop+(raphHeight-marginTop-marginBottom)/seCount*y-8, "").attr({"font-family":"Verdana", "font-size":13, fill:"#27285f", "text-anchor":"end"}).hide(); 
sect[y].set=R.set(); 
sect[y].set.push(sect[y].line1, sect[y].line2, sect[y].text1, sect[y].text2); 
for(var x=0; x<elCount; x++){ 
sect[y].el[x]=new element(); 
if(x==0) sect[y].pickedEl=sect[y].el[0]; 
sect[y].el[x].parent=sect[y]; 
sect[y].el[x].type=data[y][x][0]; 
sect[y].el[x].name=data[y][x][1]; 
sect[y].el[x].desc=data[y][x][4]; 
sect[y].el[x].service=data[y][x][5]; 
sect[y].el[x].imagePath=data[y][x][3]; 
if(sect[y].el[x].name!=""){ 
sect[y].el[x].price=data[y][x][2]; 
if(sect[y].el[x].type) sect[y].el[x].circle=R.circle(marginLeft+(raphWidth-marginLeft-marginRight)/elCount*x, marginTop+(raphHeight-marginTop-marginBottom)/seCount*y, 7).attr({fill: "white", stroke: "#808080", "stroke-width": 1.1}).hide(); 
else sect[y].el[x].circle=R.circle(marginLeft+(raphWidth-marginLeft-marginRight)/elCount*x, marginTop+(raphHeight-marginTop-marginBottom)/seCount*y, 13).attr({fill: "white", stroke: "#808080", "stroke-width": 1.1}).hide(); 
(function(e){ 
e.circle.mouseover(function(){ 
if(ieLower9) e.circle.attr({fill: "#ffff00", stroke: "#0d114c"}); 
else e.circle.animate({fill: "#ffff00", stroke: "#0d114c"}, delay, moveStyle); 
image.attr({src: "/images/configurer/"+e.imagePath}); 
desc.attr({text: e.desc}); 
if(ieLower9){ 
image.attr({opacity:1, x: raphWidth-340, y: 20, width: 310, height: 160}); 
desc.attr({opacity:1}); 
initial.hide().attr({opacity:0}); 
} 
else{ 
image.animate({opacity:1, x: raphWidth-310, y: 20, width: 248, height: 128}, delay, moveStyle); 
desc.animate({opacity:1}, delay, moveStyle); 
initial.animate({opacity:0}, delay, moveStyle); 
} 
lockInitial=-1; 
}); 
e.circle.mouseout(function(){ 
if(e.type==1 && e.state==2) 
if(ieLower9) e.circle.attr({fill: "white", stroke: "#0d114c"}); 
else e.circle.animate({fill: "white", stroke: "#0d114c"}, delay, moveStyle); 
else 
if(ieLower9) e.circle.attr({fill: "white", stroke: "#808080"}); 
else e.circle.animate({fill: "white", stroke: "#808080"}, delay, moveStyle); 
if(ieLower9){ 
image.attr({opacity:0, x: raphWidth-280, y: 40, width: 0, height: 0}); 
desc.attr({opacity:0}); 
} 
else{ 
image.animate({opacity:0, x: raphWidth-280, y: 40, width: 186, height: 96}, delay, moveStyle); 
desc.animate({opacity:0}, delay, moveStyle); 
} 
lockInitial=4; 
if(!ieLower9) initial.show(); 
}); 
e.circle.click(function(){e.choose();fulfilConditions();}); 
})(sect[y].el[x]); 
sect[y].el[x].state=1; 
} 
else sect[y].el[x].state=0; 
sect[y].set.push(sect[y].el[x].circle); 
} 
sect[y].picker=R.circle(marginLeft, marginTop+(raphHeight-marginTop-marginBottom)/seCount*y, 10).attr({fill: "#349ec0", stroke: "none"}).hide(); 
sect[y].set.push(sect[y].picker); 
(function(s){ 
s.picker.mouseover(function(){ 
if(ieLower9) s.pickedEl.circle.attr({fill: "#ffff00", stroke: "#0d114c"}); 
else s.pickedEl.circle.animate({fill: "#ffff00", stroke: "#0d114c"}, delay, moveStyle); 
image.attr({src: "/images/configurer/"+s.pickedEl.imagePath}); 
desc.attr({text: s.pickedEl.desc}); 
if(ieLower9){ 
image.attr({opacity:1, x: raphWidth-340, y: 20, width: 310, height: 160}); 
desc.attr({opacity:1}); 
initial.attr({opacity:0}); 
} 
else{ 
image.animate({opacity:1, x: raphWidth-310, y: 20, width: 248, height: 128}, delay, moveStyle); 
desc.animate({opacity:1}, delay, moveStyle); 
initial.animate({opacity:0}, delay, moveStyle); 
} 
lockInitial=-1; 
}); 
s.picker.mouseout(function(){ 
if(ieLower9){ 
s.pickedEl.circle.attr({fill: "white", stroke: "#808080"}); 
image.attr({opacity:0, x: raphWidth-280, y: 40, width: 0, height: 0}); 
desc.attr({opacity:0}); 
setTimeout("if(!lockInitial) initial.attr({opacity:1}); else lockInitial--;", delay); 
} 
else{ 
s.pickedEl.circle.animate({fill: "white", stroke: "#808080"}, delay, moveStyle); 
image.animate({opacity:0, x: raphWidth-280, y: 40, width: 186, height: 96}, delay, moveStyle); 
desc.animate({opacity:0}, delay, moveStyle); 
setTimeout("if(!lockInitial) initial.animate({opacity:1}, delay, moveStyle); else lockInitial--;", delay); 
} 
lockInitial=4; 
}); 
})(sect[y]); 
} 
} 
/*--------------------------------------------------------------------------------------*/ 
function applyConfigStr(str){ 
initializing=true; 
var myString = new String(configStr);  
var myArray = myString.split('/'); 
for(var i=0; i<myArray.length; i++); 
initializing=false; 
} 
/*--------------------------------------------------------------------------------------*/ 
function setConfigurer(data){ 
initializing=true; 
for(var y=0; y<data.length; y++){ 
if(data[y][1]=="0") sect[data[y][0]].turnOff(); 
if(data[y][1]=="1") sect[data[y][0]].turnOn(); 
} 
for(var y=0; y<data.length; y++){ 
for(var x=0; x<data[y][2].length; x++){ 
if(data[y][2].charAt(x)=="0") sect[data[y][0]].el[x].turnOff(); 
if(data[y][2].charAt(x)=="1") { sect[data[y][0]].el[x].turnOn(); if(sect[data[y][0]].el[x].state==2) sect[data[y][0]].el[x].choose(); } 
if(data[y][2].charAt(x)=="2") if(sect[data[y][0]].el[x].type==0 || sect[data[y][0]].el[x].state!=2) sect[data[y][0]].el[x].choose(); 
sect[data[y][0]].updateText2(); 
} 
} 
initializing=false; 
if(data[0][1]!="0"){ // IS NOT PACKAGE "DEFAULT" 
moveSections(); 
updatePrice(); 
if(sect[0].el[0].state==2) myPath=sect[1].pickedEl.imagePath; 
if(sect[0].el[1].state==2) myPath=sect[9].pickedEl.imagePath; 
if(sect[0].el[2].state==2) myPath=sect[3].pickedEl.imagePath; 
if(sect[0].el[3].state==2) myPath=sect[3].pickedEl.imagePath; 
if(sect[0].el[4].state==2) myPath=sect[2].pickedEl.imagePath; 
if(sect[0].el[5].state==2) myPath=sect[0].el[5].imagePath;  
if(ieLower9) image.attr({opacity:0, x: raphWidth-280, y: 40, width: 0, height: 0}); 
else image.attr({opacity:0, x: raphWidth-280, y: 40, width: 186, height: 96}); 
image.attr({src: "/images/configurer/"+myPath}); 
if(ieLower9) image.attr({opacity:1, x: raphWidth-340, y: 20, width: 310, height: 160}); 
else image.animate({opacity:1, x: raphWidth-310, y: 20, width: 248, height: 128}, 5*delay, moveStyle); 
lockInitial=20; 
if(ieLower9) initial.attr({opacity: 0}); 
else initial.animate({opacity: 0}, delay/4, moveStyle); 
if(ieLower9) setTimeout('for(var i=0; i<seCount; i++) sect[i].updateText2();', 2000); 
} 
fulfilConditions(); 
} 
//************************************************************************************************ 
function getPackageData(name){

  if(name=="DEFAULT") return([
    [0,  "0", "2-----"], // SLUZBA => vlastni, vps, dedik, managed, rack
    [1,  "0", "2-----"], // PROSTOR (PRO HOUSING) => 1u, 2u, 4u, T, 2T, 4T
    [2,  "0", "2-----"], // VELIKOST (RACKU) => 10U, 23U, 47U
    [3,  "0", "2-----"], // ZNAČKA SERVERU => master, hp, dell
    [4,  "0", "2-----"], // SESTAVA MASTER => starter, medium, expert, master
    [5,  "0", "2-----"], // SESTAVA HP => 120, 165, 320
    [6,  "0", "2-----"], // SESTAVA DELL => r310, r415, r610
    [7,  "0", "2-----"], // HDD => 30, 60, 120, 200, 400
    [8,  "0", "2-----"], // RAM => 256, 512, 1024, 2048, 4096
    [9,  "0", "2-----"], // CPU => 1/4, 1/2, 1, 2, 4
    [10, "0", "2----1"], // KONEKTIVITA (SERVER) => basic, copper, bronze, silver, gold | dual
    [11, "0", "2-----"], // KONEKTIVITA (RACK) => copper, silver, gold, platinum | dual
    [12, "0", "2---1-"], // ENERGIE (SERVER) => 100, 150, 250, 500 | dual
    [13, "0", "2---1-"], // ENERGIE (RACK) => 0.5, 1, 2, 4 | dual
    [14, "0", "2-----"], // HDD CLOUD => 100, 300, 500, 1000, 2000
    [15, "0", "2-----"], // RAM CLOUD => 4, 8, 16, 32, 48, 64
    [16, "0", "2-----"], // CPU CLOUD => 1, 2, 4, 8, 16, 24
    [17, "0", "2-----"], // KONEKTIVITA CLOUD => copper, silver, gold, platinum | dual
    [18, "0", "2-----"], // OS VPS => CentOS, Debian, Ubuntu, Windows
    [19, "0", "2-----"], // OS => Linux, Windows, FreeBSD
    [20, "1", "2----1"], // ZALOHOVANI => 0, 25, 100, 500, 1000 | geo
    [21, "1", "2-----"], // DATACENTRUM => nezalezi, praha, brno
    [22, "1", "1111--"], // DOPLNKY => firewall, monitor, ISPManager, Watcher
    [23, "1", "--2---"]  // SMLUVNI PODMINKY => mesicne, pololetne, rocne
  ]);



  else if(name=="HOUSINGSINGLE") return([
    [0,  "1", "2-----"], // SLUZBA => vlastni, vps, dedik, managed, rack
    [1,  "1", "2-----"], // PROSTOR (PRO HOUSING) => 1u, 2u, 4u, T, 2T, 4T
    [10, "1", "2-----"], // KONEKTIVITA (SERVER) => basic, copper, bronze, silver, gold | dual
    [12, "1", "2-----"]  // ENERGIE (SERVER) => 100, 150, 250, 500 | dual
  ]);
  else if(name=="HOUSINGSINGLEPLUS") return([
    [0,  "1", "2-----"], // SLUZBA => vlastni, vps, dedik, managed, rack
    [1,  "1", "2-----"], // PROSTOR (PRO HOUSING) => 1u, 2u, 4u, T, 2T, 4T
    [10, "1", "2----2"], // KONEKTIVITA (SERVER) => basic, copper, bronze, silver, gold | dual
    [12, "1", "2-----"], // ENERGIE (SERVER) => 100, 150, 250, 500 | dual
    [22, "1", "-2-2--"]  // DOPLNKY => firewall, monitor, ISPManager, Watcher
  ]);
  else if(name=="HOUSINGDOUBLE") return([
    [0,  "1", "2-----"], // SLUZBA => vlastni, vps, dedik, managed, rack
    [1,  "1", "-2----"], // PROSTOR (PRO HOUSING) => 1u, 2u, 4u, T, 2T, 4T
    [10, "1", "2-----"], // KONEKTIVITA (SERVER) => basic, copper, bronze, silver, gold | dual
    [12, "1", "-2----"]  // ENERGIE (SERVER) => 100, 150, 250, 500 | dual
  ]);
  else if(name=="HOUSINGFARM") return([
    [0,  "1", "2-----"], // SLUZBA => vlastni, vps, dedik, managed, rack
    [1,  "1", "--2---"], // PROSTOR (PRO HOUSING) => 1u, 2u, 4u, T, 2T, 4T
    [10, "1", "-2----"], // KONEKTIVITA (SERVER) => basic, copper, bronze, silver, gold | dual
    [12, "1", "--2---"]  // ENERGIE (SERVER) => 100, 150, 250, 500 | dual
  ]);



  else if(name=="VPSWEBSITE") return([
    [0,  "1", "-2----"], // SLUZBA => vlastni, vps, dedik, managed, rack
    [7,  "1", "2-----"], // HDD => 30, 60, 120, 200, 400
    [8,  "1", "2-----"], // RAM => 256, 512, 1024, 2048, 4096
    [9,  "1", "2-----"], // CPU => 1/4, 1/2, 1, 2, 4
    [18, "1", "2-----"], // OS VPS => CentOS, Debian, Ubuntu, Windows
    [21, "0", "------"]  // DATACENTRUM => nezalezi, praha, brno
  ]);
  else if(name=="VPSESHOP") return([
    [0,  "1", "-2----"], // SLUZBA => vlastni, vps, dedik, managed, rack
    [7,  "1", "-2----"], // HDD => 30, 60, 120, 200, 400
    [8,  "1", "--2---"], // RAM => 256, 512, 1024, 2048, 4096
    [9,  "1", "--2---"], // CPU => 1/4, 1/2, 1, 2, 4
    [18, "1", "2-----"], // OS VPS => CentOS, Debian, Ubuntu, Windows
    [20, "1", "-2----"], // ZALOHOVANI => 0, 25, 100, 500, 1000 | geo
    [21, "0", "------"]  // DATACENTRUM => nezalezi, praha, brno
  ]);
  else if(name=="VPSGAMEHOST") return([
    [0,  "1", "-2----"], // SLUZBA => vlastni, vps, dedik, managed, rack
    [7,  "1", "--2---"], // HDD => 30, 60, 120, 200, 400
    [8,  "1", "---2--"], // RAM => 256, 512, 1024, 2048, 4096
    [9,  "1", "---2--"], // CPU => 1/4, 1/2, 1, 2, 4
    [18, "1", "2-----"], // OS VPS => CentOS, Debian, Ubuntu, Windows
    [21, "0", "------"]  // DATACENTRUM => nezalezi, praha, brno
  ]);
  else if(name=="VPSSTORAGE") return([
    [0,  "1", "-2----"], // SLUZBA => vlastni, vps, dedik, managed, rack
    [7,  "1", "----2-"], // HDD => 30, 60, 120, 200, 400
    [8,  "1", "2-----"], // RAM => 256, 512, 1024, 2048, 4096
    [9,  "1", "2-----"], // CPU => 1/4, 1/2, 1, 2, 4
    [18, "1", "2-----"], // OS VPS => CentOS, Debian, Ubuntu, Windows
    [20, "1", "---2--"], // ZALOHOVANI => 0, 25, 100, 500, 1000 | geo
    [21, "0", "------"]  // DATACENTRUM => nezalezi, praha, brno
  ]);



  else if(name=="DEDICATEDSTARTER") return([
    [0,  "1", "--2---"], // SLUZBA => vlastni, vps, dedik, managed, rack
    [3,  "1", "2-----"], // ZNAČKA SERVERU => master, hp, dell
    [4,  "1", "2-----"], // SESTAVA MASTER => starter, medium, expert, master
    [10, "1", "2-----"], // KONEKTIVITA (SERVER) => basic, copper, bronze, silver, gold | dual
    [19, "1", "2-----"], // OS => Linux, Windows, FreeBSD
    [22, "1", "-2----"]  // DOPLNKY => firewall, monitor, ISPManager, Watcher
  ]);
  else if(name=="DEDICATEDMEDIUM") return([
    [0,  "1", "--2---"], // SLUZBA => vlastni, vps, dedik, managed, rack
    [3,  "1", "2-----"], // ZNAČKA SERVERU => master, hp, dell
    [4,  "1", "-2----"], // SESTAVA MASTER => starter, medium, expert, master
    [10, "1", "-2----"], // KONEKTIVITA (SERVER) => basic, copper, bronze, silver, gold | dual
    [19, "1", "2-----"], // OS => Linux, Windows, FreeBSD
    [22, "1", "-2-2--"]  // DOPLNKY => firewall, monitor, ISPManager, Watcher
  ]);
  else if(name=="DEDICATEDEXPERT") return([
    [0,  "1", "--2---"], // SLUZBA => vlastni, vps, dedik, managed, rack
    [3,  "1", "2-----"], // ZNAČKA SERVERU => master, hp, dell
    [4,  "1", "--2---"], // SESTAVA MASTER => starter, medium, expert, master
    [10, "1", "--2---"], // KONEKTIVITA (SERVER) => basic, copper, bronze, silver, gold | dual
    [19, "1", "2-----"], // OS => Linux, Windows, FreeBSD
    [22, "1", "-2----"]  // DOPLNKY => firewall, monitor, ISPManager, Watcher
  ]);
  else if(name=="DEDICATEDMASTER") return([
    [0,  "1", "--2---"], // SLUZBA => vlastni, vps, dedik, managed, rack
    [3,  "1", "2-----"], // ZNAČKA SERVERU => master, hp, dell
    [4,  "1", "--2---"], // SESTAVA MASTER => starter, medium, expert, master
    [10, "1", "---2-2"], // KONEKTIVITA (SERVER) => basic, copper, bronze, silver, gold | dual
    [19, "1", "2-----"], // OS => Linux, Windows, FreeBSD
    [22, "1", "-2----"]  // DOPLNKY => firewall, monitor, ISPManager, Watcher
  ]);

  else if(name=="DEDICATEDR310") return([
    [0,  "1", "--2---"], // SLUZBA => vlastni, vps, dedik, managed, rack
    [3,  "1", "-2----"], // ZNAČKA SERVERU => master, hp, dell
    [6,  "1", "2-----"], // SESTAVA DELL => r310, r415, r610
    [10, "1", "2----2"], // KONEKTIVITA (SERVER) => basic, copper, bronze, silver, gold | dual
    [19, "1", "2-----"]  // OS => Linux, Windows, FreeBSD
  ]);
  else if(name=="DEDICATEDR415") return([
    [0,  "1", "--2---"], // SLUZBA => vlastni, vps, dedik, managed, rack
    [3,  "1", "-2----"], // ZNAČKA SERVERU => master, hp, dell
    [6,  "1", "-2----"], // SESTAVA DELL => r310, r415, r610
    [10, "1", "-2---2"], // KONEKTIVITA (SERVER) => basic, copper, bronze, silver, gold | dual
    [19, "1", "2-----"], // OS => Linux, Windows, FreeBSD
    [20, "1", "-2----"], // ZALOHOVANI => 0, 25, 100, 500, 1000 | geo
    [22, "1", "-2-2--"]  // DOPLNKY => firewall, monitor, ISPManager, Watcher
  ]);
  else if(name=="DEDICATEDR610") return([
    [0,  "1", "--2---"], // SLUZBA => vlastni, vps, dedik, managed, rack
    [3,  "1", "-2----"], // ZNAČKA SERVERU => master, hp, dell
    [6,  "1", "--2---"], // SESTAVA DELL => r310, r415, r610
    [10, "1", "--2--2"], // KONEKTIVITA (SERVER) => basic, copper, bronze, silver, gold | dual
    [19, "1", "2-----"], // OS => Linux, Windows, FreeBSD
    [20, "1", "-2----"], // ZALOHOVANI => 0, 25, 100, 500, 1000 | geo
    [22, "1", "-2----"]  // DOPLNKY => firewall, monitor, ISPManager, Watcher
  ]);




  else if(name=="DEDICATEDHPA") return([
    [0,  "1", "--2---"], // SLUZBA => vlastni, vps, dedik, managed, rack
    [3,  "1", "2-----"], // ZNAČKA SERVERU => master, hp, dell
    [5,  "1", "2-----"], // SESTAVA HP => 120, 165, 320
    [10, "1", "2-----"], // KONEKTIVITA (SERVER) => basic, copper, bronze, silver, gold | dual
    [19, "1", "2-----"]  // OS => Linux, Windows, FreeBSD
  ]);

  else if(name=="DEDICATEDHPB") return([
    [0,  "1", "--2---"], // SLUZBA => vlastni, vps, dedik, managed, rack
    [3,  "1", "2-----"], // ZNAČKA SERVERU => master, hp, dell
    [5,  "1", "-2----"], // SESTAVA HP => 120, 165, 320
    [10, "1", "2----2"], // KONEKTIVITA (SERVER) => basic, copper, bronze, silver, gold | dual
    [19, "1", "2-----"], // OS => Linux, Windows, FreeBSD
    [20, "1", "-2----"], // ZALOHOVANI => 0, 25, 100, 500, 1000 | geo
    [22, "1", "-2----"]  // DOPLNKY => firewall, monitor, ISPManager, Watcher
  ]);

  else if(name=="DEDICATEDHPC") return([
    [0,  "1", "--2---"], // SLUZBA => vlastni, vps, dedik, managed, rack
    [3,  "1", "2-----"], // ZNAČKA SERVERU => master, hp, dell
    [5,  "1", "--2---"], // SESTAVA HP => 120, 165, 320
    [10, "1", "2----2"], // KONEKTIVITA (SERVER) => basic, copper, bronze, silver, gold | dual
    [19, "1", "2-----"], // OS => Linux, Windows, FreeBSD
    [20, "1", "-2----"], // ZALOHOVANI => 0, 25, 100, 500, 1000 | geo
    [22, "1", "-2----"]  // DOPLNKY => firewall, monitor, ISPManager, Watcher
  ]);

  else if(name=="DEDICATEDHPD") return([
    [0,  "1", "--2---"], // SLUZBA => vlastni, vps, dedik, managed, rack
    [3,  "1", "2-----"], // ZNAČKA SERVERU => master, hp, dell
    [5,  "1", "---2--"], // SESTAVA HP => 120, 165, 320
    [10, "1", "2----2"], // KONEKTIVITA (SERVER) => basic, copper, bronze, silver, gold | dual
    [19, "1", "2-----"], // OS => Linux, Windows, FreeBSD
    [20, "1", "-2----"], // ZALOHOVANI => 0, 25, 100, 500, 1000 | geo
    [22, "1", "-2----"]  // DOPLNKY => firewall, monitor, ISPManager, Watcher
  ]);

  else if(name=="DEDICATEDHPE") return([
    [0,  "1", "--2---"], // SLUZBA => vlastni, vps, dedik, managed, rack
    [3,  "1", "2-----"], // ZNAČKA SERVERU => master, hp, dell
    [5,  "1", "----2-"], // SESTAVA HP => 120, 165, 320
    [10, "1", "2----2"], // KONEKTIVITA (SERVER) => basic, copper, bronze, silver, gold | dual
    [19, "1", "2-----"], // OS => Linux, Windows, FreeBSD
    [20, "1", "-2----"], // ZALOHOVANI => 0, 25, 100, 500, 1000 | geo
    [22, "1", "-2----"]  // DOPLNKY => firewall, monitor, ISPManager, Watcher
  ]);

  else if(name=="DEDICATEDHPF") return([
    [0,  "1", "--2---"], // SLUZBA => vlastni, vps, dedik, managed, rack
    [3,  "1", "2-----"], // ZNAČKA SERVERU => master, hp, dell
    [5,  "1", "-----2"], // SESTAVA HP => 120, 165, 320
    [10, "1", "2----2"], // KONEKTIVITA (SERVER) => basic, copper, bronze, silver, gold | dual
    [19, "1", "2-----"], // OS => Linux, Windows, FreeBSD
    [20, "1", "-2----"], // ZALOHOVANI => 0, 25, 100, 500, 1000 | geo
    [22, "1", "-2----"]  // DOPLNKY => firewall, monitor, ISPManager, Watcher
  ]);







  else if(name=="MANAGEDSTARTER") return([
    [0,  "1", "---2--"], // SLUZBA => vlastni, vps, dedik, managed, rack
    [3,  "1", "2-----"], // ZNAČKA SERVERU => master, hp, dell
    [4,  "1", "2-----"], // SESTAVA MASTER => starter, medium, expert, master
    [10, "1", "2-----"], // KONEKTIVITA (SERVER) => basic, copper, bronze, silver, gold | dual
    [19, "1", "2-----"], // OS => Linux, Windows, FreeBSD
    [20, "1", "-2----"], // ZALOHOVANI => 0, 25, 100, 500, 1000 | geo
    [22, "1", "-2----"]  // DOPLNKY => firewall, monitor, ISPManager, Watcher
  ]);
  else if(name=="MANAGEDMEDIUM") return([
    [0,  "1", "---2--"], // SLUZBA => vlastni, vps, dedik, managed, rack
    [3,  "1", "2-----"], // ZNAČKA SERVERU => master, hp, dell
    [4,  "1", "-2----"], // SESTAVA MASTER => starter, medium, expert, master
    [10, "1", "-2----"], // KONEKTIVITA (SERVER) => basic, copper, bronze, silver, gold | dual
    [19, "1", "2-----"], // OS => Linux, Windows, FreeBSD
    [20, "1", "-2----"], // ZALOHOVANI => 0, 25, 100, 500, 1000 | geo
    [22, "1", "-2-2--"]  // DOPLNKY => firewall, monitor, ISPManager, Watcher
  ]);
  else if(name=="MANAGEDEXPERT") return([
    [0,  "1", "---2--"], // SLUZBA => vlastni, vps, dedik, managed, rack
    [3,  "1", "2-----"], // ZNAČKA SERVERU => master, hp, dell
    [4,  "1", "--2---"], // SESTAVA MASTER => starter, medium, expert, master
    [10, "1", "--2---"], // KONEKTIVITA (SERVER) => basic, copper, bronze, silver, gold | dual
    [19, "1", "2-----"], // OS => Linux, Windows, FreeBSD
    [20, "1", "-2----"], // ZALOHOVANI => 0, 25, 100, 500, 1000 | geo
    [22, "1", "-2----"]  // DOPLNKY => firewall, monitor, ISPManager, Watcher
  ]);
  else if(name=="MANAGEDMASTER") return([
    [0,  "1", "---2--"], // SLUZBA => vlastni, vps, dedik, managed, rack
    [3,  "1", "2-----"], // ZNAČKA SERVERU => master, hp, dell
    [4,  "1", "--2---"], // SESTAVA MASTER => starter, medium, expert, master
    [10, "1", "---2-2"], // KONEKTIVITA (SERVER) => basic, copper, bronze, silver, gold | dual
    [19, "1", "2-----"], // OS => Linux, Windows, FreeBSD
    [20, "1", "-2----"], // ZALOHOVANI => 0, 25, 100, 500, 1000 | geo
    [22, "1", "-2----"]  // DOPLNKY => firewall, monitor, ISPManager, Watcher
  ]);

  else if(name=="MANAGEDR310") return([
    [0,  "1", "---2--"], // SLUZBA => vlastni, vps, dedik, managed, rack
    [3,  "1", "-2----"], // ZNAČKA SERVERU => master, hp, dell
    [6,  "1", "2-----"], // SESTAVA DELL => r310, r415, r610
    [10, "1", "2----2"], // KONEKTIVITA (SERVER) => basic, copper, bronze, silver, gold | dual
    [19, "1", "2-----"]  // OS => Linux, Windows, FreeBSD
  ]);
  else if(name=="MANAGEDR415") return([
    [0,  "1", "---2--"], // SLUZBA => vlastni, vps, dedik, managed, rack
    [3,  "1", "-2----"], // ZNAČKA SERVERU => master, hp, dell
    [6,  "1", "-2----"], // SESTAVA DELL => r310, r415, r610
    [10, "1", "-2---2"], // KONEKTIVITA (SERVER) => basic, copper, bronze, silver, gold | dual
    [19, "1", "2-----"], // OS => Linux, Windows, FreeBSD
    [20, "1", "-2----"], // ZALOHOVANI => 0, 25, 100, 500, 1000 | geo
    [22, "1", "-2-2--"]  // DOPLNKY => firewall, monitor, ISPManager, Watcher
  ]);
  else if(name=="MANAGEDR610") return([
    [0,  "1", "---2--"], // SLUZBA => vlastni, vps, dedik, managed, rack
    [3,  "1", "-2----"], // ZNAČKA SERVERU => master, hp, dell
    [6,  "1", "--2---"], // SESTAVA DELL => r310, r415, r610
    [10, "1", "--2--2"], // KONEKTIVITA (SERVER) => basic, copper, bronze, silver, gold | dual
    [19, "1", "2-----"], // OS => Linux, Windows, FreeBSD
    [20, "1", "-2----"], // ZALOHOVANI => 0, 25, 100, 500, 1000 | geo
    [22, "1", "-2----"]  // DOPLNKY => firewall, monitor, ISPManager, Watcher
  ]);



  else if(name=="MANAGEDHPA") return([
    [0,  "1", "---2--"], // SLUZBA => vlastni, vps, dedik, managed, rack
    [3,  "1", "2-----"], // ZNAČKA SERVERU => master, hp, dell
    [5,  "1", "2-----"], // SESTAVA HP => 120, 165, 320
    [10, "1", "2-----"], // KONEKTIVITA (SERVER) => basic, copper, bronze, silver, gold | dual
    [19, "1", "2-----"]  // OS => Linux, Windows, FreeBSD
  ]);

  else if(name=="MANAGEDHPB") return([
    [0,  "1", "---2--"], // SLUZBA => vlastni, vps, dedik, managed, rack
    [3,  "1", "2-----"], // ZNAČKA SERVERU => master, hp, dell
    [5,  "1", "-2----"], // SESTAVA HP => 120, 165, 320
    [10, "1", "2----2"], // KONEKTIVITA (SERVER) => basic, copper, bronze, silver, gold | dual
    [19, "1", "2-----"], // OS => Linux, Windows, FreeBSD
    [20, "1", "-2----"], // ZALOHOVANI => 0, 25, 100, 500, 1000 | geo
    [22, "1", "-2----"]  // DOPLNKY => firewall, monitor, ISPManager, Watcher
  ]);

  else if(name=="MANAGEDHPC") return([
    [0,  "1", "---2--"], // SLUZBA => vlastni, vps, dedik, managed, rack
    [3,  "1", "2-----"], // ZNAČKA SERVERU => master, hp, dell
    [5,  "1", "--2---"], // SESTAVA HP => 120, 165, 320
    [10, "1", "2----2"], // KONEKTIVITA (SERVER) => basic, copper, bronze, silver, gold | dual
    [19, "1", "2-----"], // OS => Linux, Windows, FreeBSD
    [20, "1", "-2----"], // ZALOHOVANI => 0, 25, 100, 500, 1000 | geo
    [22, "1", "-2----"]  // DOPLNKY => firewall, monitor, ISPManager, Watcher
  ]);

  else if(name=="MANAGEDHPD") return([
    [0,  "1", "---2--"], // SLUZBA => vlastni, vps, dedik, managed, rack
    [3,  "1", "2-----"], // ZNAČKA SERVERU => master, hp, dell
    [5,  "1", "---2--"], // SESTAVA HP => 120, 165, 320
    [10, "1", "2----2"], // KONEKTIVITA (SERVER) => basic, copper, bronze, silver, gold | dual
    [19, "1", "2-----"], // OS => Linux, Windows, FreeBSD
    [20, "1", "-2----"], // ZALOHOVANI => 0, 25, 100, 500, 1000 | geo
    [22, "1", "-2----"]  // DOPLNKY => firewall, monitor, ISPManager, Watcher
  ]);

  else if(name=="MANAGEDHPE") return([
    [0,  "1", "---2--"], // SLUZBA => vlastni, vps, dedik, managed, rack
    [3,  "1", "2-----"], // ZNAČKA SERVERU => master, hp, dell
    [5,  "1", "----2-"], // SESTAVA HP => 120, 165, 320
    [10, "1", "2----2"], // KONEKTIVITA (SERVER) => basic, copper, bronze, silver, gold | dual
    [19, "1", "2-----"], // OS => Linux, Windows, FreeBSD
    [20, "1", "-2----"], // ZALOHOVANI => 0, 25, 100, 500, 1000 | geo
    [22, "1", "-2----"]  // DOPLNKY => firewall, monitor, ISPManager, Watcher
  ]);

  else if(name=="MANAGEDHPF") return([
    [0,  "1", "---2--"], // SLUZBA => vlastni, vps, dedik, managed, rack
    [3,  "1", "2-----"], // ZNAČKA SERVERU => master, hp, dell
    [5,  "1", "-----2"], // SESTAVA HP => 120, 165, 320
    [10, "1", "2----2"], // KONEKTIVITA (SERVER) => basic, copper, bronze, silver, gold | dual
    [19, "1", "2-----"], // OS => Linux, Windows, FreeBSD
    [20, "1", "-2----"], // ZALOHOVANI => 0, 25, 100, 500, 1000 | geo
    [22, "1", "-2----"]  // DOPLNKY => firewall, monitor, ISPManager, Watcher
  ]);






  else if(name=="QUARTERRACK") return([
    [0,  "1", "----2-"], // SLUZBA => vlastni, vps, dedik, managed, rack
    [2,  "1", "2-----"], // VELIKOST (RACKU) => 10U, 23U, 47U
    [11, "1", "2-----"], // KONEKTIVITA (RACK) => copper, silver, gold, platinum | dual
    [13, "1", "2-----"]  // ENERGIE (RACK) => 0.5, 1, 2, 4 | dual
  ]);
  else if(name=="HALFRACK") return([
    [0,  "1", "----2-"], // SLUZBA => vlastni, vps, dedik, managed, rack
    [2,  "1", "-2----"], // VELIKOST (RACKU) => 10U, 23U, 47U
    [11, "1", "2-----"], // KONEKTIVITA (RACK) => copper, silver, gold, platinum | dual
    [13, "1", "-2----"]  // ENERGIE (RACK) => 0.5, 1, 2, 4 | dual
  ]);
  else if(name=="FULLRACK") return([
    [0,  "1", "----2-"], // SLUZBA => vlastni, vps, dedik, managed, rack
    [2,  "1", "--2---"], // VELIKOST (RACKU) => 10U, 23U, 47U
    [11, "1", "2---2-"], // KONEKTIVITA (RACK) => copper, silver, gold, platinum | dual
    [13, "1", "--2---"]  // ENERGIE (RACK) => 0.5, 1, 2, 4 | dual
  ]);
  else if(name=="FULLRACKPLATINUM") return([
    [0,  "1", "----2-"], // SLUZBA => vlastni, vps, dedik, managed, rack
    [2,  "1", "--2---"], // VELIKOST (RACKU) => 10U, 23U, 47U
    [11, "1", "---22-"], // KONEKTIVITA (RACK) => copper, silver, gold, platinum | dual
    [13, "1", "--2---"]  // ENERGIE (RACK) => 0.5, 1, 2, 4 | dual
  ]);








  else if(name=="CLOUD0") return([
    [0,  "1", "-----2"], // SLUZBA => vlastni, vps, dedik, managed, rack, cloud
    [14, "1", "2-----"], // HDD CLOUD => 100, 300, 500, 1000, 2000
    [15, "1", "2-----"], // RAM CLOUD => 4, 8, 16, 32, 48, 64
    [16, "1", "2-----"], // CPU CLOUD => 1, 2, 4, 8, 16, 24
    [17, "1", "2-----"], // KONEKTIVITA CLOUD => copper, silver, gold, platinum | dual
    [21, "0", "------"]  // DATACENTRUM => nezalezi, praha, brno
  ]);
  else if(name=="CLOUD1") return([
    [0,  "1", "-----2"], // SLUZBA => vlastni, vps, dedik, managed, rack, cloud
    [14, "1", "-2----"], // HDD CLOUD => 100, 300, 500, 1000, 2000
    [15, "1", "-2----"], // RAM CLOUD => 4, 8, 16, 32, 48, 64
    [16, "1", "2-----"], // CPU CLOUD => 1, 2, 4, 8, 16, 24
    [17, "1", "2-----"], // KONEKTIVITA CLOUD => copper, silver, gold, platinum | dual
    [21, "0", "------"]  // DATACENTRUM => nezalezi, praha, brno
  ]); 
  else if(name=="CLOUD2") return([
    [0,  "1", "-----2"], // SLUZBA => vlastni, vps, dedik, managed, rack, cloud
    [14, "1", "--2---"], // HDD CLOUD => 100, 300, 500, 1000, 2000
    [15, "1", "--2---"], // RAM CLOUD => 4, 8, 16, 32, 48, 64
    [16, "1", "-2----"], // CPU CLOUD => 1, 2, 4, 8, 16, 24
    [17, "1", "2-----"], // KONEKTIVITA CLOUD => copper, silver, gold, platinum | dual
    [21, "0", "------"]  // DATACENTRUM => nezalezi, praha, brno
  ]);
  else if(name=="CLOUD3") return([
    [0,  "1", "-----2"], // SLUZBA => vlastni, vps, dedik, managed, rack, cloud
    [14, "1", "---2--"], // HDD CLOUD => 100, 300, 500, 1000, 2000
    [15, "1", "---2--"], // RAM CLOUD => 4, 8, 16, 32, 48, 64
    [16, "1", "--2---"], // CPU CLOUD => 1, 2, 4, 8, 16, 24
    [17, "1", "2-----"], // KONEKTIVITA CLOUD => copper, silver, gold, platinum | dual
    [21, "0", "------"]  // DATACENTRUM => nezalezi, praha, brno
  ]);
  else if(name=="CLOUD4") return([
    [0,  "1", "-----2"], // SLUZBA => vlastni, vps, dedik, managed, rack, cloud
    [14, "1", "----2-"], // HDD CLOUD => 100, 300, 500, 1000, 2000
    [15, "1", "----2-"], // RAM CLOUD => 4, 8, 16, 32, 48, 64
    [16, "1", "---2--"], // CPU CLOUD => 1, 2, 4, 8, 16, 24
    [17, "1", "2-----"], // KONEKTIVITA CLOUD => copper, silver, gold, platinum | dual
    [21, "0", "------"]  // DATACENTRUM => nezalezi, praha, brno
  ]);








  else if(name=="pololetne") return([
    [23, "1", "-2----"]  // SMLUVNI PODMINKY => mesicne, pololetne, rocne
  ]);
  else if(name=="rocne") return([
    [23, "1", "--2---"]  // SMLUVNI PODMINKY => mesicne, pololetne, rocne
  ]);
  else if(name=="geobackup") return([
    [20, "1", "1----2"]  // ZALOHOVANI => 0, 25, 100, 500, 1000 | geo
  ]);
  else if(name=="AKCEdedi") return([
    [0,  "1", "--2---"], // SLUZBA => vlastni, vps, dedik, managed, rack
    [4,  "1", "2-----"], // SESTAVA MASTER => starter, medium, expert, master | managed
    [21, "1", "2-----"], // DATACENTRUM => nezalezi, praha, brno
    [22, "1", "-2----"], // DOPLNKY => firewall, monitor, Webmin, ISPManager
    [23, "1", "1-----"]  // SMLUVNI PODMINKY => mesicne, pololetne, rocne | 2 roky smlouva
  ]);
  else if(name=="AKCEvirt") return([
    [0,  "1", "-2----"], // SLUZBA => vlastni, vps, dedik, managed, rack
    [7,  "1", "-2----"], // HDD => 30, 60, 120, 200, 400
    [8,  "1", "--2---"], // RAM => 256, 512, 1024, 2048, 4096
    [9,  "1", "--2---"], // CPU => 1/4, 1/2, 1, 2, 4
    [20, "1", "1-----"], // ZALOHOVANI => 0, 25, 100, 500, 1000 | geo
    [23, "1", "1-----"]  // SMLUVNI PODMINKY => mesicne, pololetne, rocne
  ]);
  else if(name=="AKCEhous") return([
    [0,  "1", "2-----"], // SLUZBA => vlastni, vps, dedik, managed, rack
    [1,  "1", "-11-11"], // PROSTOR (PRO HOUSING) => 1u, 2u, 4u, T, 2T, 4T
    [10, "1", "2-----"], // KONEKTIVITA (SERVER) => basic, copper, bronze, silver, gold | dual
    [23, "1", "1-----"]  // SMLUVNI PODMINKY => mesicne, pololetne, rocne
  ]);
  else if(name=="AKCEhosp") return([
    [0,  "1", "2-----"], // SLUZBA => vlastni, vps, dedik, managed, rack
    [1,  "1", "-11-11"], // PROSTOR (PRO HOUSING) => 1u, 2u, 4u, T, 2T, 4T
    [10, "1", "1----2"], // KONEKTIVITA (SERVER) => basic, copper, bronze, silver, gold | dual
    [20, "1", "1-----"], // ZALOHOVANI => 0, 25, 100, 500, 1000 | geo
    [22, "1", "-2----"], // DOPLNKY => firewall, monitor, ISPManager, Watcher
    [23, "1", "1-----"]  // SMLUVNI PODMINKY => mesicne, pololetne, rocne
  ]);
   else if(name=="AKCEcloud") return([
    [14, "1", "-2----"], // HDD CLOUD => 100, 300, 500, 1000, 2000
    [15, "1", "-2----"], // RAM CLOUD => 4, 8, 16, 32, 48, 64
    [16, "1", "2-----"], // CPU CLOUD => 1, 2, 4, 8, 16, 24
    [17, "1", "2-----"], // KONEKTIVITA CLOUD => copper, silver, gold, platinum | dual
    [23, "1", "2-----"]  // SMLUVNI PODMINKY => mesicne, pololetne, rocne 
  ]); 
  else if(name=="AKCEcloud0") return([
    [14, "1", "2-----"], // HDD CLOUD => 100, 300, 500, 1000, 2000
    [15, "1", "2-----"], // RAM CLOUD => 4, 8, 16, 32, 48, 64
    [16, "1", "2-----"], // CPU CLOUD => 1, 2, 4, 8, 16, 24
    [17, "1", "2-----"] // KONEKTIVITA CLOUD => copper, silver, gold, platinum | dual
  ]);  
  else if(name=="AKCEmana") return([
    [0,  "1", "--2---"], // SLUZBA => vlastni, vps, dedik, managed, rack
    [4,  "1", "---2--"], // SESTAVA MASTER => starter, medium, expert, master
    [10, "1", "---2-2"], // KONEKTIVITA (SERVER) => basic, copper, bronze, silver, gold | dual
    [20, "1", "1-----"], // ZALOHOVANI => 0, 25, 100, 500, 1000 | geo
    [21, "1", "2-----"], // DATACENTRUM => nezalezi, praha, brno
    [22, "1", "-2----"], // DOPLNKY => firewall, monitor, ISPManager, Watcher
    [23, "1", "1-----"]  // SMLUVNI PODMINKY => mesicne, pololetne, rocne
  ]);
  else if(name=="AKCEhp") return([
    [0,  "1", "--2---"], // SLUZBA => vlastni, vps, dedik, managed, rack
    [5,  "1", "-2----"], // SESTAVA HP => 120, 165, 320
    [10, "1", "-----2"], // KONEKTIVITA (SERVER) => basic, copper, bronze, silver, gold | dual
    [19, "1", "2-----"], // OS => Linux, Windows, FreeBSD
    [20, "1", "1-----"], // ZALOHOVANI => 0, 25, 100, 500, 1000 | geo
    [22, "1", "-2----"], // DOPLNKY => firewall, monitor, ISPManager, Watcher  
    [23, "1", "1-----"]  // SMLUVNI PODMINKY => mesicne, pololetne, rocne 
  ]);
  return([
    [0,  "1", "2-----"], // SLUZBA => vlastni, vps, dedik, managed, rack
    [1,  "1", "2-----"], // PROSTOR (PRO HOUSING) => 1u, 2u, 4u, T, 2T, 4T
    [10, "1", "2-----"], // KONEKTIVITA (SERVER) => basic, copper, bronze, silver | dual
    [12, "1", "2-----"]  // ENERGIE (SERVER) => 150, 300, 600, 1000 | dual
  ]);
} 
function meetsPackage(name){ 
data=getPackageData(name); 
for(var y=0; y<data.length; y++){ 
if(data[y][1]!="-") if(data[y][1]!=sect[data[y][0]].state) return(false); 
for(var x=0; x<data[y][2].length; x++){ 
if(data[y][2].charAt(x)!="-") if(data[y][2].charAt(x)!=sect[data[y][0]].el[x].state) return(false); 
} 
} 
return(true); 
} 
 
//************************************************************************************************ 
//************************************************************************************************ 
//************************************************************************************************ 
function raph() { 
R = Raphael("configurer", raphWidth, raphHeight); 
sectNames=["SERVICE:", "Space:", "Size:", "Server brand:", "Master configuration:", "HP configuration:", "DELL configuration:", "HDD:", "RAM:", "CPU:", "Connectivity:", "Connectivity:", "Energy:", "Energy:", "HDD:", "RAM:", "CPU:", "Connectivity:", "Operation system:", "Operation system:", "Backups:", "Data center:", "Add-ons:", "Payment conditions:"]; 
initConfigurer( 
[ 
[[0, "Your own server (housing)", 6, "housing.png", "YOUR OWN SERVER (HOUSING)\n \nPlacement of your on server in a datacenter.", " HOUSING [6 EUR] ID{14643}"], 
[0, "Virtual server (VPS)", 12, "vps.png", "VIRTUAL SERVER (VPS)\n \nVirtual server leasing.", " VIRTUAL SERVER [12 EUR] ID{19463}"], 
[0, "Dedicated server", 40, "server-r610.png", "DEDICATED SERVER\n \nLeasing of a server the software\nequipment of which istaken care of by the customer.", " DEDICATED SERVER [40 EUR] ID{14641}"], 
[0, "Managed server", 116, "server-r610.png", "MANAGED SERVER\n \nLeasing of a server the basic SW equipment of which isn't being \nadministered by Master Internet administrators.", " MANAGED SERVER [40 EUR] ID{14642}\n- Administration [76 EUR]"], 
[0, "Rack leasing", 24, "racks.png", "RACK CABINET LEASING\n \nSo-called rack-hosting.", " RACK LEASING [24 EUR] ID{14644}"], 
[0, "Cloud hosting", 2, "cloud.png", "CLOUD HOSTING\n \nLeasing of a server in cloud to the customers needs.", " CLOUD HOSTING [2 EUR] ID{21001}"]], 
[[0, "1U", 24, "rackmount1.png", "HOUSING SPACE: 1U", "- Customer server (set 1U) [24 EUR] ID{15477}"], 
[0, "2U", 40, "rackmount2.png", "HOUSING SPACE: 2U", "- Customer server (set 2U) [40 EUR] ID{15477}"], 
[0, "4U", 68, "rackmount4.png", "HOUSING SPACE: 4U", "- Customer server (set 4U) [68 EUR] ID{15477}"], 
[0, "1 Tower", 24, "tower1.png", "HOUSING SPACE: 1 Tower", "- Customer server (set 1PC) [24 EUR] ID{15477}"], 
[0, "2 Towers", 40, "tower2.png", "HOUSING SPACE: 2 Towers", "- Customer server (set 2PCs) [40 EUR] ID{15477}"], 
[0, "4 Towers", 68, "tower4.png", "HOUSING SPACE: 4 Towers", "- Customer server (set 4PCs) [68 EUR] ID{15477}"]], 
[[0, "10U", 200, "rack10.png", "RACK SIZE: 10U", "- Leasing of space (set 10U) [200 EUR] ID{15486}"], 
[0, "23U", 248, "rack23.png", "RACK SIZE: 10U", "- Leasing of space (set 23U) [248 EUR] ID{15486}"], 
[0, "47U", 344, "rack47.png", "RACK SIZE: 47U", "- Leasing of space (set 47U) [344 EUR] ID{15486}"], 
[0, "", 0, "", "", ""], 
[0, "", 0, "", "", ""], 
[0, "", 0, "", "", ""]], 
[[0, "MASTER", 0, "master.png", "SERVER BY MASTER INTERNET", ""], 
[0, "HP", 0, "hp.png", "SERVER BY HP", ""], 
[0, "DELL", 0, "dell.png", "SERVER BY DELL", ""], 
[0, "", 0, "", "", ""], 
[0, "", 0, "", "", ""], 
[0, "", 0, "", "", ""]], 
[[0, "Server Starter", 68, "dedicated-starter.png", "SERVER STARTER\n \nCPU INTEL Core i3-540\nRAM 4 GB (4x 1024 MB, DDR3 1333MHz)\nHDD 2x 320 GB, Western Digital RE3\nMB INTEL MB DP55WB, 1333MHz FSB\nSupply 400 Watt", "- Server Starter [68 EUR] ID{14665}"],
[0, "Server Medium", 80, "dedicated-medium.png", "SERVER MEDIUM\n \nCPU INTEL Core i5-760\nRAM 8 GB (4x 2048 MB, DDR3 1333MHz)\nHDD 2x 500 GB, Western Digital RE3\nMB INTEL MB DP55WB, 1333MHz FSB\nSupply 400 Watt", "- Server Medium [80 EUR] ID{14666}"], 
[0, "Server Master", 168, "dedicated-master.png", "SERVER MASTER\n \n2x Quad-Core Intel Xeon E5506\nRAM 24 GB (6x 4GB 1333MHz DDR3)\nHDD 2x 500 GB, Western Digital RE4\nIntel Server Board Hanlan Creek i5520\nSupply 600 Watt", "- Server Master [168 EUR] ID{14668}"], 
[0, "", 0, "", "", ""], 
[0, "", 0, "", "", ""], 
[0, "", 0, "", "", ""]], 
[[0, "HP Proliant A", 48, "server-120g6.png", "HP DL120G7\n \nIntel Xeon i3-2100\n4 GB DDR3 RAM\n2x HDD 250 GB", "- Server HP Proliant A [48 EUR] ID{21370}"], 
 [0, "HP Proliant B", 64, "server-120g6.png", "HP DL120G7\n \nIntel Xeon E3-1230\n8 GB DDR3 RAM\n2x HDD 500 GB", "- Server HP Proliant B [64 EUR] ID{21371}"], 
 [0, "HP Proliant C", 108, "server-120g6.png", "HP DL120G7\n \nIntel Xeon E3-1230\n16 GB DDR3 RAM\n2x HDD 500 GB hotplug", "- Server HP Proliant C [108 EUR] ID{21372}"],  
 [0, "HP Proliant D", 160, "server-165g7.png", "HP DL160G6\n \n2x Intel Xeon E5506\n24 GB DDR3 RAM\n2x HDD 1000 GB SATA hotplug", "- Server HP Proliant D [160 EUR] ID{21373}"], 
 [0, "HP Proliant E", 180, "server-165g7.png", "HP DL160G6\n \n2x Intel Xeon E5620\n24 GB DDR3 RAM\n2x HDD 300 GB SAS hotplug", "- Server HP Proliant E [180 EUR] ID{21374}"], 
 [0, "HP Proliant F", 204, "server-165g7.png", "HP DL160G6\n \n2x Intel Xeon E5506\n32 GB DDR3 RAM\n2x 600GB 6G SAS 15K hotplug", "- Server HP Proliant F [204 EUR] ID{21375}"]], 
[[0, "Poweredge R310", 116, "server-r310.png", "DELL POWEREDGE R310\n \nIntel Xeon X3430, 2.4GHz\n2x 4GB Dual Rank RDIMMs 1333MHz\n2x 250 GB Serial ATAu 7.2k 3.5\"\n16X DVD-ROM Drive SATA\n3 of DELL service within 4 hours", "- Server PowerEdge R310 [116 EUR] ID{19743}"], 
 [0, "Poweredge R415", 161, "server-r310.png", "DELL POWEREDGE R415\n \n2x AMD Opteron 4170HE 2.1GHz\n8x 1GB Single Rank UDIMMs 1333MHz\n2x 146GB SAS 15k 3.5\"\n16X DVD-ROM Drive SATA\n3 of DELL service within 4 hours", "- Server PowerEdge R415 [161 EUR] ID{19744}"], 
 [0, "Poweredge R610", 225, "server-r610.png", "DELL POWEREDGE R610\n \n2x Intel Xeon E5620 Processor 2.4GHz\n12x 1GB Single Rank UDIMMs 1333MHz\n2x 146GB SAS 6Gbps 15k 2.5\" HD Hot Plug\n16X DVD+/-RW ROM Drive SATA\n3 of DELL service within 4 hours", "- Server PowerEdge R610 [225 EUR] ID{14671}"], 
 [0, "", 0, "", "", ""], 
 [0, "", 0, "", "", ""], 
 [0, "", 0, "", "", ""]], 
[[0, "30 GB", 1, "hdd30.png", "30 GB OF DISK SPACE", "- Disk space 30 GB [1 EUR] ID{19492}"], 
 [0, "60 GB", 2, "hdd60.png", "60 GB OF DISK SPACE", "- Disk space 60 GB [2 EUR] ID{19493}"], 
 [0, "120 GB", 3, "hdd120.png", "120 GB OF DISK SPACE", "- Disk space 120 GB [3 EUR] ID{19494}"], 
 [0, "200 GB", 6, "hdd200.png", "200 GB OF DISK SPACE", "- Disk space 200 GB [6 EUR] ID{19495}"], 
 [0, "400 GB", 11, "hdd400.png", "400 GB OF DISK SPACE", "- Disk space 400 GB [11 EUR] ID{19496}"], 
 [0, "", 0, "", "", ""]], 
[[0, "256 MB", 2, "ram256.png", "256 MB RAM\n \nguaranteed RAM", "- RAM 256 MB [2 EUR] ID{19487}"], 
 [0, "512 MB", 4, "ram512.png", "512 MB RAM\n \nguaranteed RAM", "- RAM 512 MB [4 EUR] ID{19488}"], 
 [0, "1024 MB", 8, "ram1024.png", "1024 MB RAM\n \nguaranteed RAM", "- RAM 1024 MB [8 EUR] ID{19489}"], 
 [0, "2048 MB", 16, "ram2048.png", "2048 MB RAM\n \nguaranteed RAM", "- RAM 2048 MB [16 EUR] ID{19490}"], 
 [0, "4096 MB", 32, "ram4096.png", "4096 MB RAM\n \nguaranteed RAM", "- RAM 4096 MB [32 EUR] ID{19491}"], 
 [0, "", 0, "", "", ""]], 
[[0, "1/4 Core", 2, "cpu14.png", "1/4 CORE\n \nGuaranteed computing capacity,\nprocesor Quad-Core Intel Xeon E5507", "- Processor power 1/4 Core [2 EUR] ID{19497}"], 
 [0, "1/2 Core", 4, "cpu12.png", "1/2 CORE\n \nGuaranteed computing capacity,\nprocesor Quad-Core Intel Xeon E5507", "- Processor power 1/2 Core [4 EUR] ID{19498}"], 
 [0, "1 Core", 8, "cpu1.png", "1 CORE\n \nGuaranteed computing capacity,\nprocesor Quad-Core Intel Xeon E5507", "- Processor power 1 Core [8 EUR] ID{19499}"], 
 [0, "2 Cores", 16, "cpu2.png", "2 CORES\n \nGuaranteed computing capacity,\nprocesor Quad-Core Intel Xeon E5507", "- Processor power 2 Cores [16 EUR] ID{19500}"], 
 [0, "4 Cores", 32, "cpu4.png", "4 CORES\n \nGuaranteed computing capacity,\nprocesor Quad-Core Intel Xeon E5507", "- Processor power 4 Cores [32 EUR] ID{19501}"], 
 [0, "", 0, "", "", ""]], 
[[0, "Basic Line 100 Mbps", 4, "line-basic.png", "BASIC LINE\n \nDedicated line 100 Mbps\ndata CZ: 20 TB / month\ndata foreign countries: 500 GB / month", "- Connectivity BASIC: Dedicated line 100 Mbps, data CZ 20 TB / month, data foreign countries 500 GB / month [4 EUR] ID{19478}"], 
 [0, "Copper Line 1 Gbps", 8, "line-copper.png", "COPPER LINE\n \nDedicated line 1 Gbps\ndata CZ: 100 TB / month\ndata foreign countries: 2 TB / month", "- Connectivity COPPER: Dedicated line 1 Gbps, data CZ 100 TB / month, data foreign countries 2 TB / month [8 EUR] ID{19479}"], 
 [0, "Bronze Line 1 Gbps", 8, "line-bronze.png", "BRONZE LINE\n \nDedicated line 1 Gbps\nbandwidth CZ: 100 Mbps\nbandwidth foreign countries: 10 Mbps",  "- Connectivity BRONZE: Dedicated line 1 Gbps, bandwidth CZ 100 Mbps, bandwidth foreign countries 10 Mbps [8 EUR] ID{19483}"], 
 [0, "Silver Line 1 Gbps", 12, "line-silver.png", "SILVER LINE\n \nDedicated line 1 Gbps\nbandwidth CZ: 100 Mbps\nbandwidth foreign countries: 10 Mbps\nbandwidth Slovakia: 50 Mbps", "- Connectivity SILVER: Dedicated line 1 Gbps, bandwidth CZ 100 Mbps, bandwidth foreign countries 10 Mbps, bandwidth Slovakia 50 Mbps [12 EUR] ID{19484}"], 
 [0, "Gold Line 1 Gbps", 28, "line-gold.png", "GOLD LINE\n \nDedicated line 1 Gbps\nbandwidth CZ: 1 Gbps\nbandwidth foreign countries: 50 Mbps\nbandwidth Slovakia: 250 Mbps", "- Connectivity GOLD: Dedicated line 1 Gbps, bandwidth CZ 1 Gbps, bandwidth foreign countries 50 Mbps, bandwidth Slovakia 250 Mbps [28 EUR] ID{19485}"], 
 [1, "| DUAL", 8, "dual-line.png", "DUAL LINE\n \nSecond connectivity branch.\nEliminates dropouts in case of failure of\nnetwork devices (card, switch, router).\nNote: doesn’t double the line capacity.", "- Second connectivity branch [8 EUR] ID{19514}"]],  
[[0, "Copper Line 1 Gbps", 20, "line-copper.png", "COPPER LINE\n \nDedicated line 1 Gbps\ndata CZ: 100 TB / month\ndata foreign countries: 2 TB / month", "- Connectivity COPPER: Dedicated line 1 Gbps, data CZ 100 TB / month, data foreign countries 2 TB / month [20 EUR] ID{19479}"], 
 [0, "Silver Line 1 Gbps", 60, "line-silver.png", "SILVER LINE\n \nDedicated line 1 Gbps\nbandwidth CZ: 100 Mbps\nbandwidth foreign countries: 10 Mbps\nbandwidth Slovakia: 50 Mbps", "- Connectivity SILVER: Dedicated line 1 Gbps, bandwidth CZ 100 Mbps, bandwidth foreign countries 10 Mbps, bandwidth Slovakia 50 Mbps [60 EUR] ID{19484}"], 
 [0, "Gold Line 1 Gbps", 100, "line-gold.png", "GOLD LINE\n \nDedicated line 1 Gbps\nbandwidth CZ: 1 Gbps\nbandwidth foreign countries: 50 Mbps\nbandwidth Slovakia: 250 Mbps", "- Connectivity GOLD: Dedicated line 1 Gbps, bandwidth CZ 1 Gbps, bandwidth foreign countries 50 Mbps, bandwidth Slovakia 250 Mbps [100 EUR] ID{19485}"], 
 [0, "Platinum Line 1 Gbps", 180, "line-platinum.png", "PLATINUM LINE\n \nDedicated line 1 Gbps\nbandwidth CZ: 1 Gbps\nbandwidth foreign countries: 100 Mbps\nbandwidth Slovakia: 500 Mbps", "- Connectivity PLATINUM: Dedicated line 1 Gbps, bandwidth CZ 1 Gbps, bandwidth foreign countries 100 Mbps, bandwidth Slovakia 500 Mbps (1000 NIX, 100 TRA, 500 SIX) [180 EUR] ID{19486}"], 
 [1, "| DUAL", 0, "dual-line.png", "DUAL LINE\n \nSecond connectivity branch.\ nEliminates dropouts in case of failure of\nnetwork devices (card, switch, router).\nNote: doesn’t double the line capacity.", "- Second connectivity branch [0 EUR] ID{19514}"],
 [0, "", 0, "", "", ""]], 
[[0, "up to 100 W", 19, "default.png", "ELECTRIC ENERGY UP TO 100 W\n-we are talking about the real energy input of the machine\n(corresponds with about 300W of the supply)", "- Power consumption — 100W [19 EUR] ID{19503}"], 
 [0, "up to 150 W", 29, "default.png", " ELECTRIC ENERGY UP TO 150 W\n-we are talking about the real energy input of the machine\n(corresponds with about 400W of the supply)", "- Power consumption — 150W [29 EUR] ID{19504}"], 
 [0, "up to 250 W", 48, "default.png", " ELECTRIC ENERGY UP TO 250 W\n-we are talking about the real energy input of the machine\n(corresponds with about 500W of the supply)", "- Power consumption — 250W [48 EUR] ID{19505}"], 
 [0, "up to 500 W", 96, "default.png", " ELECTRIC ENERGY UP TO 500 W\n-we are talking about the real energy input of the machine", "- Electric energy take-off — 500W [96 EUR] ID{19507}"], 
 [1, "| DUAL", 23, "dual-power.png", "DUAL POWER\n \nSecond supply branch. Eliminates\ndropouts in case of failure of electric\ndevices (distributor, circuit breaker, source).\nNote: doesn’t double the energy limit.", "- Second supply branch [23 EUR] ID{14721}"],
 [0, "", 0, "", "", ""]], 
[[0, "up to 400 W", 77, "default.png", " ELECTRIC ENERGY UP TO 400 W\n-we are talking about the limit of the real energy input",   "- Power supply\n    - Circuit breaker 16A\n - Electric energy take-off — 400W [72 EUR] ID{19506}"], 
 [0, "up to 800 W", 154, "default.png", " ELECTRIC ENERGY UP TO 800 W\n-we are talking about the limit of the real energy input",   "- Power supply\n    - Circuit breaker 16A\n - Electric energy take-off — 800W [144 EUR] ID{19508}"], 
 [0, "up to 1600 W", 307, "default.png", " ELECTRIC ENERGY UP TO 1600 W\n-we are talking about the limit of the real energy input", "- Power supply\n    - Circuit breaker 16A\n - Electric energy take-off — 1 600W [288 EUR] ID{19509}"], 
 [0, "up to 3200 W", 614, "default.png", " ELECTRIC ENERGY UP TO 3200 W\n-we are talking about the limit of the real energy input", "- Power supply\n    - Circuit breaker 16A\n - Electric energy take-off — 3 200W [576 EUR] ID{19510}"], 
 [1, "| DUAL", 90, "dual-power.png", "DUAL POWER\n \nSecond supply branch. Eliminates\ndropouts in case of failure of electric\ndevices (distributor, circuit breaker, source).\nNote: doesn’t double the energy limit.", "- Second supply branch [90 EUR] ID{14721}"], 
 [0, "", 0, "", "", ""]], 
[[0, "30 GB", 8, "default.png", "30 GB DISK SPACE\n \n(15k SAS)", "- Disk space 30 GB [8 EUR] ID{}"], 
 [0, "100 GB", 25, "default.png", "100 GB DISK SPACE\n \n(15k SAS)", "- Disk space 100 GB [25 EUR] ID{}"], 
 [0, "300 GB", 76, "default.png", "300 GB DISK SPACE\n \n(15k SAS)", "- Disk space 300 GB [76 EUR] ID{}"], 
 [0, "500 GB", 120, "default.png", "500 GB DISK SPACE\n \n(15k SAS)", "- Disk space 500 GB [120 EUR] ID{}"], 
 [0, "", 0, "", "", ""], 
 [0, "", 0, "", "", ""]],
[[0, "1 GB", 6, "default.png", "1 GB RAM\n \nguaranteed RAM", "- RAM 1 GB [6 EUR] ID{}"],   
 [0, "4 GB", 24, "default.png", "4 GB RAM\n \nguaranteed RAM", "- RAM 4 GB [24 EUR] ID{}"], 
 [0, "8 GB", 47, "default.png", "8 GB RAM\n \nguaranteed RAM", "- RAM 8 GB [47 EUR] ID{}"], 
 [0, "16 GB", 95, "default.png", "16 GB RAM\n \nguaranteed RAM", "- RAM 16 GB [95 EUR] ID{}"], 
 [0, "", 0, "", "", ""], 
 [0, "", 0, "", "", ""]], 
[[0, "1 Core", 30, "default.png", "1 CORE AMD Opteron 6174\n \nGuaranteed computing capacity.", "- Processor power 1 Core [30 EUR] ID{}"], 
 [0, "2 Cores", 61, "default.png", "2 CORES AMD Opteron 6174\n \nGuaranteed computing capacity.", "- Processor power 2 Cores [61 EUR] ID{}"], 
 [0, "4 Cores", 121, "default.png", "4 CORES AMD Opteron 6174\n \nGuaranteed computing capacity.", "- Processor power 4 Cores [121 EUR] ID{}"], 
 [0, "", 0, "", "", ""],  
 [0, "", 0, "", "", ""], 
 [0, "", 0, "", "", ""]], 
[[0, "Copper Line 1 Gbps", 8, "line-copper.png", "COPPER LINE\n \nDedicated line 1 Gbps\ndata CZ: 100 TB / month\ndata foreign countries: 2 TB / month", "- Connectivity COPPER: Dedicated line 1 Gbps, data CZ 100 TB / month, data foreign countries 2 TB / month [20 EUR] ID{19479}"], 
[0, "Silver Line 1 Gbps", 12, "line-silver.png", "SILVER LINE\n \nDedicated line 1 Gbps\nbandwidth CZ: 100 Mbps\nbandwidth foreign countries: 10 Mbps\nbandwidth Slovakia: 50 Mbps", "- Connectivity SILVER: Dedicated line 1 Gbps, bandwidth CZ 100 Mbps, bandwidth foreign countries 10 Mbps, bandwidth Slovakia 50 Mbps [60 EUR] ID{19484}"], 
[0, "Gold Line 1 Gbps", 28, "line-gold.png", "GOLD LINE\n \nDedicated line 1 Gbps\nbandwidth CZ: 1 Gbps\nbandwidth foreign countries: 50 Mbps\nbandwidth Slovakia: 250 Mbps", "- Connectivity GOLD: Dedicated line 1 Gbps, bandwidth CZ 1 Gbps, bandwidth foreign countries 50 Mbps, bandwidth Slovakia 250 Mbps [100 EUR] ID{19485}"], 
[0, "Platinum Line 1 Gbps", 56, "line-platinum.png", "PLATINUM LINE\n \nDedicated line 1 Gbps\nbandwidth CZ: 1 Gbps\nbandwidth foreign countries: 100 Mbps\nbandwidth Slovakia: 500 Mbps", "- Connectivity PLATINUM: Dedicated line 1 Gbps, bandwidth CZ 1 Gbps, bandwidth foreign countries 100 Mbps, bandwidth Slovakia 500 Mbps (1000 NIX, 100 TRA, 500 SIX) [180 EUR] ID{19486}"], 
[1, "| DUAL", 0, "dual-line.png", "DUAL LINE\n \nSecond connectivity branch.\ nEliminates dropouts in case of failure of\nnetwork devices (card, switch, router).\nNote: doesn’t double the line capacity.", "- Second connectivity branch [0 EUR] ID{19514}"],
[0, "", 0, "", "", ""]], 
[[0, "Linux Centos", 0, "centos.png", "LINUX - CENTOS", "the chosen Linux distribution is Centos"], 
[0, "Linux Debian", 0, "debian.png", "LINUX - DEBIAN", "the chosen Linux distribution is Debian"], 
[0, "Linux Ubuntu", 0, "ubuntu.png", "LINUX - UBUNTU", "the chosen Linux distribution is Ubuntu"], 
[0, "Windows Server", 0, "windows.png", "OS WINDOWS SERVER 2008\n(WEB edition)", "the chosen OS is Windows"], 
[0, "Other", 0, "default.png", "A different operating system / distribution", "the customer wants an OS different from what he's been offered"], 
[0, "", 0, "", "", ""]], 
[[0, "Linux", 0, "linux.png", "LINUX OS", ""], 
[0, "Windows Server", 14, "windows.png", "WINDOWS SERVER 2008 OS\n(WEB edition)", "- Leasing of  Windows Server 2008 OS [14 EUR] ID{15755}"], 
[0, "FreeBSD", 0, "freebsd.png", "FreeBSD OS", "the customer wants FreeBSD"], 
[0, "", 0, "", "", ""], 
[0, "", 0, "", "", ""], 
[0, "", 0, "", "", ""]], 
[[0, "Without backups", 0, "default.png", "WITHOUT BACKUPS", ""], 
[0, "25 GB", 12, "default.png", "25 GB OF SPACE FOR BACKUPS", "- Backup space 25 GB [12 EUR] ID{15592}"], 
[0, "100 GB", 30, "default.png", "100 GB OF SPACE FOR BACKUPS", "- Backup space 100 GB [30 EUR] ID{19511}"], 
[0, "500 GB", 78, "default.png", "500 GB OF SPACE FOR BACKUPS", "- Backup space 500 GB [78 EUR] ID{19512}"], 
[0, "1000 GB", 116, "default.png", "1000 GB OF SPACE FOR BACKUPS",  "- Backup space 1000 GB [116 EUR] ID{19513}"], 
[1, "| GEO", 0, "default.png", "GEOBACKUP\n \nData are backed up in a different locality\n(data centers Brno / Prague)", "- Geographical separation of backups [0 EUR] ID{19515}"]], 
[[0, "Any", 0, "dc.png", "ANY LOCATION", ""], 
[0, "Master DC Prague", 0, "dc-praha.png", "MASTER DC PRAGUE", "the customers wants a service in Prague"], 
[0, "Master DC Brno", 0, "dc-brno.png", "MASTER DC BRNO", "the customer wants a service in Brno"], 
[0, "", 0, "", "", ""], 
[0, "", 0, "", "", ""], 
[0, "", 0, "", "", ""]], 
[[1, "| +HW Firewall", 24, "firewall.png", "EXTERNAL FIREWALL\n \nConnection of your technologies\nbehind apowerful Cisco ASA5505 HW firewall", "- External firewall [24 EUR] ID{17034}"], 
[1, "| +Monitoring", 4, "monitor.png", "SERVICE MONITORING\n \nService monitoring by the help of Nagios SW\nenables to send e-mails or SMS\nat selected events withing the scope of\nyour server and operated applications.", "- Availability monitoring [4 EUR] ID{14715}"], 
[1, "| +ISP Manager", 8, "ispmanager.png", "ISPManager\n \nControl panel,  a complete solution\nfor the administration of Linux servers.", "- ISPManager Lite [8 EUR] ID{14713}"], 
[1, "| +Transfer watcher", 1, "default.png", "Transfer watcher\n \nTransferred data watcher.",  "- Transfer watcher [1 EUR] ID{14716}"], 
[0, "", 0, "", "", ""], 
[0, "", 0, "", "", ""]], 
[[0, "Monthly payments", 0, "default.png", "MONTHLY PAYMENTS", "the customer will pay monthly"], 
[0, "Biannual payments", 0, "default.png", "BIANNUAL PAYMENTS", "the customer will pay biannually"], 
[0, "Annual payments", 0, "default.png", "ANNUAL PAYMENTS", "the customer will pay annually"], 
[0, "", 0, "", "", ""], 
[0, "", 0, "", "", ""], 
[0, "", 0, "", "", ""]] 
] 
); 
 
/************************************************ SECTION CONDITIONS ****************************************************/ 
sect[0].el[0].circle.click(function(){ // HOUSING 
initializing=true; 
sect[1].turnOn(); //Prostor 
sect[2].turnOff(); //Velikost racku 
sect[3].turnOff(); //Značka serveru 
sect[4].turnOff(); //Sestava Master 
sect[5].turnOff(); //Sestava HP 
sect[6].turnOff(); //Sestava Dell 
sect[7].turnOff(); //HDD 
sect[8].turnOff(); //RAM 
sect[9].turnOff(); //CPU 
sect[10].turnOn(); //Konektivita server 
sect[11].turnOff(); //Konektivita rack 
sect[12].turnOn(); //Energie server 
sect[13].turnOff(); //Energie rack 
sect[14].turnOff(); //HDD Cloud 
sect[15].turnOff(); //RAM Cloud 
sect[16].turnOff(); //CPU Cloud 
sect[17].turnOff(); //Konektivita Cloud 
sect[18].turnOff(); //Operační systém VPS 
sect[19].turnOff(); //Operační systém 
sect[21].turnOn(); //Datacentrum 
initializing=false; moveSections(); updatePrice(); updatePackageList('h'); 
}); 
sect[0].el[1].circle.click(function(){ // VPS 
initializing=true; 
sect[1].turnOff(); //Prostor 
sect[2].turnOff(); //Velikost racku 
sect[3].turnOff(); //Značka serveru 
sect[4].turnOff(); //Sestava Master 
sect[5].turnOff(); //Sestava HP 
sect[6].turnOff(); //Sestava Dell 
sect[7].turnOn(); //HDD 
sect[8].turnOn(); //RAM 
sect[9].turnOn(); //CPU 
sect[10].turnOff(); //Konektivita server 
sect[11].turnOff(); //Konektivita rack 
sect[12].turnOff(); //Energie server 
sect[13].turnOff(); //Energie rack 
sect[14].turnOff(); //HDD Cloud 
sect[15].turnOff(); //RAM Cloud 
sect[16].turnOff(); //CPU Cloud 
sect[17].turnOff(); //Konektivita Cloud 
sect[18].turnOn(); //Operační systém VPS 
sect[19].turnOff(); //Operační systém 
sect[21].turnOff(); //Datacentrum 
initializing=false; moveSections(); updatePrice(); updatePackageList('v'); 
}); 
sect[0].el[2].circle.click(function(){ // DEDICATED 
initializing=true; 
sect[1].turnOff(); //Prostor 
sect[2].turnOff(); //Velikost racku 
sect[3].turnOn(); //Značka serveru 
sect[4].turnOff(); //Sestava Master 
sect[5].turnOff(); //Sestava HP 
sect[6].turnOff(); //Sestava Dell 
sect[7].turnOff(); //HDD 
sect[8].turnOff(); //RAM 
sect[9].turnOff(); //CPU 
sect[10].turnOn(); //Konektivita server 
sect[11].turnOff(); //Konektivita rack 
sect[12].turnOff(); //Energie server 
sect[13].turnOff(); //Energie rack 
sect[14].turnOff(); //HDD Cloud 
sect[15].turnOff(); //RAM Cloud 
sect[16].turnOff(); //CPU Cloud 
sect[17].turnOff(); //Konektivita Cloud 
sect[18].turnOff(); //Operační systém VPS 
sect[19].turnOn(); //Operační systém 
sect[21].turnOn(); //Datacentrum 
if(sect[3].pickedEl.name=="MASTER") sect[4].turnOn(); 
if(sect[3].pickedEl.name=="HP") sect[5].turnOn(); 
if(sect[3].pickedEl.name=="DELL") ssect[6].turnOn(); 
initializing=false; moveSections(); updatePrice(); updatePackageList('d'); 
}); 
sect[0].el[3].circle.click(function(){ // MANAGED 
initializing=true; 
sect[1].turnOff(); //Prostor 
sect[2].turnOff(); //Velikost racku 
sect[3].turnOn(); //Značka serveru 
sect[4].turnOff(); //Sestava Master 
sect[5].turnOff(); //Sestava HP 
sect[6].turnOff(); //Sestava Dell 
sect[7].turnOff(); //HDD 
sect[8].turnOff(); //RAM 
sect[9].turnOff(); //CPU 
sect[10].turnOn(); //Konektivita server 
sect[11].turnOff(); //Konektivita rack 
sect[12].turnOff(); //Energie server 
sect[13].turnOff(); //Energie rack 
sect[14].turnOff(); //HDD Cloud 
sect[15].turnOff(); //RAM Cloud 
sect[16].turnOff(); //CPU Cloud 
sect[17].turnOff(); //Konektivita Cloud 
sect[18].turnOff(); //Operační systém VPS 
sect[19].turnOn(); //Operační systém 
sect[21].turnOn(); //Datacentrum 
if(sect[3].pickedEl.name=="MASTER") sect[4].turnOn(); 
if(sect[3].pickedEl.name=="HP") sect[5].turnOn(); 
if(sect[3].pickedEl.name=="DELL") ssect[6].turnOn(); 
initializing=false; moveSections(); updatePrice(); updatePackageList('m'); 
}); 
sect[0].el[4].circle.click(function(){ // RACK 
initializing=true; 
sect[1].turnOff(); //Prostor 
sect[2].turnOn(); //Velikost racku 
sect[3].turnOff(); //Značka serveru 
sect[4].turnOff(); //Sestava Master 
sect[5].turnOff(); //Sestava HP 
sect[6].turnOff(); //Sestava Dell 
sect[7].turnOff(); //HDD 
sect[8].turnOff(); //RAM 
sect[9].turnOff(); //CPU 
sect[10].turnOff(); //Konektivita server 
sect[11].turnOn(); //Konektivita rack 
sect[12].turnOff(); //Energie server 
sect[13].turnOn(); //Energie rack 
sect[14].turnOff(); //HDD Cloud 
sect[15].turnOff(); //RAM Cloud 
sect[16].turnOff(); //CPU Cloud 
sect[17].turnOff(); //Konektivita Cloud 
sect[18].turnOff(); //Operační systém VPS 
sect[19].turnOff(); //Operační systém 
sect[21].turnOn(); //Datacentrum 
initializing=false; moveSections(); updatePrice(); updatePackageList('r'); 
}); 
sect[0].el[5].circle.click(function(){ // CLOUD 
initializing=true; 
sect[1].turnOff(); //Prostor 
sect[2].turnOff(); //Velikost racku 
sect[3].turnOff(); //Značka serveru 
sect[4].turnOff(); //Sestava Master 
sect[5].turnOff(); //Sestava HP 
sect[6].turnOff(); //Sestava Dell 
sect[7].turnOff(); //HDD 
sect[8].turnOff(); //RAM 
sect[9].turnOff(); //CPU 
sect[10].turnOff(); //Konektivita server 
sect[11].turnOff(); //Konektivita rack 
sect[12].turnOff(); //Energie server 
sect[13].turnOff(); //Energie rack 
sect[14].turnOn(); //HDD Cloud 
sect[15].turnOn(); //RAM Cloud 
sect[16].turnOn(); //CPU Cloud 
sect[17].turnOn(); //Konektivita Cloud 
sect[18].turnOff(); //Operační systém VPS 
sect[19].turnOff(); //Operační systém 
sect[21].turnOff(); //Datacentrum 
initializing=false; moveSections(); updatePrice(); updatePackageList('c'); 
}); 
 
 
 
 
sect[3].el[0].circle.click(function(){ // ZNAČKA MASTER 
initializing=true; 
sect[4].turnOn(); //Sestava Master 
sect[5].turnOff(); //Sestava HP 
sect[6].turnOff(); //Sestava Dell 
initializing=false; moveSections(); updatePrice(); 
}); 
 
sect[3].el[1].circle.click(function(){ // ZNAČKA HP 
initializing=true; 
sect[4].turnOff(); //Sestava Master 
sect[5].turnOn(); //Sestava HP 
sect[6].turnOff(); //Sestava Dell 
initializing=false; moveSections(); updatePrice(); 
}); 
 
sect[3].el[2].circle.click(function(){ // ZNAČKA DELL 
initializing=true; 
sect[4].turnOff(); //Sestava Master 
sect[5].turnOff(); //Sestava HP 
sect[6].turnOn(); //Sestava Dell 
initializing=false; moveSections(); updatePrice(); 
}); 
 
 
} /********** END OF RAPH FUNCTION **************/ 
 
 
/************************************************** FULFIL CONDITIONS *****************************************************/ 
function fulfilConditions(){ 
 
if(sect[20].pickedEl.name=="Without backups") sect[20].el[5].turnOff(); 
else sect[20].el[5].turnOn(); 
 
if(sect[21].pickedEl.name=="Master DC Brno") sect[22].el[0].turnOff(); 
else sect[22].el[0].turnOn(); 
 
if(sect[0].pickedEl.name=="Your own server (housing)") sect[0].picker.animate({fill: "#c99d0a"}, 2*delay, moveStyle); 
if(sect[0].pickedEl.name=="Virtual server (VPS)") sect[0].picker.animate({fill: "#902694"}, 2*delay, moveStyle); 
if(sect[0].pickedEl.name=="Dedicated server") sect[0].picker.animate({fill: "#902694"}, 2*delay, moveStyle); 
if(sect[0].pickedEl.name=="Managed server") sect[0].picker.animate({fill: "#902694"}, 2*delay, moveStyle); 
if(sect[0].pickedEl.name=="Rack leasing") sect[0].picker.animate({fill: "#c99d0a"}, 2*delay, moveStyle); 
if(sect[0].pickedEl.name=="Cloud hosting") sect[0].picker.animate({fill: "#902694"}, 2*delay, moveStyle); 
 
} 
 
 
 
/************************************************** UPDATE/SHOW SERVICE STRUCTURE *****************************************************/ 
function updateServiceInfo(){ 
serviceStructure="SERVICE STRUCTURE: (total price "+actualPrice+",-)\n\n"; 
orderStructure=" <order>\n <comment></comment>\n <location>default</location>\n"; 
serviceNotes="\n\nNOTES\n\n"; 
var sc=0; 
for(var s=0; s<seCount; s++) for(var e=0; e<elCount; e++) if(sect[s].state && sect[s].el[e].state==2){ 
if(sect[s].el[e].service[0]==" "||sect[s].el[e].service[0]=="-"){ 
sc++; 
var begin1=0, end1=0, begin2=0, end2=0, servicePrice, serviceId, paymentPeriod; 
var str = new String(sect[s].el[e].service);  
begin1=str.indexOf("["); end1=str.indexOf("]")-4; if(begin1>0&&end1>0) servicePrice=str.substring(begin1+1,end1); 
begin2=str.indexOf("{"); end2=str.indexOf("}"); if(begin2>0&&end2>0) serviceId=str.substring(begin2+1,end2); 
serviceStructure+=str.split('ID{'+serviceId+'}').join('')+"\n"; 
orderStructure+='<orderItem id="'+sc+'">\n'; 
if(sc==1) orderStructure+=' <parentId>-1</parentId>\n'; 
else orderStructure+=' <parentId>1</parentId>\n'; 
orderStructure+=' <offerId>'+serviceId+'</offerId>\n'; 
if(sc==1){ 
if(sect[23].pickedEl.name=="Monthly payments") paymentPeriod=1;  
else if(sect[23].pickedEl.name=="Biannual payments") paymentPeriod=6; 
else paymentPeriod=12; 
orderStructure+=' <period>'+paymentPeriod+'</period>\n'; 
} 
if(sc==1&&orderRelDiscount!=0) orderStructure+=' <discount type="relative">'+orderRelDiscount+'</discount>\n'; 
if(sc==2&&orderAbsDiscount!=0) orderStructure+=' <discount type="absolute">'+orderAbsDiscount+'</discount>\n'; 
if(sc==1) orderStructure+=' <price currency="3">'+servicePrice+'</price>\n'; 
else orderStructure+=' <price currency="3" moveToParent="1">'+servicePrice+'</price>\n'; 
orderStructure+='</orderItem>\n\n'; 
if(serviceId==14642){ 
orderStructure+='<orderItem id="2">\n <parentId>1</parentId>\n <offerId>15619</offerId>\n <price currency="3" moveToParent="1">76</price>\n</orderItem>\n\n'; 
sc++; 
} 
} 
else if(sect[s].el[e].service!="") serviceNotes+=sect[s].el[e].service+"\n"; 
} 
orderStructure+=" </order>\n"; 
var tempStr = new String(orderStructure); 
tempStr = tempStr.split('<comment></comment>').join('<comment>'+serviceNotes+'\n </comment>'); 
orderStructure = tempStr.split('<location>default</location>').join('<location>'+sect[21].pickedEl.name+'</location>'); 
$('#serviceInfo').val("\n\n\n"+serviceStructure+serviceNotes+"\n\n\n");  
$('#orderInfo').val(orderStructure); 
} 
 
function showServiceInfo(){ 
alert("\n\n\n"+serviceStructure+serviceNotes+"\n\n\n"); 
} 
 
function showOrderInfo(){ 
alert("\n\n\n"+orderStructure+"\n\n\n"); 
} 
 
 
 
 
