// JavaScript Document : Used for Public FAQs in RightNow displayed on the Support pages

function kmt_DisplayResetDetails(dn) {


	devices=[['GOx00#B1#M1#M3#M5',['txt_5steps','1310go']],['ECLIPSE#N1#N2',['txt_5steps','1310eclipse']],['ONE2#E1#E2#Z1#Z2#Z3#Z4#Z5#Z6',['txt_5steps','1310one2']],['ONE1#G1#G2',['txt_5steps','1310one1']],['GOx30#J1#J2#J3#J4#J5#J6#JA#JB',['txt_5steps','1310gox20']],['GOx20#M2#M4#M6#M8#M9',['txt_5steps','1310gox20']],['RIDER#K1#K2',['txt_rider','1310rider']],['ONE30#PB#PC#PE#PF#PH#PI#PK#PL#ZC#ZD#ZE',['txt_holdpwr','']],['XL30#GC#GD#GE#RB#RC#RE#RF#RH#RI#RK#RL#RM#RN#RO#RP#RV',['txt_holdpwr','']],['GOx10#V5#V7#V8#V9',['txt_5steps','1310gox10']],['ONE3#Y1#Y2#Y3#Y4#Y5#Y6#Y7#PN#PO#PP#PQ',['txt_3steps','2027one3rd']],['ONEXL#L1#L2#L3#L4#L5#L6#L7#L8#L9#F1#F2#F3#F4',['txt_5steps','2027onexl']],['GOx40#WB#WL#WR#WT',['txt_holdpwr','']],['ECLIPSE2#DA',['txt_5steps','1310eclipse2']],['ONE40#P1#P2#PM#PR#PS#PT#PU#PV#ZA#ZB#ZF',['txt_holdpwr','']],['XL40#GA#GB#GF#RR#RS#RT#RU',['txt_holdpwr','']],['XLLIVE#R1#R2#R4',['txt_holdpwr','']],['START#XA#XB#XC#XD',['txt_start','']],['XXL#RX#RY',['txt_holdpwr','']],['GOx50#W1#W2#W3#W5#W6#W8',['txt_holdpwr','']]];

	maxd=devices.length;

	document.getElementById('txt_3steps').style.display='none';
	document.getElementById('txt_5steps').style.display='none';
	document.getElementById('txt_rider').style.display='none';
	document.getElementById('txt_holdpwr').style.display='none';
	document.getElementById('txt_start').style.display='none';
	document.getElementById('img_block').style.display='none';

	sern=document.forms['sn_form'].elements['sn'].value.substring(0,2).toUpperCase();
	
	if (sern=='') { sern='no_sn_entered'; }
	steps=null;
	image=null;
	for (i=0;i<maxd;i++) {
		if ((devices[i][0].match("#"+sern)) || (devices[i][0].match(dn+"#"))) {
			steps=devices[i][1][0];
			image=devices[i][1][1];
			device=devices[i][0];
			break;
		}
		document.getElementById('output').innerHTML=document.getElementById('nodevice').value;
	}

	if (steps) {
		document.forms['sn_form'].elements['sn'].value='';
		document.getElementById('output').innerHTML=' ';
		document.getElementById(steps).style.display='block';
	}

	if (image) {
		document.getElementById('img_big').innerHTML='<img src=http://www.tomtom.com/lib/img/cs/'+image+'.jpg border=1 />';
		document.getElementById('img_detail').innerHTML='<img src=http://www.tomtom.com/lib/img/cs/'+image+'_detail.jpg border=0 />';
		document.getElementById('img_block').style.display='block';
	}

	if (sern!='no_sn_entered') {
		device=device.split('#');
		device=device[0];
		for (i=0;i<document.forms['dev'].elements['devnames'].length;i++) {
			if (document.forms['dev'].elements['devnames'][i].value==device) {
				document.forms['dev'].elements['devnames'].selectedIndex=i;
			}
		}
	}

	return false;

}



