// <script src="http://www.google-analytics.com/urchin.js" type="text/javascript"></script>
// <script type="text/javascript">_uacct = "UA-4321683-1";urchinTracker();</script>

function GG_WriteExtraScripts()
{
	// Google Analytics - 1
	var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
	document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
	
	// Google Analytics - 2
	var pageTracker = _gat._getTracker("UA-4321683-1");
	pageTracker._initData();
	pageTracker._trackPageview();
}

function OpenNewWindow(url)
{
	new_win = window.open(url);
	new_win.focus();
}

function GoToUrl(url)
{
	window.location.href = url;
}

function GoBack()
{
	history.back();
}

function MM_preloadImages()
{ //v3.0
  var d=document; if(d.images_w){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_swapImgRestore()
{ //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_findObj(n, d)
{ //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage()
{ //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

function GG_LoadImagesOld()
{
	MM_preloadImages('http://www.grassgames.com/images_w/banner/GrassGames2.jpg','http://www.grassgames.com/images_w/banner/TTPro2.jpg','http://www.grassgames.com/images_w/banner/Solitaire2.jpg','http://www.grassgames.com/images_w/banner/Balls2.jpg','http://www.grassgames.com/images_w/banner/Reversi2.jpg','http://www.grassgames.com/images_w/banner/Cubes2.jpg','http://www.grassgames.com/images_w/banner/Asteroids2.jpg','http://www.grassgames.com/images_w/banner/Vroom2.jpg','http://www.grassgames.com/images_w/banner/eBooks2.jpg','http://www.grassgames.com/images_w/banner/NewsLetter2.jpg');
}

function GG_LoadImages()
{
}

function GG_WriteMainHeader()
{
}

function GG_SetFrameBgCssStyle()
{
	document.write('<style type="text/css">');
	document.write('<!--');
	document.write('BODY ');
	document.write('{');
	document.write('	background: #FFFFFF url(http://www.grassgames.com/images_w/Bg.jpg);');
	//document.write('	background-attachment: fixed;');
	document.write('	font-family: Verdana, Arial, Helvetica, sans-serif;');
	document.write('	font-size: 14px;');
	document.write('	colour: #333333;');
	document.write('}');
	document.write('-->');
	document.write('</style> ');
}

function GG_WriteFrameHeader(name,image,links)
{
	document.write('<table border="0" align="center" cellpadding="0" cellspacing="0" bordercolor="#CCCCCC" bgcolor="#FFFFFF">');
	document.write('  <tr>');
	document.write('    <td width="20" height="20" background="http://www.grassgames.com/images_w/GrayFrame/TopLeft.jpg" bgcolor="#FFFFFF">&nbsp;</td>');
	document.write('    <td height="20" background="http://www.grassgames.com/images_w/GrayFrame/Top.jpg" bgcolor="#FFFFFF">&nbsp;</td>');
	document.write('    <td width="20" height="20" background="http://www.grassgames.com/images_w/GrayFrame/TopRight.jpg" bgcolor="#FFFFFF">&nbsp;</td>');
	document.write('  </tr>');
	document.write('  <tr>');
	document.write('    <td background="http://www.grassgames.com/images_w/GrayFrame/Left.jpg" bgcolor="#FFFFFF"><font size="1">&nbsp;</font></td>');
	document.write('    <td bgcolor="#FFFFFF"><table width="100%" border="0" align="center" cellpadding="4" cellspacing="0">');
	document.write('        <tr>');
	document.write('          <td><div align="center">');
	document.write('              <p align="left"><font color="#333333" size="5" face="Verdana, Arial, Helvetica, sans-serif">');
	document.write(name);
	document.write('</font></p>');
	document.write('              <p align="left"><font color="#666666" size="2" face="Verdana, Arial, Helvetica, sans-serif">');
	
	document.write(links);
	document.write('<img src="http://www.grassgames.com/cgi-bin/logcount/logcnt.cgi?t" width="1" height="1">');

	document.write('          </font></p></div></td>');
	document.write('          <td><div align="right"><a href=\"http://www.grassgames.com\"><img src=');
	
	if (image != "") document.write(image);
	else             document.write('"http://www.grassgames.com/images_w/logos/GgLogoSmall.jpg"');
	
	document.write(' width="128" height="128" border="0" /></a></div></td>');
	document.write('        </tr>');
	document.write('    </table></td>');
	document.write('    <td background="http://www.grassgames.com/images_w/GrayFrame/Right.jpg" bgcolor="#FFFFFF">&nbsp;</td>');
	document.write('  </tr>');
}

function GG_WriteFrameTop(start_table)
{
	if (start_table == 1) document.write('<table border="0" align="center" cellpadding="0" cellspacing="0" bordercolor="#CCCCCC" bgcolor="#FFFFFF">');
	
	document.write('  <tr>');
	document.write('    <td width="20" height="20" background="http://www.grassgames.com/images_w/GrayFrame/TopLeft.jpg" bgcolor="#FFFFFF">&nbsp;</td>');
	document.write('    <td height="20" background="http://www.grassgames.com/images_w/GrayFrame/Top.jpg" bgcolor="#FFFFFF">&nbsp;</td>');
	document.write('    <td width="20" height="20" background="http://www.grassgames.com/images_w/GrayFrame/TopRight.jpg" bgcolor="#FFFFFF">&nbsp;</td>');
	document.write('  </tr>');
}

function GG_WriteFrameDivider()
{
	document.write('  <tr>');
	document.write('    <td width="20" height="20" background="http://www.grassgames.com/images_w/GrayFrame/LeftT3.jpg" bgcolor="#FFFFFF">&nbsp;</td>');
	document.write('    <td height="20" background="http://www.grassgames.com/images_w/GrayFrame/Bottom.jpg" bgcolor="#FFFFFF">&nbsp;</td>');
	document.write('    <td width="20" height="20" background="http://www.grassgames.com/images_w/GrayFrame/RightT3.jpg" bgcolor="#FFFFFF">&nbsp;</td>');
	document.write('  </tr>');
}

function GG_WriteFrameMainLeft()
{
	document.write('  <tr>');
	document.write('    <td width="20" background="http://www.grassgames.com/images_w/GrayFrame/Left.jpg" bgcolor="#FFFFFF">&nbsp;</td>');
	document.write('    <td bgcolor="#FFFFFF">');
}

function GG_WriteFrameMainRight()
{
	document.write('    </td>');
	document.write('    <td width="20" background="http://www.grassgames.com/images_w/GrayFrame/Right.jpg" bgcolor="#FFFFFF">&nbsp;</td>');
	document.write('  </tr>');
}

function GG_WriteFrameBottom()
{
	document.write('  <tr valign="top">');
	document.write('    <td width="20" height="20" background="http://www.grassgames.com/images_w/GrayFrame/BottomLeft.jpg" bgcolor="#FFFFFF">&nbsp;</td>');
	document.write('    <td height="20" background="http://www.grassgames.com/images_w/GrayFrame/Bottom.jpg" bgcolor="#FFFFFF">&nbsp;</td>');
	document.write('    <td width="20" height="20" background="http://www.grassgames.com/images_w/GrayFrame/BottomRight.jpg" bgcolor="#FFFFFF">&nbsp;</td>');
	document.write('  </tr>');
	document.write('</table>');
}

function GG_WriteMainFooterOld()
{
	document.write('<p>&nbsp;</p>');
	document.write('<table border="0" align="center" cellpadding="0" cellspacing="0" bordercolor="#CCCCCC" bgcolor="#FFFFFF">');
	document.write('  <tr>');
	document.write('    <td width="20" height="20" background="http://www.grassgames.com/images_w/GrayFrame/TopLeft.jpg" bgcolor="#FFFFFF"><font size="1">&nbsp;</font></td>');
	document.write('    <td height="20" background="http://www.grassgames.com/images_w/GrayFrame/Top.jpg" bgcolor="#FFFFFF"><font size="1">&nbsp;</font></td>');
	document.write('    <td width="20" height="20" background="http://www.grassgames.com/images_w/GrayFrame/TopRight.jpg" bgcolor="#FFFFFF"><font size="1">&nbsp;</font></td>');
	document.write('  </tr>');
	document.write('  <tr>');
	document.write('    <td width="20" background="http://www.grassgames.com/images_w/GrayFrame/Left.jpg" bgcolor="#FFFFFF"><font size="1">&nbsp;</font></td>');
	document.write('    <td bgcolor="#FFFFFF"><table border="0" align="right" cellpadding="4" cellspacing="0">');
	document.write('      <tr>');
	document.write('        <td><div align="center">');
	document.write('          <p align="left"><font color="#333333" size="5" face="Verdana, Arial, Helvetica, sans-serif">GrassGames</font></p>');
	document.write('          <p align="left"><font color="#333333" size="5" face="Verdana, Arial, Helvetica, sans-serif"><font color="#666666" size="3">Original Games for Windows and Mac OS X</font></font></p>');
	document.write('          <p align="left"><font color="#666666" size="2" face="Verdana, Arial, Helvetica, sans-serif"><a href="http://www.grassgames.com/index.html">Home</a>&nbsp;&nbsp;&nbsp;<a href="http://www.grassgames.com/index.html">Games</a>&nbsp;&nbsp;&nbsp;<a href="http://www.grassgames.com/about.html">About</a></font></p>');
	document.write('          </div></td>');
	document.write('        <td><img src="http://www.grassgames.com/images_w/logos/GgLogoSmall.jpg" width="128" height="128" /></td>');
	document.write('      </tr>');
	document.write('    </table></td>');
	document.write('    <td width="20" background="http://www.grassgames.com/images_w/GrayFrame/Right.jpg" bgcolor="#FFFFFF">&nbsp;</td>');
	document.write('  </tr>');
	document.write('  <tr valign="top">');
	document.write('    <td width="20" height="20" background="http://www.grassgames.com/images_w/GrayFrame/BottomLeft.jpg" bgcolor="#FFFFFF"><font size="1">&nbsp;</font></td>');
	document.write('    <td height="20" background="http://www.grassgames.com/images_w/GrayFrame/Bottom.jpg" bgcolor="#FFFFFF"><font size="1">&nbsp;</font></td>');
	document.write('    <td width="20" height="20" background="http://www.grassgames.com/images_w/GrayFrame/BottomRight.jpg" bgcolor="#FFFFFF"><font size="1">&nbsp;</font></td>');
	document.write('  </tr>');
	document.write('</table>');
	document.write('<p>&nbsp;</p>');
	document.write('<div align="center"><font color="#333333" size="5" face="Verdana, Arial, Helvetica, sans-serif"><font color="#AAAAAA" size="2">(c) 2009 GrassGames.com</font></font></div>');
}

function GG_WriteMainFooter()
{
	document.write('<p>&nbsp;</p>');
	document.write('<table border="0" align="center" cellspacing="0" cellpadding="10">');
	document.write('    <tr>');
	document.write('      <td colspan="3"><div align="center"><font size="5" face="Arial, Helvetica, sans-serif"><strong>GRASSGAMES</strong></font></div></td>');
	document.write('    </tr>');
	document.write('    <tr>');
	document.write('      <td><p align="center"><font size="4" face="Arial, Helvetica, sans-serif"><a href="http://www.grassgames.com">Home</a></font></p>');
	document.write('      <p align="center"><font size="4" face="Arial, Helvetica, sans-serif"><a href="http://www.grassgames.com">Games</a></font></p></td>');
	document.write('      <td><div align="center"><img src="http://www.grassgames.com/images_w/logos/GgLogoMedium.jpg" alt="GrassGames" width="180" height="180" longdesc="http://www.grassgames.com"></div></td>');
	document.write('      <td><p align="center"><font size="4" face="Arial, Helvetica, sans-serif"><a href="http://www.grassgames.com/about.html">About</a></font></p>');
	document.write('          <p align="center"><font size="4" face="Arial, Helvetica, sans-serif"><a href="http://www.grassgames.com/about.html">Contact</a></font></p></td>');
	document.write('    </tr>');
	document.write('    <tr>');
	document.write('      <td colspan="3"><div align="center"><font size="4" face="Arial, Helvetica, sans-serif">Original Games for Macs, PCs &amp; iPhones </font></div></td>');
	document.write('    </tr>');
	document.write('  </table>');
}