﻿/* Define Navegador */
 if(navigator.appName == "Microsoft Internet Explorer"){
    document.write('<link href="/BAlvorada/App_Themes/Master/internet.css" rel="stylesheet" type="text/css" />')
} else{
    document.write('<link href="/BAlvorada/App_Themes/Master/mozila.css" rel="stylesheet" type="text/css" />')
};

/* Funções do Login */
function LimpaCampo(Campo)
{
    if(document.getElementById(Campo).value=="Nome"){
        document.getElementById(Campo).value="";
    }
}

function LimpaCampoSenha(Campo)
{
    if(document.getElementById(Campo).value=="Senha"){
        document.getElementById(Campo).value="";
        document.getElementById(Campo)["type"] = "password";
        //Campo["type"] = "password";
    }            
}

function VerSenha(Campo)
{
    if(document.getElementById(Campo).value==""){
        //document.getElementById(Campo).type = 'text'
        document.getElementById(Campo).value= "Senha";
    }
}

function VerNome(Campo)
{
    if(document.getElementById(Campo).value==""){
        document.getElementById(Campo).value= "Nome";
    }            
}

/* Mídias */
function InsereFlash(Arquivo, Largura, Altura, FlashVars) {
	document.write('<object codeBase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0"');
	document.write('height="' + Altura + '" width="' + Largura + '" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" VIEWASTEXT>');
	document.write('<param name="_cx" value="15425">');
	document.write('<param name="_cy" value="741">');
	document.write('<param name="FlashVars" value="' + FlashVars + '">');
	document.write('<param name="Movie" value="' + Arquivo + '">');
	document.write('<param name="Src" value="' + Arquivo + '">');
	document.write('<param name="WMode" value="Transparent">');
	document.write('<param name="Play" value="-1">');
	document.write('<param name="Loop" value="-1">');
	document.write('<param name="Quality" value="High">');
	document.write('<param name="SAlign" value="">');
	document.write('<param name="Menu" value="-1">');
	document.write('<param name="Base" value="">');
	document.write('<param name="AllowScriptAccess" value="">');
	document.write('<param name="Scale" value="ShowAll">');
	document.write('<param name="DeviceFont" value="0">');
	document.write('<param name="EmbedMovie" value="0">');
	document.write('<param name="BGColor" value="">');
	document.write('<param name="SWRemote" value="">');
	document.write('<param name="MovieData" value="">');
	document.write('<param name="SeamlessTabbing" value="1">');
	document.write('<param name="Profile" value="0">');
	document.write('<param name="ProfileAddress" value="">');
	document.write('<param name="ProfilePort" value="0">');
	document.write('<embed src="' + Arquivo + '" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" ');
	document.write('type="application/x-shockwave-flash" width="' + Largura + '" height="' + Altura + '" FlashVars="' + FlashVars + '" ');
	document.write('_cx="15425" _cy="741" WMode="Transparent" Menu="-1" Scale="ShowAll" DeviceFont="0" EmbedMovie="0" SeamlessTabbing="1" Profile="0" ProfilePort="0"></embed>');
	document.write('</object>');
}

function InsereMediaPlayer(Arquivo, Largura, Altura) {
	document.write('<object ID="MediaPlayer1" classid="CLSID:22D6F312-B0F6-11D0-94AB-0080C74C7E95" type="application/x-oleobject"  width="' + Largura + '" height="' + Altura + '" VIEWASTEXT>');
	document.write('<param name="FileName" value="' + Arquivo + '">');
	document.write('<param name="animationatStart" value="TRUE">');
	document.write('<param name="transparentatStart" value="FALSE">');
	document.write('<param name="autoStart" value="true">');
	document.write('<param name="autoSize" value="false">');
	document.write('<param name="showStatusBar" value="true">');
	document.write('<param name="showControls" value="true">');
	document.write('<param name="showDisplay" value="false">');
	document.write('<embed type="application/x-mplayer2" pluginspage="mms://www.microsoft.com/windows/windowsmedia/intl/download/default.asp?DispLang=br" SRC="' + Arquivo + '" width="' + Largura + '" height="' + Altura + '" AutoStart=true showControls=false showDisplay=false>');
	document.write('</embed></object>');
}

function InsereRealPlayer(Arquivo, Largura, Altura) {
    document.write('<object classid="CLSID:CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA" width="'+ Largura +'" height="'+ Altura +'">');
    document.write('<param name="SRC" value="' + Arquivo + '" />');
    document.write('<param name="CONTROLS" value="ImageWindow" />');
    document.write('<param name="AUTOSTART" value="1" />');
    document.write('<param name="CONSOLE" value="cons" />');
    document.write('<embed src="' + Arquivo + '" autostart="1" type="audio/x-pn-realaudio-plugin" width="'+ Largura +'" height="'+ Altura +'" controls="ImageWindow" console="Filme"></embed></object>');
}

function InsereQuickTime(Arquivo, Largura, Altura) {
    document.write('<object width="' + Largura + '" height="' + Largura + '"');
    document.write('classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B"');
    document.write('codebase="http://www.apple.com/qtactivex/qtplugin.cab">');
    document.write('<param name="src" value="' + Arquivo + '">');
    document.write('<param name="autoplay" value="true">');
	document.write('<param name="autoSize" value="false">');
    document.write('<param name="controller" value="true"><embed src="' + Arquivo + '" width="' + Largura + '" height="' + Altura + '"');
    document.write('autoplay="true" controller="true"');
    document.write('pluginspage="http://www.apple.com/quicktime/download/">');
    document.write('</embed></object>');
}

/* Scroll Bars */

function CallMenu(menuItem) {
    switch(menuItem)
    {
        case 0:
        case 1:
            location.href = '/BAlvorada/WebSite/Home/Default.aspx';
            break;
        case 2:
            location.href = '/BAlvorada/WebSite/Institucional/Default.aspx';
            break;
        case 3:
            location.href = '/BAlvorada/WebSite/Equipe/Default.aspx';
            break;
        case 4:
            location.href = '/BAlvorada/WebSite/calendario/Default.aspx';
            break;
        case 5:
            location.href = '/BAlvorada/WebSite/Contato/Default.aspx';
            break;
    }
}