/*
 Pop-Up Functions
 */
function popupSetup() {
	var a;
	for (var i = 0; (a = document.links[i]); i++) {
		if (a.target && a.target.indexOf("_popup") == 0) {
			a.onclick = popup;
		}
	}
}

function popup() {
	var a = this.target.split(":");
	var sFeatures = a[1];
	window.open(this.href, a.length > 2 ? a[2] : String((new Date()).getTime()), sFeatures);
	return false;
}

/*
 image swapping
 */
var temp; 
function swap(tag, modus) {
	tag.style.backgroundColor = (modus? "#eeeeee" : "#ffffff");
	//tag.style.color = (modus? "#ffffff" : "#333333");
}

var supported = (document.getElementById || document.all);
if (supported)
{
	document.write("<STYLE>");
	document.write("p.accessoriesLink {display: none}");
	document.write('</STYLE>');

	var max = 20;
	var text = new Array();
	var shown = new Array();
	for (var i=1;i<=max;i++)
	{
		shown[i+1] = false;
	}

}


function blocking(i, maxi)
{
	if (!supported)
	{
		// alert('This link does not work in your browser.');
		return;
	}
	shown[i] = (shown[i]) ? false : true;
	current = (shown[i]) ? 'block' : 'none';
	weight = (shown[i]) ? 'bold' : 'normal';
  notcurrent = (shown[i]) ? 'none' : 'block';
	/* var temp = "";
	for (x in document.getElementById('img'+i)) {
		temp += x + ": " + document.getElementById('img'+i)[x] + "<br>\n";
	} */

	if (document.getElementById)
	{
		if(document.getElementById('links'+i).style.display == 'block') { // if element is active deactivate it
			document.getElementById('img'+i+'right').style.display = 'block';
			document.getElementById('img'+i+'down').style.display = 'none';
			document.getElementById('head'+i).style.fontWeight = 'normal';
			document.getElementById('links'+i).style.display = 'none';
		} else { // if not active 
			for(var j=1; j <= maxi; j++) {
				if(j != i) {
					document.getElementById('img'+j+'right').style.display = 'block';
					document.getElementById('img'+j+'down').style.display = 'none';
					document.getElementById('head'+j).style.fontWeight = 'normal';
					document.getElementById('links'+j).style.display = 'none';
				} else {
					document.getElementById('img'+j+'right').style.display = 'none';
					document.getElementById('img'+j+'down').style.display = 'block';
					document.getElementById('head'+j).style.fontWeight = 'bold';
					document.getElementById('links'+j).style.display = 'block';
				}
			}
		}

	}
	else if (document.all)
	{
		for(var j=1; j <= maxi; j++) {
			if(document.all['links'+i].style.display == 'block') {
				document.all['img'+i+'right'].style.display = 'block';	
				document.all['img'+i+'down'].style.display = 'none';	
				document.all['head'+i].style.fontWeight = 'normal';	
				document.all['links'+i].style.display = 'none';
			} else {
					if(j != i) {
						document.all['img'+j+'right'].style.display = 'block';	
						document.all['img'+j+'down'].style.display = 'none';	
						document.all['head'+j].style.fontWeight = 'normal';	
						document.all['links'+j].style.display = 'none';
		
					} else {
						document.all['img'+j+'right'].style.display = 'none';	
						document.all['img'+j+'down'].style.display = 'block';	
						document.all['head'+j].style.fontWeight = 'bold';	
						document.all['links'+j].style.display = 'block';
					}
			}
		}	
	}
}


