<!--
var d=document;
$ = function(id) {
	if(!arguments[1]) return document.getElementById(id);
	else document.getElementById(id).style[arguments[1]]=arguments[2];
}


function delItem(arr,item){
for(;item<arr.length;item++) arr[item]=arr[item + 1];
arr.length=arr.length-1;
} function goURL(){
(Item[atual][3].indexOf('_blank')!=-1) ? window.open(Item[atual][3].substring(0,Item[atual][3].indexOf(' '))) : location.href=Item[atual][3];
}
function goURLcat(){
(Item[atual][7].indexOf('_blank')!=-1) ? window.open(Item[atual][7].substring(0,Item[atual][7].indexOf(' '))) : location.href=Item[atual][7];
} 
 function startSlide(){ 
loadImages();
if(!paused) timeoutId=setTimeout('changeImg(1)',4000);
} function initialize(){
timeoutId=0;
textareaContent=d.form_cr.select_cr.value.split(/[\r\n]/i);
Item = new Array();
for(x=0,y=0;x<textareaContent.length;x++){ 
	if(textareaContent[x].length>30) Item[y++]=textareaContent[x].split('|');
	}
for(i=Item.length-1;i>=0;i--){
	Item[i][0]=Item[i][0].replace(/([ \n\t\r])+/, " ");
	Item[i][4]=(Item[i][4].length<3) ? '' : '<img src="'+Item[i][4]+'" border="0" style="margin-left:4px;" />';
	if(Item[i][1].length<3||Item[i][3].length<3||Item[i][2].length<3||Item[i][0].length<2) delItem(Item,i);
	}
if(Item.length==1) d.write('<style>#anterior,#proximo,#pause{visibility:hidden;}</style>');
atual = Math.random().toString().substring(2,6) % Item.length;
} function startPanel(){
usaCredito = '';
initialize();
if(arguments.length>0){
	if(!isNaN(arguments[0])) atual = arguments[0];
	}
if(paused) {imgpause='on'; altpause='alt="Ligar" title="Iniciar rotação de imagens"';}
else {imgpause='off'; altpause='alt="Parar" title="Pausar rotação de imagem"';}

d.write('<table border="0" cellpadding="0" cellspacing="0" width="258">');
d.write('<tr>');
d.write('<td><img name="index_left_novos_papeis_de_parede" src="img_index/index_left_novos_papeis_de_parede.jpg" width="21" height="113" border="0" alt=""></td>');
d.write('<td><div id="to-blend">'+usaCredito+'<a href="javascript:goURL()"><img width="151" height="113" src="'+Item[atual][1]+'" id="imgslide" name="img1" border="0" title="'+Item[atual][0]+'" alt="'+Item[atual][0]+'"  style="filter:alpha(opacity=100)" onMouseover="makevisible(this,0)" onMouseout="makevisible(this,1)"></a></td>');
d.write('<td>');
d.write('<table border="0" cellpadding="0" cellspacing="0" width="86">');
d.write('<tr>');
d.write('<td><div id="prox-ant"><a href="javascript:void(0)" id="proximo" onclick="if(okToGo)changeImg(1)"><img  border="0"  src="img_index/index_passa.jpg" border="0" title=" Próxima imagem " width="86" height="41" /></a></div></td>');
d.write('</tr><tr>');
d.write('<td><div id="prox-ant"><img border="0" src="img_index/index_pause.jpg" style="cursor:hand" onclick="pauseSlide()" id="pause" '+altpause+' /></div></td>');
d.write('</tr><tr>');
d.write('<td><div id="prox-ant"><a href="javascript:void(0)" id="anterior" onclick="if(okToGo)changeImg(-1)"><img  border="0"  src="img_index/index_voltar.jpg" border="0"  title=" Imagem anterior " /></a></div></td>');
d.write('</tr>');
d.write('</table>');
d.write('</td>');
d.write('</tr>');
d.write('</table>');
d.write('<table border="0" cellpadding="0" cellspacing="0" width="258">');
d.write('<tr>');
d.write('  <td valign=top name="index_caixa_papeis_descricao_do_wallpaper" background="img_index/index_caixa_papeis_descricao_do_wallpaper.jpg" width="258" height="81" border="0" alt="">  ');
d.write('  <div style="WIDTH:50px;height:52px;PADDING-LEFT: 33px;PADDING-TOP: 29px;float:left">  ');
d.write('  <font class="temaItalico" style="font-size:26px">  ');
d.write('  <strong><span id="txt6">'+Item[atual][6]+'</span></strong></font></div>  ');
d.write('  <div style="WIDTH:142px;height:52px;PADDING-LEFT: 15px;PADDING-TOP: 22px;float:left">  ');
d.write('  <font class="comum">  ');
d.write('  <a href="javascript:goURL()" id="p-link"><span id="txt1">'+Item[atual][0]+'</span><span id="icon-area">'+Item[atual][4]+'</span></a> <br /> ');
d.write('  <b>Tamanho:</b><span id="txt5"> '+Item[atual][5]+' </span><br />  ');
d.write('  <b>Categoria:</b><a href="javascript:goURLcat()" id="p-link"><span id="txt2" class="comum"> '+Item[atual][2]+'</span></a>');
d.write('  </font>  ');
d.write('  </div>  ');
d.write('  </div>  ');
d.write('</td>');
d.write('</tr>');
d.write('</table>');

} function pauseSlide(){
if(paused){
	$('pause').src='img_index/index_pause.jpg';
	$('pause').title='Parar'; $('pause').alt = 'Parar';
	paused=false;
	startSlide();
}else{
	clearTimeout(timeoutId);
	$('pause').src='img_index/index_play.jpg';
	$('pause').title='Ligar'; $('pause').alt = 'Ligar';
	paused = true;
} }

var okToGo=false;
var paused=(d.cookie.indexOf('homeSSpause=1')!=-1) ? true : false;
onload=startSlide;
-->