
function menuTop(lang,pg){
  var msg;
  msg ="";
  
  if (lang=="pt")
  {
    a = "<b>P</b>ágina <b>P</b>rincipal";
	b = "<b>D</b>iscografia / <b>P</b>rojectos";
	c = "<b>D</b>ownloads";
	d = "<b>B</b>iografia";
	e = "<b>E</b>m <b>E</b>studio / <b>F</b>otos";
	f = "<b>E</b>ntrevistas & <b>A</b>rtigos";
	g = "<b>A</b>dquirir CDs";
	h = "<b>L</b>inks";
	lg = "eng";
  }

  if (lang=="eng")
  {
    a = "<b>H</b>ome";
	b = "<b>D</b>iscography / <b>P</b>rojects";
//	c = "<b>D</b>ownloads";
	d = "<b>B</b>iography";
	e = "<b>I</b>n <b>S</b>tudio / <b>P</b>hotos";
	f = "<b>I</b>nterviews & <b>A</b>rticles";
	g = "<b>B</b>uy CDs";
	h = "<b>L</b>inks";
	lg = "pt";
  }
 
  msg = msg + "<div id='spMenuLyr' style='position:absolute;top:20px;right:20px;visibility:visible;'>";
  msg = msg + "<br>";
  msg = msg + "<a class='menu3' href='spHome.htm'>" + a + "</a> &nbsp;&nbsp;";
  msg = msg + "<a class='menu3' href='spDiscography.htm'>" + b + "</a> &nbsp;&nbsp;";
//  msg = msg + "<a class='menu3' href='spDownload.htm'>" + c + "</a> &nbsp;&nbsp; ";
  msg = msg + "<a class='menu3' href='spBiography.htm'>" + d + "</a> &nbsp;&nbsp; ";
  msg = msg + "<a class='menu3' href='spStudio.htm'>" + e + "</a> &nbsp;&nbsp; ";
  msg = msg + "<a class='menu3' href='spInterviews.htm'>" + f + "</a> &nbsp;&nbsp; ";
  msg = msg + "<a class='menu3' href='spDistributors.htm'>" + g + "</a>&nbsp;&nbsp; ";
  msg = msg + "<a class='menu3' href='spLinks.htm'>" + h + "</a> ";
  msg = msg + "</div>";
	
  msg = msg + "<div id='spMenu2ndBarLyr' style='visibility:visible;left:0px;'>";
  msg = msg + "<div id='spMenu2ndBarLyr2' style='position:absolute; top:55px;'>";
  msg = msg + "<hr class=menu2>";
  msg = msg + "&nbsp;";
  msg = msg + "<a href='../_" + lg + "/spHome.htm'><img border='0' src='../imgs/bandeira_" + lg + ".gif' width='20' height='14'></a>";
  msg = msg + "</div>";
  msg = msg + "</div>";

  msg = msg + "<div id='spMenuHomeLyr' style='position:absolute;;left:0px;top:65px;right:0;'>";
  msg = msg + "<table align='right' border='0'>";
  msg = msg + "<tr>";
  msg = msg + "<td class='menuLabel' align='right'>";

  if (lang=="pt")
  {
	if (pg=="spHome")
	  msg = msg + "Bem vindo!";
	if (pg=="spDiscography")
	  msg = msg + "DISCOGRAFIA / PROJECTOS: Informação sobre os CDs";
	if (pg=="spDownload")
	  msg = msg + "DOWNLOADS";
	if (pg=="spBiography")
	  msg = msg + "BIOGRAFIA: Biografia dos Sonic Pulsar";
	if (pg=="spStudio")
	  msg = msg + "EM ESTÚDIO: Desenvolvimentos";
	if (pg=="spInterviews")
	  msg = msg + "Entrevistas & Artigos";
	if (pg=="spDistributors")
	  msg = msg + "Lojas onde pode adquirir os CDs dos Sonic Pulsar";
	if (pg=="spLinks")
	  msg = msg + "Links";
	if (pg=="spVideo")
	  msg = msg + "Video Clip";
  }

  if (lang=="eng")
  {
	if (pg=="spHome")
	  msg = msg + "Welcome!";
	if (pg=="spDiscography")
	  msg = msg + "DISCOGRAPHY / PROJECTS: Sonic Pulsar's";
//	if (pg=="spDownload")
//	  msg = msg + "DOWNLOADS";
	if (pg=="spBiography")
	  msg = msg + "BIOGRAPHY: Sonic Pulsar's Biography";
	if (pg=="spStudio")
	  msg = msg + "IN STUDIO: New developments";
	if (pg=="spInterviews")
	  msg = msg + "Interviews & Articles";
	if (pg=="spDistributors")
	  msg = msg + "Stores and distributors";
	if (pg=="spLinks")
	  msg = msg + "Links";
	if (pg=="spVideo")
	  msg = msg + "Video Clip";
  }

  msg = msg + "</td>";
  msg = msg + "</tr>";
  msg = msg + "</table>";
  msg = msg + "</div>";
	
  document.write(msg);
}


