//***************************MM_scripts

function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);

function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

function MM_findObj(n, d) { //v4.0
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && document.getElementById) x=document.getElementById(n); return x;
}

function MM_showHideLayers() { //v3.0
  var i,p,v,obj,args=MM_showHideLayers.arguments;
  for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2];
    if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v='hide')?'hidden':v; }
    obj.visibility=v;
	 }
	}
	

//webring date/scripts
function Add(href,text,kat) {
 SoundRing[++NumInSoundRing] = new SoundRingObject(href,text,kat);
 if (location.href.indexOf(href) > -1){ 
 WhereInRing = NumInSoundRing; 
 }
 } 
 
function SoundRingObject(href,text,kat) {
 this.href = href;
 this.text = text;
 this.kat = kat;
 } 
 
var WhereInRing = 0, NumInSoundRing = 0, SoundRing = new Array(), BaseUrl='http://helvildt.menneske.dk/'; 

Add(BaseUrl+"portraet/index.html","Ego - Noget om hvem og hvorfor!","manden_ikon.gif");
Add(BaseUrl+"system/news.html","News!","manden_ikon.gif");
Add(BaseUrl+"skildpadder/index.html","Skildpadden kender sandheden","billederne_ikon.gif");
Add(BaseUrl+"howdoyoulikeyournoise/index.html","How do you like your noise?","lyden_ikon.gif"); 
Add(BaseUrl+"soundmemory/index.html","SoundMemory - Lydtænknings træningsspil","lyden_ikon.gif");
Add(BaseUrl+"solo/index.html","helvildt som solist noiseist","lyden_ikon.gif");
Add(BaseUrl+"remix/index.html","Re-mix én drone - 3dages performance","lyden_ikon.gif"); 
Add(BaseUrl+"telefontegninger/index.html","Telefontegninger","billederne_ikon.gif");
Add(BaseUrl+"links/index.html","Links","manden_ikon.gif");

if (WhereInRing == 0) { WhereInRing = 1; } 
if (WhereInRing == 1) { PrevInRing = NumInSoundRing ; }
else 
{ PrevInRing = WhereInRing - 1; } 
if (WhereInRing == NumInSoundRing){ NextInRing = 1; }
else
{ NextInRing = WhereInRing + 1; } 

//pilenavigation
var venstregrafik=BaseUrl+"system/image/top_nav_venstre_pil.gif";
var hoejregrafik=BaseUrl+"system/image/top_nav_hoejre_pil.gif";
var SoundVenstre = ''; 
SoundVenstre += '<A HREF="'+SoundRing[PrevInRing].href+'">';
SoundVenstre += '<IMG SRC="'+venstregrafik+'" BORDER="0" WIDTH="19" HEIGHT="30" ALT="'+SoundRing[PrevInRing].text+'"><\/A>'; 
var SoundHoejre = ''; 
SoundHoejre += '<A HREF="'+SoundRing[NextInRing].href+'">';
SoundHoejre += '<IMG SRC="'+hoejregrafik+'" BORDER="0" WIDTH="19" HEIGHT="30" ALT="'+SoundRing[NextInRing].text+'"><\/A>';

//dropdownmenutable
var myWidth = 300, SoundTabel = '', myRows = SoundRing.length, bg_hover_color = '#234567', bg_color= '#000033';
if(what=="none") SoundTabel = '';
if(what=="moz") {
SoundTabel = '';}
else {
	// toppen af tabellen
	SoundTabel +='<table width='+myWidth+' border="0" cellspacing="0" cellpadding="2"><tbody>'; 
		for (var y = 1; y < myRows; y++){ //listen lægges ind i rækken
		SoundTabel +='<tr>';
		SoundTabel +='<td width="20"><img src="'+BaseUrl+'system/image/'+SoundRing[y].kat+'" width="20" height="20"><\/td>';
    	SoundTabel +='<td class=mu id=m1u'+y+' onMouseOver = "stopTime();changeBc(\'m1u'+y+'\',\''+bg_hover_color+'\');" onClick="location.href=\''+SoundRing[y].href+'\';" onMouseOut="startTime(2);changeBc(\'m1u'+y+'\',\''+bg_color+'\');">&nbsp;'+SoundRing[y].text+'&nbsp;<\/td>';
		SoundTabel +='<\/tr>';
	}
SoundTabel +='<\/tbody><\/table>'; //afslutningen af tabellen
}


//fullTOP
 var TopTable = '';
 TopTable += '<table width="97%" border="0" cellpadding="0" cellspacing="0" height="45">';
 //afstand til toppen
 TopTable += '<tr><td colspan="8" height="15" valign="top">&nbsp;</td></tr>';
 //afstand fra venstre
 TopTable += '<tr><td width="5%" height="30" valign="top" background="'+BaseUrl+'system/image/top_nav_between.gif">&nbsp;</td>';
 //Menu dropdown
 TopTable += '<td width="5%" background="'+BaseUrl+'system/image/top_nav_between.gif">Indhold:<div id=m1 style="background-color: #000033;; width: 300px; top: 45px"><script language="javascript1.2">document.write(SoundTabel);</script></div></td>';
 // Lyd /billeder
 TopTable += '<td valign="middle" width="35%" height="30" background="'+BaseUrl+'system/image/top_nav_between.gif"><p class="stor"><a onMouseOver="hideAll(1); showLayer(\'m1\'); stopTime()" style="CURSOR: default" onClick="" onMouseOut=startTime(2); href="'+BaseUrl+'lyd/index.html" class=hvid>Lyd/Sound</a> - <a onMouseOver="hideAll(1); showLayer(\'m1\'); stopTime()" style="CURSOR: default" onClick="" onMouseOut=startTime(2); href="'+BaseUrl+'billed/index.html" class=hvid>Billed/Image </a></p></td>';
 //afstand til titelen
 TopTable += '<td width="5%"  background="'+BaseUrl+'system/image/top_nav_between.gif"><p valign="right">title: </p></td>';
 //Titel
 TopTable += '<td width="30%" background="'+BaseUrl+'system/image/top_nav_between.gif" height="30" nowrap><script  language="javascript1.2" >document.write(\'<p class="stor" ><a href="'+BaseUrl+'news.html" style="CURSOR: default">'+document.title+'</a></p>\');</script></td>';
  //afstand til email
 TopTable += '<td width="7%" background="'+BaseUrl+'system/image/top_nav_between.gif"><p valign="right" nowrap>e-mail:</p></td>';
  TopTable += '<td width="10%" background="'+BaseUrl+'system/image/top_nav_between.gif" height="30" nowrap><a href="mailto:helvildt@menneske.dk?subject='+document.title+'">helvildt@menneske.dk</a></td>';
 // afstand til højre
 TopTable += '<td width="10"><img src="'+BaseUrl+'system/image/top_nav_hoejre.gif"></td></tr></table>';





