/*Copyright 2006. William Ukoh @ http://www.williamukoh.com. All rights reserved worldwide. This material remains a property of William Ukoh and should not used or otherwised distributed without the permission of the owner*/


//Email page to someone
function emailPage(){
	//var pageurl = document.URL;
	//document.location.href = "mailto:Enter email address here" + "?subject=" + document.title + "&body=" + pageurl;
	
	openBrWindow('/extensions/email.php?link='+document.URL,'email','status=yes,scrollbars=no,resizable=no,width=520,height=600');
}


//Mail to someone
function mailto(user,domain) 
{ 
	document.location.href = "mailto:" + user + "@" + domain;

}


//Add to Favourites
function addToFavorite(){
  if ((navigator.appVersion.indexOf("MSIE") > 0) && (parseInt(navigator.appVersion) >= 4)) {
    window.external.AddFavorite(location.href, document.title);
  }
  else{
	  window.alert('Please use Internet Explorer to bookmark this site');
  }
}

//Set the URL address in the Address Bar
function flashPutHref(href) { 
	location.href = href; 
}

//Set the Title of the Window
function flashPutTitle(title) { 
	document.title = title; 
}
	
//Display my site
function displaySite(){
	window.open('http://www.williamukoh.com');
}

//Open Browser Window
function openBrWindow(theURL,winName,features) {
  window.open(theURL,winName,features);
}

function clock() {
		if (!document.layers && !document.all) return;
		var digital = new Date();
		var hours = digital.getHours();
		var minutes = digital.getMinutes();
		var seconds = digital.getSeconds();
		var amOrPm = "AM";
		if (hours > 11) amOrPm = "PM";
		if (hours > 12) hours = hours - 12;
		if (hours == 0) hours = 12;
		if (minutes <= 9) minutes = "0" + minutes;
		if (seconds <= 9) seconds = "0" + seconds;
		dispTime = digital.toLocaleString();
		if (document.layers) {
		document.layers.pendule.document.write(dispTime);
		document.layers.pendule.document.close();
		}
		else
		if (document.all)
		pendule.innerHTML = dispTime;
		setTimeout("clock()", 1000);
}
function printPage(){
	window.print();
}
