// mod select style and color
/*
Compativel com Internet Explorer, Mozila Firefox e Opera 9+
*/
//var file=new Array("site-teste_01","site-teste_03","site-teste_05","site-teste_06","site-teste_07","site-teste_08","site-teste_09","site-teste_10","site-teste_11");
var file=new Array("c1","c2","c3","c4","c5","c6","c7","c8","c9");

function modo(mytema) {
	var tamanho = Number;
	tamanho = mytema.length;
	ext = mytema.substr((tamanho-4),4);

	if (ext == '_png') {
		return true;
	} else {
		return false;
	}

}

function tema(valor){
	for (i=0;i<9;i++) {
		id = 'x'+i;
		if (modo(valor) == false ) {
			//document.getElementById('png').innerHTML = 'Tema compativel com Internet Explorer 6. Imagens <strong>GIF</strong>.';
			document.styleSheets[1].cssRules[i].style.cssText  = "background-image:url('"+valor+"/"+file[i]+".gif')"; 
		} else {
			//document.getElementById('png').innerHTML = 'Tema usado, não é compativel com Internet Explorer 6. Imagens <strong>PNG</strong>.';
			document.styleSheets[1].cssRules[i].style.cssText  = "background-image:url('"+valor+"/"+file[i]+".png')"; 
		}
	}
	document.getElementById('loadtema').style.visibility = "hidden";
}

function temaIE(valorie){
	for (i=0;i<9;i++) {
		if (modo(valorie) == false) { 
			//document.getElementById('png').innerHTML = 'Tema compativel com Internet Explorer 6. Imagens <strong>GIF</strong>.';
			document.styleSheets[1].rules[i].style.backgroundImage = 'url("'+valorie+'/'+file[i]+'.gif")';
		} else {
			//document.getElementById('png').innerHTML = 'Tema usado, não é compativel com Internet Explorer 6. Imagens <strong>PNG</strong>.';
			document.styleSheets[1].rules[i].style.backgroundImage = 'url("'+valorie+'/'+file[i]+'.png")';
		}
	}
	document.getElementById('loadtema').style.visibility = "hidden";
}


