

	function popup(sPage, sName, iWidth, iHeight, blnScroll, blnResize, blnStatus) {
		window.open(sPage, sName,"top=100,left=100,width="+iWidth+",height="+iHeight+",status="+blnStatus+",scrollbars="+blnScroll+",resizable="+blnResize);
	}
	
	function showOrderSpec(orderId) {
		specElement = document.getElementById('orderspec_'+orderId);
		if (specElement.style.display == 'none') {
			specElement.style.display = '';
			document.getElementById("showButton_"+orderId).value = 'Dölj';
		} else {
			specElement.style.display = 'none';
			document.getElementById("showButton_"+orderId).value = 'Visa';
		}
	}
	
	function showProdImg(imgSrc, objId, objRef) 
	{
	    var div = document.getElementById(objId);
	    var posx = 0;
	    var posy = 0;
		posx = findPosX(objRef);
		posy = findPosY(objRef);
	   
	    div.style.display = "block";
	    div.style.top = posy + "px";
	    div.style.left = (posx - 125) + "px";
	    div.innerHTML = "<img src=\"" + imgSrc + "\" width=\"120\">";
	}
	
	function hideProdImg(objId)	
	{
	    document.getElementById(objId).style.display = "none";
	}
	
	function findPosX(obj)
    {
	    var curleft = 0;
	    if (obj.offsetParent)
	    {
		    while (obj.offsetParent)
		    {
			    curleft += obj.offsetLeft
			    obj = obj.offsetParent;
		    }
	    }
	    else if (obj.x)
		    curleft += obj.x;
	    return curleft;
    }

    function findPosY(obj)
    {
	    var curtop = 0;
	    if (obj.offsetParent)
	    {
		    while (obj.offsetParent)
		    {
			    curtop += obj.offsetTop
			    obj = obj.offsetParent;
		    }
	    }
	    else if (obj.y)
		    curtop += obj.y;
	    return curtop;
    }
