// --------------------------------------------------------------------------------
function initialise()
	{
	//positionPopup();
	}
// --------------------------------------------------------------------------------
function stringDeMangle(str)
	{
	var newStr = '';
	for( i=str.length; i>0; i-- )
		{
		newStr += String.fromCharCode(str.charCodeAt(i-1));
		}
	return newStr;
	}
// --------------------------------------------------------------------------------
function ieLessThan7()
	{
	if ( navigator.userAgent.match(/MSIE (\d)/) )
		{
		if ( RegExp.$1 < 7 )
			{
			return true;
			}
		}
	return false;
	}
// --------------------------------------------------------------------------------
function positionPopup()
	{
	var popupObj = document.getElementById('popup');
	popupObj.style.visibility = 'hidden';
	popupObj.style.left = parseInt((document.body.clientWidth - popupObj.offsetWidth) / 2);
	if ( popupObj.style.left < 0 )
		{
		popupObj.style.left = 0;
		}
	popupObj.style.top = parseInt((document.body.clientHeight - popupObj.offsetHeight) / 2);
	if ( popupObj.style.top < 0 )
		{
		popupObj.style.top = 0;
		}
	return false;
	}
// --------------------------------------------------------------------------------
function showPortfolioPopup()
	{
	hideObj('main');
	positionPopup();
	showCloseIcon();
	showObj('popup');
	return false;
	}
// --------------------------------------------------------------------------------
function hidePortfolioPopup()
	{
	showObj('main');
	hideCloseIcon();
	hideObj('popup');
	return false;
	}
// --------------------------------------------------------------------------------
function showCloseIcon()
	{
	document.getElementById('closeIcon').src = '/media/icon_close_lo.gif';
	}
// --------------------------------------------------------------------------------
function hideCloseIcon()
	{
	document.getElementById('closeIcon').src = '/media/icon_close_no.gif';
	}
// --------------------------------------------------------------------------------
function switchCloseIcon()
	{
alert('hello1');
return false;
	obj = document.getElementById('closeIcon');
	if ( obj.src.substring(obj.src.length-17) == 'icon_close_lo.gif' )
		{
		obj.src = '/media/icon_close_hi.gif';
		}
	else if ( obj.src.substring(obj.src.length-17) == 'icon_close_hi.gif' )
		{
		obj.src = '/media/icon_close_lo.gif';
		}
	return false;
	}
// --------------------------------------------------------------------------------
function showObj( id )
	{
	document.getElementById(id).style.visibility = 'visible';
	return false;
	}
// --------------------------------------------------------------------------------
function hideObj( id )
	{
	document.getElementById(id).style.visibility = 'hidden';
	}
// --------------------------------------------------------------------------------
function switchCloseIcon()
	{
	obj = document.getElementById('closeIcon');
	if ( obj.src.substring(obj.src.length-17) == 'icon_close_lo.gif' )
		{
		obj.src = '/media/icon_close_hi.gif';
		}
	else if ( obj.src.substring(obj.src.length-17) == 'icon_close_hi.gif' )
		{
		obj.src = '/media/icon_close_lo.gif';
		}
	return false;
	}
// --------------------------------------------------------------------------------
function logProjectViews(projectID)
	{
	location.href = 'logProjectViews.php?project_id=' + projectID;
	return false;
	}
