// JavaScript Document

function p31pInit() {
	p31pInitNavigation('rSubNav');
	p31pInitKeyFeatures();

}

function p31pInitNavigation(navId) {
	if (document.all&&document.getElementById) {
		navRoot = document.getElementById(navId);
		for (i=0; i<navRoot.childNodes.length; i++) {
			node = navRoot.childNodes[i];
			if (node.nodeName=="LI") {
				node.onmouseover=function() {
					this.className+=" over";
  				}
  				node.onmouseout=function() {
  					this.className=this.className.replace(" over", "");
				}
			}
		}
	}
}

function p31pInitKeyFeatures(id) {
	p31pReplaceColapse();
}

function p31pReplaceExpand() {
	node = document.getElementById('kflist');

	if (node) {
		node.className = "kfListShortLong";
	}

	node = document.getElementById('kflistbg');
	if (node) {
		node.className = "kfListNoneBg";
	}
	
}

function p31pReplaceColapse() {
	node = document.getElementById('kflist');
	bgNode = document.getElementById('kflistbg');
	if (node) {
		if (node.scrollHeight > 176) {
			node.className = "kfListShortMore";
			bgNode.className = "kflistShortMoreBg";
		} else {
			node.className = "kfListShort";
			bgNode.className = "kfListNoneBg";
		}
	}

}

function p31ppopimage(imgpath, imgfile, popwidth, popheight){

	popwidth += 22;
	popheight += 55;

	leftpos=(screen.width - popwidth) / 2;
	toppos=(screen.height - popheight) / 2;
	
	var winattributes='width='+popwidth+',height='+popheight+',resizable=yes,top='+toppos+',left='+leftpos
	p31ppopwin=window.open("","_blank",winattributes)

	p31ppopwin.document.open()
	p31ppopwin.document.write('<html><title>Dataflow - Screenshot</title><body background="#FFFFFF">')
	p31ppopwin.document.write('<table border="0" cellpadding="0" cellspacing="0"><tr><td>')
	p31ppopwin.document.write('<img src="'+imgpath+imgfile+'" style="margin-bottom: 0.5em">')
	p31ppopwin.document.write('</td></tr>')
	p31ppopwin.document.write('<tr><td bgcolor="#3d619b" align="right">')
	p31ppopwin.document.write('<a href="javascript:top.window.close()"><img src="'+imgpath+'/btnClose.gif" border="0"></a>')
	p31ppopwin.document.write('</td></tr></table>')
	
	p31ppopwin.document.write('</body></html>')
	p31ppopwin.document.close()
	p31ppopwin.focus()
}