var xmlHttp;
if (window.ActiveXObject)
xmlHttp = new ActiveXObject("Microsoft.XMLHttp");
else if (window.XMLHttpRequest)
xmlHttp = new XMLHttpRequest();
function mynextSib(node){
	var tempLast = node.parentNode.lastChild;
	if (node == tempLast)
	return null;
	var tempObj = node.nextSibling;
	while (tempObj.nodeType != 1 && tempObj.nextSibling != null)
	tempObj = tempObj.nextSibling;
	return (tempObj.nodeType == 1) ? tempObj : null;
}
function myprevSib(node){
	var tempFirst = node.parentNode.firstChild;
	if (node == tempFirst)
	return null;
	var tempObj = node.previousSibling;
	while (tempObj.nodeType != 1 && tempObj.previousSibling != null)
	tempObj = tempObj.previousSibling;
	return (tempObj.nodeType == 1) ? tempObj : null;
}
var myimages = new Array()
function myloadimage(){
	for (i = 0; i < arguments.length; i++) {
		myimages[i] = new Image()
		myimages[i].src = arguments[i]
	}
}
function newcode(code){
	codeurl=code.getAttribute("src");
	$url=codeurl+"?timestamp=" + new Date().getTime();
	var img=new Image();
	img.setAttribute("src",$url);
	code.setAttribute("src","/templates/noimage/image/working.gif");
	code.setAttribute("width","16");
	code.setAttribute("height","16");
	code.setAttribute("title","Loading ...");
	img.onload=function(){
		code.setAttribute("width","90");
		code.setAttribute("height","20");
		code.setAttribute("src",$url);
		code.setAttribute("title","Click picture to replace");
	};
	img.onerror=function(){code.setAttribute("title","Error loading picture");};
}
function mymaxlength(obj){
	var mlength=obj.getAttribute? parseInt(obj.getAttribute("maxlength")) : ""
	if (obj.getAttribute && obj.value.length>mlength){
		obj.value=obj.value.substring(0,mlength);
		alert('Restrictions on the importation of reach');
	}
}
