function updateSet(vTikiSet,selectedSet,linkStyle){

	//alert('sel ['+selectedSet+']');
	for (i in vTikiSet){
			if ((selectedSet==vTikiSet[0])||(vTikiSet[i]==selectedSet)){
    			show('bg'+vTikiSet[i]);
    		}else{
    			hide('bg'+vTikiSet[i]);
    		}
	}
	for (i in vTikiSet){
		document.anchors['dg'+vTikiSet[i]].style.background = "#d9e8c0"; 
	}
	linkStyle.background='#bfe7ff';
}

function show(id) {
	var op = null;
	if (document.getElementById) {
		op = document.getElementById(id);
	} else if (document.all) {
		op = document.all[id];
	} else if (document.layers) {
		op = document.layers[id];
	}
	
	if (!op) {
		return 
	} else if (op.style) {
			op.style.display = ""; 
	} else { 
		op.visibility = "show"; 
	}
}

function hide(id) {
	var op = null;
	if (document.getElementById) {
		op = document.getElementById(id);
	} else if (document.all) {
		op = document.all[id];
	} else if (document.layers) {
		op = document.layers[id];
	}
	
	if (!op) {
		return 
	} else if (op.style) {
			op.style.display = "none"; 
	} else { 
		op.visibility = ""; 
	}
}

function sH1(id) {
	if (id != '') {
		options(id);
	}
}

function sH3(id1, id2, id3) {
    if (id1 != '') options(id1);
    if (id2 != '') options(id2);
	if (id3 != '') options(id3);
}

function options(id) {
	var op = null;
	if (document.getElementById) {
		op = document.getElementById(id);
	} else if (document.all) {
		op = document.all[id];
	} else if (document.layers) {
		op = document.layers[id];
	}
	
	if (!op) {
		return 
	} else if (op.style) {
		if (op.style.display == "none") { 
			op.style.display = ""; 
		} else { 
			op.style.display = "none"; 
		}
	} else { 
		op.visibility = "show"; 
	}
}

function updateBg(newBg) {
	//alert ('newBg['+newBg+']');
	var op = null;
	if (document.getElementById) {
		op = document.getElementById('previewBgImg');
	} else if (document.all) {
		op = document.all['previewBgImg'];
	} else if (document.layers) {
		op = document.layers['previewBgImg'];
	}
	
	if (!op) {
		return 
	} else if (op.style) {
		op.style.background = "url('/img/"+newBg+"') center no-repeat"; 
	}
}

function nStyle(id,whichStyle) {
	var op = null;
	if (document.getElementById) {
		op = document.getElementById(id);
	} else if (document.all) {
		op = document.all[id];
	} else if (document.layers) {
		op = document.layers[id];
	}
	
	if (!op) {
		return 
	}

	if (whichStyle == 'on') {
		op.style.background='#fff';
		op.style.cursor='pointer';
	} else if (whichStyle == 'current') {
		op.style.cursor='auto';
		op.style.background='#bfe7ff';
	} else if (whichStyle == 'offAccount') {
		op.style.cursor='auto';
		op.style.background='#F3E5A5';
	} else {
		op.style.cursor='auto';
		op.style.background='#d9e8c0';
	}
}

function display(){
        	document.form.platform.value=navigator.platform;
        	document.form.resolution.value=screen.width+"x"+screen.height;
        	document.form.depth.value = window.screen.colorDepth;
			
		var colours = window.screen.colorDepth;
			document.form.colours.value = Math.pow (2, colours);
       }