//***************************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+"index.html","Forside / Nyhedder","kat_ego.png");
Add(BaseUrl+"telefontegninger/index.html","Telefontegninger","kat_billede.png");
Add(BaseUrl+"bevaeelse/index.html","Bvægelse 1-4","kat_billede.png");
Add(BaseUrl+"skildpadder/index.html","Skildpadder","kat_billede.png");
Add(BaseUrl+"remix/index.html","Re-mix én drone","kat_lyd.png");
Add(BaseUrl+"howdoyoulikeyournoise/index.html","How do you like your noise?","kat_lyd.png");
Add(BaseUrl+"soundmemory/index.html","Husk en lyd (spil)","kat_lyd.png");
Add(BaseUrl+"komfurfilm/index.html","Komfurfilm","kat_lyd.png");
Add(BaseUrl+"solo/index.html","Om lyde","kat_lyd.png");
Add(BaseUrl+"billed/index.html","Om billeder","kat_billede.png");
Add(BaseUrl+"portraet/index.html","Om helvildt!","kat_ego.png");
Add(BaseUrl+"links/index.html","Nogle links","kat_ego.png");

//Add(BaseUrl+"jammachine/jammachine.html","fra '15 grader i timen'","lyden_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; } 
//alert (WhereInRing);

//dropdownmenutable - + sortering (sansning, taenkning, handling)#529DA8
var myWidth = 200, SoundTabel = '', myRows = SoundRing.length, bg_hover_color = '#BC9C41', bg_color= 'transparent';
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 class=mu id=m2u'+y+' width="12"><img border=0 src="'+BaseUrl+'system/image/'+SoundRing[y].kat+'" width="12" height="12"><\/td>';
    	SoundTabel +='<td class=mu id=m1u'+y+' onMouseOver = "stopTime();changeBc(\'m1u'+y+'\',\''+bg_hover_color+'\');changeBc(\'m2u'+y+'\',\''+bg_hover_color+'\');" onClick="location.href=\''+SoundRing[y].href+'\';" onMouseOut="startTime(2);changeBc(\'m1u'+y+'\',\''+bg_color+'\');changeBc(\'m2u'+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="25" height="30" valign="top" background="'+BaseUrl+'system/image/top_nav_between.png">&nbsp;</td>';
 //Menu dropdown
 TopTable += '<td width="1%" background="'+BaseUrl+'system/image/top_nav_between.png"> <div id=m1 style="background-color: '+bg_color+'; width: '+myWidth+'px; left: 10px top: 45px"><script language="javascript1.2">document.write(SoundTabel);</script></div></td><td width="10" background="'+BaseUrl+'system/image/top_nav_between.png"><img border=0 class="aimg" src="'+BaseUrl+'system/image/'+SoundRing[WhereInRing].kat+'" width="22" height="22"></td>';
 // Lyd /billeder
 TopTable += '<td valign="middle" width="5%" height="30" background="'+BaseUrl+'system/image/top_nav_between.png"><a   onMouseOver="hideAll(1); showLayer(\'m1\'); stopTime()" style="CURSOR: default" onClick="" onMouseOut=startTime(2); href="'+BaseUrl+'index.html"><img class="aimg" src="'+BaseUrl+'system/image/helvildt_logo.png" border=0 ></a></td>';
 //afstand til titelen
 TopTable += '<td width="5%"  background="'+BaseUrl+'system/image/top_nav_between.png"></td>';
 //Titel
 TopTable += '<td width="50%" background="'+BaseUrl+'system/image/top_nav_between.png" height="30" nowrap><script  language="javascript1.2">document.write(\'<p align="left" class="title">'+document.title+'</p>\');</script></td>';
  //afstand til email
   TopTable += '<td width="7%" background="'+BaseUrl+'system/image/top_nav_between.png"><g:plusone size="small"></g:plusone></td>';
  // TopTable += '<td width="7%" background="'+BaseUrl+'system/image/top_nav_between.png"><fb:like href="http://www.facebook.com/helvildt.raagaard" send="false" layout="button_count" data-width="125" data-height="15" pixelsshow_faces="false" action="recommend" font="verdana"></fb:like></td>';
  TopTable += '<td width="10%" background="'+BaseUrl+'system/image/top_nav_between.png" 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 class="aimg" src="'+BaseUrl+'system/image/top_nav_hoejre.png"></td></tr></table>';






