var hWnd ;

function openwin(img , w , h , title )
{
	if(hWnd!=null)
	hWnd.close();
	hWnd=window.open(img,"","toolbar=no,location=no,directories=no,resizable=no,width=" + w + ",height=" + h );
	hWnd.document.open();
	hWnd.document.write("<html>");
	hWnd.document.write("<head>");
	hWnd.document.write("<title>" + title + "</title>");
	hWnd.document.write("</head>");
	hWnd.document.write("<body bgcolor=#ffffff bottommargin=0 leftmargin=0 marginheight=0 marginwidth=0 rightmargin=0 topmargin=0 style='border:0px;'>");
	hWnd.document.write("<table align=center width=100% height=100% cellspacing=0 cellpadding=0 border=0>");
	hWnd.document.write("<tr><td><img src='"+img+"' border=0></td></tr>");
	hWnd.document.write("</table></body></html>");
	hWnd.document.close();
}

function pics( img , url ) {
		document.images[img].src = url;
}

function chf( selected , restored ) {
	eval( "document.location='" + selected.options[selected.selectedIndex].value + "'" );
	if ( restored ) selected.selectedIndex=0;
}

function show( id ){
	layer = document.getElementById( id );
	if(layer.style.display == "none")
		layer.style.display = "block";
	else 
		layer.style.display = "none";
} 

function cls( id ) {
	layer = document.getElementById( id );
	layer.style.display = "none";
//	document.getElementById( 'tbl3' ).style.height = "0px";
}

function clsall( pref ) {
	LayersCollection = document.getElementsByTagName("div");
	for (i=0; i<LayersCollection.length; i+=1) {
		CurrentLayerID = LayersCollection[i].id;
		if ( CurrentLayerID.indexOf( pref ) >= 0 ) {
			eval('Currentlayer = document.getElementById(\'' + CurrentLayerID + '\');');
			Currentlayer.style.display = 'none';
		}
	} 
}

function openwin_text( url , w , h ) {
	 window.open( url , "window" , "toolbar=no , location=no , directories=no , resizable=no , scrollbars=yes , height=" + h + " , width=" + w );
}

function redir( uri ) {
	eval( "document.location='" + uri.options[uri.selectedIndex].value + "'");
}
