
function init() {
  if (!document.getElementById) return
  var imgOriginSrc;
  var imgTemp = new Array();
  var imgarr = document.getElementsByTagName('img');
  for (var i = 0; i < imgarr.length; i++) {
    if (imgarr[i].getAttribute('hsrc')) {
        imgTemp[i] = new Image();
        imgTemp[i].src = imgarr[i].getAttribute('hsrc');
        imgarr[i].onmouseover = function() {
            imgOriginSrc = this.getAttribute('src');
            this.setAttribute('src',this.getAttribute('hsrc'))
        }
        imgarr[i].onmouseout = function() {
            this.setAttribute('src',imgOriginSrc)
        }
    }
  }
}

//----- 
function openInnerUrl(id,bpopup,url)
	{
	/*
	if(url==null)
		{
		var pref="http://www.citrix.fr/";

		if(bpopup==0)
			open(pref+"?id="+id);
		else if(document.layers)
			window.open(pref+ "/FrontOffice/inner_popupN4.asp?id="+id,"", "width=665,height=353,resizable=0,toolbar=no,status=no,menubar=no");
		else
			window.open(pref+ "/FrontOffice/inner_popup.asp?id="+id,"", "width=665,height=353,resizable=1,toolbar=no,status=no,menubar=no");
		return;
		}
	*/
	
	if(bpopup==2)
		{
		window.open(url,"", "width=580,height=380,resizable=1,scrollbars=yes,toolbar=no,status=no,menubar=no");
		return false;
		}

	if(bpopup==5)
		{
		window.open(url,"", "width=580,height=580,resizable=1,scrollbars=yes,toolbar=no,status=no,menubar=no");
		return false;
		}

	return true;
	}

function openBlank(url)
	{
	open(url);
	return;
	}

//--------
function openCntPopup(cnt_Id)
	{
	window.open("/popupCnt.asp?cnt_Id="+cnt_Id,"", "width=675,height=380,resizable=1,scrollbars=yes,toolbar=no,status=no,menubar=no");
	return false;
	}
//--------
function openCBAPopup(cba)
	{
	window.open("/popupCBA.asp?cba="+cba,"", "width=700,height=380,resizable=1,scrollbars=yes,toolbar=no,status=no,menubar=no");
	return false;
	}


//----- 
function openDocument(docR_Id)
	{
	return true;
	}

function openExternalUrl()
	{
	return true;
	}

//-----
function search(bAdvanced)
	{
	if(bAdvanced)
		{
		window.open("/Herramientas/search/default.asp","_self");
		return;
		}

	var swhat = escape(document.searchform.texttosearch.value);

	window.open("/Herramientas/search/default.asp?dosearch=1&swhat="+swhat,"_self");
	}

function sfonsubmit()
	{
	search(0);
	return false;
	}

//====================
function isNumber(sval)
  {
  if(!(l=sval.length)) return false;
  var strtest = "0123456789";
  var k;
  for(k=0; k<l; k++)
	  if(strtest.indexOf(sval.charAt(k))==-1) return false;
  return true;
  }

