/* www.clube7.com.br - Clube7Web */

function mOvr(src,clrOver) {
if (!src.contains(event.fromElement)) {
src.style.cursor = 'default';
src.bgColor = clrOver;
}
}

function mOut(src,clrIn) {
if (!src.contains(event.toElement)) {
src.style.cursor = 'default';
src.bgColor = clrIn;
}
}

function mClk(src) {
if(event.srcElement.tagName=='TD'){
src.children.tags('A')[0].click();
}
}

function Reset(objForm) { objForm.reset(); }

function checarTodos(algumAlterado) {
f = document.lista;
if (algumAlterado) {
if (algumAlterado.checked == false)
	f.br.checked = false;
}
else
for (i=0; i<f.length; i++)
if (f.elements[i].type == "checkbox")
if (f.br.checked) f.elements[i].checked = true
else f.elements[i].checked = false
}

function verTodos() {
e = document.lista.elements;
todos = true
for (i=0; i<e.length; i++)
if (e[i].type == "checkbox" && e[i].name != "br")
if (e[i].checked == false) todos = false;
document.lista.br.checked = eval(todos)
}

function countChars(form)
{
    var text1 = document.irec.msg.value

    document.irec.totalChars.value = text1.length
    document.irec.msg_total.value = text1
    document.irec.totalCounter.value = 500 - text1.length;
}

function countCharsA(form)
{
    var text1 = document.anuncio.texto.value

    document.anuncio.totalChars.value = text1.length
    document.anuncio.msg_total.value = text1
    document.anuncio.totalCounter.value = 300 - text1.length;
}

function countMsg(form)
{
    var text1 = document.torpedo.msg_for.value

    document.torpedo.totalChars.value = text1.length
    document.torpedo.msg_total.value = text1
    document.torpedo.totalCounter.value = 300 - text1.length;
}

function excom(theForm)
{
if (confirm ("Deseja Realmente Excluir este Comentário?."))
{
    theForm.submit;
}
else
{
    return (false);
}
}

function exrec(theForm)
{
if (confirm ("Deseja Realmente Excluir esta Mensagem?."))
{
    theForm.submit;
}
else
{
    return (false);
}
}

function exec_action()
{
    switch( arguments[0] )
    {
	     case "1":
	      document.lista.executar_acao.value = 1;
		  document.lista.submit();
	      break;
	     default:
		  break;
    }
}

function open_r( hp )
{
    window.open(hp,"","top=80,left=140,resizable=no,location=no,toolbar=no,status=no,menubar=no,copyhistory=no,scrollbars=no,width=420,height=130")
}

function open_s( hp )
{
    window.open(hp,"","top=80,left=140,resizable=no,location=no,toolbar=no,status=no,menubar=no,copyhistory=no,scrollbars=no,width=267,height=166")
}

function trecados(theForm)
{
var msg1 = theForm.msg.value

if (theForm.para.value == "")
{
	alert("Clube7\n\nInforme o Nome de quem receberá o Recado.");
	theForm.para.focus();
	return (false);
}

if (theForm.msg.value == "")
{
	alert("Clube7\n\nDigite a Mensagem.");
	theForm.msg.focus();
	return (false);
}

if ( msg1.length > 500 )
{
	alert("Clube7\n\nAtenção, sua mensagem não deve ter mais de 500 caracteres.");
	theForm.msg.focus();
	return (false);
}
	theForm.submit;
}

function tmsg(theForm)
{
var msg1 = theForm.msg_for.value

if (theForm.msg_for.value == "")
{
	alert("Clube7\n\nDigite a Mensagem.");
	theForm.msg_for.focus();
	return (false);
}

if ( msg1.length > 300 )
{
	alert("Clube7\n\nAtenção, sua mensagem não deve ter mais de 300 caracteres.");
	theForm.msg_for.focus();
	return (false);
}
	theForm.submit;
}

function open_t( hp )
{
    window.open(hp,"","top=40,left=140,resizable=no,location=no,toolbar=no,status=no,menubar=no,copyhistory=no,scrollbars=no,width=320,height=400")
}

function open_f( hp )
{
    window.open(hp,"","top=80,left=140,resizable=no,location=no,toolbar=no,status=no,menubar=no,copyhistory=no,scrollbars=yes,width=461,height=370")
}

function showGE( hp )
{
    x = eval(screen.width);
    y = eval(screen.height);

    h = 250;
    v = 200;

    d = x / 2;
    r = d - h;

    t = y / 2;
    s = t - v;

    if ( x == 800 ) { s = 0; }

    window.open(hp,"","top="+s+",left="+r+",resizable=no,location=no,toolbar=no,status=no,menubar=no,copyhistory=no,scrollbars=yes,width=500,height=480")
}

function showG( hp )
{
    x = eval(screen.width);
    y = eval(screen.height);

    h = 390;
    v = 250;

    d = x / 2;
    r = d - h;

    t = y / 2;
    s = t - v;

    if ( x == 800 ) { s = 0; }

    window.open(hp,"","top="+s+",left="+r+",resizable=no,location=no,toolbar=no,status=no,menubar=no,copyhistory=no,scrollbars=yes,width=780,height=530")
}

function showNT( hp )
{
    x = eval(screen.width);
    y = eval(screen.height);

    h = 160;
    v = 120;

    d = x / 2;
    r = d - h;

    t = y / 2;
    s = t - v;

    if ( x == 800 ) { s = 0; }

    window.open(hp,"","top="+s+",left="+r+",resizable=no,location=no,toolbar=no,status=no,menubar=no,copyhistory=no,scrollbars=no,width=320,height=240")
}

	function FindGuia(){
		if( document.FormSearch.SearchCompany.value == '' ){
			alert('Por Favor Informe o nome da Empresa a ser Pesquisada');
			return;
		}
	camp		= document.FormSearch.SearchCompany.value;
	sig_city	= document.FormSearch.OptSelCity.value;
	expr 		= sig_city.split("#");

	window.open('http://www.guiacidade.com.br/BuscaExterna/PlayerSearchName.inc.php?cpSearch='+camp+'&sig_city='+expr[1]+'&si='+expr[0]+'&cod='+expr[2]+'', '_blank','left=170,top=20,width=450,height=575,scrollbars = yes');

	}

//
