//------------------------------------------------------------------------------------------------------------------------------------------------
//	Funções diversas
//------------------------------------------------------------------------------------------------------------------------------------------------
function getData(){
	var now = new Date();
	var mName = now.getMonth() + 1;
	var dayNr = now.getDate();
	var yearNr=now.getYear();
	if(mName==1) Month = "janeiro";
	if(mName==2) Month = "fevereiro";
	if(mName==3) Month = "março";
	if(mName==4) Month = "abril";
	if(mName==5) Month = "maio";
	if(mName==6) Month = "junho";
	if(mName==7) Month = "julho";
	if(mName==8) Month = "agosto";
	if(mName==9) Month = "setembro";
	if(mName==10) Month = "outubro";
	if(mName==11) Month = "novembro";
	if(mName==12) Month = "dezembro";
	if(yearNr < 2000) Year = 1900 + yearNr;
	else Year = yearNr;

	return ("Triumpho, " + dayNr + " de " + Month + " de " + Year);
}

//------------------------------------------------------------------------------------------------------------------------------------------------

function breadcrumbs(){
  sURL = new String;
  bits = new Object;
  var x = 0;
  var stop = 0;
  var output = "<a class=\"LinkBreadcumb\" href=\"egusmao/web/triumpho/main.php\"><font size=\"1\">Home</font></a>  >  ";
  sURL = location.href;
  sURL = sURL.slice(8,sURL.length);
  chunkStart = sURL.indexOf("/");
  sURL = sURL.slice(chunkStart+1,sURL.length)
  while(!stop){
    chunkStart = sURL.indexOf("/");
    if (chunkStart != -1){
      bits[x] = sURL.slice(0,chunkStart)
      sURL = sURL.slice(chunkStart+1,sURL.length);
    }else{
      stop = 1;
    }
    x++;
  }
  for(var i in bits){
    output += "<a class=\"LinkBreadcumb\" href=\"";
    for(y=1;y<x-i;y++){
      output += "../";
    }
    output += bits[i] + "/\"><font size=\"1\">" + bits[i] + "</font></a>  >  ";
  }
//  document.write(output + document.title);
  document.write(output);
}

//------------------------------------------------------------------------------------------------------------------------------------------------

function showPagina(){	
	document.write("<object classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" codebase=\"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0\" width=\"235\" height=\"405\">");
	document.write("<param name=\"flash_component\" value=\"ImageViewer.swc\" />");
	document.write("<param name=\"movie\" value=\"flash/pagina.swf\" />");
	document.write("<param name=\"quality\" value=\"best\" />");
	document.write("<param name=\"wmode\" value=\"transparent\" />");
	document.write("<embed src=\"flash/pagina.swf\" wmode=\"transparent\" quality=\"best\" pluginspage=\"http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash\" type=\"application/x-shockwave-flash\" width=\"235\" height=\"405\"> </embed>");
	document.write("</object>");
}

//------------------------------------------------------------------------------------------------------------------------------------------------

function tam() {
	document.getElementById("page").height = page.document.getElementById("contLoja").scrollHeight + 40; //40: Margem Superior e Inferior, somadas
}

//------------------------------------------------------------------------------------------------------------------------------------------------

function MM_openBrWindow(theURL,winName,features) { //v2.0
	window.open(theURL,winName,features);
}


//------------------------------------------------------------------------------------------------------------------------------------------------

function popFoto(strURL){
	var win=window.open("../popFoto.php?strURL="+strURL,'Detalhes','toolbar=no,location=no,directories=no,status=no,menubar=no,width=800,height=600,scrollbars=no, resizable=no');
// 	var sw = 0;//(window.screen.availWidth-800)/2;
//	var sh = 0;//(window.screen.availHeight-600)/2;

// 	win.moveTo(sw,sh);
}

//------------------------------------------------------------------------------------------------------------------------------------------------
//Confirmar antes de executar uma ação...
function confAcao(strMsg, strParam){
	if(confirm(strMsg)){document.location.href=strParam;}
}
//------------------------------------------------------------------------------------------------------------------------------------------------
