<!-- 

// Browser Object

function browserObject()
{
this.init=browserObjectInit;
}

function browserObjectInit()
{
this.isDom = (document.getElementById)? true:false;
this.isIe4 = (document.all && !this.isDom)? true:false;
this.isIe5 = (this.isDom && (navigator.appVersion.indexOf("MSIE 5")>-1 || navigator.appVersion.indexOf("MSIE 6")>-1))? true:false;
this.isNs4 = (document.layers)? true:false;
this.isNs6 = (document.createRange)? true:false;
this.isOpera = (navigator.userAgent.indexOf("Opera")>-1)? true:false;

var agt=navigator.userAgent.toLowerCase();
this.isIe     = ((agt.indexOf("msie") != -1) && (agt.indexOf("opera") == -1));
this.isIe4up  = (this.isIe && (parseInt(navigator.appVersion) >= 4));
this.isWin   = ( (agt.indexOf("win")!=-1) || (agt.indexOf("16bit")!=-1) );
}


// getStyle returns the css style of an element
function getStyle(divId, nest)
{
return document.getElementById(divId).style;
}

// getElement returns the element itself
function getElm(divId, nest)
{
return document.getElementById(divId);
}


/*
---------------------------------
css property get and set function
---------------------------------
*/

// gets any CSS property value
function getProp(divId, prop)
{
style=getStyle(divId);
str="value=style."+prop;
eval(str);
return value;
}

// sets any CSS property value
function setProp(divId, prop, value)
{
style=getStyle(divId);
str="style."+prop+"='"+value+"'";
eval(str);
}

// Change the class of an element
function setClass(divId, className)
{
obj=getElm(divId);
obj.className=className;
}

/*
--------------------
visibility functions
--------------------
*/

function show(divId, nest)
{
objStyle=getStyle(divId, nest);
objStyle.visibility="visible";
}

function hide(divId, nest) 
{
objStyle=getStyle(divId, nest);
objStyle.visibility="hidden";
}


/*
---------------------
positioning functions
---------------------
*/

// Moves the div to the absolute coordinates (x, y)
function moveTo(divId, x, y, nest)
{
objStyle=getStyle(divId, nest);
objStyle.left=x+"px";
objStyle.top=y+"px";
}

/* Date functions */
function getToday()
	{
	var months = new Array ("January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December");
	var today=new Date();
	var day=today.getDate();
	var mm=today.getMonth();
	var yy=today.getYear();
	var year=(yy < 1900)? yy+1900:yy;
	var txt_date=day+" "+months[mm]+" "+year;
	return txt_date;
	}
	
/* Submit search */
function validate_search()
{
	if (document.form_search.keyword.value=="")
		return false;
	else
		document.form_search.submit();
}


// display email page popup
function emailPagePopup()
{
	width = 420;
	height = 490;
	x = (640 - width)/2, y = (480 - height)/2;
    if (screen) 
	{
        y = (screen.availHeight - height)/2;
        x = (screen.availWidth - width)/2;
    }
    window.open("emailpage.php?url="+document.location.href+"&title="+document.title,'newWin','width='+width+',height='+height+',screenX='+x+',screenY='+y+',top='+y+',left='+x);
	return false;
}

// get the given query variable value
function getQueryVariable(variable) 
{
	var query = window.location.search.substring(1);
	var vars = query.split("&");
	for (var i=0;i<vars.length;i++) 
	{
		var pair = vars[i].split("=");
		if (pair[0] == variable) 
		{
			return pair[1];
		}
	} 
	return 0;
}

// reload the page in "printer friendly" mode
function printerFriendlyPage()
{
	var url = document.location.href;
	if (url.indexOf("?") != -1)
		document.location.href = url+"&print=yes";
	else
		document.location.href = url+"?print=yes";
}

var isPrinterFriendlyPage=false;
if (getQueryVariable("print")=="yes") isPrinterFriendlyPage=true;

// -->
