function menu() {

var url = 'http://www.hocusfocus.no/';
var el_1 = document.getElementById('menu').getElementsByTagName('li'); 
var el_2 = document.getElementById('menu').getElementsByTagName('a'); 

if (location.href.indexOf(url+"?p") != -1){el_2.item(0).className="";el_2.item(0).href="index.php";};
if (location.href.indexOf(url+"?page_id=4") != -1){el_2.item(1).className="sel";el_2.item(1).href="#";} else {};
if (location.href.indexOf(url+"?page_id=5") != -1){el_2.item(2).className="sel";el_2.item(2).href="#";} else {};
if (location.href.indexOf(url+"?page_id=7") != -1){el_2.item(3).className="sel";el_2.item(3).href="#";} else {};
if (location.href.indexOf(url+"?page_id=9") != -1){el_2.item(4).className="sel";el_2.item(4).href="#";} else {};
if (location.href.indexOf("http://client.hocusfocus.no/") != -1){el_2.item(5).className="sel";el_2.item(5).href="#";} else {};
if (location.href.indexOf(url+"?page_id=11") != -1){el_2.item(6).className="sel";el_2.item(6).href="#";} else {};

//el_1.item(4).style.display='none';

}

function frontvid(img,file){
	var url = 'http://client.hocusfocus.no/hocusgjest/hocusfocusweb/';
	document.write('<div class="frontplayer"><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0" width="430" height="242">');
  document.write('<param name="movie" value="wp-content/themes/hocus/flash/player.swf" />');
  document.write('<param name="quality" value="high" />');
  document.write('<param name="allowFullScreen" value="true" />');
  document.write('<param name="flashvars" value="img='+url+img+'&amp;file='+url+file+'" />');
  document.write('<embed src="wp-content/themes/hocus/flash/player.swf" quality="high" allowFullScreen="true" pluginspage="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="430" height="242" flashvars="img='+url+img+'&amp;file='+url+file+'"></embed>');
document.write('</object></div>');
}
function vid(img,file){
	var url = 'http://client.hocusfocus.no/hocusgjest/hocusfocusweb/';
document.write('<div class="flash"><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0" width="430" height="242">');
  document.write('<param name="movie" value="wp-content/themes/hocus/flash/player.swf" />');
  document.write('<param name="quality" value="high" />');
  document.write('<param name="allowFullScreen" value="true" />');
  document.write('<param name="flashvars" value="img='+url+img+'&amp;file='+url+file+'" />');
  document.write('<embed src="wp-content/themes/hocus/flash/player.swf" quality="high" allowFullScreen="true" pluginspage="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="430" height="242" flashvars="img='+url+img+'&amp;file='+url+file+'"></embed>');
document.write('</object></div>');
}
function customvid(img,file){
	var url = '';
document.write('<div class="flash"><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0" width="430" height="242">');
  document.write('<param name="movie" value="wp-content/themes/hocus/flash/subplayer.swf" />');
  document.write('<param name="quality" value="high" />');
  document.write('<param name="flashvars" value="img='+url+img+'&amp;file='+url+file+'" />');
  document.write('<embed src="wp-content/themes/hocus/flash/subplayer.swf" quality="high" pluginspage="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="430" height="242" flashvars="img='+url+img+'&amp;file='+url+file+'"></embed>');
document.write('</object></div>');
}

function itemOver(){
	if(document.getElementById('home_news') != null){
		for(i = 0; i < 200; i++){
		var sRow1 = document.getElementById('home_news').getElementsByTagName('div').item(i);
		var sRow2 = document.getElementById('home_work').getElementsByTagName('div').item(i);
		if(sRow1 != null){
			sRow1.onmouseover = function(){this.className = "over"}
			sRow1.onmouseout = function(){this.className = ""}
			}
		if(sRow2 != null){
			sRow2.onmouseover = function(){this.className = "over"}
			sRow2.onmouseout = function(){this.className = ""}
			}
	}
}
}

function init(){
	menu();
	itemOver();
}

window.onload = init;