//
// noright click
	if (window.Event) // Netscape
  document.captureEvents(Event.MOUSEUP);
  
 function nocontextmenu()  // Internet Explorer
{
 event.cancelBubble = true
 event.returnValue = false;
 
 return false;
}
 
function norightclick(e)
{
 if (window.Event)
 {
  if (e.which == 2 || e.which == 3)
   return false;
 }
 else
  if (event.button == 2 || event.button == 3)
  {
   event.cancelBubble = true
   event.returnValue = false;
   return false;
  }
 }
 
document.oncontextmenu = nocontextmenu;
document.onmousedown = norightclick;





// NOticias CODE
//
//

function grow(row, texto){
	closeall();
	element = document.getElementById(row);
	element.height = 30;
	
	
	
	textArray = texto.split("<S>");
	paragraph = document.createElement("DIV");
	
	for(var x = 0; x < textArray.length; x++){
		if(textArray[x] != 'break'){
			textElement = document.createTextNode(textArray[x]);
			paragraph.appendChild(textElement);
		}
		else{
			linefeed = document.createElement("BR");
			paragraph.appendChild(linefeed);
		}
	}
	
	element.appendChild(paragraph);
	
}

function closeall(){
	for(var x=0; x<100; x+=1){
		if(linha = document.getElementById('news'+x)){
			while(linha.hasChildNodes()) 
				linha.removeChild(linha.firstChild);
			linha.height = 1;
		}
	}

}

function shrink(row){
	linha = linha = document.getElementById(row);
	while(linha.hasChildNodes()) 
		linha.removeChild(linha.firstChild);
	linha.height = 1;

}

function toggle(row, text){
	pergunta = document.getElementById(row);
	if(pergunta.height > 1)
		shrink(row);
	else{
		grow(row, text);
	}
}

//
// Random Product
//
function rimage(){
		var image = ["r1.jpg","r2.jpg","r3.jpg","r4.jpg","r5.jpg","r6.jpg","r7.jpg","r8.jpg"];
		var url;
		var nimage;
	
		nimage = (Math.floor(Math.random()*(image.length)));
		url = 'MEDIA/RANDOM/' + image[nimage];
		document.write('<img border="0" src="'+ url +'"/>');
}