da = new Date() // Create a Date Object set to the today date 
dy = da.getFullYear() // Get full year (as opposed to last two digits only) 
dm = da.getMonth() + 1 // Get month and correct it (getMonth() returns 0 to 11) 
dd = da.getDate() // Get date within month 
if ( dy < 1970 ) dy = dy + 100; // We still have to fix the millennium bug 
ys = new String(dy) // Convert year, month and date to strings 
ms = new String(dm)   
ds = new String(dd)   
if ( ms.length == 1 ) ms = "0" + ms; // Add leading zeros to month and date if required 
if ( ds.length == 1 ) ds = "0" + ds;   

//this handles the slider

	YAHOO.example = function() {
		var $D = YAHOO.util.Dom;
		var $E = YAHOO.util.Event;
		var $A = YAHOO.util.Anim;
		var $M = YAHOO.util.Motion;
		var $DD = YAHOO.util.DD;
		var $ = $D.get;
		var x = 1;
		return {
			init : function() {
				$E.on(['move-left','move-right'], 'click', this.move);
			},
			move : function(e) {
				$E.stopEvent(e);
				switch(this.id) {
					case 'move-left':
						if ( x === 1 ) {
							return;
						}
						var attributes = {
							points : {
								by : [440, 0]
							}
						};
						x--;
					break;
					case 'move-right':
					    var right_moves = 5;
					    try {
					        right_moves = ourwork_rightclicks;
					    } catch (e) {}
					    
						//if ( x === 5 ) { <!-- This value = number of new slides you need when scrolling to the right to show all thumbs.  Take the total number of thumbnails and divide that by 3 and you get this value. -->
						//alert("move-right. right_moves=" + right_moves);
						if ( x === right_moves ) { <!-- This value = number of new slides you need when scrolling to the right to show all thumbs.  Take the total number of thumbnails and divide that by 3 and you get this value. -->
							//alert("x=" + right_moves + ". can't move right");
							//RV 10/27/06 commenting out these two lines
							//x=1;		
							return;

							// RV 10/27/06 put this elseif in here to go back to beginning
							// DH 05.01.2007 Removed the elseif to see if search bots were looping on the site
//							x = 0;
//							var attributes = {
//								points : {
//									by : [(440 * (right_moves-1)), 0]
//								}
//							};
        				}
//						else {
							var attributes = {
								points : {
									by : [-440, 0]
								}
							};
//						}
						x++;
					break;
				};
				var anim = new $M('themes', attributes, .2, YAHOO.util.Easing.easeOut);
				anim.animate();
			}
		};
	}();
	YAHOO.util.Event.onAvailable('portfolio',YAHOO.example.init, YAHOO.example, true);
// ----------------------------------------

//Highlight image script- By Dynamic Drive
//For full source code and more DHTML scripts, visit http://www.dynamicdrive.com
//This credit MUST stay intact for use

function makevisible(cur,which){
strength=(which==0)? 1 : 0.6

if (cur.style.MozOpacity)
cur.style.MozOpacity=strength
else if (cur.filters)
cur.filters.alpha.opacity=strength*100
}
// ----------------------------------------
// Top menu
function top_nav() {
var temp = '';	
temp += '<div id="top_nav">';
temp += '<div id="nav">';
                       
temp += '<ul>';
temp += '<li id="interactive"><a href="index.html" class="selected">Marketing</a></li>';
temp += '<li id="training"><a href="../eventos/index.html" class="">Eventos</a></li>';
temp += '<li id="staffing"><a href="../design/index.html" class="">Design</a></li>';
temp += '<li id="event_management"><a href="../publishing/index.html" class="">Desktop Publishing</a></li>';
temp += '<li id="search_marketing"><a href="../agenciamento/index.html" class="">Agenciamento</a></li>';
temp += '<li id="spin_ventures"><a href="../management/index.html" class="">Management</a></li>';
temp += '</ul>';
temp += '</div>';
temp += '</div>';
//                --end of top_nav--
temp += '<div id="logo_bar">';
temp += '<div class="logo"><a href="index.html">AMC</a></div>';
temp += '<div id="links">';
temp += '<a href="faleconosco.html">fale conosco</a>';
temp += '&nbsp;';
temp += '<a href="../xPainel/index.htm" target="_blank">login</a>';
temp += '</div>';
temp += '</div>';
//                --end of logo_bar--
document.write(temp);
}
// ----------------------------------------
// vertical menu
var iMenu = new Array();
iMenu[0] = "Home;index.html";
iMenu[1] = "Quem Somos;quemsomos.html";
iMenu[2] = "O Que Fazemos;oquefazemos.html";
//iMenu[3] = "Projetos;projetos.html";
iMenu[3] = "Clientes;clientes.html";
//iMenu[5] = "Notícias;noticias.html";
iMenu[4] = "Trabalhe Conosco;trabalheconosco.html";

