var timer;
var h ;	// set this to the same value of the top property for the pa div in the style sheet
var w ;	// set this to the same value of the width property for the pa div in the style sheet, smaller to move it to the right, larger to move it to the left
var t = 20;	// set this to the actual pixel distance from the top where you want the pa div to be at the end of the descent
function initsize(width,height){
	w=width;
	h=height;
}
function startAp(pa, popupHeight,popupWidth ) {
	h = popupHeight;	// set this to the same value of the top property for the pa div in the style sheet
	w = popupWidth;	// set this to the same value of the width property for the pa div in the style sheet, smaller to move it to the right, larger to move it to the left
	setLeft(pa);
	showAp(pa);
}

function hideAp(pa) { 
	if (document.getElementById(pa)){
		document.getElementById(pa).style.visibility = 'hidden';
	}
}

function showAp(pa) {
	
	state=typeof tPos;
	if(state=='undefined') tPos = h;
	if(tPos < t) { 
		tPos+25;
		if (document.getElementById(pa)){ 
			document.getElementById(pa).style.top = tPos+"px";
		}
	}

	if(timer!=null) clearInterval(timer);
	timer = setTimeout("showAp('"+ pa +"')",10);
}

function getoPos() {
	if (document.layers) alert(document.layers.pa.top);
	else if (document.all) alert(document.all.pa.style.top);
	else if (document.getElementById) alert(document.getElementById("pa").style.top);
}

function setLeft(pa) {
	
	//if (document.getElementById(pa)){
	//	stePose=((document.body.clientWidth / 2) - (w / 2));
	//	document.getElementById(pa).style.left=stePose+"px";
	//}
}