
function dsGetPageSize () {
	
	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){
		xScroll = document.body.scrollWidth;
		yScroll = document.body.scrollHeight;
	} else {
		xScroll = document.body.offsetWidth;
		yScroll = document.body.offsetHeight;
	}
	var windowWidth, windowHeight;
	if (self.innerHeight) {
		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;
	}

	arrayPageSize = new Array(pageWidth,pageHeight,windowWidth,windowHeight);
	return arrayPageSize;
}

function showCallFeedback () {
	modalDiv = document.getElementById('call_feedback')
	dWidth = modalDiv.clientWidth;
	dHeight = modalDiv.clientHeight;
	pageSize = dsGetPageSize();		

	document.body.appendChild(this.modalDiv);
	Body = document.getElementsByTagName((document.compatMode && document.compatMode == "CSS1Compat") ? "HTML" : "BODY")[0];
	SY = window.scrollY ? window.scrollY : Body.scrollTop;
	SX = window.scrollX ? window.scrollX : Body.scrollLeft;

	this.modalDiv.style.position = 'absolute';
	this.modalDiv.style.visibility = 'visible';
	
	oLeft = SX + Math.round((pageSize[2]/2) - (dWidth/2));	
	oTop = SY + Math.round((pageSize[3]/2) - (dHeight/2));
	
	this.modalDiv.style.left =  oLeft + 'px';
	this.modalDiv.style.top =  oTop + 'px';
	this.modalDiv.style.width = dWidth + 'px';
	this.modalDiv.style.height = dHeight + 'px';
	return false;
}

function closeCallFeedback () {
	modalDiv = document.getElementById('call_feedback')
	this.modalDiv.style.visibility = 'hidden';
	return false;
}
