var ActiveID = "";
function imageChange(imageName,flashName,objPanel) {
	if (ActiveID != imageName) {
		document.getElementById("global").style.backgroundImage = 'url(/images/banner1' + imageName + '.gif)';
		document.getElementById("flashlink").href = flashName+ '.html';
		var fo = new FlashObject("/images/flash/" + flashName + ".swf", "smart_plan_flash", "448", "220", "6");
		fo.addParam("wmode", "transparent")
		fo.write("flash");	
		ActiveID = imageName;
	}
	if (objPanel) {
		document.getElementById('pack_info' + imageName).style.backgroundColor = '#EEE'; //change the current panel
		objPanel.onmouseout = function() {
			document.getElementById('pack_info' + ActiveID).style.backgroundColor = '#D5D5DF'; //change the old one back
		}
	}
}

function change(tagid, newClass) {
	identity = document.getElementById(tagid);
	identity.className=newClass;
}

function showFiles(id) {
	var name = document.getElementById(id);
	if(name.style.display == 'block'){
		name.style.display = 'none';
	} else {
		name.style.display = 'block';	
	}
}

function refreshMe() {
	window.open('http://www.google.co.uk', 'downloader', 'height=0, width=0');
	window.setTimeout("window.opener.reload();", 5000);
	window.downloader.close();
}

function reachedMax(no) {
	var msgBlock = document.getElementById('msgblock');
	var msg = 'Sorry you have reached your maximum of '+no+' downloads.';
	
	msgBlock.innerHTML = msg;
	msgBlock.style.display = 'block';
} 