
function showTopmenubck(id)
{
	document.getElementById(id).style.backgroundImage = "url(/gfx/gfx2007/menu_top/" +id+ "_over.gif)";
}
function hideTopmenubck(id)
{
	document.getElementById(id).style.backgroundImage = "url(/gfx/gfx2007/menu_top/" +id+ "_out.gif)";
}

//---------------------------------------------------------------------


function setLayer(id)
{
	var arrPopup = new Array()
		//arrPopup[0] = "popup_findirma"
		arrPopup[0] = "popup_indkoebseddel"
		// arrPopup[1] = "popup_kontakt"
		arrPopup[1] = "popup_soeg"
		

	if (document.getElementById(id).style.display == "none")
	{
		for (i=0; i < arrPopup.length; i++)
		{
			document.getElementById(arrPopup[i]).style.display = "none";
		}
		document.getElementById(id).style.display = "block";
	} else
	{
		document.getElementById(id).style.display = "none";
	}
}

function hideLayer(id)
{
	document.getElementById(id).style.display = "none";
}

//---------------------------------------------------------------------
function setLayer_brugerKommentarer(id)
{
	var arrPopup = new Array()
		arrPopup[0] = "popup_kommentar1"
		arrPopup[1] = "popup_kommentar2"
		arrPopup[2] = "popup_kommentar3"
		

	if (document.getElementById(id).style.display == "none")
	{
		for (i=0; i < arrPopup.length; i++)
		{
			document.getElementById(arrPopup[i]).style.display = "none";
		}
		document.getElementById(id).style.display = "block";
	} 
	else
	{
		document.getElementById(id).style.display = "none";
	}
}

//---------------------------------------------------------------------

function setPopup(thisDoc, thisName, thisWidth, thisHeight)
{
	var popupWin = window.open(thisDoc.href, thisName, "width=" + thisWidth + ", height=" + thisHeight + ", location=no,directories=no,status=no,menubar=yes,toolbar=no,resizable=no,scrollbars=yes");
	popupWin.focus();
	return false;
}
//---------------------------------------------------------------------

function hl_small(obj) 
{
	obj.style.width = "205px";  
	obj.style.height = "138px"; 
	//obj.style.backgroundImage = "url(/gfx/gfx2007/tiles/box_205x138.gif)";
	obj.style.backgroundImage = "";
	obj.style.backgroundRepeat = "no-repeat";
	obj.style.position = "absolute";
	obj.style.zIndex = "10";
	obj.style.margin = '-5px 0 0 -13px';
	obj.style.padding = "0 0 0 10px";
}

function rs_small(obj) 
{
	obj.style.width = '189px';
	obj.style.height = '122px';
	//obj.style.backgroundImage = "url(/gfx/gfx2007/tiles/box_189x125.gif)";
	obj.style.backgroundImage = "";
	obj.style.position = 'relative';
	obj.style.zIndex = '1';
	obj.style.margin = '0 0 0 0';
	obj.style.padding = '0 0 0 0';
}

function hl_wide(obj) 
{
	obj.style.width = "294px";   
	obj.style.height = "147px"; 
	//obj.style.backgroundImage = "url(/gfx/gfx2007/tiles/box_294x147.gif)";
	obj.style.backgroundImage = "";
	obj.style.backgroundRepeat = "no-repeat";
	obj.style.position = "absolute";
	obj.style.zIndex = "10";
	obj.style.margin = '-5px 0 0 -5px';
	obj.style.padding = "0 0 0 10px";
}

function rs_wide(obj) 
{
	obj.style.width = '284px';
	obj.style.height = '135px';
	//obj.style.backgroundImage = "url(/gfx/gfx2007/tiles/box_284x135.gif)";
	obj.style.backgroundImage = "";		
	obj.style.position = 'relative';
	obj.style.zIndex = '1';
	obj.style.margin = '0 0 0 0';
	obj.style.padding = '0 0 0 0';
}
//---------------------------------------------------------------------

var arVersion = navigator.appVersion.split("MSIE")
var version = parseFloat(arVersion[1])

function fixPNG(myImage, thisWidth, thisHeight)
{
    if ((version >= 5.5) && (version < 7) && (document.body.filters)) 
    {
       if (myImage.tagName == 'SPAN') {
          //fixPNG er kaldt tidligere
          myImage.style.width = thisWidth;
          myImage.style.height = thisHeight;
       } else {
       
       var imgID = (myImage.id) ? "id='" + myImage.id + "' " : ""
	   var imgClass = (myImage.className) ? "class='" + myImage.className + "' " : ""
	   var imgTitle = (myImage.title) ? 
		             "title='" + myImage.title  + "' " : "title='" + myImage.alt + "' "
	   var imgStyle = "display:inline-block;" + myImage.style.cssText
	   var strNewHTML = "<span " + imgID + imgClass + imgTitle
                  + " style=\"" + "width:" + thisWidth
                  + "px; height:" + thisHeight
                  + "px;" + imgStyle + ";"
                  + "filter:progid:DXImageTransform.Microsoft.AlphaImageLoader"
                  + "(src=\'" + myImage.src + "\', sizingMethod='scale');\"></span>"
	   myImage.outerHTML = strNewHTML
	   
	   }
	   
    } else {
       // firefox??
       //if (navigator.userAgent.indexOf("Firefox") > 0) {
           myImage.width = thisWidth;
           myImage.height = thisHeight;
       //}
    }
}

//---------------------------------------------------------------------
function hideDiv(divClassName)
{
	var x = document.getElementsByTagName('div');
	for ( var i=0; i < x.length ; i++ )
	{
		if ( x[i].className == divClassName )
		{
			x[i].style.display = 'none';
		}
	}
}

function irmaShow(id,obj)
{
	if ( document.getElementById(id).style.display == "block" )
	{
		hideDiv('irmaContent');
	}
	else
	{
		hideDiv('irmaContent');
		document.getElementById(id).style.display = "block";
	}
	//obj.style.fontWeight = "bold";
}


function preload_images() 
{
    if (document.images)
    {
      imageUrl = new Array();
	  preImages = new Array();
      imageUrl[0] = "/gfx/gfx2007/tiles/box_205x138.gif";
      imageUrl[1] = "/gfx/gfx2007/tiles/box_189x125.gif";
      imageUrl[2] = "/gfx/gfx2007/tiles/box_294x147.gif";
      imageUrl[3] = "/gfx/gfx2007/tiles/box_284x135.gif";

       var i = 0;

       for(i=0; i < imageUrl.length; i++)
	   {
		 	preImages[i] = new Image()
			preImages[i].src = imageUrl[i] 
			
		}
    }
}