function vertical_nav(ativo) {
var iMenuLines = iMenu.length;
var temp = '';	

temp += '<div id="header_nav">';
temp += '<ul>';

for (var i=0; i<iMenuLines; i++){
    var arrText = iMenu[i].split(';');

    temp += '<li class="';
	if (arrText[0] == ativo) { temp += 'active'; }
	temp += '"><a href="' + arrText[1] + '">' + arrText[0] + '</a></li>';
}

temp += '</ul>';
temp += '</div>';
document.write(temp);
}
// ----------------------------------------
// Mapa do Site
function mapa() {
var iMenuLines = iMenu.length;
var temp = '';	

temp += '<ul>';

for (var i=0; i<iMenuLines; i++){
    var arrText = iMenu[i].split(';');

    temp += '<li class=""><a href="' + arrText[1] + '">' + arrText[0] + '</a></li>';
}
temp += '</ul>';
document.write(temp);
}
// ----------------------------------------
// Rodapé
function rodape() {
var temp = '';	
temp += '<div id="footer">';
//                    --email_list--
temp += '<div id="email_list">';
temp += '<img src="images/CARQ0V7T.gif" alt="" height="18" width="1" border="0" />';
temp += '</div>';
//                    --end of email_list--
                    
temp += '<tbody align="right"><tr><td>';
temp += '<a href="../design/index.html" target="_self">';
temp += '<img src="images/amc_com_br.png" alt="" border="0" align="right" hspace="25" vspace="5" />';
temp += '</a>';
temp += '</td></tr></tbody>';

temp += '<a href="index.html">Marketing</a> | ';
temp += '<a href="../eventos/index.html">Eventos</a> | ';
temp += '<a href="../design/index.html">Design</a> | ';
temp += '<a href="../publishing/index.html">Desktop Publishing</a> | ';
temp += '<a href="../agenciamento/index.html">Agenciamento</a> | ';
temp += '<a href="../management/index.html">Management</a>	';
temp += '<br />';
temp += '<a href="faleconosco.html">Fale Conosco</a> | ';
temp += '<a href="privacidade.html">Política de Privacidade</a> | ';
temp += '<a href="mapadosite.html">Mapa do Site</a> | &#0169; 1992-<script>document.write(ys);</script>&nbsp;AMC Comunicação';
       
//                --tirei WebTrends_SpindustryInteractive.js--

temp += '</div>';
document.write(temp);
}
// ----------------------------------------
    // need variable to determine number of right-clicks
    // for the "Projetos" slider at bottom of page
    var ourwork_rightclicks = 2;
             
// Projetos
function hotlinks() {
var temp = '';	
temp += '<div id="portfolio">';

temp += '<a href="#" id="move-left">';
temp += '<img src="images/arrow-left.gif" alt="&laquo; Esquerda" border="0" /></a>';
temp += '<div class="mod">';
temp += '<ul id="themes">';
            
temp += '<li><a href="../eventos/index.html" target="_top">';
temp += '<img id="_ctl0_cphContent_ucPortfolioSlider_rptSlider__ctl0_imgThumb" class="thumbs" src="portfolio/projetos_thumb1.gif" alt="AMC Comunicação &#13;Eventos" border="0" style="height:84px;width:127px;" /><span>Eventos</span></a></li>';
            
temp += '<li><a href="../design/index.html" target="_top">';
temp += '<img id="_ctl0_cphContent_ucPortfolioSlider_rptSlider__ctl1_imgThumb" class="thumbs" src="portfolio/projetos_thumb2.gif" alt="AMC Comunicação &#13;Design" border="0" style="height:84px;width:127px;" /><span>Design</span></a></li>';
            
temp += '<li><a href="../publishing/index.html" target="_top">';
temp += '<img id="_ctl0_cphContent_ucPortfolioSlider_rptSlider__ctl2_imgThumb" class="thumbs" src="portfolio/projetos_thumb3.gif" alt="AMC Comunicação &#13;Publishing" border="0" style="height:84px;width:127px;" /><span>Publishing</span></a></li>';
            
temp += '<li><a href="../agenciamento/index.html" target="_top">';
temp += '<img id="_ctl0_cphContent_ucPortfolioSlider_rptSlider__ctl3_imgThumb" class="thumbs" src="portfolio/projetos_thumb4.gif" alt="AMC Comunicação &#13;Agenciamento" border="0" style="height:84px;width:127px;" /><span>Agenciamento</span></a></li>';
            
temp += '<li><a href="../management/index.html" target="_top">';
temp += '<img id="_ctl0_cphContent_ucPortfolioSlider_rptSlider__ctl5_imgThumb" class="thumbs" src="portfolio/projetos_thumb5.gif" alt="AMC Comunicação &#13;Management" border="0" style="height:84px;width:127px;" /><span>Management</span></a></li>';
            
temp += '</ul>';
temp += '</div>';
    //-- end of mod --
temp += '<a href="#" id="move-right">';
temp += '<img src="images/arrow-right.gif" alt="&raquo; Direita" border="0" /></a>';
temp += '</div>';
document.write(temp);
}
// -----------------------------------------------------------------------------------------
//  N O T Í C I A S
// -----------------------------------------------------------------------------------------

