/**
 *
 * @access public
 * @return void
 **/
function blowup(e)
{
	e.className='blownup';
}

function blowdown(e)
{
	e.className='box';
}

function blowdown2(e, style)
{
	e.className=style;
}

/**
 *
 * @access public
 * @return void
 **/
function setElementText(id, text)
{
	var e=document.getElementById(id);
	e.innerHTML=text;
}

/**
 *
 * @access public
 * @return void
 **/
function setClass(id, className)
{
	var e=document.getElementById(id);
	e.className=className;
}

var contactShown=null;

function height()
{
	if (window.innerHeight) return window.innerHeight;

	if (document.documentElement.clientHeight || document.documentElement.clientWidth)
	{
		return document.documentElement.clientHeight;
	}

	return document.body.clientHeight;
}


/**
* deal with browser compatibility
*/
function width()
{
	if (window.innerWidth) return window.innerWidth;

	if (document.documentElement.clientHeight || document.documentElement.clientWidth)
	{
		return document.documentElement.clientWidth;
	}
	return document.body.clientWidth;
}

/**
 *
 * @access public
 * @return void
 **/
function showContactForm()
{
	try
	{
		var e=document.getElementById('contact');
		if (e)
		{
			e.style.display='block';
			e.style.zIndex=2;

			try
			{
				e.style.left=""+(width()-e.scrollWidth)/2+"px";
				e.style.top=""+(height()-e.scrollHeight)/2+"px";
			}
			catch(ex){}
			contactShown=new Date();
		}
		var f=document.getElementById('frm_contact');
		f.reset();

		var n=document.getElementById('frm_name');
		n.focus();
	}
	catch (ex){}
}

function hideContactForm()
{
	if (contactShown==null)
		return;

	if ((new Date()).getTime() - contactShown.getTime() < 200)
	{
		return;
	}

	var e=document.getElementById('contact');
	e.style.display='none';
	contactShown=null;
}

