/* -----------------------------------------------|
 |  JavaScripts for www.sourcehost.co.uk          |
 |  Author: Peter Smith                           |
 |  URL www.syntaxsandbox.co.uk                   |
 |  Date Last edited: 11/02/2009                  |
 |------------------------------------------------| */



/* ------ start status message ------ */


function setMsg(msg)
{
   window.status = msg;
   return true;
}


/* ------ open centred subwindow ------ */


function openWindow(url, w, h, attr)
{
   winLeft = (screen.width) ? (screen.width-w)/2 : 0;
   winTop = (screen.height) ? (screen.height-h)/2 : 0;   
   newWin = window.open(""+url+"","subWindow","width="+w+",height="+h+",top="+winTop+",left="+winLeft+",scrollbars="+attr+",resizable="+attr+",location="+attr+",status="+attr+",toolbar="+attr);
   return true;
}


/* ------ bookmark site ------ */


function addBookmark()
{
self.external.AddFavorite("http://www.sourcehost.co.uk","Source Host");
document.getElementById("bookmark_link").blur();
}


/* ------ copyright current year ------ */

function showYear()
{

   var today = new Date();
   var theYear = today.getFullYear();
   document.getElementById("thisYear").innerHTML = theYear;

}


/* ------ frame buster ------ */


if(top != self)
{
   top.location = location;
}


/* ------ end javascripts ------ */