function kmt_ShowDeviceName(sn) {

	sn=sn.substring(0,2);
	sn=sn.toUpperCase();

	device=document.getElementById('nodevice').value;

	devicesn=new Array("B1","DA","E1","E2","F3","G1","G2","GA","GB","GC","GD","GE","GF","IA","J1","J2","J4","J6","JA","JB","K1","K2","L1","L2","L3","L4","L6","L7","L8","L9","LF","LG","M1","M2","M3","M4","M5","M6","M7","M8","N1","N2","P1","P2","PA","PB","PC","PD","PE","PF","PH","PI","PK","PL","PM","PN","PO","PP","PQ","PR","PS","PT","PU","PV","R1","R2","R4","RB","RC","RE","RF","RH","RI","RK","RL","RM","RN","RO","RP","RR","RS","RT","RU","RV","RX","RY","V5","V7","W1","W2","W3","W5","W6","W8","WB","WL","WR","WT","XA","XB","XC","XD","Y1","Y2","Y3","Y4","Y5","Y6","Y7","Y8","Z1","Z2","Z3","ZA","ZB","ZC","ZD","ZE","ZF");


	devicenames=new Array("GO (classic)","ECLIPSE II - 2 GB","ONE 2nd Edition","ONE 2nd Edition","ONE XL HDT - 1GB","ONE 1st Edition","ONE 1st Edition","XL IQ Routes / 340 - 2GB","ONE XL IQ Routes TTS* / 340S - 2GB","XL (30 Series) / 330 - 1GB","XL (30 Series) / 330 - 2GB","XL (30 Series) TTS* / 330S - 1GB","XL IQ Routes / 340 - 1GB","Carminat TomTom","GO 530 - 1GB","GO 530 - 2 GB","GO 730 - 2GB","GO 930 - 4GB","GO 630 - 1GB","GO 630 - 2GB","RIDER 1st Edition","RIDER 2nd Edition","ONE XL - 1GB","ONE XL - 512MB","ONE XL","ONE XL - 1GB TTS*","ONE XL - 1GB","ONE XL - 1GB TTS*","ONE XL - 512MB","ONE XL - 1GB","GO 7000 - 4GB","GO 9000 - 4GB","GO 300","GO 520 - 512MB","GO 500","GO 520 - 1GB","GO 700 - 2.5GB","GO 720 - 2GB","GO 715","GO 920 - 4GB","DAIHATSU / ECLIPSE / TOYOTA","DAIHATSU / ECLIPSE / TOYOTA","ONE IQ Routes (White Pearl) - 2GB","ONE IQ Routes (White Pearl) - 2GB","ONE (30 Series) / 125 / 130 - 512MB","ONE (30 Series) / 125 / 130 - 1GB","ONE (30 Series) / 125 / 130 - 2GB","ONE (30 Series) / 125 / 130 - 512MB","ONE (30 Series) / 125 / 130 - 1GB","ONE (30 Series) / 125 / 130 - 2GB","ONE (30 Series) TTS* / 125S / 130S - 1GB","ONE (30 Series) TTS* / 125S / 130S - 2GB","ONE (30 Series) TTS* / 125S / 130S - 1GB","ONE (30 Series) TTS* / 125S / 130S - 2GB TTS*","ONE 140S Red (US) - 2GB","ONE (30 Series) / 125 / 130 - 1GB","ONE (30 Series) / 125 / 130 - 2GB","ONE (30 Series) / 125 / 130 - 1GB TTS*","ONE (30 Series) TTS* / 125S / 130S - 2GB","ONE IQ Routes / 140 - 1GB","ONE IQ Routes / 140 - 2GB","ONE IQ Routes TTS* / 140S - 1GB","ONE IQ Routes TTS* / 140S - 2GB","ONE (30 Series) / 125 / 130 512MB","XL LIVE IQ Routes - 2GB","XL LIVE IQ Routes - 2GB TTS*","XL 340 S LIVE","XL (30 Series) / 330 - 1GB","XL (30 Series) / 330 - 2GB","XL (30 Series) / 330 - 1GB","XL (30 Series) / 330 - 2GB","XL (30 Series) TTS* / 330S - 1GB","XL (30 Series) TTS* / 330S - 2GB","XL (30 Series) TTS* / 330S - 1GB","XL (30 Series) TTS* / 330S - 2GB","XL (30 Series) / 330 - 1GB","XL (30 Series) / 330 - 2GB","XL (30 Series) TTS* / 330S - 1GB","XL (30 Series) TTS* / 330S - 2GB","XL IQ Routes / 340 - 1GB","XL IQ Routes / 340 - 2GB","XL IQ Routes TTS* / 340S - 1GB","XL IQ Routes TTS* / 340S - 2GB","XL Black Edition (30 Series) - 2GB","XXL 540 S - 2GB","XXL 530 S - 2GB","GO 510/710","GO 910 - 20GB","GO 950 LIVE - 4GB","GO 750 / 550 LIVE - 2GB","GO 750 / 550 LIVE - 1GB","GO 950 - 4GB","GO 750 / 550 - 2GB","GO 750 / 550 - 1GB","GO 940 LIVE - 4BG","GO 740 LIVE - 2GB","GO 740 LIVE - 2GB","GO 540 LIVE - 1GB","START - 1GB","START - 2GB","START - 1GB","START - 2GB","ONE 3rd Edition - 1GB","ONE 3rd Edition - 1GB","ONE 3rd Edition - 512MB","ONE 3rd Edition - 512MB","ONE 3rd Edition - 1GB TTS*","ONE 3rd Edition - 512MB","ONE 3rd Edition - 1GB","ONE 3rd Edition - 1GB","ONE 2nd Edition - 1GB","ONE 2nd Edition - 512MB","ONE 2nd Edition","ONE IQ Routes / 140 - 2GB","ONE IQ Routes TTS* / 140S - 2GB","ONE (30 Series) / 125 / 130 - 1GB","ONE (30 Series) / 125 / 130 - 2GB","ONE (30 Series) TTS* / 125S / 130S - 1GB","ONE IQ Routes / 140 - 1GB");

	for (i=0; i<devicesn.length; i++) {
		if (sn==devicesn[i]) {
			device=devicenames[i];
			break;
		}
	}

	document.getElementById('output').innerHTML=device;

	return false;

}



function kmt_ShowBox(bn) {

	if (document.getElementById(bn).style.display=="block") { document.getElementById(bn).style.display="none"; return false; }
	levels=bn.match(/_/g);

	// hide all boxes (main, secondary, etc.)

	allBoxes=document.getElementsByTagName('div');
	for (i=0; i<allBoxes.length; i++) {
		if (allBoxes[i].id.match("BOX")) { document.getElementById(allBoxes[i].id).style.display="none"; }
	}

	// show box and box container(s)

	document.getElementById(bn).style.display="block";
	if (levels==null) {
		return false;
	} else {
		levels=(levels.length)+1;
		temp=bn;
		for (i=0; i<levels; i++) {
			temp=temp.substring(temp,temp.length-3);
			if (temp.length>2) { document.getElementById(temp).style.display="block"; }
		}

		return false;

	}

	return false;

}



function kmt_HideBox(bn) {

	document.getElementById(bn).style.display="none";
	return false;

}