var numOfTabs = 2;

function showTab(tabNum)
{
	var tabId = "tab" + tabNum;
	tabObj = document.getElementById(tabId);
	tabObj.className = "tab tabOn";
	var tabTextId = tabId + "Text";
	tabTextObj = document.getElementById(tabTextId);
	tabTextObj.className = "tabOnText";
	var tabBodyId = tabId + "Body";
	tabBodyObj = document.getElementById(tabBodyId);
	tabBodyObj.style.visibility = "visible";
	for (var i = 1; i <= numOfTabs; i++)
	{
		if (i != tabNum)
		{
			var tabId = "tab" + i;
			tabObj = document.getElementById(tabId);
			tabObj.className = "tab tabOff";
			var tabTextId = tabId + "Text";
			tabTextObj = document.getElementById(tabTextId);
			tabTextObj.className = "tabOffText";
			var tabBodyId = "tab" + i + "Body";
			tabBodyObj = document.getElementById(tabBodyId);
			tabBodyObj.style.visibility = "hidden";
		}
	}

}

var dombrowser = (typeof(document.getElementById) != undefined);
var setDisableRC = null;

var ie = navigator.userAgent.indexOf("MSIE") != -1;
var mac = navigator.userAgent.indexOf("Mac") != -1;
var safari = navigator.userAgent.indexOf("Safari") != -1;

function disableRC()
{
	if (setDisableRC != null) clearTimeout(setDisableRC);
	if (dombrowser)
	{
		if (document.getElementById("photoCover"))
		{
			document.getElementById("photoCover").onmousedown = mouseDown;
			document.getElementById("photoCover").onmouseup = mouseNegate;
			document.getElementById("photoCover").onclick = mouseNegate;
		}
		else
		{
			setDisableRC = setTimeout("disableRC()",50);
		}
	}
}

disableRC();

function mouseDown(e)
{
	if ((ie && event.button == 2) || (!ie && e.button == 2))
	{
		if (mac == true)
		{
			if (e.ctrlKey == false && safari == false)
			{
				showAlertDisabled();
				return false;
			}
		}
		else
		{
			showAlertDisabled();
			return false;
		}
	}
}

function mouseNegate(e)
{
	if ((ie && event.button == 2) || (!ie && e.button == 2))
	{
		return false;
	}
}

function showAlertDisabled()
{
	alert('This feature has been disabled for TheCuteKid photos.');
}
