
IE4 = (document.all && document.getElementById) ? true : false;
NS6 = (!document.all && document.getElementById) ? true : false;

IE4orNS6=(document.all || NS6 ) ? true : false;

NS4=(document.layers);

NS = (NS4 || NS6) ? true : false;
IE = (document.all) ? true : false; 

function DOMGetElement(o) {
    if (IE4orNS6)   return document.getElementById(o);
    else if (IE4)   return document.all[o];
    else if (document.layers)   return document.layers[o];
    return null;
}

function writeShapeTableRow(imageReference, shapeDescription)
{
   document.write('<tr>');
   document.write('	<td bgcolor="white" align="center" valign="middle">');
   document.write('		<img src="_ + imageReference + _" alt="" border="0">');
   document.write('	</td>');
   document.write('	<td width="" bgcolor="white" align="left" valign="middle" class="tabletext">');
   document.write('		<table border="0" width="100%" cellspacing="0">');
   document.write('		<td><img src="amg_images\clear.gif" width="2" alt="" border="0"></td>');
   document.write('		<td width="100%" bgcolor="white" align="left" valign="middle" class="tabletext">');
   document.write('		' + shapeDescription);
   document.write('		</td>');
   document.write('		</table>');
   document.write('	</td>');
   document.write('</tr>');
}

function writeViewletLink(url, caption)
{
   document.write('<table border="0" cellspacing="0" cellpadding="0">');
   document.write('<tr valign="top">');
   document.write('	  <td width="35" align="left">');
   document.write('	  <a href="javascript:openPopup(\''+url+'\')">');
   document.write('	  <img src="images\watch_viewlet.gif" width="20" height="20" alt="" border="0"></a>');
   document.write('	  </td>');
   document.write('	  <td bgcolor="" class="bodytext">');
   document.write('	  <a href="javascript:openPopup(\''+url+'\')">'+caption+'</a></span>');
   document.write('	  </td>');  
   document.write('</tr>');
   document.write('</table>');
}