function setCookie(nome, valor){
	document.cookie = nome + "=" + valor + ";domain=ig.com.br";
}
function getCookie(nome){
	if(document.cookie.indexOf(nome + "=")!=-1) return true;
	else return false;
}
var origem = '';
var or = (document.location).href;

if(or.indexOf("origem=")!=-1){
	var o = (document.location).href.split("origem=");
	setCookie("origem", o[1]);
	origem = o[1];
}

if(getCookie("origem")){
	var csplit = document.cookie.split(";");
	
	for(i=0;i<csplit.length;i++){
		if(csplit[i].indexOf("origem")!=-1){
			var orig = csplit[i].split("origem=");
			origem = orig[1];
		}
	}
	
	//var csplit1 = csplit[0].split("origem=");
	//origem = csplit1[1];
} else {
	
	origem = 'ARENATURBO';
	
}

var html = '';
html += '		<div class="logo" style="margin-right:0;">';
html += '			<a href="http://arenaturbo.ig.com.br/home.html" title="ARENA TURBO">ARENA TURBO</a>';
html += '		</div>';
html += '		<div class="box_login_novo" style="width:367px; margin-left:-16px; background-image:url(http://images.ig.com.br/arena_ig/novo/bgheaderboxlogin_novo.gif);">';
html += '			<div style="float:left; width:200px;">';
html += '				<form action="http://forum.arenaig.ig.com.br/vbulletin/login.php?do=login" name="form1" method="post" onsubmit="md5hash(vb_login_password, vb_login_md5password, vb_login_md5password_utf, 0)"><script type="text/javascript" src="http://forum.arenaig.ig.com.br/vbulletin/clientscript/vbulletin_md5.js?v=372"></script>';
html += '					<fieldset style="padding-bottom:5px;">';
html += '						<label>Login:</label><input type="text" class="bginput" style="font-size: 11px; width:130px;" name="vb_login_username" id="navbar_username" size="10" accesskey="u" tabindex="101" value="Usuário" onfocus="if (this.value == \'Usuário\') this.value = \'\';" />';
html += '					</fieldset>';
html += '					<fieldset style="padding:0 10px 0 10px;">';
html += '						<label>Senha:</label><input type="password" class="bginput" style="font-size: 11px; margin-right:5px; width:65px;" name="vb_login_password" id="navbar_password" size="10" tabindex="102" />';
html += '						<a href="javascript:document.form1.submit();" title="LOGAR" class="btnlogar">LOGAR</a>';
html += '					</fieldset>';
html += '			<input type="hidden" name="s" value="" />';
html += '			<input type="hidden" name="securitytoken" value="guest" />';
html += '			<input type="hidden" name="do" value="login" />';
html += '			<input type="hidden" name="vb_login_md5password" />';
html += '			<input type="hidden" name="vb_login_md5password_utf" />';
html += '					<a href="http://forum.arenaig.ig.com.br/vbulletin/register.php" title="CADASTRE-SE" class="cadastrese">Cadastre-se</a>';
html += '				</form>';
html += '			</div>';
html += '			<div style="float:left; width:165px;">';
html += '				<form action="http://busca.ig.com.br/buscar" method="get" accept-charset="UTF-8" name="form2"><input type="hidden" name="o" value="ARENATURBO">';
html += '					<fieldset style="margin:10px 0; padding-top:0; border-left:1px dashed #5A6D82;">';
html += '						<p style="float:left; padding:0 5px 0 22px; height:22px;">enhanced by</p>';
html += '						<img src="http://images.ig.com.br/arena_ig/novo/header_logogoogle.gif" alt="ENHANCED BY GOOGLE" width="49" height="17" /><br clear="all" />';
html += '						<input type="text" name="q" id="buscagoogle" style="margin-right:5px; width:85px;" />';
html += '						<a href="javascript:document.form2.submit();" title="BUSCAR" class="btnbusca">BUSCAR</a>';
html += '					</fieldset>';
html += '				</form>';
html += '			</div>';
html += '		</div>';
html += '		<div class="box_kzam" style="width: 120px; background-image: none; text-align: right;"><SCRIPT LANGUAGE="JavaScript">OAS_AD(\'Position1\')</SCRIPT></div>';
html += '		<div class="hrheader"></div>';
document.write(html);

document.getElementById("buscagoogle").focus();
