/* browser snifer */
dom=(document.getElementById)?1:0;
ns6=(dom&&!document.all)?1:0;
if(!dom) alert('This site is not compatible with your browser!');
/* window positioning */
//winw=(ns6)? window.innerWidth:document.body.offsetWidth;
//if(winw<1000)	document.write('<style>div.content{left:500px;}</style>')
//onresize=function(){self.location.reload()}

/* popup window managing */
popupWin=0;
popupOpen=function(file,w,h) 
{	this.popupW=w||610;
	this.popupH=h||510;
	this.popupX=parseInt(((ns6)? window.innerWidth:document.body.offsetWidth)/2-this.popupW/2)||100;			
	this.popupY=parseInt(((ns6)? window.innerHeight:document.body.offsetHeight)/2-this.popupH/2)||50;
	if(this.popupWin)
	{	this.popupWin.close();
		this.popupWin=0;
	} 
	this.popupWin=window.open(file,'popupWindow','left='+this.popupX+',top='+this.popupY+',width='+this.popupW+',height='+this.popupH+',scrollbars=0');
	this.popupWin.focus();
};

/*menu expanding functionallity - not general*/
var AlphaStep=3;
var RevealStep=15;
var menuIdHeight=0;
var stepRevealIn=0;
var menuOpen=0;
var active=0; 
//)Netscape: clip:rect(left,top,right,bottom)
//     MSIE: clip:rect(top right bottom left) 
function RevealIn()
{	menuIdHeight=document.getElementById("menuExpan").offsetHeight;
	menuIdWidth=document.getElementById("menuExpan").offsetWidth;
	var common=document.getElementById("menuExpan");
	if(stepRevealIn<=menuIdHeight)
	{	if (ns6){}// common.style.MozOpacity+='.'+AlphaStep;
		else common.filters.alpha.opacity+=AlphaStep;
		stepRevealIn+=RevealStep;
		//alert(common.style.clip="rect(0,175,"+stepRevealIn+",0)");
		common.style.clip="rect(0,"+menuIdWidth+","+stepRevealIn+",0)";
		
		setTimeout("RevealIn()",2);
	}
	else
	{menuOpen=1; if (ns6){}// common.style.MozOpacity='.'+99; else common.filters.alpha.opacity=99;
	}
}

function RevealOut()
{	var common=document.getElementById("menuExpan");
	menuIdHeight=document.getElementById("menuExpan").offsetHeight;
	menuIdWidth=document.getElementById("menuExpan").offsetWidth;
	if(stepRevealIn>=0&&active==0)
	{	if (ns6){}// common.style.MozOpacity-='.'-AlphaStep;
		else common.filters.alpha.opacity-=AlphaStep;
		stepRevealIn-=RevealStep;
		//alert(stepRevealIn);
		common.style.clip="rect(0,"+menuIdWidth+","+stepRevealIn+",0)";
	
		setTimeout("RevealOut()",2);
	}
	else
	{
		if(stepRevealIn>=0){}
		else{menuOpen=0;}
	}
}
function onclk(){document.getElementById("menuExpan")}