var lightbox_blend = "";
	var lightbox_field = "";
    var ligthbox_caller;
    function questionBox (prompt,x) {

		ligthbox_caller = x;
		var width = 386;
		var height = 100;
		var div = document.createElement("div");
		lightbox_blend = div;
		var pageSize = getPageSize();

        var arrayPageScroll = document.viewport.getScrollOffsets();
        var lightboxTop = arrayPageScroll[1] + (document.viewport.getHeight()-height) / 2;

		div.id = "blend";
	    div.style.position = "absolute";

   		div.style.backgroundColor = "#000";
		div.style.height = document.body.offsetHeight+"px";
		div.style.width = "100%";
		div.style.top = "0px";
		div.style.left = "0px";
		div.style.filter = "alpha(opacity=50)";
		div.style.opacity = ".5";
	    document.body.appendChild(div);


		var div = document.createElement("div");
		lightbox_field = div;
	    div.style.position = "absolute";
	    div.style.overflow = "hidden";
	    div.className = "ccm_form lightbox";
	    div.innerHTML = prompt+"<div class='actionbar'><span class='button'><span><input type='submit'  onclick='okLightbox()' value = 'Okay'/></span></span><span class='button''><span><input onclick='closeLightbox()'  onclick='closeLightbox()'type='submit' value = 'Abbrechen'/></span></span></div>";

	    div.style.backgroundColor = "#FFF";
		div.style.height = height +"px";
		div.style.width =  width+"px";
		div.style.left = ((document.body.offsetWidth - width  ) / 2)+"px";
		div.style.top = (lightboxTop-50)+"px";


		document.body.appendChild(div);

		return false;

    }
	function closeLightbox() {
		document.body.removeChild(lightbox_blend);
		document.body.removeChild(lightbox_field);


	}
	function okLightbox() {

		window.location.href = ligthbox_caller.href;
	}

    function getPageSize() {

	       var xScroll, yScroll;

	    if (window.innerHeight && window.scrollMaxY) {
	      xScroll = window.innerWidth + window.scrollMaxX;
	      yScroll = window.innerHeight + window.scrollMaxY;
	    } else if (document.body.scrollHeight > document.body.offsetHeight){ // all but Explorer Mac
	      xScroll = document.body.scrollWidth;
	      yScroll = document.body.scrollHeight;
	    } else { // Explorer Mac...would also work in Explorer 6 Strict, Mozilla and Safari
	      xScroll = document.body.offsetWidth;
	      yScroll = document.body.offsetHeight;
	    }

	    var windowWidth, windowHeight;

	    if (self.innerHeight) {	// all except Explorer
	      if(document.documentElement.clientWidth){
	        windowWidth = document.documentElement.clientWidth;
	      } else {
	        windowWidth = self.innerWidth;
	      }
	      windowHeight = self.innerHeight;
	    } else if (document.documentElement && document.documentElement.clientHeight) { // Explorer 6 Strict Mode
	      windowWidth = document.documentElement.clientWidth;
	      windowHeight = document.documentElement.clientHeight;
	    } else if (document.body) { // other Explorers
	      windowWidth = document.body.clientWidth;
	      windowHeight = document.body.clientHeight;
	    }


	    if(yScroll < windowHeight){
	      pageHeight = windowHeight;
	    } else {
	      pageHeight = yScroll;
	    }


	    if(xScroll < windowWidth){
	      pageWidth = xScroll;
	    } else {
	      pageWidth = windowWidth;
	    }

   	 return [pageWidth,pageHeight];

   }
