function popUp(url, pwidth, pheight)
{
	var swidth = screen.width;
	var sheight = screen.height;
	
	var leftpos = (swidth - pwidth) / 2;
	var toppos = (sheight - pheight) / 2;
	
	var features = 'width=' + pwidth + ', height=' + pheight + ', left=' + leftpos + ', top=' + toppos;
	
	return window.open(url, 'popup', features);
}

var gocount = 0;

function showPlatform(id) {
	for(i=1;i<=6;i++) {
		if (document.getElementById("plat_"+id)) {
			document.getElementById("plat_"+id).style.display = "none";
		}
	}
	if (document.getElementById("plat_"+id)) {
		document.getElementById("plat_"+id).style.display = "block";
	}
}


function markForUpdate(obj, key, check)
{	
	if(check != null)
	{
		if(document.getElementById(key).checked == true)
		{
			obj.parentNode.parentNode.className = 'markForUpdate';
			
			gocount++;
		}
		else
		{
			obj.parentNode.parentNode.className = '';
			
			gocount--;
		}
	}
	else
	{	
		if(document.getElementById(key).checked == false)
		{
			gocount++;
		}

		obj.parentNode.parentNode.className = 'markForUpdate';
		document.getElementById(key).checked = true;
	}
	
	document.getElementById('go').value = 'Go (' + gocount + ')';
}

function popitup(url) {
	newwindow=window.open(url,'Challenge clan','scrollbars=auto,toolbar=no,menubar=no,status=no,height=1000,width=630');
	if (window.focus) {newwindow.focus()}
	return false;
}

