﻿/*
	JS DOCUMENT
	AURELIO ARANTES
	WWW.KITAHARA.COM.BR
	
	AURELIOARANTES@GMAIL.COM

*/

function Menu(a, b){
	document.getElementById(a).src="img/menu/"+b+".gif";	
}

function subItens(a, b){
	document.getElementById(a).src="img/subItens/"+b+".png";	
}


function mostrarTolTip(mostra)
{
	document.getElementById(mostra).style.display = "block";
}
function esconderTolTip(mostra)
{
	document.getElementById(esconde).style.display = "none";
}


// ---------------------------------------- +
// - Função para executar flashs
// ---------------------------------------- +
function RodarFlash( path,variaveis,_width,_height ) {
	document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="'+_width+'" height="'+_height+'">');
	document.write('<param name="movie" value="'+path+'?'+variaveis+'">');
	document.write('<param name="quality" value="high">');
	document.write('<param name="wmode" value="transparent">');
	document.write('<embed src="'+path+'?'+variaveis+'" width="'+_width+'" height="'+_height+'" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" wmode="transparent"></embed>');
	document.write('</object>');
}


function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
	};
	
	
function comentarioVisivel(obj) {
	var el = document.getElementById(obj);
	if ( el.style.display != 'none' ) {
		el.style.display = 'none';
		}
		else {
		el.style.display = '';
		}
	}
	
	
	
	
//tamanho da fonte

function getCookieVal (offset) {
	var endstr = document.cookie.indexOf (";", offset);
	if (endstr == -1) { endstr = document.cookie.length; }
	return unescape(document.cookie.substring(offset, endstr));
	}

function GetCookie (name) {
	var arg = name + "=";
	var alen = arg.length;
	var clen = document.cookie.length;
	var i = 0;
	while (i < clen) {
		var j = i + alen;
		if (document.cookie.substring(i, j) == arg) {
			return getCookieVal (j);
			}
		i = document.cookie.indexOf(" ", i) + 1;
		if (i == 0) break; 
		}
	return null;
	}

function DeleteCookie (name,path,domain) {
	if (GetCookie(name)) {
		document.cookie = name + "=" +
		((path) ? "; path=" + path : "") +
		((domain) ? "; domain=" + domain : "") +
		"; expires=Thu, 01-Jan-70 00:00:01 GMT";
		}
	}

function SetCookie (name,value,expires,path,domain,secure) {
	expires = new Date;
	expires.setMonth(expires.getMonth()+9);
  document.cookie = name + "=" + escape (value) +
    ((expires) ? "; expires=" + expires.toGMTString() : "") +
    ((path) ? "; path=" + path : "") +
    ((domain) ? "; domain=" + domain : "") +
    ((secure) ? "; secure" : "");
	}
	


var THEME_KEY = "theme";	
var DEFAULT_THEME = "styleTransito";	



function changeStyleSheet() {
	var s = GetCookie(THEME_KEY);	
	if (s == null) s = DEFAULT_THEME;	
	document.getElementById('default').href = "src/"+s+".css";	
}

function setTheme(name) {
	DeleteCookie(THEME_KEY);					
	SetCookie(THEME_KEY, name);
	self.location = self.location;	
}
	
changeStyleSheet(); 

/*
	JS DOCUMENT
	AURELIO ARANTES
	WWW.KITAHARA.COM.BR
	
	AURELIOARANTES@GMAIL.COM

*/
