
var handys = new Array();
var gruppe = new Array();
var cgroup = new Array();
handys[0] = new Array('Apple iPad 2 16 GB schwarz','203596','Apple');gruppe['203596'] = new Array('7');
handys[1] = new Array('Apple iPad 2 16 GB schwarz + MultiSIM','210595','Apple');gruppe['210595'] = new Array('7');
handys[2] = new Array('Apple iPad 2 16 GB weiss','205596','Apple');gruppe['205596'] = new Array('7');
handys[3] = new Array('Apple iPad 2 16 GB weiss + MultiSIM','211595','Apple');gruppe['211595'] = new Array('7');
handys[4] = new Array('Apple iPad 2 32 GB schwarz','204596','Apple');gruppe['204596'] = new Array('7');
handys[5] = new Array('Apple iPad 2 32 GB schwarz + MultiSIM','211596','Apple');gruppe['211596'] = new Array('7');
handys[6] = new Array('Apple iPad 2 32 GB weiss','205595','Apple');gruppe['205595'] = new Array('7');
handys[7] = new Array('Apple iPad 2 32 GB weiss + MultiSIM','212595','Apple');gruppe['212595'] = new Array('7');
handys[8] = new Array('Apple iPad 2 64 GB schwarz','203595','Apple');gruppe['203595'] = new Array('7');
handys[9] = new Array('Apple iPad 2 64 GB schwarz + MultiSIM','212596','Apple');gruppe['212596'] = new Array('7');
handys[10] = new Array('Apple iPad 2 64 GB weiss','204595','Apple');gruppe['204595'] = new Array('7');
handys[11] = new Array('Apple iPad 2 64 GB weiss + MultiSIM','212597','Apple');gruppe['212597'] = new Array('7');
handys[12] = new Array('Apple iPhone 3GS 8 GB schwarz','98595','Apple');gruppe['98595'] = new Array('3');
handys[13] = new Array('Apple iPhone 3GS 8 GB schwarz NEUWERTIG','157595','Apple');gruppe['157595'] = new Array('3');
handys[14] = new Array('Apple iPhone 4 16 GB schwarz NEUWERTIG','155595','Apple');gruppe['155595'] = new Array('3');
handys[15] = new Array('Apple iPhone 4 16 GB weiss NEUWERTIG','184596','Apple');gruppe['184596'] = new Array('3');
handys[16] = new Array('Apple iPhone 4 32 GB schwarz NEUWERTIG','156595','Apple');gruppe['156595'] = new Array('3');
handys[17] = new Array('Apple iPhone 4 32 GB weiss NEUWERTIG','184595','Apple');gruppe['184595'] = new Array('3');
handys[18] = new Array('Apple iPhone 4 8 GB schwarz','214596','Apple');gruppe['214596'] = new Array('3');
handys[19] = new Array('Apple iPhone 4 8 GB schwarz NEUWERTIG','224596','Apple');gruppe['224596'] = new Array('3');
handys[20] = new Array('Apple iPhone 4 8 GB weiss','214595','Apple');gruppe['214595'] = new Array('3');
handys[21] = new Array('Apple iPhone 4 8 GB weiss NEUWERTIG','224597','Apple');gruppe['224597'] = new Array('3');
handys[22] = new Array('Apple iPhone 4S 16 GB schwarz','214600','Apple');gruppe['214600'] = new Array('3');
handys[23] = new Array('Apple iPhone 4S 16 GB schwarz NEUWERTIG','224598','Apple');gruppe['224598'] = new Array('3');
handys[24] = new Array('Apple iPhone 4S 16 GB weiss','214599','Apple');gruppe['214599'] = new Array('3');
handys[25] = new Array('Apple iPhone 4S 16 GB weiss NEUWERTIG','224599','Apple');gruppe['224599'] = new Array('3');
handys[26] = new Array('Apple iPhone 4S 32 GB schwarz','214601','Apple');gruppe['214601'] = new Array('3');
handys[27] = new Array('Apple iPhone 4S 32 GB schwarz NEUWERTIG','224600','Apple');gruppe['224600'] = new Array('3');
handys[28] = new Array('Apple iPhone 4S 32 GB weiss','214598','Apple');gruppe['214598'] = new Array('3');
handys[29] = new Array('Apple iPhone 4S 32 GB weiss NEUWERTIG','224604','Apple');gruppe['224604'] = new Array('3');
handys[30] = new Array('Apple iPhone 4S 64 GB schwarz','214602','Apple');gruppe['214602'] = new Array('3');
handys[31] = new Array('Apple iPhone 4S 64 GB schwarz NEUWERTIG','224602','Apple');gruppe['224602'] = new Array('3');
handys[32] = new Array('Apple iPhone 4S 64 GB weiss','214597','Apple');gruppe['214597'] = new Array('3');
handys[33] = new Array('Apple iPhone 4S 64 GB weiss NEUWERTIG','224603','Apple');gruppe['224603'] = new Array('3');
handys[34] = new Array('Xtra Pac Apple iPhone 3GS 8 GB','119595','Apple');gruppe['119595'] = new Array('3');
handys[35] = new Array('Xtra Pac Apple iPhone 4 8 GB schwarz','224606','Apple');gruppe['224606'] = new Array('3');
handys[36] = new Array('BlackBerry Bold 9780','135596','BlackBerry');gruppe['135596'] = new Array('3');
handys[37] = new Array('BlackBerry Bold 9900','191595','BlackBerry');gruppe['191595'] = new Array('3');
handys[38] = new Array('BlackBerry Curve 9360','195595','BlackBerry');gruppe['195595'] = new Array('3');
handys[39] = new Array('BlackBerry Torch 9800','134595','BlackBerry');gruppe['134595'] = new Array('3');
handys[40] = new Array('BlackBerry Torch 9810','192595','BlackBerry');gruppe['192595'] = new Array('3');
handys[41] = new Array('Emporia ELEGANCEplus','163595','Emporia');gruppe['163595'] = new Array('1');
handys[42] = new Array('Emporia TALKcomfort','202595','Emporia');gruppe['202595'] = new Array('1');
handys[43] = new Array('HTC 7 Pro','174596','HTC');gruppe['174596'] = new Array('3');
handys[44] = new Array('HTC Desire HD','131596','HTC');gruppe['131596'] = new Array('3');
handys[45] = new Array('HTC Desire S','162595','HTC');gruppe['162595'] = new Array('3');
handys[46] = new Array('HTC Radar','215595','HTC');gruppe['215595'] = new Array('3');
handys[47] = new Array('HTC Sensation','181595','HTC');gruppe['181595'] = new Array('3');
handys[48] = new Array('HTC Sensation XE','216595','HTC');gruppe['216595'] = new Array('3');
handys[49] = new Array('HTC Sensation XL','219597','HTC');gruppe['219597'] = new Array('3');
handys[50] = new Array('HTC Wildfire S','173595','HTC');gruppe['173595'] = new Array('3');
handys[51] = new Array('Xtra Pac LG A133','115595','LG');gruppe['115595'] = new Array('1');
handys[52] = new Array('Motorola DEFY+','213595','Motorola');gruppe['213595'] = new Array('3');
handys[53] = new Array('Motorola GLEAM','167595','Motorola');gruppe['167595'] = new Array('1');
handys[54] = new Array('Motorola GLEAM+ anthrazit','226597','Motorola');gruppe['226597'] = new Array('1');
handys[55] = new Array('Motorola GLEAM+ weiß','226598','Motorola');gruppe['226598'] = new Array('1');
handys[56] = new Array('Motorola RAZR','219596','Motorola');gruppe['219596'] = new Array('3');
handys[57] = new Array('Xtra Pac Motorola GLEAM+ anthrazit','226599','Motorola');gruppe['226599'] = new Array('1');
handys[58] = new Array('Nokia 100','218599','Nokia');gruppe['218599'] = new Array('1');
handys[59] = new Array('Nokia 3720 classic','42595','Nokia');gruppe['42595'] = new Array('1');
handys[60] = new Array('Nokia 500 Street Gigs Pac','209595','Nokia');gruppe['209595'] = new Array('3');
handys[61] = new Array('Nokia 700','218596','Nokia');gruppe['218596'] = new Array('3');
handys[62] = new Array('Nokia 7230 MyCommunity','69595','Nokia');gruppe['69595'] = new Array('1');
handys[63] = new Array('Nokia 8800 Arte','8179','Nokia');gruppe['8179'] = new Array('1');
handys[64] = new Array('Nokia Asha 300','227596','Nokia');gruppe['227596'] = new Array('1');
handys[65] = new Array('Nokia C2-01','161596','Nokia');gruppe['161596'] = new Array('1');
handys[66] = new Array('Nokia C5-00 5MP','197595','Nokia');gruppe['197595'] = new Array('1');
handys[67] = new Array('Nokia E52 Navigation','74596','Nokia');gruppe['74596'] = new Array('3');
handys[68] = new Array('Nokia Lumia 710','226596','Nokia');gruppe['226596'] = new Array('3');
handys[69] = new Array('Nokia Lumia 800','216596','Nokia');gruppe['216596'] = new Array('3');
handys[70] = new Array('Nokia Lumia 800 cyan','217596','Nokia');gruppe['217596'] = new Array('3');
handys[71] = new Array('Nokia X7-00','179595','Nokia');gruppe['179595'] = new Array('3');
handys[72] = new Array('Xtra Pac Nokia 100','218598','Nokia');gruppe['218598'] = new Array('1');
handys[73] = new Array('Xtra Pac Nokia 1616','52596','Nokia');gruppe['52596'] = new Array('1');
handys[74] = new Array('Xtra Pac Nokia 2220 pink','51595','Nokia');gruppe['51595'] = new Array('1');
handys[75] = new Array('Xtra Pac Nokia C1-01','144595','Nokia');gruppe['144595'] = new Array('1');
handys[76] = new Array('Xtra Pac Nokia C2-01','161595','Nokia');gruppe['161595'] = new Array('1');
handys[77] = new Array('Xtra Pac Nokia X2-00','110595','Nokia');gruppe['110595'] = new Array('1');
handys[78] = new Array('Samsung B2710 metallic orange','126595','Samsung');gruppe['126595'] = new Array('1');
handys[79] = new Array('Samsung B2710 misty blue','127595','Samsung');gruppe['127595'] = new Array('1');
handys[80] = new Array('Samsung E1050 weiss','215596','Samsung');gruppe['215596'] = new Array('1');
handys[81] = new Array('Samsung E1190','190595','Samsung');gruppe['190595'] = new Array('1');
handys[82] = new Array('Samsung Galaxy Ace schwarz','152595','Samsung');gruppe['152595'] = new Array('3');
handys[83] = new Array('Samsung Galaxy Ace weiß','225596','Samsung');gruppe['225596'] = new Array('3');
handys[84] = new Array('Samsung Galaxy Nexus','223596','Samsung');gruppe['223596'] = new Array('3');
handys[85] = new Array('Samsung Galaxy Note','219598','Samsung');gruppe['219598'] = new Array('3');
handys[86] = new Array('Samsung Galaxy S II','172595','Samsung');gruppe['172595'] = new Array('3');
handys[87] = new Array('Samsung Galaxy S II ceramic white','194596','Samsung');gruppe['194596'] = new Array('3');
handys[88] = new Array('Samsung Galaxy S Plus schwarz','186595','Samsung');gruppe['186595'] = new Array('3');
handys[89] = new Array('Samsung Galaxy S Plus weiß','223597','Samsung');gruppe['223597'] = new Array('3');
handys[90] = new Array('Samsung Galaxy Tab 10.1N','220596','Samsung');gruppe['220596'] = new Array('7');
handys[91] = new Array('Samsung Galaxy Y','199595','Samsung');gruppe['199595'] = new Array('3');
handys[92] = new Array('Samsung Star II schwarz','146595','Samsung');gruppe['146595'] = new Array('1');
handys[93] = new Array('Samsung Star II weiß','145595','Samsung');gruppe['145595'] = new Array('1');
handys[94] = new Array('Samsung Wave 3','217597','Samsung');gruppe['217597'] = new Array('3');
handys[95] = new Array('Xtra Pac Samsung E1050 (schwarz)','220597','Samsung');gruppe['220597'] = new Array('1');
handys[96] = new Array('Xtra Pac Samsung E1190','189595','Samsung');gruppe['189595'] = new Array('1');
handys[97] = new Array('Xtra Pac Samsung Galaxy mini','185595','Samsung');gruppe['185595'] = new Array('3');
handys[98] = new Array('Xtra Pac Samsung Galaxy Y','198595','Samsung');gruppe['198595'] = new Array('3');
handys[99] = new Array('Xtra Pac Samsung S5230 Star black','77595','Samsung');gruppe['77595'] = new Array('1');
handys[100] = new Array('Xtra Pac Samsung Star II','169595','Samsung');gruppe['169595'] = new Array('1');
handys[101] = new Array('Sony Ericsson Mix Walkman™','206595','Sony Ericsson');gruppe['206595'] = new Array('1');
handys[102] = new Array('Sony Ericsson T280i','10131','Sony Ericsson');gruppe['10131'] = new Array('1');
handys[103] = new Array('Sony Ericsson Xperia™ X8','141595','Sony Ericsson');gruppe['141595'] = new Array('3');
handys[104] = new Array('Sony Ericsson Xperia™ active','208595','Sony Ericsson');gruppe['208595'] = new Array('3');
handys[105] = new Array('Sony Ericsson Xperia™ arc S','201595','Sony Ericsson');gruppe['201595'] = new Array('3');
handys[106] = new Array('Sony Ericsson Xperia™ mini pro','187595','Sony Ericsson');gruppe['187595'] = new Array('3');
handys[107] = new Array('Sony Ericsson Xperia™ neo','159595','Sony Ericsson');gruppe['159595'] = new Array('11');
handys[108] = new Array('Sony Ericsson Xperia™ ray','188595','Sony Ericsson');gruppe['188595'] = new Array('3');
handys[109] = new Array('Sony Ericsson Xperia™ ray schwarz','196595','Sony Ericsson');gruppe['196595'] = new Array('3');
handys[110] = new Array('Xtra Pac Sony Ericsson Mix Walkman™ Extreme Playgrounds Edition','207595','Sony Ericsson');gruppe['207595'] = new Array('1');
handys[111] = new Array('Xtra Pac Sony Ericsson Spiro weiss-grün','100596','Sony Ericsson');gruppe['100596'] = new Array('1');
handys[112] = new Array('Xtra Pac Sony Ericsson Xperia™ X8','142595','Sony Ericsson');gruppe['142595'] = new Array('3');
handys[113] = new Array('T-Mobile web\'n\'walk Box IV','8439','T-Mobile');gruppe['8439'] = new Array('9');
handys[114] = new Array('Telekom Speedstick LTE','183595','Telekom');gruppe['183595'] = new Array('9');
handys[115] = new Array('Telekom move','200595','Telekom');gruppe['200595'] = new Array('3');
handys[116] = new Array('Telekom web\'n\'walk Stick Business II','175595','Telekom');gruppe['175595'] = new Array('9');
handys[117] = new Array('Telekom web\'n\'walk Stick Fusion III','150595','Telekom');gruppe['150595'] = new Array('9');
handys[118] = new Array('Xtra Pac Telekom web\'n\'walk Stick Basic IV','151595','Telekom');gruppe['151595'] = new Array('9');
 
