function openPopup(aUrl, aWidth, aHeight, aType) 
  { 
    aHeight += 40;
    aWidth  += 20;

    var mywin = window.open(aUrl, "", "status=0,width=" + aWidth + ",height=" + aHeight + ",menubar=0,toolbar=0,resizable=1,scrollbars=0");
    var match = /([^\/])*\./i.exec(aUrl);
    var file_name = match[0];

    switch(aType)
    {
      case('image'):
        mywin.document.write("<HTML><HEAD><TITLE>Image of Project</TITLE></HEAD><BODY align=center><center><img src='" + aUrl + "'><br /><br /><a style='color: RGB(32, 72, 120); font-size: 10px; font-family: verdana, arial, helvetica, sans-serif; text-decoration: none;' href='javascript: self.close();'><b>Close</b></center></a></BODY></HTML>");
        break;
      case('flash'):

	mywin.document.write('<html><head><title>Flash of Project</title>');
	mywin.document.write('<script type="text/javascript" src="js/swfobject.js"></' + 'script>');	
	mywin.document.write('<style type="text/css">/* hide from ie on mac \*/html {height: 100%;overflow: hidden;} #flashcontent {height: 100%;} /* end hide */	body {height: 100%;margin: 0;padding: 0;}</style>');
	mywin.document.write('</head><body>');
	mywin.document.write('<div id="flashcontent"><strong>You need to upgrade your Flash Player</strong>This is replaced by the Flash content. Place your alternate content here and users without the Flash plugin or with Javascript turned off will see this. Content here allows you to leave out <code>noscript</code> tags. Include a link to <a href="fullpage.html?detectflash=false">bypass the detection</a> if you wish.</div>');
 	mywin.document.write('<script type="text/javascript">/*![CDATA[*/var so = new SWFObject("' + aUrl + '", "' + file_name + '", "100%", "100%", "8", "#FFFFFF");so.addParam("scale", "noscale");so.write("flashcontent");/*]]>*/</'+'script>');
	//mywin.document.write('<a style="color: RGB(32, 72, 120); font-size: 10px; font-family: verdana, arial, helvetica, sans-serif; text-decoration: none;" href="javascript: self.close();"><b>Close</b></center></a>');
	mywin.document.write('</body></html>');
        break;
    }
    mywin.moveTo( screen.width/2 - aWidth/2, screen.height/2 - aHeight/2 );
  }
  