// ccstal template, want one?

window.header = function(domain_html){
  html = ''
  +'<table width="100%" cellpadding="5" cellspacing="0" class="mainheading" style="position:fixed; height:20px; top:0px; z-index:999;">'
  +'  <tr>'
  +'    <td width="500" id="IvnCOL2" nowrap>'

  +'      <!-- Search Google -->'
  +'      <form style="display:inline;" action="http://www.esqsoft.com/javascript/search-results.htm" id="cse-search-box">'
  +'      <div>'
  +'        <input type="hidden" name="cx" value="partner-pub-1157892973816149:hfy1pm-l4em" />'
  +'        <input type="hidden" name="cof" value="FORID:11" />'
  +'        <input type="hidden" name="ie" value="ISO-8859-1" />'
  +'        <input type="text" name="q" size="33" />'
  +'        <input type="submit" name="sa" value="Search" />'
  +'      </div>'
  +'    </form>'
  +'    <sc'+'ript type="text/javascript" src="http://www.google.com/coop/cse/brand?form=cse-search-box&amp;lang=en"></sc'+'ript>'
  +'      <!-- Search Google -->'

  +'    </td><td width="280" id="IvnCOL1" nowrap>'

  +'    </td>'
  +'  </tr>'
  +'</table>'

  +'<div style="height:50px;"></div>'

  +'<table width="900" cellpadding="10" style="background-color:#ffe;"><tr><td>'
  +'<table border="0" width="100%" cellspacing="0" cellpadding="0">'
  +'<tr><td width="100%">'

  +'<table border="0" width="100%" cellspacing="0" cellpadding="0">'
  +'  <tr>'
  +'    <td width="100%"><img border="0" src="template/images/title.gif" width="404" height="102"></td>'
  +'  </tr>'
  +'</table>'

  +'</td></tr>'
  +'<tr><td width="100%">'

  +'<table border="0" width="100%" cellspacing="0" cellpadding="0">'
  +'  <tr>'
  +'    <td width="134" align="center" valign="top">'
  +'      <table border="0" width="100%" cellspacing="0" cellpadding="0">'
  +'        <tr>'
  +'          <td width="100%"><img border="0" src="template/images/nav-top.gif" width="134" height="18"></td>'
  +'        </tr>'
  +'        <tr>'
  +'          <td width="100%">'
  +'            <table border="0" width="134" cellspacing="0" cellpadding="0">'
  +'              <tr>'
  +'                <td width="20" background="template/images/nav-left.gif"> </td>'
  +'                <td width="90" background="template/images/nav-mid.gif"> <br><br><br><br><br>'
  +'                </td>'
  +'                <td width="24" background="template/images/nav-right.gif"> </td>'
  +'              </tr>'
  +'            </table>'
  +'          </td>'
  +'        </tr>'
  +'        <tr>'
  +'          <td width="100%"><img border="0" src="template/images/nav-sub.gif" width="134" height="29"></td>'
  +'        </tr>'
  +'      </table>'
  +'      <div style="margin:15px;"></div>'
  +'      <iframe id="a01e9d17" name="a01e9d17" src="http://hostagnostic.com/openads/adframe.php?n=a01e9d17&amp;clientid=3&amp;target=_blank" framespacing="0" frameborder="no" scrolling="no" width="120" height="240" allowtransparency="true"><a href="http://hostagnostic.com/openads/adclick.php?n=a01e9d17" target="_blank"><img src="http://hostagnostic.com/openads/adview.php?clientid=3&amp;n=a01e9d17" border="0" alt=""></a></iframe>'
  +'      <div style="margin:15px;"></div>'
  +'      <iframe id="ac39e60b" name="ac39e60b" src="http://hostagnostic.com/openads/adframe.php?n=ac39e60b&amp;clientid=4&amp;target=_blank" framespacing="0" frameborder="no" scrolling="no" width="120" height="60" allowtransparency="true"><a href="http://hostagnostic.com/openads/adclick.php?n=ac39e60b" target="_blank"><img src="http://hostagnostic.com/openads/adview.php?clientid=4&amp;n=ac39e60b" border="0" alt=""></a></iframe>'
  +'      <div style="margin:15px;"></div>'
  +'      <iframe id="aa424d13" name="aa424d13" src="http://hostagnostic.com/openads/adframe.php?n=aa424d13&amp;clientid=5&amp;target=_blank" framespacing="0" frameborder="no" scrolling="no" width="120" height="600" allowtransparency="true"><a href="http://hostagnostic.com/openads/adclick.php?n=aa424d13" target="_blank"><img src="http://hostagnostic.com/openads/adview.php?clientid=5&amp;n=aa424d13" border="0" alt=""></a></iframe>'
  +'      <div align="center">'
  +'      <p>You can <a href="#" onclick="var a=\'postmaster\'; var b=location.host; var c=\'mailto:\'; location.href=c+a+\'@\'+b+\'?subject=\'+location.href; return false"'
  +'      ><b>contact the author</b></a> here.'
  +'      <p><font style="color:#dddddd;"><isml type="counter"></font>'

  +'      <p><img border="0" src="template/images/gui.gif" width="105" height="78">'
  +'    </td>'
  +'    <td width="466" valign="top" style="padding:50px;">'

  +'    <iframe id="ae6d9139" name="ae6d9139" src="http://hostagnostic.com/openads/adframe.php?n=ae6d9139&amp;clientid=6&amp;target=_blank" framespacing="0" frameborder="no" scrolling="no" width="728" height="90" allowtransparency="true"><a href="http://hostagnostic.com/openads/adclick.php?n=ae6d9139" target="_blank"><img src="http://hostagnostic.com/openads/adview.php?clientid=6&amp;n=ae6d9139" border="0" alt=""></a></iframe>'

  return html 
}


