
function mouseOver( el )
{
	el.style.cssText="color: #3366FF; text-decoration: none;";
}

function mouseOut( el )
{
	el.style.cssText="color: #000000; text-decoration: none;";
}

function writeText(txt)
{
document.getElementById("desc").innerHTML=txt;
}

function setContent(page)
{
document.getElementById("page").src=page;
}

function calcHeight()
{
  //find the height of the internal page
  var the_height = document.getElementById('page').contentWindow.document.body.scrollHeight;

  //change the height of the iframe
  document.getElementById('page').height = the_height;
}

function toggleList( list ) {
	list.style.display = (list.style.display == 'none') ? 'block' : 'none';
}

function generateList() {
  	//var x=frames['page'].document.getElementsByTagName("a");
	//var x=document.getElementById('page').contentWindow.document.getElementsByTagName("a");

	var x=document.getElementsByTagName("p");
	for (var i=0;i<x.length;i++) {
  	// do something with each paragraph
		//var y=document.getElementById("maindiv");
		//y.parentNode.removeChild(y); 
		document.write("<li>X</li>");
	} 

}

function get_firstchild(n)
  {
  var x=n.firstChild;
  while (x.nodeType!=1)
    {
    x=x.nextSibling;
    }
  return x;
  }

//document.frames("sFrameName").document.body.style.backgroundColor;
//sBorderValue = document.all.oFrame.style.border;
//var collAll = document.frames("IFrame1").document.all
function buildReportList( doc ) {
	var x = doc.getElementsByTagName("a");
	var listNode=document.getElementById('reportList');

	var childCount = listNode.childNodes.length;
	for (var i=0;i<listNode.childNodes.length;i++)
  	{ 
    	if (listNode.childNodes[i].nodeType==1)
    	{ 
    		removeNode = listNode.childNodes[i];
    		i--;
    		listNode.removeChild(removeNode);
    //Process only element nodes
    //document.write(firstNode.childNodes[i].nodeName);
    //document.write(" = ");
    //ocument.write(firstNode.childNodes[i].childNodes[0].nodeValue);
    //document.write("&lt;br /&gt;");
    	} 		
	
	}
	//if (repList.hasChildNodes())
  	//{ 
  	//	document.write(repList.firstChild.nodeValue);
  	//	reportList.removeChild(get_firstchild(reportList));
	//}

	for (var i=0; i<x.length; i++) {
		var listItem = document.createElement("li");
		//listItem.id = x[i].childNodes[0].nodeValue;
		var newText = document.createTextNode("This is the second paragraph.");
		listItem.appendChild(newText);
		document.getElementById("reportList").appendChild(listItem);
		toggleList(document.getElementById('reportList'));
	}
}
	
