/* Set some global variables */
//ajaxUrl = "/Vstep-Webserver/nautis/";
//ajaxUrl = "/4frank/nautis/";
ajaxUrl = "/";


/* Extend the array object to contain an inArray function */
Array.prototype.inArray = function(value){
	for (var i in this) { 
		if (typeof this[i] == 'string' && this[i].toLowerCase() === value.toLowerCase()){
			return true;
		}
	} 
	
	return false;
}


/* URL encode a string */
function urlencode(str) {
	str = str.replace(/\//g, '');
	str = str.replace(/\\/g, '');
	
	str = escape(str);
	
	str = str.replace(/\+/g, '%2B');
	str = str.replace(/%20/g, '+');
	str = str.replace(/\*/g, '%2A');
	str = str.replace(/@/g, '%40');
	
	return str;
}	


/* Display some images in lightbox */
function GroupDelegate(id){
	var objLink = document.getElementById(id);
	Lightbox.prototype.start(objLink);
}
