/**
 * @author ellier
 */
var  xmldata1;

function getPress () {
	
	var press = xmldata1;
	showPress();
	document.getElementById("theDiv").innerHTML = press;

}

var expandedPress=null;
var interv;
var pressDiv;
var inc = 0.1;

function showPressInHomePg() {

	if(!expandedPress) {
		pressDiv = document.createElement("div");
		pressDiv.setAttribute("id", "theDiv");
		
		if(document.all) {
		pressDiv.style.height = "502px";
		document.getElementById("right-top").appendChild(pressDiv);
		} else {
		pressDiv.style.opacity = 0;
		document.getElementById("right-top").appendChild(pressDiv);
		interv = setInterval(showDiv, 20);
		}
	}
	
}

function showPress() {

	if(!expandedPress) {
		pressDiv = document.createElement("div");
		pressDiv.setAttribute("id", "theDiv");
		
		if(document.all) {
		pressDiv.style.height = "502px";
		document.getElementById("rightcolpress").appendChild(pressDiv);
		} else {
		pressDiv.style.opacity = 0;
		document.getElementById("rightcolpress").appendChild(pressDiv);
		interv = setInterval(showDiv, 20);
		}
	}
	
}


function showDiv() {

	var opac = pressDiv.style.opacity;
	pressDiv.style.opacity = parseFloat(opac) + inc;
		
		if(opac==.9) {
		clearInterval(interv);
		}
	}
		

function hidePress() {
	if(document.all) {
		//document.getElementById("rightcolpress").removeChild(pressDiv);
		pressDiv.parentNode.removeChild(pressDiv);
	} else {
		if(interv) {clearInterval(interv);}
		interv = setInterval(hideDiv, 20);
	}
}


function hideDiv() {
	var opac = pressDiv.style.opacity;
	pressDiv.style.opacity = parseFloat(opac) - inc;		
		if(opac==0) {
		clearInterval(interv);
//		document.getElementById("rightcolpress").removeChild(pressDiv);
		pressDiv.parentNode.removeChild(pressDiv);
		}
}