
function viewSVGHelper(objName)
{
	
	var myName=objName;
	this.myName=myName;
	
	var idmap=idmap;
	 
	var width=width;
	 
	var height=height;
	 
	
	var checkWinHt=700;
	if (window.screen.availHeight < checkWinHt)
		{checkWinHt = window.screen.availHeight;}

	var processCheckIdx = -1;  //not set
	
		
	
	//Function to create an pop-up window for diagram processing
	//  This function returns a handle to the pop-up window that was created.
	function create_popup(url,name,toolbar,location,directories,status,menubar,scrollbars,resizable,
					width,height,top,left) 
	{
        var winHandle= window.open(url,name,"toolbar="+toolbar+",location="+location+",directories="+directories+",status="+status+",menubar="+menubar+",scrollbars="+scrollbars+",resizable="+resizable+",width="+width+",height="+height+",top="+top+",left="+left+"");
        return winHandle;
	}
	
	//Function to implement the view check image request.
	var dgmWin=null;
	//var initialCall=true;
	function ProcessView(idmap, width, height) 
	{
	/*
	  if((dgmWin!=null) && !dgmWin.closed)
	  {
		if(initialCall)
		{
		dgmWin = create_popup("","TreeDiagram","no","no","no","no","no","yes","yes",550,checkWinHt,10,10);
		initialCall=false;
		return;
		}
	
	  }//the window is open
	initialCall=true;
	*/
		dgmWin = create_popup("","TreeDiagram","no","no","no","no","no","yes","yes",550,checkWinHt,10,10);	
		
		// write the page to be posted
		BuildContents(dgmWin,idmap,width,height);
	}
	//  --no public interface
	//Function to build the window to post to check image processing
	function BuildContents(aWin,idmap,width,height)
	{
		aWin.document.writeln('<html><head><title>Tree Diagram of Content Model</title>');
				
		//aWin.document.writeln('<script src="js/newpopup.js" language="javascript"></script>');				
		aWin.document.writeln('<script type="text/javascript">');
		aWin.document.writeln('<!--');		
		aWin.document.writeln('		function newpopup(url, name, toolbar, location, directories, status, menubar, scrollbars,');
		aWin.document.writeln('		                resizable, width, height, top, left) ');
		aWin.document.writeln('	{');
		aWin.document.writeln('			var windowFeatures = "toolbar=" + toolbar + ",location=" + location + ');
		aWin.document.writeln('			   ",directories=" + directories + ",status=" + status + ",menubar=" +menubar +');
		aWin.document.writeln('			   ",scrollbars=" + scrollbars + ",resizable="+resizable + ",width="+width +');
		aWin.document.writeln('			   ",height="+height + ",top="+top + ",left="+left+"";');
		aWin.document.writeln('			window.open(url, name, windowFeatures);');
		aWin.document.writeln('}');
		aWin.document.writeln('//-->');
		aWin.document.writeln('</script>');
		aWin.document.writeln('</head>');
		aWin.document.writeln('<body>');
	
		aWin.document.writeln('<p>Tree Diagram of the Content Model</p><form>');
		aWin.document.writeln('<table border="0" cellpadding="0" cellspacing="0" width="450" bgcolor="#FFFFFF">');
		aWin.document.writeln('<tr align="right" valign="center">');
		aWin.document.writeln('<td align="right" width="400" Height="50"><input type="button" value="Help" onclick="newpopup(\'dgmhelp.html\',\'helpWin\',\'no\',\'no\',\'no\',\'no\',\'no\',\'yes\',\'yes\',600,680,10,10)" ></td>');
		aWin.document.writeln('<td align="right" width="66"><input type="button" value="Close" onclick="javascript:window.close();"</td>');
		aWin.document.writeln('</tr>');
		aWin.document.writeln('</table></form>');

		aWin.document.writeln('<hr/>');
		aWin.document.writeln('<center>');
		aWin.document.writeln('<embed src="'+idmap+'" name="SVGEmbed" height="'+height+'" width="'+width+'" type="image/svg+xml"></embed>');
		aWin.document.writeln('</center>');
		aWin.document.writeln('</body></html>');
		aWin.document.close();
	} 
	
	 
	this.ProcessView= ProcessView;
	
} 

