/*
Panel Heaer ( Title | up/down button )
Panel
Designed by SR Khurram, srkhurram@gmail/yahoo/hotmail
*/
var ind=0;
function startPanel(title, collapse, other){
	//Panel Header
	nam="srk"+ind++;
	if (collapse){
		imge="'images/pDown.gif'";
		disp="none";
	}else{
		imge="'images/pUp.gif'";
		disp="block";
	}
	_style = "style='position:relative; visibility:visible; display:"+ disp +"; "+ other+"'";
	str = "<table width=100% class='panelHead'><tr>";
	str=str+"<td><a href='javascript:;' id='" + nam +"' onClick='roll(\""+nam+"\")' title='Click to Expand/Collapse' class='panelTitle'>" + title + "</a>";
	str=str+"<td width=10><a href='javascript:;' id='" + nam +"' onClick='roll(this)'>";
	str=str+"<img id='"+nam+"_img" + "' src="+ imge +" title='Click to Expand/Collapse'></a>";
	str=str+"</tr></table>";
	//Panel start
	str = str + "<div id='" + nam + "_panel" + "' class='panel' " + _style + ">";

	document.write(str);
}
function stopPanel(){
	str = "</div><br>";
	
	document.write(str);
}
function roll(pan){
	pan = (typeof pan == "string") ? pan : pan.id;
	panel = document.getElementById( pan + "_panel" );
	if (panel.style.display == "none" ){
		panel.style.display = "block";
		document.images[pan + "_img"].src = "images/pUp.gif";
	}else{
		panel.style.display = "none";
		document.images[pan + "_img"].src = "images/pDown.gif";
	}
}
