/*  NCCscript.js  JavaScript file - Scriptus Web Design
© 2008 Scriptus Web Design:  www.scriptus.co.nz */

// Script to insert day & date

    // Get today's current date.
    var now = new Date();

    // Array list of days.
    var days = new Array('Sunday','Monday','Tuesday','Wednesday','Thursday','Friday','Saturday');

    // Array list of months.
    var months = new Array('January','February','March','April','May','June','July','August','September','October','November','December');

    // Calculate the number of the current day in the week.
    var date = ((now.getDate()<10) ? "0" : "")+ now.getDate();

    // Join it all together
    today =  days[now.getDay()] + ", " +
         date + " " + months[now.getMonth()]+ " " + now.getFullYear();

//  End 


// Script to add this site to favorites

    function addbookmark()
    {
    bookmarkurl="http://www.northcanterburychess.cjb.net"
    bookmarktitle="North Canterbury Chess"
    if (document.all)
    window.external.AddFavorite(bookmarkurl,bookmarktitle)
    }

//  End 


// Script which stops the site from being "framed"

    if (top !=self)
      top.location=self.document.location;
      
// End 


// All-in-one Internal Site Search script- By JavaScriptKit.com (http://www.javascriptkit.com)
// For this and over 400+ free scripts, visit JavaScript Kit- http://www.javascriptkit.com/
// This notice must stay intact for use
// Enter domain of site to search.

var domainroot="http://users.cjb.net/northcanterburychess/"

var searchaction="http://www.google.com/search"

var queryfieldname="q" //name of hidden query form for the 3 search engines


function jksitesearch(curobj){

for (i=0; i< document.jksearch.se.length; i++){ //loop through radio to see which is checked

if (document.jksearch.se[i].checked==true)

switchaction(document.jksearch.se[i], i)

}

document.getElementById("hiddenquery").value="site:"+domainroot+" "+curobj.qfront.value

}

// End
