function imgSwap(image)
{
	document.getElementById('lrgimg').src=image;
}

function high(which2){
	theobject=which2
	highlighting=setInterval("highlightit(theobject)",50)
}
function low(which2){
	clearInterval(highlighting)
	if (which2.style.MozOpacity)
	which2.style.MozOpacity=0.3
	else if (which2.filters)
	which2.filters.alpha.opacity=30
}

function highlightit(cur2){
	if (cur2.style.MozOpacity<1)
	cur2.style.MozOpacity=parseFloat(cur2.style.MozOpacity)+0.1
	else if (cur2.filters&&cur2.filters.alpha.opacity<100)
	cur2.filters.alpha.opacity+=10
	else if (window.highlighting)
	clearInterval(highlighting)
}

function SwapText(focusEle) {
	var fieldsArray = new Array();
	if (document.getElementById('features')) fieldsArray.push(document.getElementById('features'));
	if (document.getElementById('specs')) fieldsArray.push(document.getElementById('specs'));
	if (document.getElementById('supportfiles')) fieldsArray.push(document.getElementById('supportfiles'));
	if (document.getElementById('reviews')) fieldsArray.push(document.getElementById('reviews'));
	if (document.getElementById('additionalimages')) fieldsArray.push(document.getElementById('additionalimages'));
	if (document.getElementById('wallpapers')) fieldsArray.push(document.getElementById('wallpapers'));
	if (document.getElementById('catalog')) fieldsArray.push(document.getElementById('catalog'));
	if (document.getElementById('guides')) fieldsArray.push(document.getElementById('guides'));
	if (document.getElementById('configs')) fieldsArray.push(document.getElementById('configs'));
	for (var n=0; n<fieldsArray.length; n++) {
		if (fieldsArray[n].id == focusEle) {
			fieldsArray[n].style.display = "block";
		} else {
			fieldsArray[n].style.display = "none";
		}
	}
}

// These are for the registration page

ToggleFormEles = function(ele)
{
	if (ele!='blank') var activeEle = document.getElementById('div' + ele);
	for (var n=0; n<40; n++)
	{
		if (document.getElementById('div' + n))
		{
			document.getElementById('div' + n).style.display = 'none';
		}
	}
	if (ele!='blank') activeEle.style.display = 'block';
}

fillConfirmBox = function()
{
	var catEle = document.getElementById('cat_select');
	var catId = catEle.value;
	var prodEle = document.getElementById('prod_select'+parseInt(catId));
	var shopEle = document.getElementById('purchased');
	document.getElementById('check_platform').innerHTML = catEle.options[catEle.selectedIndex].text;
	document.getElementById('check_product').innerHTML = prodEle.options[prodEle.selectedIndex].text;
	document.getElementById('check_shop').innerHTML = shopEle.value;
	document.getElementById('prod_hidden').value = prodEle.options[prodEle.selectedIndex].value;
	document.getElementById('confirm').style.display='block';
}