<!--
function findIndex(value){
	for(i=0; i < this.length; i++)
		if(this[i] == value)
			return (i);
	return (-1);
}
Array.prototype.findIndex = findIndex;

function deleteIndex(index){
	if (index == -1)
	return this;
	else if (index == 0)
		return this.slice(1);
	else if (index == (this.length - 1))
		return this.slice(0,(this.length - 1));
	else{
		tempArr1 = this.slice(0,index);
		tempArr2 = this.slice(index + 1);
		returnArr = tempArr1.concat(tempArr2);
	}
	return returnArr;
}
Array.prototype.deleteIndex = deleteIndex;

	
function findObjIndex(param,value){
	for(i=0; i < this.length; i++)
		if(this[i][param] == value)
			return (i);
	return (-1);
}
Array.prototype.findObjIndex = findObjIndex;


function hasIllegalChar(str){
	if (str.match(/[<>&#\\%+|]/)){
		return true;
	} else {
		return false;
	}
}

function trim(str){ 
	/* this code replicated in login.asp, make changes in both places. */
	str = str.replace(/^[\s]+/g,"");
	str = str.replace(/[\s]+$/g,"");
	return str;
}

function rTrim(str){
	str = str.replace(/^[\s]+/g,"");
	return str;
}

function CStr(vVariant){
	try{
		var str = new String(vVariant).toString();
		if(str == "undefined" || str == "null")
			str = "";
		}
	catch(e){str = "";}
	return str;
}

function CInt(vVariant){
	try{
		var num = 0;
		if (CStr(vVariant) != "" && !isNaN(vVariant))
			num = parseInt(vVariant);
	}
	catch(e){num = 0;}
	return num;
}

function isNumeric(vVariant){
	try {
		var num = 0;
		var numeric = false;
		if (CStr(vVariant) != "" && !isNaN(vVariant)){
			num = parseInt(vVariant);
			numeric = true;
		}
	}
	catch(e){numeric = false;}
	return numeric;
}

function BrowserData() {
	agent  = navigator.userAgent.toLowerCase();
	this.major = parseInt(navigator.appVersion);
	this.minor = parseFloat(navigator.appVersion);
		
	// detection for netscape Browsers
	this.ns    = ((agent.indexOf('mozilla')   !=   -1) && 
				 ((agent.indexOf('spoofer')   ==   -1) && 
				 (agent.indexOf('compatible') ==   -1)));
	this.ns4   = (this.ns && (this.major      ==    4));
	this.ns6   = (this.ns && (this.major      >=    5));
	this.dom = (document.getElementsByTagName && !document.all);
		
	// detection for ie Browsers
	this.ie    = (agent.indexOf("msie")       !=   -1);
	this.ie3   = (this.ie && (this.major      < 4));
	this.ie4   = (this.ie && (this.major      ==    4) && 
	             (agent.indexOf("msie 5.0")   ==   -1));
	this.ie5 = (document.getElementsByTagName && document.all);             
	this.ie50   = (this.ie && (this.major      ==    4) && 
	             (agent.indexOf("msie 5.0")   !=   -1));
	this.ie55  = (this.ie && (this.major      ==    4) && 
	             (agent.indexOf("msie 5.5")   !=   -1));
	this.ie6   = (this.ie && (agent.indexOf("msie 6.0") != -1) );
	this.ie5Mac = ((agent.indexOf("mac") != -1) && this.ie5);
	
	// detection for aol ie browsers
	this.aol = (agent.indexOf("aol") != -1);
	this.aol3 = (this.aol && this.ie3);
	this.aol4 = (this.aol && this.ie4);
	this.aol5 = (this.aol && this.ie5);

}
oBD = new BrowserData(); 
//-->