// TIME OF DAY GREETING
<!-- //
function myGreeting() {
var time=new Date();
var hours=time.getHours();
if (hours <= 11) 
	{return ("Good morning ")}
	else
	{return ("Good afternoon ")}
}
//-->

//SUPPRESSING JAVASCRIPT ERRORS http://www.chunkysoup.net/basic/breakingjs/
<!-- //
function handleError() {
	return true;
}
window.onerror = handleError;
//-->

//LIMIT TEXTAREA
<!-- //
maxLen = 1000; // max number of characters allowed

function checkMaxInput(form) {
if (form.description.value.length > maxLen) // if too long.... trim it!
form.description.value = form.description.value.substring(0, maxLen);
// otherwise, update 'characters left' counter
else form.remLen.value = maxLen - form.description.value.length;
}
//-->

//OPERA 7 DETECTION
<!-- //
if(navigator.userAgent.indexOf("Opera")!=-1){
var versionindex=navigator.userAgent.indexOf("Opera")+6
}
// -->

//OPERA 7 DETECTION
<!-- //
function OperaLayout() {
if(navigator.userAgent.indexOf("Opera")!=-1)
var versionindex=navigator.userAgent.indexOf("Opera")+6
if (parseInt(navigator.userAgent.charAt(versionindex))>=8)
	{return ("<div id='content'>")}
else if (parseInt(navigator.userAgent.charAt(versionindex))>=7)
	{return ("<div id='content' style='margin-top: -100px;'>") }
else 
	{return ("<div id='content'>")}
}
// -->

// POPUP WINDOW http://forums.devarticles.com/advanced-web-development-41/don-t-force-links-to-open-in-a-new-window-6487.html
<!-- //
var newWindow = null;
function closeWin(){
if (newWindow != null){
if(!newWindow.closed)
newWindow.close();
}
}
function popUpWin(url, type, strWidth, strHeight){
	
	closeWin();
	
	if (type == "fullScreen"){
		strWidth = screen.availWidth - 10;
		strHeight = screen.availHeight - 160;
	}
	
	var tools="";
	if (type == "standard" || type == "fullScreen") tools = "resizable,toolbar=yes,location=yes,scrollbars=yes,menubar=yes,width="+strWidth+",height="+strHeight+",top=0,left=0";
	if (type == "console") tools = "resizable,toolbar=no,location=no,scrollbars=yes,width="+strWidth+",height="+strHeight+",left=0,top=0";
	newWindow = window.open(url, 'newWin', tools);
	newWindow.focus();
}
// -->


