
if (top!= self) top.location.replace(self.location.href);
//if (window != top) top.location.href = location.href;

function katana(){
	
	//window.onresize = doResize;
	
	h1=document.getElementById("leftcol").offsetHeight;
	h2=document.getElementById("maincol").offsetHeight;
	(h1>h2?h=h1:h=h2);
	document.getElementById("maincol").style.height = h+"px";
	

}


function ShowPage(url)
{
	document.url=url;
}

// Opacity and Fade in script.
// Script copyright (C) 2008 http://www.cryer.co.uk/.
// Script is free to use provided this copyright header is included.
function SetOpacity(object,opacityPct)
{
  // IE.
  object.style.filter = 'alpha(opacity=' + opacityPct + ')';
  // Old mozilla and firefox
  object.style.MozOpacity = opacityPct/100;
  // Everything else.
  object.style.opacity = opacityPct/100;
}

function ChangeOpacity(id,msDuration,msStart,fromO,toO)
{
  var element=document.getElementById(id);
  var opacity = element.style.opacity * 100;
  var msNow = (new Date()).getTime();
  opacity = fromO + (toO - fromO) * (msNow - msStart) / msDuration;
  if (opacity<0) 
    SetOpacity(element,0)
  else if (opacity>100)
    SetOpacity(element,100)
  else
  {
    SetOpacity(element,opacity);
    element.timer = window.setTimeout("ChangeOpacity('" + id + "'," + msDuration + "," + msStart + "," + fromO + "," + toO + ")",1);
  }
}

function getElementChild(pParent)
{
	var lResult;
	var lChild=pParent.firstChild;
	while (lChild!=pParent.lastChild) {
		if (lChild.nodeType==1) lResult=lChild;
		lChild=lChild.nextSibling;
	}
	return lResult;
}

function FadeInImage(id,img)
{
  var a=document.getElementById(id);
  var b=a.parentNode;
  
  if (b.nodeName=="A") {
  	b=b.parentNode;
  }

  b.style.backgroundImage = 'url(' + a.src + ')';
  b.style.backgroundRepeat = 'no-repeat';
  //v1=a.style.opacity*100;
  //if (v1>0) SetOpacity(b,v1);
  
  SetOpacity(a,0);
  a.src = img;
  
  var t0 = (new Date()).getTime();
  if (a.timer) clearTimeout(a.timer);
  ChangeOpacity(id,500,t0,0,100);
}