function menuEsquerda()
{
    if (!document.layers)
    document.write('</div>');
    JSFX_FloatTopDiv();
}

function JSFX_FloatTopDiv()
{
    var verticalpos="fromtop";

	var startX = 3,
	startY = 90;
	var ns = (navigator.appName.indexOf("Netscape") != -1);
	var d = document;
	function ml(id)
	{
		var el=d.getElementById?d.getElementById(id):d.all?d.all[id]:d.layers[id];
		if(d.layers)el.style=el;
		el.sP=function(x,y){this.style.left=x;this.style.top=y;};
		el.x = startX;
		if (verticalpos=="fromtop")
		el.y = startY;
		else{
		el.y = ns ? pageYOffset + innerHeight : document.body.scrollTop + document.body.clientHeight;
		el.y -= startY;
		}
		return el;
	}
	window.stayTopLeft=function()
	{
		if (verticalpos=="fromtop"){
		var pY = ns ? pageYOffset : document.body.scrollTop;
		ftlObj.y += (pY + startY - ftlObj.y)/8;
		}
		else{
		var pY = ns ? pageYOffset + innerHeight : document.body.scrollTop + document.body.clientHeight;
		ftlObj.y += (pY - startY - ftlObj.y)/8;
		}
		ftlObj.sP(ftlObj.x, ftlObj.y);
		setTimeout("stayTopLeft()", 10);
	}
	ftlObj = ml("divStayTopLeft");
	stayTopLeft();
}


/***********************************************************************************
          Fading Scroller- By DynamicDrive.com
          For full source code, and usage terms, visit http://www.dynamicdrive.com
          This notice MUST stay intact for use
 ***********************************************************************************/

function escreveSroll(){
  var delay=2000; //set delay between message change (in miliseconds)
  var fcontent=new Array();

  begintag='<p class=text2>' ;//set opening tag, such as font declarations
  fcontent[0]="<a class=menu2 href=spDiscographyPUDetails.htm>\"Playing the Universe\"</a> features almost 74mn of pure progressive music!";
  fcontent[1]="Go to our label\'s website at <a class=menu2 href=http://www.fossilrecords.net>Fossil Records</a> and buy it.";
  fcontent[2]="Our next CD is also in preparation and will be called <a class=menu2 href=spDiscographyOPDetails.htm>\"Out of Place\"</a>.";
  fcontent[3]="Best wishes to you all!";
  closetag='</p>';

  var fwidth='150px' ;//set scroller width
  var fheight='150px' ;//set scroller height
  var fadescheme=1 ;//set 0 to fade text color from (white to black), 1 for (black to white)
  var fadelinks=0 ; //should links inside scroller content also fade like text? 0 for no, 1 for yes.

  ///No need to edit below this line/////////////////

  var hex=(fadescheme==0)? 255 : 0;
  var startcolor=(fadescheme==0)? "rgb(255,255,255)" : "rgb(0,0,0)";//"rgb(221,187,136)"
  var endcolor=(fadescheme==0)? "rgb(0,0,0)" : "rgb(255,255,255)";

  var ie4=document.all&&!document.getElementById;
  var ns4=document.layers;
  var DOM2=document.getElementById;
  var faderdelay=0;
  var index=0;

  if (DOM2)
      faderdelay=4000;

//function to change content
function changecontent(){
if (index>=fcontent.length)
index=0
if (DOM2){
document.getElementById("fscroller").style.color=startcolor
document.getElementById("fscroller").innerHTML=begintag+fcontent[index]+closetag
linksobj=document.getElementById("fscroller").getElementsByTagName("A")
if (fadelinks)
linkcolorchange(linksobj)
colorfade()
}
else if (ie4)
document.all.fscroller.innerHTML=begintag+fcontent[index]+closetag
else if (ns4){
document.fscrollerns.document.fscrollerns_sub.document.write(begintag+fcontent[index]+closetag)
document.fscrollerns.document.fscrollerns_sub.document.close()
}

index++
setTimeout("changecontent()",delay+faderdelay)
}

// colorfade() partially by Marcio Galli for Netscape Communications.  ////////////
// Modified by Dynamicdrive.com

frame=20;

function linkcolorchange(obj){
if (obj.length>0){
for (i=0;i<obj.length;i++)
obj[i].style.color="rgb("+hex+","+hex+","+hex+")"
}
}

function colorfade() {
// 20 frames fading process
if(frame>0) {
hex=(fadescheme==0)? hex-12 : hex+12 // increase or decrease color value depd on fadescheme
document.getElementById("fscroller").style.color="rgb("+hex+","+hex+","+hex+")"; // Set color value.
if (fadelinks)
linkcolorchange(linksobj)
frame--;
setTimeout("colorfade()",20);
}

else{
document.getElementById("fscroller").style.color=endcolor;
frame=20;
hex=(fadescheme==0)? 255 : 0
}
}

if (ie4||DOM2)
document.write('<div id="fscroller" style="border:1px solid white;width:'+fwidth+';height:'+fheight+';padding:2px"></div>')

window.onload=changecontent
}



