
var DHTML=0, DOM=0, MS=0, NS=0, OP=0;

function DHTML_init(){
	if(window.opera){OP=1;}
	if(document.getElementById){DHTML=1;DOM=1;}
	if(document.all && !OP){DHTML=1;MS=1;}
	if(window.netscape && window.screen && !DOM && !OP){DHTML=1;NS=1;}
}

function oID(ID){
	if(DOM){if(typeof document.getElementById(ID)=='object')return(document.getElementById(ID)); else return(void(0));
	}else if(MS){if(typeof document.all[ID]=='object')return(document.all[ID]);else return(void(0));
	}else if(NS){if(typeof document[ID]=='object')return(document[ID]);else return(void(0));}
}
function oName(p2){
	if(DOM){if(typeof document.getElementsByName(p2)=="object")return(document.getElementsByName(p2)[0]);	else return(void(0));
	}else if(MS){if(typeof document[p2]=="object")return(document[p2]);	else return(void(0));
	}else if(NS){if(typeof document[p2]=="object")return(document[p2]);	else return(void(0));}
}
DHTML_init();

function myOnload(){
	oWin.init();
	if(oWin.Height <= (oID("MenuMain").offsetHeight + 200)){
		oID("MenuLeft").style.position="absolute";
		oID("MenuLeft").style.left="0px";
	}else{
		oID("MenuLeft").style.position="fixed";
		oID("MenuLeft").style.left="50px";
	}
	if((oID("MenuMain").offsetHeight + 200) >= oID("contentMain").offsetHeight ){
		oID("contentMain").style.height=((oID("MenuMain").offsetHeight)+ 40) +"px";
	}
}

window.onresize = myOnload;

var oWin=new oWIN();

var curMenu="";
var curUMenu="";
var oldUMenu="";
function hide(ID){
	oID(ID).style.visibility="hidden";
}
function show(ID){
	oID(ID).style.visibility="visible";
}
function hideD(ID){
	oID(ID).style.display="none";
}
function showD(ID){
	oID(ID).style.display="block";
}
function hideIF(Name){
	oID(Name).style.visibility="hidden";
}
function showIF(Name){
	oID(Name).style.visibility="visible";
}
function LoadIFrame(mytarget,file){
	oID(mytarget).src=file;
}

function mouseover(me){
	me.firstChild.nextSibling.style.display="block";
}
function mouseout(me){
	me.firstChild.nextSibling.style.display="none";
}
function mouseclick(me){
//	me.firstChild.nextSibling.style.display="none";
}
function oWIN(){
	this.BodyName='BodyID';
	this.Width=0;
	this.Height=0;
	this.init=_oWIN_init;
	this.setName=_oWIN_SetName;
	this.resize2min=_oWIN_resize2min;
}
function _oWIN_SetName(BodyName){
	this.BodyName=BodyName;
}
function _oWIN_init(){
	if((document.all)&& (OP==0)){
		this.Width=oID(this.BodyName).offsetWidth;
		this.Height=oID(this.BodyName).offsetHeight;
	}else{
		this.Width=window.innerWidth;
		this.Height=window.innerHeight;
	}
	if(typeof this.Width=="string")this.Width=parseInt(this.Width);
	if(typeof this.Height=="string")this.Height=parseInt(this.Height);
}

function _oWIN_resize2min(minWidth,minHeight){
	if(this.Width < minWidth){
		window.resizeBy(minWidth-this.Width,0);
	}
	if(this.Height < minHeight){
		window.resizeBy(0,minHeight-this.Height);
	}
	this.init();
}


function Scroll(){
//	this.stepCont=360;
	this.stepCont=1;
	this.scrollingdown=false;
	this.scrollingup=false;
	this.contHeight;
	this.actPos=0;
	this.init=_scroll_init;
	this.hide=_scroll_hide;
	this.check=_scroll_check;
//	this.scrollIF=scroll;
	this.contHeight=360;
	this.mode="auto";
}

function _scroll_hide(){
		hide('scrlDown');
		hide('scrlUp');
}

function _scroll_init(){
	this.mode="auto";
	this.actPos=0;
	oScroll.contHeight=contHeight;
}

function _scroll_check(){
	if(this.contHeight > ((this.actPos*this.stepCont)+this.stepCont)+20){
		if(this.mode=="auto"){
			showD('scrlDown');
		}
	}else{
		oScroll.scrollingdown=false;
		hideD('scrlDown');
	}
	if(this.actPos >= 1){
		if(this.mode=="auto")showD('scrlUp');
	}else{
		oScroll.scrollingup=false;
		hideD('scrlUp');
	}
}

function ScrollUp(){
	oScroll.scrollingup=true;
	ScrollUpMore()
}
function ScrollUpMore(){
	if(oScroll.actPos>0){
		oScroll.actPos=oScroll.actPos-1;
		scroll(oScroll.actPos*oScroll.stepCont);
	}
	oScroll.check();
}

function ScrollDown(){
	oScroll.scrollingdown=true;
	ScrollDownMore()
}

function ScrollDownMore(){
	if(oScroll.contHeight>(oScroll.actPos*oScroll.stepCont)+oScroll.stepCont){
		oScroll.actPos=oScroll.actPos+1;
		scroll(oScroll.actPos*oScroll.stepCont);
	}
	oScroll.check();
}

function ScrollUpOut(){
	oScroll.scrollingup=false;
}
function ScrollDownOut(){
	oScroll.scrollingdown=false;
}

function ScrollDown_(){
	if(oScroll.contHeight>(oScroll.actPos*oScroll.stepCont)+oScroll.stepCont){
		oScroll.actPos=oScroll.actPos+1;
		scroll(oScroll.actPos*oScroll.stepCont);
	}
	oScroll.check();
}

var oScroll=new Scroll();

function scroll(y){
	if(oScroll.scrollingdown===true){
		oID("contentMain").style.top=(oScroll.actPos)*(-1);
		window.setTimeout("ScrollDownMore()",10)
	}
	if(oScroll.scrollingup===true){
		oID("contentMain").style.top=(oScroll.actPos)*(-1);
		window.setTimeout("ScrollUpMore()",10)
	}
}
function mlncdm(maddress,mdomain){
	mailaddr=maddress+"@"+mdomain;
	location.href="mailto:"+mailaddr.replace(/ /g,".");
}
function mlncd(maddress,mdomain,what){
	mailaddr=maddress+"@"+mdomain;
	return mailaddr.replace(/ /g,"."); 
}

