// JavaScript Document

var tab1 = "tab_welcome"
var tab2 = "tab_manege"
var tab3 = "tab_lessen"
var tab4 = "tab_stalling"
var tab5 = "tab_contact"


function $(elem) { 
	return document.getElementById(elem); 
}

function handleTabOn(element) { 
	$(element).className = 'tab_on';
}

function handleTabOff(element) { 
	$(element).className = 'tab_off';
}

function setCurrentTab(element) {
	$(tab1).className='tab_off';
	$(tab2).className='tab_off';
	$(tab3).className='tab_off';
	$(tab4).className='tab_off';
	$(tab5).className='tab_off';

	
	$(element).className = 'tab_on';

}


var win=null;
function NewWindow(mypage,myname,w,h,scroll,pos){
	if(pos=="random"){LeftPosition=(screen.width)?Math.floor(Math.random()*(screen.width-w)):100;TopPosition=(screen.height)?Math.floor(Math.random()*((screen.height-h)-75)):100;}
	if(pos=="center"){LeftPosition=(screen.width)?(screen.width-w)/2:100;TopPosition=(screen.height)?(screen.height-h)/2:100;}
	else if((pos!="center" && pos!="random") || pos==null){LeftPosition=0;TopPosition=20}
	settings='width='+w+',height='+h+',top='+TopPosition+',left='+LeftPosition+',scrollbars='+scroll+',location=no,directories=no,status=no,menubar=no,toolbar=no,resizable=yes';
	win=window.open(mypage,myname,settings);
}

var ldr_url  = 'images/loader.gif';

function hideLoader() {
	var oldDiv = $("overlap_div");
	oldDiv.style.display = 'none';
	$("cnt").style.display = 'block';
}
