/* javascript, 2004 orange8 interactive ag */

var hTimOut;
var iimgs = new Array();
var vimgs = new Array();

/* Global */

function openWnd(fil, width, height)
{
	window.open(fil,'popup','left='+((screen.availWidth-width)/2)+',top='+((screen.availHeight-height)/2)+',width='+width+',height='+height+',directories=no,location=no,menubar=no,scrollbars=yes,status=no,toolbar=no,resizable=yes').focus();
}

function showDiv(name)
{
	hideAll();
	var divToShow = document.getElementById(name);
	if (divToShow) divToShow.style.visibility = 'visible';
}

function hideDiv(name)
{
	var divToHide = document.getElementById(name);
	if (divToHide) divToHide.style.visibility = 'hidden';
}

/* Top image navigation */

function hideAll()
{
	hideDiv('topnav_home');
	hideDiv('topnav_rate');
	hideDiv('topnav_check');
	hideDiv('topnav_team');
	hideDiv('topnav_ref');
	hideDiv('topnav_contact');
}

/* popups */

function openWnd(fil, width, height)
{
	window.open(fil,'popup','left='+((screen.availWidth-width)/2)+',top='+((screen.availHeight-height)/2)+',width='+width+',height='+height+',directories=no,location=no,menubar=no,scrollbars=yes,status=no,toolbar=no,resizable=yes').focus();
}

/* contact form */

function chkCheck()
{
	var cbxId = '_ctl0_cbxConversionCheck';
	if (document.getElementById)
		document.getElementById(cbxId).checked = true;
	else
		document.all[cbxId].checked = true;
	
}

/* factor hovering */

function resetFactors()
{
	resetFactor('factor0');
	resetFactor('factor1');
	resetFactor('factor2');
	resetFactor('factor3');
	resetFactor('factor4');
	resetFactor('factor5');
	resetFactor('factor6');
	resetFactor('factor7');
	resetFactor('factor8');
	resetFactor('factor9');
	resetFactor('factora');
	resetFactor('factorb');
	resetFactor('factorc');
}

function hlLogFactors()
{
	resetFactors();
	hlFactor('factor0');
	hlFactor('factor1');
	hlFactor('factor2');
	hlFactor('factor3');
	hlFactor('factor4');
	hlFactor('factor5');
	hlFactor('factor6');
	hlFactor('factor7');
	hlFactor('factor8');
	hlFactor('factor9');
	hlFactor('factora');
	hlFactor('factorb');
	hlFactor('factorc');
}

function hlWalkthroughFactors()
{
	resetFactors();
	hlFactor('factor1');
	hlFactor('factor5');
	hlFactor('factor9');
}

function hlReviewFactors()
{
	resetFactors();
	hlFactor('factor2');
	hlFactor('factor4');
	hlFactor('factor6');
	hlFactor('factor7');
}

function hlUsageFactors()
{
	resetFactors();
	hlFactor('factor0');
	hlFactor('factor3');
}

function hlEtFactors()
{
	resetFactors();
	hlFactor('factor1');
	hlFactor('factor7');
}

function hlPerformanceFactors()
{
	resetFactors();
	hlFactor('factor8');
}

/* --- */

function hlFactor(name)
{
	if (document.getElementById)
		document.getElementById(name).style.color = "#33a020";	// Mozilla
	else
		document.all[name].style.setAttribute("color","#33a020","false"); // IE
}

function resetFactor(name)
{
	if (document.getElementById)
		document.getElementById(name).style.color = "#cccccc";	// Mozilla
	else
		document.all[name].style.setAttribute("color","#cccccc","false"); // IE
}
