function _customPopup() {
	
	
}

_customPopup.createPopup = function(popupContent) {
	
    var scroll = getScrollXY();					// get screen scroll
	var windowSize = getWindowSize();
	
	// ca sa fie pe mijloc trebuie sa scad din ambele marimea elementului..
    var mtop = (windowSize[1]/3) + scroll[1];	// top margin
  	var mlft = (windowSize[0]/3) + scroll[0];	// left margin

	var popupBox = document.createElement('div');
	
	popupBox.style.border = "1px solid black";
	popupBox.style.top = mtop+"px";
    popupBox.style.left = mlft+"px";
	popupBox.style.position = "absolute";
	popupBox.style.zIndex = "1000";
	
	popupBox.onclick = function() { document.body.removeChild(popupBox); }
	
	popupBox.innerHTML = popupContent;
	document.body.appendChild(popupBox);

}

_customPopup.createContentPopup = function(popupContent) {
	
    var scroll = getScrollXY();					// get screen scroll
	var windowSize = getWindowSize();
	
	// ca sa fie pe mijloc trebuie sa scad din ambele marimea elementului..
    var mtop = (windowSize[1]/3) + scroll[1];	// top margin
  	var mlft = (windowSize[0]/3) + scroll[0];	// left margin

	var popupBox = document.createElement('div');
	
	var popupId=0;
	var popup;
	
	while (1) {
		popup = document.getElementById("popupBox"+popupId);
		if (popup) 
			popupId ++;
		else
			break;
	}
	popupBox.id = 'popupBox'+popupId;
	
	popupBox.style.border = "1px solid black";
	popupBox.style.top = mtop+"px";
    popupBox.style.left = mlft+"px";
	popupBox.style.position = "absolute";
	popupBox.style.zIndex = 1000+popupId;
	
	//popupBox.onclick = function() { document.body.removeChild(popupBox); }
	
	popupBox.innerHTML = "<span onclick='document.body.removeChild(document.getElementById(\"popupBox"+popupId+"\"));' style='text-align:right;'><a href='javascript:;'>X</a></span>"+popupContent;
	document.body.appendChild(popupBox);

}

_customPopup.createClickPopup = function(popupContent) {
	
    var scroll = getScrollXY();					// get screen scroll
	var windowSize = getWindowSize();
	
	// ca sa fie pe mijloc trebuie sa scad din ambele marimea elementului..
    var mtop = (windowSize[1]/3) + scroll[1];	// top margin
  	var mlft = (windowSize[0]/3) + scroll[0];	// left margin

	var popupBox = document.createElement('div');
	
	popupBox.style.border = "1px solid black";
	popupBox.style.top = mtop+"px";
    popupBox.style.left = mlft+"px";
	popupBox.style.position = "absolute";
	popupBox.style.zIndex = "1000";
	
	window.onclick = function() { document.body.removeChild(popupBox); window.onclick='';}
	
	popupBox.innerHTML = popupContent;
	document.body.appendChild(popupBox);

}