//GENERIC IMAGE POPUPPER
var popup
function popImage(path,width,height) {
	URL = '/popup_image.asp?path='+path;
	if(popup) {popop = popup.close();};
	popup = window.open(URL,'popup','toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width='+(parseInt(width)+40)+',height='+(parseInt(height)+40)+',left = 25,top = 25');
	popup.focus();
}

var isIE8 = window.XDomainRequest ? true : false;
        var invocation = createCrossDomainRequest();
        var url = 'http://www.ds-display.dk/webshop-bund-maa-ikke-roeres';       
 
        function createCrossDomainRequest(url, handler)
        {
            var request;
            if (isIE8)
            {
                request = new window.XDomainRequest();
            }
            else
            {
                request = new XMLHttpRequest();
            }
            return request;
        }
 
        function callOtherDomain()
        {
            if (invocation)
            {
                if(isIE8)
                {
                    invocation.onload = outputResult;
                    invocation.open("GET", url, true);
                    invocation.send();
                }
                else
                {
                    invocation.open('GET', url, true);
                    invocation.onreadystatechange = handler;
                    invocation.send();
                }
            }
            else
            {
                var text = "No Invocation TookPlace At All";
                var textNode = document.createTextNode(text);
                var textDiv = document.getElementById("test");
                textDiv.appendChild(textNode);
            }
        }
 
        function handler(evtXHR)
        {
            if (invocation.readyState == 4)
            {
                if (invocation.status == 200)
                {
                    outputResult();
                }
                else
                {
                    alert("Invocation Errors Occured");
                }
            }
        }
 
        function outputResult()
        {
            var response = invocation.responseText;
            var textDiv = document.getElementById("test");
            textDiv.innerHTML += response;
        }

