var nImgCnt=0;
function imgLoad(cImage){
	nImgCnt++;
	eval('oImgDecor'+nImgCnt+'=new Image();');
	eval('oImgDecor'+nImgCnt+'.src=cImage;');
}

function imgCache(eId, cImage, cImageAct){
	eval('oImg'+eId+'=new Image();');
	eval('oImg'+eId+'.src=cImage;');
	eval('oImg'+eId+'Act=new Image();');
	eval('oImg'+eId+'Act.src=cImageAct;');
}
function imgOver(eId, oImg){
	oImg.src=eval('oImg'+eId+'Act.src;');
}
function imgOut(eId, oImg){
	oImg.src=eval('oImg'+eId+'.src;');
}

function makePopup(href, target, w, h, ext){
w=(w?w:parseInt((screen.availWidth)/2))+20
h=(h?h:parseInt((screen.availHeight)/2))+30
l=parseInt((screen.availWidth-w)/2),
t=parseInt((screen.availHeight-h)/2)-10;
if (typeof(target)!="string"||(!target)) target="_blank";
window.open(href, target, 'location=no,menubar=no,resizable=no,status=no,toolbar=no,width='+w+',height='+h+',left='+l+',top='+t+(ext?','+ext:''));
}

function makePopupSBno(href, target, w, h, ext){
makePopup(href, target, w, h, "scrollbars=no"+(ext?','+ext:''))
}
function makePopupSByes(href, target, w, h, ext){
makePopup(href, target, w+20, h, "scrollbars=yes"+(ext?','+ext:''))
}
function addBookmark(url, title)
{
  if (!url) url = location.href;
  if (!title) title = document.title;
  
  //Gecko
  if ((typeof window.sidebar == "object") && (typeof window.sidebar.addPanel == "function")) window.sidebar.addPanel (title, url, "");
  //IE4+
  else if (typeof window.external == "object") window.external.AddFavorite(url, title);
  //Opera7+
  else if (window.opera && document.createElement)
  {
    var a = document.createElement('A');
    if (!a) return false; //IF Opera 6
    a.setAttribute('rel','sidebar');
    a.setAttribute('href',url);
    a.setAttribute('title',title);
    a.click();
  }
  else return false;
  
  return true;
}
