if (!window.keyLang) {
	keyLang = 'en';
}

var lessLocalized = '';
var moreLocalized = '';

var arrayMsg = new Array();
arrayMsg['en'] = new Array('Click to show', 'Click to hide');

if (typeof arrayMsg[keyLang] != 'undefined') {
	lessLocalized = ' ('+ arrayMsg[keyLang][0] + ')';
	moreLocalized = ' ('+ arrayMsg[keyLang][1] + ')';
}

imgout=new Image(9,9);
imgin=new Image(9,9);

imgout.src="/etc_images/elements/arrow.png";
imgin.src="/etc_images/elements/arrow-down.png";


function getPodValue() {

	document.getElementById('podvalue').innerHTML = 'language key: ' + keyLang;

	/* set the correct values */
	document.getElementById("labelfirst").innerHTML= moreLocalized;
	document.getElementById("labelsecond").innerHTML=moreLocalized;
}

//this switches expand collapse icons
function filter(imagename,objectsrc){
	if (document.images){
		document.images[imagename].src=eval(objectsrc+".src");
	}
}

//show OR hide function depends on if element is shown or hidden
function soh(id) { 
	
	if (document.getElementById) { // DOM3 = IE5, NS6
		if (document.getElementById(id).style.display == "none"){
			document.getElementById(id).style.display = 'block';
			filter(("img"+id),'imgin');
			document.getElementById("label" + id).innerHTML = moreLocalized;
		} else {
			filter(("img"+id),'imgout');
			document.getElementById(id).style.display = 'none';
			document.getElementById("label" + id).innerHTML =  lessLocalized;
		}	
	} else { 
		if (document.layers) {	
			if (document.id.display == "none"){
				document.id.display = 'block';
				filter(("img"+id),'imgin');
			} else {
				filter(("img"+id),'imgout');	
				document.id.display = 'none';
			}
		} else {
			if (document.all.id.style.visibility == "none"){
				document.all.id.style.display = 'block';
			} else {
				filter(("img"+id),'imgout');
				document.all.id.style.display = 'none';
			}
		}
	}
}
