/* CCSTAL Template */


/* some CCSTAL housekeeping 
  -need to find where the remote style sheet is relative to the caller (doing it this way supports dev on a local file system as well as docroot on a web box)
*/

var l = location.href
window.myFile = l.match(/[^\/]+$/)
//window.myPath = 
//alert(window.myFile)
window.baseRef = ''


window.header = function(rPath){
  if(rPath) window.baseRef = rPath
  var html = ''
  +'<link rel="stylesheet" href="'+window.baseRef+'template/template1.css">'

  +'<table width="100%" cellpadding="7" cellspacing="0" class="mainheading" style="position:fixed; height:40px; top:0;">'
  +'  <tr>'
  +'    <td width="470" style="padding-left:10px; white-space:nowrap;">'

  + domains_sale()

  +'    </td>'
  +'    <td align="right" width="440" id="u440x20">'

  +'      <!-- 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>'
  +'  </tr>'
  +'</table>'

  +'<table width="950" cellpadding="0" cellspacing="0"><tr><td>'
  +'<br><br><table width="100%" cellspacing="0" cellpadding="20" class="main">'
  +'  <tr valign="top">'
  +'    <td><br>'

  return html
}


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

  +'<div style="margin-left:10px;"><!-- Start of StatCounter Code -->'
  +'<sc'+'ript type="text/javascript" language="javascript">'
  +'var sc_project=418754; '
  +'var sc_partition=2; '
  +'</sc'+'ript>'
  +'<sc'+'ript type="text/javascript" language="javascript" src="http://www.statcounter.com/counter/counter.js"></sc'+'ript><noscript><a href="http://www.statcounter.com/" target="_blank"><img  src="http://c3.statcounter.com/counter.php?sc_project=418754&amp;java=0" alt="free hit counter" border="0"></a> </noscript>'
  +'<!-- End of StatCounter Code --></div>'

  return html
}


window.CCSTALSkinIt2 = function(){
  var html = ''
  +window.header()
  +document.body.innerHTML
  +window.footer()
  document.body.innerHTML = html
}


window.domains_sale = function(){
  /* start domain search */
  var extensions = ''
    +'COM,INFO,NET,NET.BR,ME,FR,ORG,BIZ,COM.CO,NET.CO,'
    +'NOM.CO,IT,COM.BR,MOBI,MX,COM.ES,WS,US,NOM.ES,ES,ORG.ES,'
    +'CA,NL,ASIA,IN,COM.MX,AM,AT,BE,BZ,COM.BZ,CC,NET.BZ,DE,'
    +'EU,FM,GS,CO.IN,FIRM.IN,GEN.IN,IND.IN,NET.IN,ORG.IN,'
    +'JOBS,JP,MS,NU,CO.NZ,NET.NZ,ORG.NZ,TC,TK,TV,TW,COM.TW,'
    +'ORG.TW,IDV.TW,CO.UK,ME.UK,ORG.UK,VG'

  var html = ''
    +'<div id="domain_search" style="margin:0; padding:0;">'
    +'<form style="margin:0; padding:0;" method="post" action="https://www.securepaynet.net/gdshop/registrar/search.asp?se=%2B&prog%5Fid=hosting411&from=rhp" id="form1" name="form1" target="_blank"> '
    +'<table width="500" cellspacing="0" cellpadding="5" style="border:1px #eee solid; background:#cdd; white-space:nowrap;">'
    +'  <tr><td style="color:#000; border-right:1px #000 dotted; font-weight:bold;">'
    +'    DOMAIN NAME&nbsp;'
    +'  </td><td width="100%" style="color:#000; padding-left:10px;">'
    +'    <input type="hidden" name="checkAvail" value="1"> '
    +'    <input type="hidden" name="JScriptOn" value="yes"> '
    +'    <input type="hidden" name="submit1" value="Submit"> '
    +'    <u>w</u>ww<b style="font-size:125%;color:#000;">.</b>'
    +'    <input type="text" name="domainToCheck" maxlength="63" accesskey="w" style="border:1px #ccc solid;">'
    +'    <b style="font-size:125%;color:#000;">.</b><select name="TLD"> '

  var ext = extensions.split(/,/);
  for(var i=0; i<ext.length; i++){
    html += ''
    +'<option value=".'+ext[i].toUpperCase()+'">'+ext[i].toLowerCase()
  }

  html += ''
    +'    </select> '
    +'    <input type="button" value="Price/Availability" id="submit1" name="spoof" onclick="this.form.submit()"> '
    +'  </td>'
    +'</tr></table>'
    +'</form>'
    +'</div>'
  
  return (html)
}