window.footer = function(){
  html = ''
  +'    </td>'
  +'  </tr>'
  +'</table>'

  +'    </td>'
  +'  </tr>'
  +'</table>'

  +'</td></tr>'
  +'</table>'
  +'</td></tr></table>'

//<!-- Start of StatCounter Code -->
  +'<sc'+'ript type="text/javascript" language="javascript">'
  +'var sc_project=418754; '
  +'var sc_invisible=1; '
  +'var sc_partition=2; '
  +'var sc_security=""; '
  +'</sc'+'ript>'

  +'<sc'+'ript type="text/javascript" language="javascript" src="http://www.statcounter.com/counter/counter.js"></sc'+'ript>'
//<!-- End of StatCounter Code -->
  return html
}


window.hBuildDomainWidget = function(){
  /* slurp in the remote domain widget and shuttle into the UI placeholder */
  document.write('<sc'+'ript type="text/javascript" src="../../domain-names/lib/domain-widget.js"></sc'+'ript>');
  document.write('<sc'+'ript>var html = buildDomainWidgetHTML("me"); document.getElementById("IvnCOL1").innerHTML = html;</sc'+'ript>');
}

window.hBuildCustomSearch = function(){
  /* slurp in the remote custom search and shuttle into UI placeholder */
  document.write('<div id="IvnSRC1" style="display:none;"><sc'+'ript type="text/javascript" src="../../lib/build-custom-search.js"></sc'+'ript></div>');
  document.write('<sc'+'ript type="text/javascript">var src = document.getElementById("IvnSRC1");</sc'+'ript>');
  //document.write('<sc'+'ript>var tgt = document.getElementById("IvnCOL2"); tgt.innerHTML = src.innerHTML;</sc'+'ript>');
  
}


window.doNow = function(){
  var html = window.header()
  +document.body.innerHTML
  +window.footer()

  document.body.innerHTML = html

  window.hBuildDomainWidget(); // put the remote domain widget into the UI
  window.hBuildCustomSearch(); // put the remote search widget into the UI
}

doNow()