<!-- AddThis Button BEGIN -->
addthis_pub  = 'www.thecgf.com';
addthis_logo = 'http://www.thecgf.com/media/footer/cgf_addthis.gif'; // add url of cgf logo ~ 200px
addthis_brand = 'www.thecgf.com';
addthis_options = 'favorites, delicious, digg, reddit, facebook, stumbleupon, myweb, google, myspace, live, newsvine, more';
<!-- AddThis Button END -->



<!-- Fontsize BEGIN -->
var prefsLoaded = false;
var defaultFontSize = 100;
var maxFontSize = 130;
var minFontSize = 80;
var currentFontSize = defaultFontSize;

function revertStyles(){
	currentFontSize = defaultFontSize;
	changeFontSize(0);
}

function changeFontSize(sizeDifference){
	currentFontSize = parseInt(currentFontSize) + parseInt(sizeDifference);
	if(currentFontSize > maxFontSize){
		currentFontSize = maxFontSize;
	}else if(currentFontSize < minFontSize){
		currentFontSize = minFontSize;
	}
	setFontSize(currentFontSize);
	createCookie("fontSize", currentFontSize, 365);
};

function setFontSize(fontSize){
//	alert(fontSize);
	document.body.style.fontSize = currentFontSize + '%';
};


function setUserOptions(){
	var cookie = readCookie("fontSize");
	if(!prefsLoaded){
		cookie = readCookie("fontSize");
		currentFontSize = cookie ? cookie : defaultFontSize;
		setFontSize(currentFontSize);
		prefsLoaded = true;
	}
}

function createCookie(name,value,days) {
	if (days) {
		var date = new Date();
		date.setTime(date.getTime()+(days*24*60*60*1000));
		var expires = "; expires="+date.toGMTString();
	}
	else expires = "";
	document.cookie = name+"="+value+expires+"; path=/";
}

function readCookie(name) {
	var nameEQ = name + "=";
	var ca = document.cookie.split(';');
	for(var i=0;i < ca.length;i++) {
	var c = ca[i];
	while (c.charAt(0)==' ') c = c.substring(1,c.length);
	if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length);
	}
	return null;
}

window.onload = setUserOptions;
<!-- Fontsize END-->







<!-- Clock END-->

function startclock()
{
var zonestr = "";
var thetime=new Date();
var nhours=thetime.getHours();
var nmins=thetime.getMinutes();
var nsecn=thetime.getSeconds();
var nday=thetime.getDay();
var nmonth=thetime.getMonth();
var ntoday=thetime.getDate();
var nyear=thetime.getYear();
var nzone=thetime.getTimezoneOffset();
if (nzone<0) zonestr ="+"
if (nzone>0) zonestr ="-"
if (Math.floor(nzone/60)<10) zonestr+="0";
zonestr+=Math.abs(Math.floor(nzone/60));
zonestr+=":";
if (nzone-(60*Math.floor(nzone/60))==0) zonestr+="0"
zonestr+=Math.abs(60/100*(nzone-60*Math.floor(nzone/60)));
if (nsecn<10) nsecn="0"+nsecn;
if (nmins<10) nmins="0"+nmins;
if (nhours<10) nhours="0"+nhours;
if (nday==0)   nday="Sun";
if (nday==1)   nday="Mon";
if (nday==2)   nday="Tue";
if (nday==3)   nday="Wed";
if (nday==4)   nday="Thur";
if (nday==5)   nday="Fri";
if (nday==6)   nday="Sat";
nmonth+=1;
if (nmonth==1)   nmonth="Jan";
if (nmonth==2)   nmonth="Feb";
if (nmonth==3)   nmonth="Mar";
if (nmonth==4)   nmonth="Apr";
if (nmonth==5)   nmonth="May";
if (nmonth==6)   nmonth="Jun";
if (nmonth==7)   nmonth="Jul";
if (nmonth==8)   nmonth="Aug";
if (nmonth==9)   nmonth="Sept";
if (nmonth==10)   nmonth="Oct";
if (nmonth==11)   nmonth="Nov";
if (nmonth==12)   nmonth="Dec";
if (nyear<=99) nyear= "19"+nyear;
if ((nyear>99) && (nyear<2000)) nyear+=1900;
document.getElementById('mast_date').innerHTML = nday+" "+ntoday+" "+nmonth+" "+nyear+"&nbsp;&nbsp;|&nbsp;&nbsp;"+nhours+":"+nmins+":"+nsecn+" GMT"+zonestr;
setTimeout('startclock()',1000);
} 

<!-- Clock END-->




<!-- New Window BEGIN-->
var win = null;
function newWindow(mypage,myname,w,h,features) {
  var winl = (screen.width-w)/2;
  var wint = (screen.height-h)/2;
  if (winl < 0) winl = 0;
  if (wint < 0) wint = 0;
  var settings = 'height=' + h + ',';
  settings += 'width=' + w + ',';
  settings += 'top=' + wint + ',';
  settings += 'left=' + winl + ',';
  settings += features;
  win = window.open(mypage,myname,settings);
  win.window.focus();
}
<!-- New Window END-->

<!-- Disable Right Click BEGIN-->
var message="©2008 Commonwealth Games Federation.";
function clickIE() {
	if (document.all) {(message);return false;}
}
function clickNS(e) {
if (document.layers||(document.getElementById&&!document.all))
	{ if (e.which==2||e.which==3) {(message);return false;}}
}
if (document.layers) {
	document.captureEvents(Event.MOUSEDOWN);document.  onmousedown=clickNS;
}
else {
	document.onmouseup=clickNS;document.oncontextmenu  =clickIE;
}
document.oncontextmenu=new Function("return false")
<!-- Disable Right Click END -->