function noticias() {
var temp = '';	
//      N O T A
temp += '<div style="margin-bottom:15px;">';
temp += '<a href="http://www.tacario.com.br" target="_blank">';
temp += '<img src="images/tacario.gif" border="0" style="width:200px;" />';
temp += '<br><br style="line-height:8px;">';
temp += '<h1>PRÉ-INSCRIÇÕES ABERTAS</h1></a>';
temp += '<p>Acompanhe as notícias do maior campeonato brasileiro de futebol soçaite';
temp += '<br><a href="http://www.tacario.com.br" target="_blank">www.tacario.com.br</a></p>';
temp += '</div>';
//      N O T A
temp += '<div style="margin-bottom:15px; ">';
temp += '<h1><a href="http://www.bandadonovoleblon.com.br" target="_blank">EVENTO DE CARNAVAL NA BARRA</a></h1>';
temp += '<p>Banda do Novo Leblon completa 11 anos';
temp += '<br><a href="http://www.bandadonovoleblon.com.br" target="_blank">www.bandadonovoleblon.com.br</a></p>';
temp += '</div>';
//      N O T A
temp += '<div style="margin-bottom:15px; ">';
temp += '<h1><a href="http://www.amc.com.br/brasileirao/" target="_blank">TAÇA LUIZ CARLOS BOTTINO</a></h1>';
temp += '<p>Torneio de soçaite do Novo Leblon';
temp += '<br><a href="http://www.amc.com.br/brasileirao/" target="_blank">www.amc.com.br/brasileirao</a></p>';
temp += '</div>';
document.write(temp);
}
// -----------------------------------------------------------------------------------------
//  B U S C A
// -----------------------------------------------------------------------------------------

function busca() {
var temp = '';	
temp += '<div id="quicksearch">';
temp += '<form name="BuscaSite" method=GET action=http://www.google.com/custom TARGET=_blank>';
temp += '<input name=q value="" type="text" id="_ctl0_cphContent_qs_txtSearch" class="searchinput" onKeyPress="SelBuscaSite()" />';
temp += '<input type="image" name=sa id="_ctl0_cphContent_qs_btnGo" class="searchbutton" src="images/search_button.gif" border="0" onclick="VerBuscaSite()" />';
temp += '<input type=hidden name=sitesearch value="www.amc.com.br">';
temp += '<input type=hidden name=domains value="www.amc.com.br">';
temp += '<input type=hidden name=cof VALUE="S:http://www.amc.com.br;GL:0;AH:left;LH:78;L:http://www.amc.com.br/marketing/images/marketing_logo_bar.gif;LW:840;AWFID:ff44ac8ed5117e96;">';
temp += '<input type="hidden" name="hl" value="pt">';
temp += '</form>';
temp += '</div>';
document.write(temp);
}
function SelBuscaSite()
  {
  if (window.event.keyCode == 13)
    {
    window.event.keyCode = 0;
    VerBuscaSite();
    }
  }
function VerBuscaSite()
  {
  var f = document.BuscaSite;
  if (f.q.value == "")
    {
    alert("Escreva uma palavra para fazer a busca.");
    f.q.focus();
    return;
    }
  else
    {
    f.submit();
	}
  }
// -----------------------------------------------------------------------------------------