cgroup['1'] = new Array('2','3','5','6','7','8','9','10');
cgroup['3'] = new Array('1','2','4','5','6','7','8','9','10');
cgroup['7'] = new Array('1','2','3','5','6','8','9','10');
cgroup['9'] = new Array('1','2','3','5','6','7','8','10');
cgroup['11'] = new Array('');


if(!Array.indexOf){ Array.prototype.indexOf = 
function(obj){ for(var i=0; i<this.length; i++){ if(this[i]==obj){ return i;} } return -1;} } var selectlistIds = new Array();
function fuellen (act,idhandy1, idhandy2, idhandy3) { if (act!='1') { idhandy1=document.getElementById('handy1').value;idhandy2=document.getElementById('handy2').value;idhandy3=document.getElementById('handy3').value;} var optionNeu = null;selectlistIds = new Array();clearSelectlists();var manu = '';var j = 0;for (var i = 0; i <handys.length; i++) { if (checkHandy(handys[i][1]) || groupids.length==0) { if (manu!=handys[i][2]) { if (typeof optgroup != 'undefined'&&j!=0) {hinzufuegen(optgroup);}  optgroup = document.createElement('optgroup'); optgroup.label = handys[i][2]; manu=handys[i][2];} optionNeu=document.createElement('option');optionNeu.value=handys[i][1];optionNeu.innerHTML=handys[i][0];optgroup.appendChild(optionNeu);selectlistIds.push(handys[i][1]);j++;} } if (typeof optgroup != 'undefined') {hinzufuegen(optgroup);} document.getElementById('handy1').selectedIndex=0;if (idhandy1!='') { idx1=selectlistIds.indexOf(idhandy1);document.getElementById('handy1').selectedIndex=idx1+1;} document.getElementById('handy2').selectedIndex=0;if (idhandy2!='') { idx2=selectlistIds.indexOf(idhandy2);document.getElementById('handy2').selectedIndex=idx2+1;} document.getElementById('handy3').selectedIndex=0;if (idhandy3!='') { idx3=selectlistIds.indexOf(idhandy3);document.getElementById('handy3').selectedIndex=idx3+1;} } 
function uniqueArr(a) {  temp = new Array(); for(i=0;i<a.length;i++){ if(!contains(temp, a[i])){ temp.length+=1;temp[temp.length-1]=a[i];}  }  return temp;} 
function contains(a, e) {  for(j=0;j<a.length;j++) {  if(a[j]==e)
 return true
 }; return false;} 