/****************
zoom images
*******************/

//Thumbnail image viewer-
//© Dynamic Drive (www.dynamicdrive.com)
//For full source code, usage terms, and 100's more DHTML scripts, visit http://www.dynamicdrive.com

var ie=document.all
var ns=document.layers
var ns6=document.getElementById&&!document.all

function enlarge(which,e){
//Render image code for IE 4+ and NS6
  if (ie||ns6){
    crossobj=document.getElementById? document.getElementById("showimage") : document.all.showimage
    if (crossobj.style.visibility=="hidden"){
      crossobj.style.left=ns6? pageXOffset+e.clientX : document.body.scrollLeft+event.clientX;
      crossobj.style.top=ns6? pageYOffset+e.clientY : document.body.scrollTop+event.clientY
      crossobj.innerHTML='<img onClick=closepreview() src="'+which+'">'
      crossobj.style.visibility="visible"
    }
    else
      crossobj.style.visibility="hidden"
      return false
    }
    //Render image code for NS 4
  else if (document.layers){
    if (document.showimage.visibility=="hide"){
      document.showimage.document.write('<a href="#" onMouseover="drag_dropns(showimage)"><img src="'+which+'" border=0></a>')
      document.showimage.document.close()
      document.showimage.left=e.x
      document.showimage.top=e.y
      document.showimage.visibility="show"
    }
    else
      document.showimage.visibility="hide"
    return false
  }
//if NOT IE 4+ or NS 4, simply display image in full browser window
  else
    return true
}

function closepreview(){
  crossobj.style.visibility="hidden"
}


//By Dynamicdrive.com

//drag drop function for NS 4////
/////////////////////////////////

var nsx,nsy,nstemp

function drag_dropns(name){
  temp=eval(name)
  temp.captureEvents(Event.MOUSEDOWN | Event.MOUSEUP)
  temp.onmousedown=gons
  temp.onmousemove=dragns
  temp.onmouseup=stopns
}

function gons(e){
  temp.captureEvents(Event.MOUSEMOVE);
  nsx=e.x;
  nsy=e.y;
}

function dragns(e){
  temp.moveBy(e.x-nsx,e.y-nsy); return false
}

function stopns(){
  temp.releaseEvents(Event.MOUSEMOVE)
}

//drag drop function for IE 4+ and NS6////
/////////////////////////////////

function drag_drop(e){
  if (ie&&dragapproved){
    crossobj.style.left=tempx+event.clientX-offsetx
    crossobj.style.top=tempy+event.clientY-offsety
  }
  else if (ns6&&dragapproved){
    crossobj.style.left=tempx+e.clientX-offsetx
    crossobj.style.top=tempy+e.clientY-offsety
  }
  return false
}

function initializedrag(e){
  if (ie&&event.srcElement.id=="drag"||ns6&&e.target.id=="drag"){
    offsetx=ie? event.clientX : e.clientX
    offsety=ie? event.clientY : e.clientY

    tempx=parseInt(crossobj.style.left)
    tempy=parseInt(crossobj.style.top)

    dragapproved=true
    document.onmousemove=drag_drop
  }
}

document.onmousedown=initializedrag
document.onmouseup=new Function("dragapproved=false")




/************************
* No rigth click

//Disable right mouse click Script
//By Maximus (maximus@nsimail.com) w/ mods by DynamicDrive
//For full source code, visit http://www.dynamicdrive.com

************************/

var message="Sonic Pulsar Copyrighted";

function clickIE4(){
  if (event.button==2){
	alert("event.button: "+event.button);
    alert(message);
    return false;
  }
}

