// JavaScript Document
function ChangeImage(strImgName, strImage)
{
	document.getElementById(strImgName).src = strImage;
}

//*************************************************************************

function RandomPic()
{
	var nRandomNum;
	var strImage;
	var strRandonNum;

	nRandomNum = (Math.round((Math.random()*6)+1));
	strRandonNum = nRandomNum.toString();

	if (strRandonNum.length == 1)
	{
		strRandonNum = "0" + strRandonNum;
	}
	strImage = "office" + strRandonNum + ".jpg";
	document.writeln('<img src="/images/' + strImage + '" alt="" height="210" width="326" />');		
}

//*************************************************************************

function LoadIframe(url)
{
  if (window.frames[0])
  {
	window.frames[0].location = url;   
	return false;
  }
  else return true;
}

//*************************************************************************

function ObfuscateEmail(strAlias)
{
	var a,b,c,d,e,f,g,h,i;

	a = '<a href=\"mai';
	b = strAlias;
	c = '\">';
	d = strAlias + '@in' + 'lustri' + 'ssolut' + 'ions.com';
	e = '</a>';

	a += 'lto:';
	b += '@';
	b += 'inlustris';
	b += 'solutions';
	b += '.com';

	document.write(a+b+c+d+e);
}

//*************************************************************************

function PreloadImages()
{
	var oImages = new Array(
		"/images/about_us01.jpg",
		"/images/about_us02.jpg",
		"/images/main_page01.jpg",
		"/images/main_page02.jpg",
		"/images/contacts01.jpg",
		"/images/contacts02.jpg",
		"/images/services01.jpg",
		"/images/services02.jpg",
		"/images/news01.jpg",
		"/images/news02.jpg");
	
	for (oItem in oImages)
	{
		oImage = new Image();
		oImage.src = oImages[oItem];
	}
}