function refill(pos) { dname='handy'+pos;hid1=document.getElementById('handy1').value;hid2=document.getElementById('handy2').value;hid3=document.getElementById('handy3').value;groupids = new Array();if (hid1!='') { groupids.push(parseInt(gruppe[hid1]));} if (hid2!='') { groupids.push(parseInt(gruppe[hid2]));} if (hid3!='') { groupids.push(parseInt(gruppe[hid3]));} groupids=uniqueArr(groupids);fuellen();} 
function checkHandy (i) { var hgrpid=gruppe[i];var groupid;if (groupids.length==0) { return true;} else{ var retcount = 0;for (var j = 0; j < groupids.length; j++) { groupid=groupids[j];if (parseInt(groupid)==parseInt(hgrpid)) { return true;break;} else { for (k=0;k<cgroup[hgrpid].length;k++) { if (cgroup[hgrpid][k]==groupid) { retcount++;} } } } if (retcount==groupids.length) { return true;} } return false;} 
function clearSelectlists() { var sArray = new Array('handy1','handy2','handy3');for (var j = 0; j < sArray.length; j++) { dady=document.getElementById(sArray[j]);if (dady.hasChildNodes()) { while (dady.childNodes.length > 0) { dady.removeChild(dady.firstChild);} } optionNeu=document.createElement('option');optionNeu.value='';optionNeu.innerHTML='Bitte wählen Sie';dady.appendChild(optionNeu);} } 
function hinzufuegen (optgroup) {  document.handyvgl.handy1.appendChild(optgroup); document.handyvgl.handy2.appendChild(optgroup.cloneNode(true)); document.handyvgl.handy3.appendChild(optgroup.cloneNode(true));} 
function arrayUnion(arr1,arr2) { var arr3=new Array(); for (var i in arr1) { for (var j in arr2) { if (arr1[i] == arr2[j]) { arr3.push(arr1[i]);} } } return arr3;} fillAll();
function archOn() { document.handyvgl.archivFlag.checked=true;anzeigen();} 
function archOff() { document.handyvgl.archivFlag.checked=false; anzeigen();} 
function delhandset(pos) { pos1=pos+1;data = eval('document.handyvgl.handy'+pos1);data.selectedIndex = 0;handyvgldel(pos);anzeigen();} 