function clickNS4(e){
  if (document.layers||document.getElementById&&!document.all){
    if (e.which==2||e.which==3){
	alert("e.which: "+e.which);
      alert(message);
      return false;
    }
  }
}

function rigthClick ()
{
  if (document.layers){
    document.captureEvents(Event.MOUSEDOWN);
    document.onmousedown=clickNS4;
  }
  else if (document.all&&!document.getElementById){
    document.onmousedown=clickIE4;
  }
  document.oncontextmenu=new Function("alert(message);return false")
  document.oncontextmenu.saveas

}


/**************************
Pop Up
//  ConcessWindow=window.open(nomePg, "conWindow", "toolbar=no,width=340,height=400,directories=no,status=no,resize=no,menubar=no,minimize=no,scrollbars=yes");

*************************/
function PopUp(nomePg){ 
  var remote
  remote=null;
  remote = window.open (nomePg, "conWindow", "toolbar=no,width=340,height=400,directories=no,status=no,resize=no,menubar=no,minimize=no,scrollbars=yes");
  if (remote != null)
    remote.location.href = nomePg;
}


/************************
som
*************************/
function som(lang){
  var msg;
  msg ="";

  msg = msg + "<OBJECT ID='MPlyr' CLASSID='CLSID:22D6F312-B0F6-11D0-94AB-0080C74C7E95'>" ;

  if (lang=="eng")
  	msg = msg + "<PARAM NAME='FileName' VALUE='pt/download/ambiente3.wav'>" ;
  else if (lang=="pt")
  	msg = msg + "<PARAM NAME='FileName' VALUE='download/ambiente3.wav'>" ;

  msg = msg + "<PARAM NAME='AutoRewind' VALUE='true'>" ;
  msg = msg + "<PARAM NAME='Balance' VALUE='-10000'>" ;
  msg = msg + "<PARAM NAME='AutoStart' VALUE='true'> " ;
  msg = msg + "<PARAM NAME='ShowDisplay' VALUE='false'> " ;
  msg = msg + "<PARAM NAME='ShowControls' VALUE='false'>" ;
  msg = msg + "<PARAM NAME='ShowTracker' VALUE='false'>" ;
  msg = msg + "<PARAM NAME='PlayCount' VALUE='0'> " ;
  msg = msg + "</OBJECT>" ;

  if (lang=="eng"){
    msg = msg + "<img src='imgs/sound-on.gif' alt='Sound on' onclick='MPlyr.Play()';>   " ;
    msg = msg + "<img src='imgs/sound-off.gif' alt='Sound off' ONCLICK='MPlyr.Pause();'> " ;
  }
  else if (lang=="pt"){
    msg = msg + "<img src='../imgs/sound-on.gif' alt='Sound on' onclick='MPlyr.Play()';>   " ;
    msg = msg + "<img src='../imgs/sound-off.gif' alt='Sound off' ONCLICK='MPlyr.Pause();'> " ;
  }

  document.write(msg);
}





/*************************************
imgs home
**************************************/


<!--

//*****************************************
// Blending Image Slide Show Script- 
// © Dynamic Drive (www.dynamicdrive.com)
// For full source code, visit http://www.dynamicdrive.com/
//*****************************************

function slideHome()
{
alert('slideHome');
//specify interval between slide (in mili seconds)
  var slidespeed=3000

//specify images
  var slideimages=new Array("../photos/HF5.JPG","../photos/NF1.JPG","../photos/CM1.JPG")

//specify corresponding links
  var slidelinks=new Array('javascript:PopUp("spBiographyHF.htm")','javascript:PopUp("spBiographyNF.htm")', 'javascript:PopUp("spBiographyCM.htm")')

  var newwindow=1 //open links in new window? 1=yes, 0=no

  var imageholder=new Array()
  var ie=document.all
  for (i=0;i<slideimages.length;i++){
    imageholder[i]=new Image()
    imageholder[i].src=slideimages[i]
  }

  var whichlink=0 
  var whichimage=0
  var blenddelay=(ie)? document.images.slide.filters[0].duration*1000 : 0
  gotoshow();
  slideit();
}

function gotoshow(){
  if (newwindow)
    window.open(slidelinks[whichlink])
  else
    window.location=slidelinks[whichlink]
}



function slideit(){
alert('slideit');
  if (!document.images) return
    if (ie) document.images.slide.filters[0].apply()
      document.images.slide.src=imageholder[whichimage].src
    if (ie) document.images.slide.filters[0].play()
      whichlink=whichimage
  whichimage=(whichimage<slideimages.length-1)? whichimage+1 : 0
  setTimeout("slideit()",slidespeed+blenddelay)
}
