function openestatuto()
{
  self.open('http://www.spbancarios.com.br/trabalho/noscript.aspx','_blank','left=0, top=0,  toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=yes, resizable=yes, copyhistory=no');
}


function openvideo1 ()
{
  window.showModalDialog("Streaming/video1.htm","", "dialogHeight: 370px; dialogWidth: 338px; resizable: no; center: yes; help: no; status: no;") 
}

function openvideo2 ()
{
  window.showModalDialog("Streaming/video2.htm","", "dialogHeight: 370px; dialogWidth: 338px; resizable: no; center: yes; help: no; status: no;") 
}

function openvideo3 ()
{
  window.showModalDialog("Streaming/video3.htm","", "dialogHeight: 370px; dialogWidth: 338px; resizable: no; center: yes; help: no; status: no;") 
}

function openvideoLC1 ()
{
  window.showModalDialog("Streaming/Video LC1.htm","", "dialogHeight: 370px; dialogWidth: 338px; resizable: no; center: yes; help: no; status: no;") 
}

function openvideoLC2 ()
{
  window.showModalDialog("Streaming/Video LC2.htm","", "dialogHeight: 370px; dialogWidth: 338px; resizable: no; center: yes; help: no; status: no;") 
}

function openvideoLC3 ()
{
  window.showModalDialog("Streaming/Video LC3.htm","", "dialogHeight: 370px; dialogWidth: 338px; resizable: no; center: yes; help: no; status: no;") 
}

function openvideoAss1 ()
{
  window.showModalDialog("Streaming/ASSEMBL.htm","", "dialogHeight: 420px; dialogWidth: 339px; resizable: no; center: yes; help: no; status: no;")
}

function openvideobanc2 ()
{
  window.showModalDialog("Streaming/Bancarios2.htm","", "dialogHeight: 420px; dialogWidth: 339px; resizable: no; center: yes; help: no; status: no;")
}


function openvideobcliente ()
{

  window.showModalDialog("Streaming/Banc_Cliente.htm","", "dialogHeight: 429px; dialogWidth: 343px; resizable: no; center: yes; help: no; status: no;")
}


function openvideoassedio ()
{

  window.showModalDialog("Streaming/Assediomoral.htm","", "dialogHeight: 380px; dialogWidth: 343px; resizable: no; center: yes; help: no; status: no;")
}

function openvideo10 ()
{
  window.showModalDialog("Streaming/ImpostodeRenda.htm","", "dialogHeight: 380px; dialogWidth: 343px; resizable: no; center: yes; help: no; status: no;")
}


function openvideomobbrasilia ()
{
  window.showModalDialog("Streaming/mobbrasilia.htm","", "dialogHeight: 380px; dialogWidth: 343px; resizable: no; center: yes; help: no; status: no;")
}




function abreformcel ()
{
  window.showModalDialog("http://www.spbancarios.com.br/celular/cadastro.asp","", "dialogHeight: 378px; dialogWidth: 510px; resizable: no; center: yes; help: no; status: no;")
}

function abreformitau ()
{
  window.showModalDialog("http://www.spbancarios.com.br/celular/itau.asp","", "dialogHeight: 378px; dialogWidth: 522px; resizable: no; center: yes; help: no; status: no;")
}

/******************** Função que abre a pagina de pesquisa ************************/
function OpenPesquisa()
{ 
    winwidth  = 555;
    winheight = 450;
    winleft   = 200;
    wintop    = 200;

    if(parseInt(navigator.appVersion)>=4)
    {
        winleft = (screen.width / 2) - (winwidth / 2);
        wintop =  (screen.height / 2) - (winheight / 2);
    }

        window.open('/convenios/default.aspx', '_blank', 'top=' + wintop + ',left=' + winleft + ',height=' + winheight + ',width=' + winwidth);  
}



function loadFlash() {
	document.write('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" width="770" height="300" id="b_walking.swf" align="middle">\n');
	document.write('<param name="allowScriptAccess" value="sameDomain" />\n');
	document.write('<param name="movie" value="flash/b_walking.swf" />\n');
	document.write('<param name="quality" value="high" />\n');
	document.write('<param name="wmode" value="transparent" />\n');
	document.write('<param name="bgcolor" value="#ffffff" />\n');
	document.write('<embed src="flash/b_walking.swf" quality="high" wmode="transparent" bgcolor="#ffffff" width="770" height="300" name="b_walking.swf" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />\n');
	document.write('</object>\n');
}

function Trim(str){ 

	var regexp = /[ ]+$/; 		
	str = str.replace(regexp, "");
	
	regexp = /^[ ]+/; 		
	str = str.replace(regexp, "");
	
	return str;

}

function FormSelect(form, origem, valor){ 

	if(valor == ""){
		valor = 0;
	}

	var ate = form[origem].length;

    for(j=0; j < ate; j++){
       if(form[origem].options[j].value == valor){ 
            form[origem].options[j].selected = true
       }
    }
    
    return;
}   


function ehEmail(v){

	if(v.indexOf("..") > -1 ) return false;
	if(v.indexOf("@") == -1 )  return false;
	if(v.indexOf("@.") > -1 ) return false;
	if(v.indexOf(" ") > -1 )  return false;
	
	var re = /^[a-zA-Z._0-9-]+@[a-zA-Z0-9]{1}[a-zA-Z._0-9-]+\.[a-zA-Z]+[.]?[a-zA-Z]{0,3}$/;
	return re.test(v); 
	
}


function ehVazio(valor){
	
	valor = Trim(valor)
	
	if(valor == ''){
		return true;
	}
	else{
		return false;
	}

}

function janela(vURL, vName, w, h, resize, scroll){ 
	
	t = (window.screen.height-h)/2;
	l = (window.screen.width-w)/2;
	
	var nw = window.open(vURL, vName, 'toolbar=0,location=0,directories=0,status=no,menubar=0,scrollbars='+scroll+',resizable='+resize+',width='+w+',height='+h+',top='+t+',left='+l);
	nw.focus();	
	
	return;

}

function loadFlashBanner(arquivo, w, h) {
	document.write('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" width="' + w + '" height="' + h + '" align="middle">\n');
	document.write('<param name="allowScriptAccess" value="sameDomain" />\n');
	document.write('<param name="movie" value="' + arquivo + '" />\n');
	document.write('<param name="quality" value="high" />\n');
	document.write('<param name="wmode" value="transparent" />\n');
	document.write('<param name="bgcolor" value="#f1f1f1" />\n');
	document.write('<embed src="' + arquivo + '" quality="high" wmode="transparent" bgcolor="#f1f1f1" width="' + w + '" height="' + h + '" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />\n');
	document.write('</object>\n');
}
