// JavaScript para exibir o flash original
function flash(largura, altura, arquivo)
{
	document.write('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=4,0,0,0" width="' + largura + '" height="' + altura + '" id="teste" align="middle">');
	document.write('<param name="allowScriptAccess" value="sameDomain" /><param name="wmode" value="transparent" />');
	document.write('<param name="movie" value="' + arquivo + '" /><param name="quality" value="best" /><param name="bgcolor" value="#ffffff" /><embed src="' + arquivo + '" wmode="transparent" quality="best" width="' + largura + '" height="' + altura + '" name="teste" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />');
	document.write('</object>');
}

function swapImage(i)
{
	var dir = 'img';
	var uid = i;
	var obj = document.getElementById(uid);
	var arr = obj.src.split('/');
	var ele = arr[parseInt(arr.length - 1)].split('.');
	var lbl = ele[0];
	var ext = ele[1];
	var spl = lbl.split('_');
	var img = spl[0];
	var mod = spl[1] != 'on' ? 'on' : 'off';
	var src = dir + '/' + img + '_' + mod + '.' + ext;
	obj.src = src;
}

function mnuMain()
{
	var lenX, lenY, altT, iSrc, iLnk, oSet, iEvt;
	var mnuItem = new Array(
		new Array(72, 21, 'Quem Somos', 'quemsomos.asp', 117),
		new Array(59, 21, 'Portfolio', 'portfolio.asp', 101),
		new Array(32, 21, 'Cases', 'cases.asp', 75),
		new Array(50, 21, 'Notícias', 'noticias.asp', 92),
		new Array(53, 21, 'Contato', 'contato.asp', 53)
		);
	document.write('<table cellpadding="0" cellspacing="0" border="0">');
	document.write('<tr>');
	document.write('<td width="51" nowrap="nowrap">&nbsp;</td>');
	document.write('<td width="115" nowrap="nowrap">&nbsp;</td>');
	for(i = 1; i <= mnuItem.length; i++)
	{
		mItm = mnuItem[parseInt(i - 1)];
		lenX = mItm[0];
		lenY = mItm[1];
		altT = mItm[2];
		iSrc = mnuMode != i ? i + '_off.gif' : i + '_on.gif';
		iSrc = 'img/mnu' + iSrc;
		iLnk = mItm[3];
		oSet = mItm[4];
		iUid = 'mnu' + i;
		iEvt = i != mnuMode ? true : false;
		document.write('<td width="' + oSet + '" nowrap="nowrap">');
		if(iEvt)
		{
			document.write('<a href="' + iLnk + '" onmouseover="javascript:swapImage(\'' + iUid + '\');" onmouseout="javascript:swapImage(\'' + iUid + '\');">');
			document.write('<img src="' + iSrc + '" width="' + lenX + '" height="' + lenY + '" alt="' + altT + '" id="' + iUid + '" />');
			document.write('</a>');
		}
		else
		{
			document.write('<a href="' + iLnk + '">');
			document.write('<img src="' + iSrc + '" width="' + lenX + '" height="' + lenY + '" alt="' + altT + '" id="' + iUid + '" />');
			document.write('</a>');
		}
		document.write('</td>');
	}
	document.write('<td width="171" nowrap="nowrap">&nbsp;</td>');
	document.write('</tr>');
	document.write('</table>');
}

function topMount()
{
	var tLnk = new Array(
		'noticias1.asp',
		'portfolio3.asp',
		'portfolio1.asp',
		'noticias1.asp'
		);
	var tMod = topMode != null && topMode != '' ? topMode : 1;
	var tTxt = boxMode != null && boxMode != '' ? boxMode : 1;
	var tStl = 'bgiSch' + tMod;
	var tImg = 'img/box' + tTxt + '.gif';
	document.write('<table class="tabSch1" width="100%">');
	document.write('<tr><td class="' + tStl + '" align="right"><a href="' + tLnk[parseInt(tTxt - 1)] + '"><img src="' + tImg + '" width="209" height="52" /></a></td></tr>');
	document.write('</table>');
}

function popUp(a, b, c, d)
{
    var page = a;
	var lenX = b;
	var lenY = c;
	var scrl = d;
	var posX = parseInt((screen.width / 2) - (lenX / 2));
	var posY = parseInt((screen.height / 2) - (lenY / 2));
	var name = 'POPUP';
	var wobj = window.open(page, name,'scrollbars=' + scrl + ',top=' + posY + ',left=' + posX + ',width='+ lenX + ',height=' + lenY);
    wobj.focus();
	void(0);
}